dshowsrcwrapper: add get_property implementation to sources

This commit is contained in:
Joshua M. Doe 2018-10-12 10:12:14 -04:00 committed by Nirbheek Chauhan
parent 8f7641bf3c
commit e70af38d4e
2 changed files with 36 additions and 0 deletions

View file

@ -250,7 +250,25 @@ static void
gst_dshowaudiosrc_get_property (GObject * object, guint prop_id, gst_dshowaudiosrc_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec) 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 * static GstCaps *

View file

@ -313,7 +313,25 @@ static void
gst_dshowvideosrc_get_property (GObject * object, guint prop_id, gst_dshowvideosrc_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec) 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 * static GstCaps *