diff options
author | Martin Szulecki <compiz@sukimashita.com> | 2006-07-19 14:46:36 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.net> | 2006-07-19 14:46:36 +0000 |
commit | 5a274b64d1907c057cc9fe5e207164eff1f15c26 (patch) | |
tree | c9f568cb12f79b16655cda8b49e1bbcb6394ab6f /sys | |
parent | f8e63966ad133d51815d02d672706b297d6d6f8c (diff) |
sys/v4l/gstv4lelement.c: If "device-name" is requested and the device is not open, try to temporarily open it to obta...
Original commit message from CVS:
Patch by: Martin Szulecki
* sys/v4l/gstv4lelement.c: (gst_v4lelement_get_property):
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')
-rw-r--r-- | sys/v4l/gstv4lelement.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/v4l/gstv4lelement.c b/sys/v4l/gstv4lelement.c index a2585588..dc73d55b 100644 --- a/sys/v4l/gstv4lelement.c +++ b/sys/v4l/gstv4lelement.c @@ -414,8 +414,12 @@ gst_v4lelement_get_property (GObject * object, case PROP_DEVICE_NAME:{ gchar *new = NULL; - if (GST_V4L_IS_OPEN (v4lelement)) + if (GST_V4L_IS_OPEN (v4lelement)) { + new = v4lelement->vcap.name; + } else if (gst_v4l_open (v4lelement)) { new = v4lelement->vcap.name; + gst_v4l_close (v4lelement); + } g_value_set_string (value, new); break; } |