Nikolay Sivov : mf/evr: Implement OnClockSetRate().

Alexandre Julliard julliard at winehq.org
Mon Oct 26 16:59:42 CDT 2020


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

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Mon Oct 26 17:20:23 2020 +0300

mf/evr: Implement OnClockSetRate().

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

---

 dlls/mf/evr.c | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/dlls/mf/evr.c b/dlls/mf/evr.c
index 1b18e1c07a3..e408b204304 100644
--- a/dlls/mf/evr.c
+++ b/dlls/mf/evr.c
@@ -1499,9 +1499,23 @@ static HRESULT WINAPI video_renderer_clock_sink_OnClockRestart(IMFClockStateSink
 
 static HRESULT WINAPI video_renderer_clock_sink_OnClockSetRate(IMFClockStateSink *iface, MFTIME systime, float rate)
 {
-    FIXME("%p, %s, %f.\n", iface, debugstr_time(systime), rate);
+    struct video_renderer *renderer = impl_from_IMFClockStateSink(iface);
+    IMFClockStateSink *sink;
 
-    return E_NOTIMPL;
+    TRACE("%p, %s, %f.\n", iface, debugstr_time(systime), rate);
+
+    EnterCriticalSection(&renderer->cs);
+
+    IMFVideoPresenter_OnClockSetRate(renderer->presenter, systime, rate);
+    if (SUCCEEDED(IMFTransform_QueryInterface(renderer->mixer, &IID_IMFClockStateSink, (void **)&sink)))
+    {
+        IMFClockStateSink_OnClockSetRate(sink, systime, rate);
+        IMFClockStateSink_Release(sink);
+    }
+
+    LeaveCriticalSection(&renderer->cs);
+
+    return S_OK;
 }
 
 static const IMFClockStateSinkVtbl video_renderer_clock_sink_vtbl =




More information about the wine-cvs mailing list