mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-16 13:26:36 +00:00
wasapi2: Increase rank to primary + 1
wasapi2 plugin should be preferred than old wasapi plugin if available because: * wasapi2 supports automatic stream routing, and it's highly recommended feature for application by MS. See also https://docs.microsoft.com/en-us/windows/win32/coreaudio/automatic-stream-routing * This implementation must be various COM threading issue free by design since wasapi2 plugin spawns a new dedicated COM thread and all COM objects' life-cycles are managed correctly. There are unsolved COM issues around old wasapi plugin. Such issues are very tricky to be solved unless old wasapi plugin's threading model is re-designed. Note that, in case of UWP, wasapi2 plugin's rank is primary + 1 already Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2314>
This commit is contained in:
parent
152813e71d
commit
b1dd20d57a
1 changed files with 1 additions and 5 deletions
|
@ -41,7 +41,7 @@ plugin_deinit (gpointer data)
|
||||||
static gboolean
|
static gboolean
|
||||||
plugin_init (GstPlugin * plugin)
|
plugin_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
GstRank rank = GST_RANK_SECONDARY;
|
GstRank rank = GST_RANK_PRIMARY + 1;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -55,10 +55,6 @@ plugin_init (GstPlugin * plugin)
|
||||||
GST_WARNING ("MFStartup failure, hr: 0x%x", hr);
|
GST_WARNING ("MFStartup failure, hr: 0x%x", hr);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
|
|
||||||
/* If we are building for UWP, wasapi2 plugin should have the highest rank */
|
|
||||||
rank = GST_RANK_PRIMARY + 1;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY_INIT (gst_wasapi2_debug, "wasapi2", 0, "wasapi2");
|
GST_DEBUG_CATEGORY_INIT (gst_wasapi2_debug, "wasapi2", 0, "wasapi2");
|
||||||
GST_DEBUG_CATEGORY_INIT (gst_wasapi2_client_debug, "wasapi2client",
|
GST_DEBUG_CATEGORY_INIT (gst_wasapi2_client_debug, "wasapi2client",
|
||||||
|
|
Loading…
Reference in a new issue