diff options
author | Joshua M. Doe <oss@nvl.army.mil> | 2018-10-12 10:12:14 -0400 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2018-11-09 09:52:40 +0000 |
commit | e70af38d4ed837c34fb5830f6d7799b1f3f192e9 (patch) | |
tree | c50cb9000867557104343aeb1ae7e66a6c02c9cb /sys/dshowsrcwrapper | |
parent | 8f7641bf3c1d24f9d97150ffeba2ffd8f49299d6 (diff) | |
download | gstreamer-plugins-bad-e70af38d4ed837c34fb5830f6d7799b1f3f192e9.tar.gz |
dshowsrcwrapper: add get_property implementation to sources
Diffstat (limited to 'sys/dshowsrcwrapper')
-rw-r--r-- | sys/dshowsrcwrapper/gstdshowaudiosrc.cpp | 18 | ||||
-rw-r--r-- | sys/dshowsrcwrapper/gstdshowvideosrc.cpp | 18 |
2 files changed, 36 insertions, 0 deletions
diff --git a/sys/dshowsrcwrapper/gstdshowaudiosrc.cpp b/sys/dshowsrcwrapper/gstdshowaudiosrc.cpp index 29c250bbe..f7976315a 100644 --- a/sys/dshowsrcwrapper/gstdshowaudiosrc.cpp +++ b/sys/dshowsrcwrapper/gstdshowaudiosrc.cpp @@ -250,7 +250,25 @@ static void gst_dshowaudiosrc_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { + GstDshowAudioSrc *src; + g_return_if_fail (GST_IS_DSHOWAUDIOSRC (object)); + src = GST_DSHOWAUDIOSRC (object); + + switch (prop_id) { + case PROP_DEVICE: + g_value_set_string (value, src->device); + break; + case PROP_DEVICE_NAME: + g_value_set_string (value, src->device_name); + break; + case PROP_DEVICE_INDEX: + g_value_set_int (value, src->device_index); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } } static GstCaps * diff --git a/sys/dshowsrcwrapper/gstdshowvideosrc.cpp b/sys/dshowsrcwrapper/gstdshowvideosrc.cpp index c8cf511cd..691df598c 100644 --- a/sys/dshowsrcwrapper/gstdshowvideosrc.cpp +++ b/sys/dshowsrcwrapper/gstdshowvideosrc.cpp @@ -313,7 +313,25 @@ static void gst_dshowvideosrc_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) { + GstDshowVideoSrc *src; + g_return_if_fail (GST_IS_DSHOWVIDEOSRC (object)); + src = GST_DSHOWVIDEOSRC (object); + + switch (prop_id) { + case PROP_DEVICE: + g_value_set_string (value, src->device); + break; + case PROP_DEVICE_NAME: + g_value_set_string (value, src->device_name); + break; + case PROP_DEVICE_INDEX: + g_value_set_int (value, src->device_index); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } } static GstCaps * |