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:
parent
963dda3482
commit
733f5b2851
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user