wasapi2sink - Could not open resource for writing
Nirbheek Chauhan
nirbheek.chauhan at gmail.com
Wed Apr 6 07:52:24 UTC 2022
Hi Jonas,
Ideally you should use the GstDeviceMonitor API for discovering
devices and creating elements that use those devices. That will always
do the right thing.
https://gstreamer.freedesktop.org/documentation/gstreamer/gstdevicemonitor.html?gi-language=c
https://gstreamer.freedesktop.org/documentation/gstreamer/gstdevice.html?gi-language=c#gst_device_create_element
You can test this by running:
gst-device-monitor-1.0 Audio/Sink
Here is the source code for that:
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/main/subprojects/gst-plugins-base/tools/gst-device-monitor.c
Cheers,
Nirbheek
On Wed, Apr 6, 2022 at 4:15 AM Jonas Kvinge via gstreamer-devel
<gstreamer-devel at lists.freedesktop.org> wrote:
>
> Hi,
>
> When using an audio playbin with wasapi2sink on Windows 11 and setting
> the audio device I'm getting the following error :
>
> Domain: 2662 Code: 6 Error: "Could not open resource for writing."
> Debug: "../sys/wasapi2/gstwasapi2ringbuffer.cpp(324):
> gst_wasapi2_ring_buffer_post_open_error ():
> /GstBin:audiobin/GstWasapi2Sink:pipeline-3-wasapi2sink:\nFailed to open
> device"
>
> The same devices works fine with wasapisink.
>
> Example device is: {0.0.0.00000000}.{82631c85-c597-497e-b082-2f80df4461e1}
>
> I get this using CLSID_MMDeviceEnumerator
>
> Do you need to set the device differently with wasapi2sink?
>
> Jonas
>
>
More information about the gstreamer-devel
mailing list