mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
sys/v4l2/gstv4l2object.c: If "device-name" is requested and the device is not open, try to temporarily open it to obt...
Original commit message from CVS: Patch by: Martin Szulecki * sys/v4l2/gstv4l2object.c: (gst_v4l2_object_get_property_helper): If "device-name" is requested and the device is not open, try to temporarily open it to obtain this information (#342494).
This commit is contained in:
parent
daab8f4193
commit
58f9de0123
1 changed files with 5 additions and 1 deletions
|
@ -406,8 +406,12 @@ gst_v4l2_object_get_property_helper (GstV4l2Object * v4l2object,
|
||||||
{
|
{
|
||||||
gchar *new = NULL;
|
gchar *new = NULL;
|
||||||
|
|
||||||
if (GST_V4L2_IS_OPEN (v4l2object))
|
if (GST_V4L2_IS_OPEN (v4l2object)) {
|
||||||
new = (gchar *) v4l2object->vcap.card;
|
new = (gchar *) v4l2object->vcap.card;
|
||||||
|
} else if (gst_v4l2_open (v4l2object)) {
|
||||||
|
new = (gchar *) v4l2object->vcap.card;
|
||||||
|
gst_v4l2_close (v4l2object);
|
||||||
|
}
|
||||||
g_value_set_string (value, new);
|
g_value_set_string (value, new);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue