summaryrefslogtreecommitdiffstats
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
commitc8e459496b315ada563c65c0703e574b5913e849 (patch)
tree3feb043417a73bf359e9550a8516abee0e77253e
parent1001b9d7a92d63951da3c3fb27840ac0082294b5 (diff)
downloadgst-plugins-bad-c8e459496b315ada563c65c0703e574b5913e849.tar.gz
gst-plugins-bad-c8e459496b315ada563c65c0703e574b5913e849.tar.bz2
gst-plugins-bad-c8e459496b315ada563c65c0703e574b5913e849.zip
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).
-rw-r--r--ChangeLog9
-rw-r--r--sys/v4l2/gstv4l2object.c6
2 files changed, 14 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 7f086cee..b91cd22f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
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):
Really fix compilation. Apparently it's not enough to
just check the return value for errors, but we need to
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;
}