Commit 8d9655b8 authored by Christian Costa's avatar Christian Costa Committed by Alexandre Julliard

amstream: Retrieve some interfaces needed to control the stream.

parent 4a25010c
...@@ -35,6 +35,8 @@ typedef struct { ...@@ -35,6 +35,8 @@ typedef struct {
IAMMultiMediaStream IAMMultiMediaStream_iface; IAMMultiMediaStream IAMMultiMediaStream_iface;
LONG ref; LONG ref;
IGraphBuilder* pFilterGraph; IGraphBuilder* pFilterGraph;
IMediaSeeking* media_seeking;
IMediaControl* media_control;
IPin* ipin; IPin* ipin;
ULONG nbStreams; ULONG nbStreams;
IMediaStream** pStreams; IMediaStream** pStreams;
...@@ -116,6 +118,10 @@ static ULONG WINAPI IAMMultiMediaStreamImpl_Release(IAMMultiMediaStream* iface) ...@@ -116,6 +118,10 @@ static ULONG WINAPI IAMMultiMediaStreamImpl_Release(IAMMultiMediaStream* iface)
IMediaStream_Release(This->pStreams[i]); IMediaStream_Release(This->pStreams[i]);
if (This->ipin) if (This->ipin)
IPin_Release(This->ipin); IPin_Release(This->ipin);
if (This->media_seeking)
IMediaSeeking_Release(This->media_seeking);
if (This->media_control)
IMediaControl_Release(This->media_control);
if (This->pFilterGraph) if (This->pFilterGraph)
IGraphBuilder_Release(This->pFilterGraph); IGraphBuilder_Release(This->pFilterGraph);
HeapFree(GetProcessHeap(), 0, This); HeapFree(GetProcessHeap(), 0, This);
...@@ -240,6 +246,22 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_Initialize(IAMMultiMediaStream* if ...@@ -240,6 +246,22 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_Initialize(IAMMultiMediaStream* if
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))
{ {
This->StreamType = StreamType; This->StreamType = StreamType;
hr = IGraphBuilder_QueryInterface(This->pFilterGraph, &IID_IMediaSeeking, (void**)&This->media_seeking);
if (SUCCEEDED(hr))
IGraphBuilder_QueryInterface(This->pFilterGraph, &IID_IMediaControl, (void**)&This->media_control);
}
if (FAILED(hr))
{
if (This->media_seeking)
IMediaSeeking_Release(This->media_seeking);
This->media_seeking = NULL;
if (This->media_control)
IMediaControl_Release(This->media_control);
This->media_control = NULL;
if (This->pFilterGraph)
IGraphBuilder_Release(This->pFilterGraph);
This->pFilterGraph = NULL;
} }
return hr; return 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