Nikolay Sivov : mf/session: Forward MEQualityNotify event to the quality manager.

Alexandre Julliard julliard at winehq.org
Wed Nov 11 15:31:43 CST 2020


Module: wine
Branch: master
Commit: 3b230b58c89aaabb567f1e47ad1494a6d48803b0
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=3b230b58c89aaabb567f1e47ad1494a6d48803b0

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Wed Nov 11 16:36:51 2020 +0300

mf/session: Forward MEQualityNotify event to the quality manager.

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/mf/session.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/dlls/mf/session.c b/dlls/mf/session.c
index 5bbd47b3418..d586f1c6be9 100644
--- a/dlls/mf/session.c
+++ b/dlls/mf/session.c
@@ -2910,6 +2910,7 @@ static HRESULT WINAPI session_events_callback_Invoke(IMFAsyncCallback *iface, IM
     IMFMediaEventGenerator *event_source;
     IMFMediaEvent *event = NULL;
     MediaEventType event_type;
+    IUnknown *object = NULL;
     IMFMediaSource *source;
     IMFMediaStream *stream;
     PROPVARIANT value;
@@ -3057,6 +3058,21 @@ static HRESULT WINAPI session_events_callback_Invoke(IMFAsyncCallback *iface, IM
                     (IMFStreamSink *)event_source);
             LeaveCriticalSection(&session->cs);
 
+            break;
+        case MEQualityNotify:
+
+            if (session->quality_manager)
+            {
+                if (FAILED(IMFMediaEventGenerator_QueryInterface(event_source, &IID_IMFStreamSink, (void **)&object)))
+                    IMFMediaEventGenerator_QueryInterface(event_source, &IID_IMFTransform, (void **)&object);
+
+                if (object)
+                {
+                    IMFQualityManager_NotifyQualityEvent(session->quality_manager, object, event);
+                    IUnknown_Release(object);
+                }
+            }
+
             break;
         default:
             ;




More information about the wine-cvs mailing list