windows11 gstreamer can not find any device
gst_init(&argc, &argv);
GstDeviceMonitor* monitor;
monitor = gst_device_monitor_new();
gst_device_monitor_add_filter(monitor, "Audio/Source", NULL);
gst_device_monitor_start(monitor);
GList* devices, * device;
devices = gst_device_monitor_get_devices(monitor);
//devices is NULL
but after I use gst-device-monitor-1.0.exe command ,console will show all of devices.
how to fix my code