diff --git a/ChangeLog b/ChangeLog index 7f086cee30..b91cd22f46 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2006-07-19 Tim-Philipp Müller + + 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). + 2006-07-19 Tim-Philipp Müller * gst/nsf/nsf.c: (nsf_load): diff --git a/sys/v4l2/gstv4l2object.c b/sys/v4l2/gstv4l2object.c index 24120dd0fa..148ca399fe 100644 --- a/sys/v4l2/gstv4l2object.c +++ b/sys/v4l2/gstv4l2object.c @@ -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; }