wasapi2: device provider stops enumerating devices early
Describe your issue
When enumerating devices with gst-device-monitor-1.0.exe Audio
, wasapi2 may list fewer devices than are actually available.
The issue was observed while there was an RDP connection to the host (gst-device-monitor was running on the physical console), so it's possible that the device causing the error is the virtual "Remote Audio" device.
Observed Behavior
See gst-device-monitor-output.txt
attachment:
- wasapi2 lists one Audio/Sink device (in addition to the default device)
- wasapi lists 3 Audio/Sink devices
Running the command with GST_DEBUG, the following is logged:
0:00:02.319693000 5812 000002274179CD50 WARN wasapi2client gstwasapi2client.cpp:160:GstWasapiDeviceActivator::ActivateCompleted: WASAPI call failed: 0x80070490, Element not found.
Setup
- Operating System: Windows 10 22H2
- Device: Computer
- GStreamer Version: 1.22.6
- Command line: gst-device-monitor-1.0.exe Audio
How reproducible is the bug?
The bug appears only after connecting to the computer via RDP, but it doesn't happen every time (it seems to depend on the ordering of the list returned by DeviceInformation.FindAllAsyncDeviceClass
).
Additional Information
See attached gst_debug.log
. The log contains message "gst_wasapi2_client_activate_async: Available device count: 5", but then it stops at the third item because GstWasapiDeviceActivator fails.