Module: wine Branch: master Commit: c5faf158a1b12ea28a9731434bad457af6c0981e URL: http://source.winehq.org/git/wine.git/?a=commit;h=c5faf158a1b12ea28a9731434b...
Author: Christian Costa titan.costa@gmail.com Date: Wed Mar 14 21:51:43 2012 +0100
amstream: Get and store event for streams render completion.
---
dlls/amstream/amstream.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/dlls/amstream/amstream.c b/dlls/amstream/amstream.c index b7393fa..afcdb59 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))