Commit c5faf158 authored by Christian Costa's avatar Christian Costa Committed by Alexandre Julliard

amstream: Get and store event for streams render completion.

parent c6c44723
...@@ -42,6 +42,7 @@ typedef struct { ...@@ -42,6 +42,7 @@ typedef struct {
ULONG nbStreams; ULONG nbStreams;
IMediaStream** pStreams; IMediaStream** pStreams;
STREAM_TYPE StreamType; STREAM_TYPE StreamType;
OAEVENT event;
} IAMMultiMediaStreamImpl; } IAMMultiMediaStreamImpl;
static inline IAMMultiMediaStreamImpl *impl_from_IAMMultiMediaStream(IAMMultiMediaStream *iface) static inline IAMMultiMediaStreamImpl *impl_from_IAMMultiMediaStream(IAMMultiMediaStream *iface)
...@@ -257,6 +258,17 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_Initialize(IAMMultiMediaStream* if ...@@ -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); hr = CoCreateInstance(&CLSID_MediaStreamFilter, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (LPVOID*)&This->media_stream_filter);
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))
IGraphBuilder_AddFilter(This->pFilterGraph, This->media_stream_filter, filternameW); 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)) if (FAILED(hr))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment