GNOME Bugzilla – Bug 577050
[winks] property probe interface needs fixing to use device-path
Last modified: 2012-09-30 11:00:09 UTC
The winks plugin was missing the property probe interface. This first implementation of the interface only returns the values for the device-name property, in other words, the list of available WDM cameras on Windows. The following functions were added: static void gst_ks_video_src_init_interfaces (GType type); static void gst_ks_video_src_probe_interface_init (GstPropertyProbeInterface * iface); static const GList *gst_ks_video_src_probe_get_properties (GstPropertyProbe * probe); static GValueArray *gst_ks_video_src_probe_get_values (GstPropertyProbe * probe, guint prop_id, const GParamSpec * pspec); static GValueArray *gst_ks_video_src_get_device_name_values (GstKsVideoSrc * self); static gboolean gst_ks_video_src_probe_needs_probe (GstPropertyProbe * probe, guint prop_id, const GParamSpec * pspec); static void gst_ks_video_src_probe_probe_property (GstPropertyProbe * probe, guint prop_id, const GParamSpec * pspec);
Created attachment 131541 [details] [review] Patch containing the changes made to gstksvideosrc.c and h
This patch doesn't look correct. _probe_property() should get/update the list of devices while _get_values() should only return them.
Ok, thanks for looking at this patch. I'll correct it following your comment.
Looks like something along these lines has been committed by oleavr: http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=700f70e7a5a6ae6eed5ea6026ab5901a4c05aff1 but it doesn't look entirely correct (the interface is really awful, no doubt): "device-name" is by convention a read-only property that will return a human-readable string for the device selected via some other property (usually a "device" property, here maybe "device-path" and/or "device-index"). This is to work around the limitation of the property probe interface that it can only return one value per probe, and not a set of values such as device + device name. So unless devices are primarily selected via the "device-name" property, this looks bogus, and it should be some other property that's probable.
(In reply to comment #4) > Looks like something along these lines has been committed by oleavr: > > http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=700f70e7a5a6ae6eed5ea6026ab5901a4c05aff1 > > but it doesn't look entirely correct (the interface is really awful, no doubt): > "device-name" is by convention a read-only property that will return a > human-readable string for the device selected via some other property (usually > a "device" property, here maybe "device-path" and/or "device-index"). This is > to work around the limitation of the property probe interface that it can only > return one value per probe, and not a set of values such as device + device > name. > > So unless devices are primarily selected via the "device-name" property, this > looks bogus, and it should be some other property that's probable. Spot on. The right thing to do here would be to use "device-path", as it is the only unambiguous way to specify a device. So the current implementation is indeed horribly broken. I'll fix this.
Hello guys. Thanks for picking up this one! I created the patch a while ago, but it was just a quick hack. Now I'm very busy with other things (gstreamer-java, etc) so it will be great if Ole Andre finish this functionality the way it should be.
Hello, is anyone currently maintaining the winks plugin?
Doesn't look like Ole André or anyone else will be fixing this any time soon. Ole André: are you still interested in fixing this "horribly broken" code up? :) Setting to NEEDINFO for response from Ole André. If no one is picking this up, we may just as well WONTFIX it or OBSOLETE it, as the property probe interface has been removed in 0.11 anyway, and there's no replacement so far.
I'd be willing to maintain the winks plugin if no one else is up to the tak, and continues to be the most reliable capture source on windows in my projects (as it has been so far). The disappearance of the probe interface from gsteamer is what worries me most at this point, tough.
Andres: we don't really have specific people maintaining certain plugins. Great to hear you're willing to help out here though. There will be a better probing interface at some point though, it just hasn't been designed/written yet.
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for. Thanks!