summaryrefslogtreecommitdiffstats
path: root/sys/v4l2/gstv4l2object.c
diff options
context:
space:
mode:
authorMartin Szulecki <compiz@sukimashita.com>2006-07-19 14:36:00 +0000
committerTim-Philipp Müller <tim@centricular.net>2006-07-19 14:36:00 +0000
commit58f9de0123097217cd6eac9db4ec780290d67b0f (patch)
tree9ab7499b1e99a4e51c65ecb212ffcb7ffbf5c1be /sys/v4l2/gstv4l2object.c
parentdaab8f41933814eecd92aab4e736855847494df0 (diff)
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).
Diffstat (limited to 'sys/v4l2/gstv4l2object.c')
-rw-r--r--sys/v4l2/gstv4l2object.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/v4l2/gstv4l2object.c b/sys/v4l2/gstv4l2object.c
index 24120dd0..148ca399 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;
}