How to get a list of all the dshowvideosrc devices?

BRampersad xc10254 at umbc.edu
Fri Jan 18 16:06:30 PST 2013


Hello, does the dshowvideosrc support property probing? I can't seem to get
it to work. It fails on the second assert which means that dshowvideosrc
doesn't support property probing. I am using gst 0.10.36 gstreamer.com sdk.

#include <QCoreApplication>
#include <QDebug>

#include <QGst/Init>
#include <QGst/ElementFactory>
#include <QGst/PropertyProbe>

void probeForDevices(const QGst::PropertyProbePtr & propertyProbe)
{
    QList<QGlib::Value> devices =
propertyProbe->probeAndGetValues("device");

    Q_FOREACH(const QGlib::Value & device, devices) {
        propertyProbe->setProperty("device", device);

        QString deviceName =
propertyProbe->property("device-name").toString();
        qDebug() << deviceName;
    }
}

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
    QGst::init(&argc, &argv);

    /* Print out all video sources */
    qDebug() << "Video Sources";

    QGst::ElementPtr videoSource =
QGst::ElementFactory::make("dshowvideosrc");
    QGst::PropertyProbePtr videoDevicesProbe;

    videoSource->setState(QGst::StateReady);

    videoDevicesProbe = videoSource.dynamicCast<QGst::PropertyProbe>();

    Q_ASSERT(videoDevicesProbe);
    Q_ASSERT(videoDevicesProbe->propertySupportsProbe("device"));

    probeForDevices(videoDevicesProbe);

    videoSource->setState(QGst::StateNull);

    return a.exec();
}



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/How-to-get-a-list-of-all-the-dshowvideosrc-devices-tp4658038.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list