mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-08 18:39:54 +00:00
mediafoundation: Use core dispatcher of current view instead of main view
Main view might be hidden depending on application's view tree. In that case, ICoreApplication object doesn't return get_MainView() method Note that nothing about this behavior was documented by Microsoft https://docs.microsoft.com/en-us/uwp/api/windows.applicationmodel.core.coreapplication.mainview Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1310>
This commit is contained in:
parent
00caf46e3f
commit
12532cc8bb
1 changed files with 1 additions and 6 deletions
|
@ -940,13 +940,8 @@ MediaCaptureWrapper::findCoreDispatcher()
|
|||
if (!gst_mf_result(hr))
|
||||
return;
|
||||
|
||||
ComPtr<ICoreImmersiveApplication> core_immersive_app;
|
||||
hr = core_app.As(&core_immersive_app);
|
||||
if (!gst_mf_result(hr))
|
||||
return;
|
||||
|
||||
ComPtr<ICoreApplicationView> core_app_view;
|
||||
hr = core_immersive_app->get_MainView (&core_app_view);
|
||||
hr = core_app->GetCurrentView (&core_app_view);
|
||||
if (!gst_mf_result(hr))
|
||||
return;
|
||||
|
||||
|
|
Loading…
Reference in a new issue