summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorSeungha Yang <seungha@centricular.com>2020-05-29 22:55:56 +0900
committerSeungha Yang <seungha@centricular.com>2020-05-29 23:01:08 +0900
commit12532cc8bba22c77778c2472ca485b9c33107644 (patch)
tree67618ac4fc752ad2710246f0a7565ce664f08efd /sys
parent00caf46e3fd5e517c0f2272b809dea949de550bf (diff)
downloadgstreamer-plugins-bad-12532cc8bba22c77778c2472ca485b9c33107644.tar.gz
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>
Diffstat (limited to 'sys')
-rw-r--r--sys/mediafoundation/mediacapturewrapper.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/sys/mediafoundation/mediacapturewrapper.cpp b/sys/mediafoundation/mediacapturewrapper.cpp
index f24de3c71..295cf3681 100644
--- a/sys/mediafoundation/mediacapturewrapper.cpp
+++ b/sys/mediafoundation/mediacapturewrapper.cpp
@@ -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;