Zebediah Figura : qcap/avimux: Implement source_query_accept().
Alexandre Julliard
julliard at winehq.org
Thu Dec 23 16:01:32 CST 2021
Module: wine
Branch: master
Commit: ecb7c90131a021c163521d6a154775074ec9a2dd
URL: https://source.winehq.org/git/wine.git/?a=commit;h=ecb7c90131a021c163521d6a154775074ec9a2dd
Author: Zebediah Figura <zfigura at codeweavers.com>
Date: Thu Dec 23 00:35:13 2021 -0600
qcap/avimux: Implement source_query_accept().
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/qcap/avimux.c | 7 +++++--
dlls/qcap/tests/avimux.c | 5 +++--
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/dlls/qcap/avimux.c b/dlls/qcap/avimux.c
index c3dbf71d2da..fe4add83b7c 100644
--- a/dlls/qcap/avimux.c
+++ b/dlls/qcap/avimux.c
@@ -1110,9 +1110,12 @@ static HRESULT source_query_interface(struct strmbase_pin *iface, REFIID iid, vo
return S_OK;
}
-static HRESULT source_query_accept(struct strmbase_pin *base, const AM_MEDIA_TYPE *amt)
+static HRESULT source_query_accept(struct strmbase_pin *iface, const AM_MEDIA_TYPE *mt)
{
- FIXME("(%p) stub\n", base);
+ if (!IsEqualGUID(&mt->majortype, &GUID_NULL) && !IsEqualGUID(&mt->majortype, &MEDIATYPE_Stream))
+ return S_FALSE;
+ if (!IsEqualGUID(&mt->subtype, &GUID_NULL) && !IsEqualGUID(&mt->subtype, &MEDIASUBTYPE_Avi))
+ return S_FALSE;
return S_OK;
}
diff --git a/dlls/qcap/tests/avimux.c b/dlls/qcap/tests/avimux.c
index 3f43ff569cf..70575281cee 100644
--- a/dlls/qcap/tests/avimux.c
+++ b/dlls/qcap/tests/avimux.c
@@ -468,6 +468,7 @@ static void test_media_types(void)
pmt->bFixedSizeSamples = FALSE;
pmt->bTemporalCompression = TRUE;
pmt->lSampleSize = 123;
+ pmt->formattype = FORMAT_VideoInfo;
hr = IPin_QueryAccept(pin, pmt);
ok(hr == S_OK, "Got hr %#x.\n", hr);
@@ -476,7 +477,7 @@ static void test_media_types(void)
ok(hr == S_OK, "Got hr %#x.\n", hr);
pmt->majortype = MEDIATYPE_Video;
hr = IPin_QueryAccept(pin, pmt);
- todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr);
+ ok(hr == S_FALSE, "Got hr %#x.\n", hr);
pmt->majortype = MEDIATYPE_Stream;
pmt->subtype = GUID_NULL;
@@ -484,7 +485,7 @@ static void test_media_types(void)
ok(hr == S_OK, "Got hr %#x.\n", hr);
pmt->subtype = MEDIASUBTYPE_RGB8;
hr = IPin_QueryAccept(pin, pmt);
- todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr);
+ ok(hr == S_FALSE, "Got hr %#x.\n", hr);
pmt->subtype = MEDIASUBTYPE_Avi;
CoTaskMemFree(pmt);
More information about the wine-cvs
mailing list