From 5a274b64d1907c057cc9fe5e207164eff1f15c26 Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Wed, 19 Jul 2006 14:46:36 +0000 Subject: [PATCH] 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). --- ChangeLog | 9 +++++++++ sys/v4l/gstv4lelement.c | 6 +++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ab76b1c01c..8ede002228 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2006-07-19 Tim-Philipp Müller + + 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). + 2006-07-19 Tim-Philipp Müller * gst-libs/gst/tag/gstid3tag.c: diff --git a/sys/v4l/gstv4lelement.c b/sys/v4l/gstv4lelement.c index a2585588bc..dc73d55bb0 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; }