Zebediah Figura : quartz/filtergraph: Don' t require IAMFilterMiscFlags when performing seek operations.
Alexandre Julliard
julliard at winehq.org
Mon May 20 15:50:47 CDT 2019
Module: wine
Branch: master
Commit: 474295e34edc7554bcc0360b4f845e867cad4826
URL: https://source.winehq.org/git/wine.git/?a=commit;h=474295e34edc7554bcc0360b4f845e867cad4826
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Sat May 18 21:38:50 2019 -0500
quartz/filtergraph: Don't require IAMFilterMiscFlags when performing seek operations.
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/quartz/filtergraph.c | 9 ------
dlls/quartz/tests/filtergraph.c | 62 ++++++++++++++++++++---------------------
2 files changed, 31 insertions(+), 40 deletions(-)
diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c
index 02707b4..60cc368 100644
--- a/dlls/quartz/filtergraph.c
+++ b/dlls/quartz/filtergraph.c
@@ -2319,15 +2319,6 @@ static HRESULT all_renderers_seek(IFilterGraphImpl *This, fnFoundSeek FoundSeek,
LIST_FOR_EACH_ENTRY(filter, &This->filters, struct filter, entry)
{
IMediaSeeking *seek = NULL;
- IAMFilterMiscFlags *flags = NULL;
- ULONG filterflags;
- IBaseFilter_QueryInterface(filter->filter, &IID_IAMFilterMiscFlags, (void **)&flags);
- if (!flags)
- continue;
- filterflags = IAMFilterMiscFlags_GetMiscFlags(flags);
- IAMFilterMiscFlags_Release(flags);
- if (filterflags != AM_FILTER_MISC_FLAGS_IS_RENDERER)
- continue;
IBaseFilter_QueryInterface(filter->filter, &IID_IMediaSeeking, (void **)&seek);
if (!seek)
diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c
index f63f738..79841e6 100644
--- a/dlls/quartz/tests/filtergraph.c
+++ b/dlls/quartz/tests/filtergraph.c
@@ -3448,23 +3448,23 @@ static void test_graph_seeking(void)
filter1.seek_caps = AM_SEEKING_CanDoSegments | AM_SEEKING_CanGetCurrentPos;
filter2.seek_caps = AM_SEEKING_CanDoSegments | AM_SEEKING_CanGetDuration;
hr = IMediaSeeking_GetCapabilities(seeking, &caps);
- todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
- todo_wine ok(caps == AM_SEEKING_CanDoSegments, "Got caps %#x.\n", caps);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(caps == AM_SEEKING_CanDoSegments, "Got caps %#x.\n", caps);
caps = AM_SEEKING_CanDoSegments | AM_SEEKING_CanGetCurrentPos;
hr = IMediaSeeking_CheckCapabilities(seeking, &caps);
- todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr);
- todo_wine ok(caps == AM_SEEKING_CanDoSegments, "Got caps %#x.\n", caps);
+ ok(hr == S_FALSE, "Got hr %#x.\n", hr);
+ ok(caps == AM_SEEKING_CanDoSegments, "Got caps %#x.\n", caps);
caps = AM_SEEKING_CanDoSegments;
hr = IMediaSeeking_CheckCapabilities(seeking, &caps);
- todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(caps == AM_SEEKING_CanDoSegments, "Got caps %#x.\n", caps);
caps = AM_SEEKING_CanGetCurrentPos;
hr = IMediaSeeking_CheckCapabilities(seeking, &caps);
- todo_wine ok(hr == E_FAIL, "Got hr %#x.\n", hr);
- todo_wine ok(!caps, "Got caps %#x.\n", caps);
+ ok(hr == E_FAIL, "Got hr %#x.\n", hr);
+ ok(!caps, "Got caps %#x.\n", caps);
hr = IMediaSeeking_IsFormatSupported(seeking, &testguid);
ok(hr == S_FALSE, "Got hr %#x.\n", hr);
@@ -3526,25 +3526,25 @@ static void test_graph_seeking(void)
filter1.seek_duration = 0x12345;
filter2.seek_duration = 0x23456;
hr = IMediaSeeking_GetDuration(seeking, &time);
- todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
- todo_wine ok(time == 0x23456, "Got time %s.\n", wine_dbgstr_longlong(time));
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(time == 0x23456, "Got time %s.\n", wine_dbgstr_longlong(time));
filter2.seek_duration = 0x12345;
filter1.seek_duration = 0x23456;
hr = IMediaSeeking_GetDuration(seeking, &time);
- todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
- todo_wine ok(time == 0x23456, "Got time %s.\n", wine_dbgstr_longlong(time));
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(time == 0x23456, "Got time %s.\n", wine_dbgstr_longlong(time));
filter1.seek_stop = 0x54321;
filter2.seek_stop = 0x65432;
hr = IMediaSeeking_GetStopPosition(seeking, &time);
- todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
todo_wine ok(time == 0x65432, "Got time %s.\n", wine_dbgstr_longlong(time));
filter2.seek_stop = 0x54321;
filter1.seek_stop = 0x65432;
hr = IMediaSeeking_GetStopPosition(seeking, &time);
- todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
todo_wine ok(time == 0x65432, "Got time %s.\n", wine_dbgstr_longlong(time));
hr = IMediaSeeking_GetCurrentPosition(seeking, &time);
@@ -3553,7 +3553,7 @@ static void test_graph_seeking(void)
current = stop = 0xdeadbeef;
hr = IMediaSeeking_GetPositions(seeking, ¤t, &stop);
- todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(!current, "Got time %s.\n", wine_dbgstr_longlong(current));
todo_wine ok(stop == 0x65432, "Got time %s.\n", wine_dbgstr_longlong(stop));
@@ -3561,13 +3561,13 @@ static void test_graph_seeking(void)
stop = 0x321;
hr = IMediaSeeking_SetPositions(seeking, ¤t, AM_SEEKING_AbsolutePositioning,
&stop, AM_SEEKING_AbsolutePositioning);
- todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
- ok(current == 0x123, "Got time %s.\n", wine_dbgstr_longlong(current));
- ok(stop == 0x321, "Got time %s.\n", wine_dbgstr_longlong(stop));
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+ todo_wine ok(current == 0x123, "Got time %s.\n", wine_dbgstr_longlong(current));
+ todo_wine ok(stop == 0x321, "Got time %s.\n", wine_dbgstr_longlong(stop));
todo_wine ok(filter1.seek_current == 0x123, "Got time %s.\n", wine_dbgstr_longlong(filter1.seek_current));
todo_wine ok(filter1.seek_stop == 0x321, "Got time %s.\n", wine_dbgstr_longlong(filter1.seek_stop));
- todo_wine ok(filter2.seek_current == 0x123, "Got time %s.\n", wine_dbgstr_longlong(filter2.seek_current));
- todo_wine ok(filter2.seek_stop == 0x321, "Got time %s.\n", wine_dbgstr_longlong(filter2.seek_stop));
+ ok(filter2.seek_current == 0x123, "Got time %s.\n", wine_dbgstr_longlong(filter2.seek_current));
+ ok(filter2.seek_stop == 0x321, "Got time %s.\n", wine_dbgstr_longlong(filter2.seek_stop));
hr = IMediaSeeking_GetCurrentPosition(seeking, &time);
ok(hr == S_OK, "Got hr %#x.\n", hr);
@@ -3583,25 +3583,25 @@ static void test_graph_seeking(void)
stop = 0x321;
hr = IMediaSeeking_SetPositions(seeking, ¤t, AM_SEEKING_AbsolutePositioning | AM_SEEKING_ReturnTime,
&stop, AM_SEEKING_AbsolutePositioning);
- todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
- todo_wine ok(current == 0x1234, "Got time %s.\n", wine_dbgstr_longlong(current));
- ok(stop == 0x321, "Got time %s.\n", wine_dbgstr_longlong(stop));
- todo_wine ok(filter1.seek_current == 0x1234, "Got time %s.\n", wine_dbgstr_longlong(filter1.seek_current));
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(current == 0x1234, "Got time %s.\n", wine_dbgstr_longlong(current));
+ todo_wine ok(stop == 0x321, "Got time %s.\n", wine_dbgstr_longlong(stop));
+ ok(filter1.seek_current == 0x1234, "Got time %s.\n", wine_dbgstr_longlong(filter1.seek_current));
todo_wine ok(filter1.seek_stop == 0x321, "Got time %s.\n", wine_dbgstr_longlong(filter1.seek_stop));
- todo_wine ok(filter2.seek_current == 0x123, "Got time %s.\n", wine_dbgstr_longlong(filter2.seek_current));
- todo_wine ok(filter2.seek_stop == 0x321, "Got time %s.\n", wine_dbgstr_longlong(filter2.seek_stop));
+ ok(filter2.seek_current == 0x123, "Got time %s.\n", wine_dbgstr_longlong(filter2.seek_current));
+ ok(filter2.seek_stop == 0x321, "Got time %s.\n", wine_dbgstr_longlong(filter2.seek_stop));
current = 0x123;
stop = 0x321;
hr = IMediaSeeking_SetPositions(seeking, ¤t, AM_SEEKING_AbsolutePositioning,
&stop, AM_SEEKING_AbsolutePositioning | AM_SEEKING_ReturnTime);
- todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
- ok(current == 0x123, "Got time %s.\n", wine_dbgstr_longlong(current));
- todo_wine ok(stop == 0x4321, "Got time %s.\n", wine_dbgstr_longlong(stop));
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+ todo_wine ok(current == 0x123, "Got time %s.\n", wine_dbgstr_longlong(current));
+ ok(stop == 0x4321, "Got time %s.\n", wine_dbgstr_longlong(stop));
todo_wine ok(filter1.seek_current == 0x123, "Got time %s.\n", wine_dbgstr_longlong(filter1.seek_current));
- todo_wine ok(filter1.seek_stop == 0x4321, "Got time %s.\n", wine_dbgstr_longlong(filter1.seek_stop));
- todo_wine ok(filter2.seek_current == 0x123, "Got time %s.\n", wine_dbgstr_longlong(filter2.seek_current));
- todo_wine ok(filter2.seek_stop == 0x321, "Got time %s.\n", wine_dbgstr_longlong(filter2.seek_stop));
+ ok(filter1.seek_stop == 0x4321, "Got time %s.\n", wine_dbgstr_longlong(filter1.seek_stop));
+ ok(filter2.seek_current == 0x123, "Got time %s.\n", wine_dbgstr_longlong(filter2.seek_current));
+ ok(filter2.seek_stop == 0x321, "Got time %s.\n", wine_dbgstr_longlong(filter2.seek_stop));
hr = IMediaSeeking_SetRate(seeking, 2.0);
ok(hr == S_OK, "Got hr %#x.\n", hr);
More information about the wine-cvs
mailing list