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:
Martin Szulecki 2006-07-19 14:36:00 +00:00 committed by Tim-Philipp Müller
parent daab8f4193
commit 58f9de0123

View file

@ -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;
}