Anton Baskanov : amstream: Implement CheckMediaType for AMDirectDrawStream based on code form mediastreamfilter.c.

Alexandre Julliard julliard at winehq.org
Thu Mar 1 13:34:45 CST 2018


Module: wine
Branch: master
Commit: 5b03813d9d8a41714a175d94a8ca56d38694acc1
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=5b03813d9d8a41714a175d94a8ca56d38694acc1

Author: Anton Baskanov <baskanov at gmail.com>
Date:   Fri Feb 16 23:43:36 2018 +0700

amstream: Implement CheckMediaType for AMDirectDrawStream based on code form mediastreamfilter.c.

Signed-off-by: Anton Baskanov <baskanov at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/amstream/mediastream.c | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/dlls/amstream/mediastream.c b/dlls/amstream/mediastream.c
index d6f5eaf..6aad625 100644
--- a/dlls/amstream/mediastream.c
+++ b/dlls/amstream/mediastream.c
@@ -511,9 +511,24 @@ static HRESULT WINAPI DirectDrawMediaStreamInputPin_CheckMediaType(BasePin *base
 {
     DirectDrawMediaStreamInputPin *This = impl_from_DirectDrawMediaStreamInputPin_IPin(&base->IPin_iface);
 
-    FIXME("(%p)->(%p) stub!\n", This, media_type);
+    TRACE("(%p)->(%p)\n", This, media_type);
 
-    return E_NOTIMPL;
+    if (IsEqualGUID(&media_type->majortype, &MEDIATYPE_Video))
+    {
+        if (IsEqualGUID(&media_type->subtype, &MEDIASUBTYPE_RGB1) ||
+            IsEqualGUID(&media_type->subtype, &MEDIASUBTYPE_RGB4) ||
+            IsEqualGUID(&media_type->subtype, &MEDIASUBTYPE_RGB8)  ||
+            IsEqualGUID(&media_type->subtype, &MEDIASUBTYPE_RGB565) ||
+            IsEqualGUID(&media_type->subtype, &MEDIASUBTYPE_RGB555) ||
+            IsEqualGUID(&media_type->subtype, &MEDIASUBTYPE_RGB24) ||
+            IsEqualGUID(&media_type->subtype, &MEDIASUBTYPE_RGB32))
+        {
+            TRACE("Video sub-type %s matches\n", debugstr_guid(&media_type->subtype));
+            return S_OK;
+        }
+    }
+
+    return S_FALSE;
 }
 
 static LONG WINAPI DirectDrawMediaStreamInputPin_GetMediaTypeVersion(BasePin *base)




More information about the wine-cvs mailing list