[PATCH 06/10] amstream: Implement GetMediaType for AMAudioStream based on code from mediastreamfilter.c.

Anton Baskanov baskanov at gmail.com
Fri Feb 16 10:43:39 CST 2018


Signed-off-by: Anton Baskanov <baskanov at gmail.com>
---
 dlls/amstream/mediastream.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/dlls/amstream/mediastream.c b/dlls/amstream/mediastream.c
index e308f0f51b..b6f591ad25 100644
--- a/dlls/amstream/mediastream.c
+++ b/dlls/amstream/mediastream.c
@@ -1094,9 +1094,18 @@ static HRESULT WINAPI AudioMediaStreamInputPin_GetMediaType(BasePin *base, int i
 {
     AudioMediaStreamInputPin *This = impl_from_AudioMediaStreamInputPin_IPin(&base->IPin_iface);
 
-    FIXME("(%p)->(%d,%p) stub!\n", This, index, media_type);
+    TRACE("(%p)->(%d,%p)\n", This, index, media_type);
 
-    return E_NOTIMPL;
+    /* FIXME: Reset structure as we only fill majortype and minortype for now */
+    ZeroMemory(media_type, sizeof(*media_type));
+
+    if (index)
+        return S_FALSE;
+
+    media_type->majortype = MEDIATYPE_Audio;
+    media_type->subtype = MEDIASUBTYPE_PCM;
+
+    return S_OK;
 }
 
 static HRESULT WINAPI AudioMediaStreamInputPin_Receive(BaseInputPin *base, IMediaSample *sample)
-- 
2.14.1




More information about the wine-devel mailing list