mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
dshowsrcwrapper: add get_property implementation to sources
This commit is contained in:
parent
8f7641bf3c
commit
e70af38d4e
2 changed files with 36 additions and 0 deletions
|
@ -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 *
|
||||
|
|
|
@ -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 *
|
||||
|
|
Loading…
Reference in a new issue