mf/session: Handle source buffering events.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2020-06-02 11:43:42 +03:00 committed by Alexandre Julliard
parent f151550e56
commit 68b5a0574c
1 changed files with 17 additions and 0 deletions

View File

@ -2867,6 +2867,23 @@ static HRESULT WINAPI session_events_callback_Invoke(IMFAsyncCallback *iface, IM
LeaveCriticalSection(&session->cs);
break;
case MEBufferingStarted:
case MEBufferingStopped:
EnterCriticalSection(&session->cs);
if (session_get_media_source(session, (IMFMediaSource *)event_source))
{
if (event_type == MEBufferingStarted)
IMFPresentationClock_Pause(session->clock);
else
IMFPresentationClock_Start(session->clock, PRESENTATION_CURRENT_POSITION);
IMFMediaEventQueue_QueueEvent(session->event_queue, event);
}
LeaveCriticalSection(&session->cs);
break;
case MENewStream:
stream = (IMFMediaStream *)value.punkVal;