Commit 58f9de01 authored by Martin Szulecki's avatar Martin Szulecki Committed by Tim-Philipp Müller

sys/v4l2/gstv4l2object.c: If "device-name" is requested and the device is not...

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).
parent daab8f41
......@@ -406,8 +406,12 @@ gst_v4l2_object_get_property_helper (GstV4l2Object * v4l2object,
{
gchar *new = NULL;
if (GST_V4L2_IS_OPEN (v4l2object))
if (GST_V4L2_IS_OPEN (v4l2object)) {
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);
break;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment