From c5faf158a1b12ea28a9731434bad457af6c0981e Mon Sep 17 00:00:00 2001 From: Christian Costa Date: Wed, 14 Mar 2012 21:51:43 +0100 Subject: [PATCH] amstream: Get and store event for streams render completion. --- dlls/amstream/amstream.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dlls/amstream/amstream.c b/dlls/amstream/amstream.c index b7393faf7d0..afcdb593560 100644 --- a/dlls/amstream/amstream.c +++ b/dlls/amstream/amstream.c @@ -42,6 +42,7 @@ typedef struct { ULONG nbStreams; IMediaStream** pStreams; STREAM_TYPE StreamType; + OAEVENT event; } IAMMultiMediaStreamImpl; static inline IAMMultiMediaStreamImpl *impl_from_IAMMultiMediaStream(IAMMultiMediaStream *iface) @@ -257,6 +258,17 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_Initialize(IAMMultiMediaStream* if hr = CoCreateInstance(&CLSID_MediaStreamFilter, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (LPVOID*)&This->media_stream_filter); if (SUCCEEDED(hr)) IGraphBuilder_AddFilter(This->pFilterGraph, This->media_stream_filter, filternameW); + if (SUCCEEDED(hr)) + { + IMediaEventEx* media_event = NULL; + hr = IGraphBuilder_QueryInterface(This->pFilterGraph, &IID_IMediaEventEx, (void**)&media_event); + if (SUCCEEDED(hr)) + hr = IMediaEventEx_GetEventHandle(media_event, &This->event); + if (SUCCEEDED(hr)) + hr = IMediaEventEx_SetNotifyFlags(media_event, AM_MEDIAEVENT_NONOTIFY); + if (media_event) + IMediaEventEx_Release(media_event); + } } if (FAILED(hr))