Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/tests/vmr7.c | 8 ++------ dlls/quartz/tests/vmr9.c | 14 ++------------ dlls/quartz/vmr9.c | 4 ++-- 3 files changed, 6 insertions(+), 20 deletions(-)
diff --git a/dlls/quartz/tests/vmr7.c b/dlls/quartz/tests/vmr7.c index 1f0af817f0b..4422a1f9140 100644 --- a/dlls/quartz/tests/vmr7.c +++ b/dlls/quartz/tests/vmr7.c @@ -1366,12 +1366,8 @@ static void test_connect_pin(void)
vih.bmiHeader.biBitCount = 16; hr = IFilterGraph2_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &req_mt); - todo_wine ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); - if (hr == S_OK) - { - IFilterGraph2_Disconnect(graph, &source.source.pin.IPin_iface); - IFilterGraph2_Disconnect(graph, pin); - } + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); + vih.bmiHeader.biBitCount = 32; hr = IFilterGraph2_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &req_mt); if (hr == VFW_E_TYPE_NOT_ACCEPTED) /* w7u */ diff --git a/dlls/quartz/tests/vmr9.c b/dlls/quartz/tests/vmr9.c index fae824b827d..69065d35761 100644 --- a/dlls/quartz/tests/vmr9.c +++ b/dlls/quartz/tests/vmr9.c @@ -1618,20 +1618,10 @@ static void test_connect_pin(void)
req_mt.subtype = MEDIASUBTYPE_RGB8; hr = IFilterGraph2_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &req_mt); - todo_wine ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); - if (hr == S_OK) - { - IFilterGraph2_Disconnect(graph, &source.source.pin.IPin_iface); - IFilterGraph2_Disconnect(graph, pin); - } + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); req_mt.subtype = MEDIASUBTYPE_WAVE; hr = IFilterGraph2_ConnectDirect(graph, &source.source.pin.IPin_iface, pin, &req_mt); - todo_wine ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); - if (hr == S_OK) - { - IFilterGraph2_Disconnect(graph, &source.source.pin.IPin_iface); - IFilterGraph2_Disconnect(graph, pin); - } + ok(hr == VFW_E_TYPE_NOT_ACCEPTED, "Got hr %#x.\n", hr); req_mt.subtype = MEDIASUBTYPE_RGB32;
peer = (IPin *)0xdeadbeef; diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index 09d63b6a71c..e49266c30c2 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -424,7 +424,7 @@ static HRESULT allocate_surfaces(struct quartz_vmr *filter, const AM_MEDIA_TYPE default: FIXME("Unhandled bit depth %u.\n", filter->bmiheader.biBitCount); free(filter->surfaces); - return E_INVALIDARG; + return VFW_E_TYPE_NOT_ACCEPTED; }
info.dwFlags = VMR9AllocFlag_TextureSurface; @@ -456,7 +456,7 @@ static HRESULT allocate_surfaces(struct quartz_vmr *filter, const AM_MEDIA_TYPE }
free(filter->surfaces); - return hr; + return VFW_E_TYPE_NOT_ACCEPTED; }
static void vmr_start_stream(struct strmbase_renderer *iface)
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/vmr9.c | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-)
diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index e49266c30c2..e4db42223e9 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -417,17 +417,35 @@ static HRESULT allocate_surfaces(struct quartz_vmr *filter, const AM_MEDIA_TYPE
if (!is_vmr9(filter)) { - switch (filter->bmiheader.biBitCount) + switch (filter->bmiheader.biCompression) { - case 24: info.Format = D3DFMT_R8G8B8; break; - case 32: info.Format = D3DFMT_X8R8G8B8; break; - default: - FIXME("Unhandled bit depth %u.\n", filter->bmiheader.biBitCount); - free(filter->surfaces); - return VFW_E_TYPE_NOT_ACCEPTED; - } + case BI_RGB: + switch (filter->bmiheader.biBitCount) + { + case 24: info.Format = D3DFMT_R8G8B8; break; + case 32: info.Format = D3DFMT_X8R8G8B8; break; + default: + FIXME("Unhandled bit depth %u.\n", filter->bmiheader.biBitCount); + free(filter->surfaces); + return VFW_E_TYPE_NOT_ACCEPTED; + } + + info.dwFlags = VMR9AllocFlag_TextureSurface; + break;
- info.dwFlags = VMR9AllocFlag_TextureSurface; + case mmioFOURCC('N','V','1','2'): + case mmioFOURCC('U','Y','V','Y'): + case mmioFOURCC('Y','U','Y','2'): + case mmioFOURCC('Y','V','1','2'): + info.Format = filter->bmiheader.biCompression; + info.dwFlags = VMR9AllocFlag_OffscreenSurface; + break; + + default: + WARN("Unhandled video compression %#x.\n", filter->bmiheader.biCompression); + free(filter->surfaces); + return VFW_E_TYPE_NOT_ACCEPTED; + } if (FAILED(hr = initialize_device(filter, &info, count))) free(filter->surfaces); return hr;
To match Windows.
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/regsvr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/quartz/regsvr.c b/dlls/quartz/regsvr.c index 7bae46cb847..f867c4178a6 100644 --- a/dlls/quartz/regsvr.c +++ b/dlls/quartz/regsvr.c @@ -189,7 +189,7 @@ static struct regsvr_filter const filter_list[] = { { &CLSID_VideoRendererDefault, &CLSID_LegacyAmFilterCategory, L"Video Renderer", - 0x800000, + 0x800001, { { REG_PINFLAG_B_RENDERER, { { &MEDIATYPE_Video, &GUID_NULL }, { NULL }
Oddly, Windows doesn't either.
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/regsvr.c | 12 ------------ 1 file changed, 12 deletions(-)
diff --git a/dlls/quartz/regsvr.c b/dlls/quartz/regsvr.c index f867c4178a6..92555630e9e 100644 --- a/dlls/quartz/regsvr.c +++ b/dlls/quartz/regsvr.c @@ -198,18 +198,6 @@ static struct regsvr_filter const filter_list[] = { { 0xFFFFFFFF }, } }, - { &CLSID_VideoMixingRenderer, - &CLSID_LegacyAmFilterCategory, - L"Video Mixing Renderer", - 0x200000, - { { REG_PINFLAG_B_RENDERER, - { { &MEDIATYPE_Video, &GUID_NULL }, - { NULL } - }, - }, - { 0xFFFFFFFF }, - } - }, { &CLSID_VideoMixingRenderer9, &CLSID_LegacyAmFilterCategory, L"Video Mixing Renderer 9",
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=74178
Your paranoid android.
=== debiant (32 bit Chinese:China report) ===
quartz: videorenderer.c:1054: Test failed: Got time f005c00000000.
=== debiant (64 bit WoW report) ===
quartz: videorenderer.c:1053: Test failed: Got hr 0xdeadbeef. videorenderer.c:1054: Test failed: Got time f005c00000000.
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/quartz/videorenderer.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/quartz/videorenderer.c b/dlls/quartz/videorenderer.c index e004d0fc214..c77331398ea 100644 --- a/dlls/quartz/videorenderer.c +++ b/dlls/quartz/videorenderer.c @@ -541,6 +541,10 @@ HRESULT video_renderer_create(IUnknown *outer, IUnknown **out)
HRESULT video_renderer_default_create(IUnknown *outer, IUnknown **out) { - /* TODO: Attempt to use the VMR-7 renderer instead when possible */ + HRESULT hr; + + if (SUCCEEDED(hr = vmr7_create(outer, out))) + return hr; + return video_renderer_create(outer, out); }
Zebediah Figura z.figura12@gmail.com writes:
Signed-off-by: Zebediah Figura z.figura12@gmail.com
dlls/quartz/videorenderer.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
This is causing test failures here:
../../../tools/runtest -q -P wine -T ../../.. -M quartz.dll -p quartz_test.exe filtergraph && touch filtergraph.ok filtergraph.c:256: Test failed: expected 104, got 32 filtergraph.c:256: Test failed: expected 104, got 32 filtergraph.c:256: Test failed: expected 104, got 32 make: *** [Makefile:437: filtergraph.ok] Error 3