[gst-devel] Enumering capture devices?

Julien Isorce julien.isorce at gmail.com
Thu Feb 11 10:41:29 CET 2010


Hi,


Something like that:

#include <gst/interfaces/propertyprobe.h>

GstElement* videodevicesrc = create_element("dshowvideosrc", NULL);
GstPropertyProbe* probe = GST_PROPERTY_PROBE (videodevicesrc);
GValueArray* va = gst_property_probe_get_values_name (probe, "device-name");
for(guint i=0; i < va->n_values; ++i) {
    GValue* v = g_value_array_get_nth(va, i);
    g_print ("one more device: %s\n", g_value_get_string(v));
}
gst_element_set_state (videodevicesrc, GST_STATE_NULL);
gst_object_unref(GST_OBJECT (videodevicesrc));


2010/2/10 Francis Rammeloo <francis.rammeloo at gmail.com>

> I am using the directshowsrc for capturing a camera source. If there
> is only one camera it works out of the box without requiring me to
> specify a device-name. However when multiple cameras are connected
> then I need some way of enumerating the device names. Does GStreamer
> provide such a mechanism (similar to DirectShow's System Device
> Enumerator)?
>
>
> Grts,
> Francis
>
>
> ------------------------------------------------------------------------------
> SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
> http://p.sf.net/sfu/solaris-dev2dev
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20100211/530fe02d/attachment.htm>


More information about the gstreamer-devel mailing list