mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-02 09:03:38 +00:00
amstream: Handle AMMSF_RENDERALLSTREAMS in IAMMultiMediaStream::OpenFile().
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com> Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
5514dbc293
commit
3319526fda
|
@ -471,9 +471,12 @@ static HRESULT WINAPI multimedia_stream_OpenFile(IAMMultiMediaStream *iface,
|
|||
|
||||
if (SUCCEEDED(ret = IGraphBuilder_QueryInterface(This->graph, &IID_IFilterGraph2, (void **)&graph)))
|
||||
{
|
||||
ret = IFilterGraph2_RenderEx(graph, This->ipin, AM_RENDEREX_RENDERTOEXISTINGRENDERERS, NULL);
|
||||
DWORD renderflags = (flags & AMMSF_RENDERALLSTREAMS) ? 0 : AM_RENDEREX_RENDERTOEXISTINGRENDERERS;
|
||||
|
||||
ret = IFilterGraph2_RenderEx(graph, This->ipin, renderflags, NULL);
|
||||
if (ret == VFW_E_CANNOT_RENDER) ret = VFW_E_CANNOT_CONNECT;
|
||||
else if (ret == VFW_S_PARTIAL_RENDER) ret = S_OK;
|
||||
|
||||
IFilterGraph2_Release(graph);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -451,6 +451,50 @@ static void test_openfile(const WCHAR *test_avi_path)
|
|||
ref = IAMMultiMediaStream_Release(mmstream);
|
||||
ok(!ref, "Got outstanding refcount %d.\n", ref);
|
||||
|
||||
mmstream = create_ammultimediastream();
|
||||
|
||||
hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &graph);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
ok(!graph, "Expected NULL graph.\n");
|
||||
|
||||
hr = IAMMultiMediaStream_GetFilter(mmstream, &filter);
|
||||
ok(!!filter, "Expected non-NULL filter.\n");
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
||||
check_interface(filter, &IID_IMediaSeeking, FALSE);
|
||||
|
||||
hr = IAMMultiMediaStream_OpenFile(mmstream, test_avi_path, AMMSF_RENDERALLSTREAMS);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
||||
check_interface(filter, &IID_IMediaSeeking, FALSE);
|
||||
|
||||
hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &graph);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
ok(!!graph, "Expected non-NULL graph.\n");
|
||||
|
||||
hr = IGraphBuilder_QueryInterface(graph, &IID_IMediaFilter, (void **)&media_filter);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
||||
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
||||
clock = NULL;
|
||||
IMediaFilter_GetSyncSource(media_filter, &clock);
|
||||
ok(!!clock, "Expected non-NULL clock.\n");
|
||||
|
||||
hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_STOP);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
||||
ref = IAMMultiMediaStream_Release(mmstream);
|
||||
ok(!ref, "Got outstanding refcount %d.\n", ref);
|
||||
IMediaFilter_Release(media_filter);
|
||||
ref = IGraphBuilder_Release(graph);
|
||||
ok(!ref, "Got outstanding refcount %d.\n", ref);
|
||||
ref = IMediaStreamFilter_Release(filter);
|
||||
ok(!ref, "Got outstanding refcount %d.\n", ref);
|
||||
ref = IReferenceClock_Release(clock);
|
||||
ok(!ref, "Got outstanding refcount %d.\n", ref);
|
||||
|
||||
mmstream = create_ammultimediastream();
|
||||
hr = IAMMultiMediaStream_GetFilterGraph(mmstream, &graph);
|
||||
ok(hr == S_OK, "Got hr %#x.\n", hr);
|
||||
|
|
Loading…
Reference in a new issue