gst_device_monitor_get_devices() failed in Win11

张欣 seanzhangxinsh at gmail.com
Thu Mar 16 16:31:02 UTC 2023


Hi,
I want to get videosrc device list from my win11 laptop programmatically,
the code is like:
GstDeviceMonitor *monitor = gst_device_monitor_new();
    if (!monitor) {
        printf("monitor is null\n");
    }

    auto caps = gst_caps_new_empty_simple("video/x-raw");
    if (!caps) {
        printf("caps is null\n");
    }
    gst_device_monitor_add_filter(monitor, "Video/Source", caps);
    gst_caps_unref(caps);
    GList *devs = gst_device_monitor_get_devices(monitor);
But the gst_device_monitor_get_devices() returns null. GST version is 1.22
and GST log is:

0:00:00.009809000 26332 0000023D789A22D0 WARN           devicemonitor
gstdevicemonitor.c:527:gst_device_monitor_start:<devicemonitor0> No
providers match the current filters

The same code works in a Mac book pro and a win10 laptop. I did not try
other win11 computers. I tried the gat-device-monitor.exe on the same
laptop and it can list all devices.
Any suggestions?

Thanks,
Sean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230317/9b54f3d8/attachment.htm>


More information about the gstreamer-devel mailing list