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 1001b9d7a9
commit c8e459496b
2 changed files with 14 additions and 1 deletions

View file

@ -1,3 +1,12 @@
2006-07-19 Tim-Philipp Müller <tim at centricular dot net>
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 <tim at centricular dot net>
* gst/nsf/nsf.c: (nsf_load):

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