wasapi: Move to CoInitializeEx for COM initialization

CoInitialize is not allowed when targeting UWP and causes a Windows
Application Certification Kit (WACK) error.
This commit is contained in:
Nirbheek Chauhan 2019-08-13 22:54:42 +05:30 committed by Nirbheek Chauhan
parent 963dda3482
commit 733f5b2851
3 changed files with 5 additions and 5 deletions

View file

@ -48,7 +48,7 @@ gst_wasapi_device_provider_class_init (GstWasapiDeviceProviderClass * klass)
static void
gst_wasapi_device_provider_init (GstWasapiDeviceProvider * provider)
{
CoInitialize (NULL);
CoInitializeEx (NULL, COINIT_MULTITHREADED);
}
static void

View file

@ -177,7 +177,7 @@ gst_wasapi_sink_init (GstWasapiSink * self)
self->event_handle = CreateEvent (NULL, FALSE, FALSE, NULL);
self->client_needs_restart = FALSE;
CoInitialize (NULL);
CoInitializeEx (NULL, COINIT_MULTITHREADED);
}
static void
@ -475,7 +475,7 @@ gst_wasapi_sink_prepare (GstAudioSink * asink, GstAudioRingBufferSpec * spec)
guint bpf, rate, devicep_frames;
HRESULT hr;
CoInitialize (NULL);
CoInitializeEx (NULL, COINIT_MULTITHREADED);
if (gst_wasapi_sink_can_audioclient3 (self)) {
if (!gst_wasapi_util_initialize_audioclient3 (GST_ELEMENT (self), spec,

View file

@ -191,7 +191,7 @@ gst_wasapi_src_init (GstWasapiSrc * self)
self->event_handle = CreateEvent (NULL, FALSE, FALSE, NULL);
self->client_needs_restart = FALSE;
CoInitialize (NULL);
CoInitializeEx (NULL, COINIT_MULTITHREADED);
}
static void
@ -444,7 +444,7 @@ gst_wasapi_src_prepare (GstAudioSrc * asrc, GstAudioRingBufferSpec * spec)
guint bpf, rate, devicep_frames, buffer_frames;
HRESULT hr;
CoInitialize (NULL);
CoInitializeEx (NULL, COINIT_MULTITHREADED);
if (gst_wasapi_src_can_audioclient3 (self)) {
if (!gst_wasapi_util_initialize_audioclient3 (GST_ELEMENT (self), spec,