Commit 9ef27b8d authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

mfreadwrite: Return source flags through MF_SOURCE_READER_MEDIASOURCE_CHARACTERISTICS.

parent eca0e8bb
......@@ -21,6 +21,7 @@
#include <stdarg.h>
#define COBJMACROS
#define NONAMELESSUNION
#include "windef.h"
#include "winbase.h"
......@@ -211,10 +212,38 @@ static HRESULT WINAPI src_reader_GetServiceForStream(IMFSourceReader *iface, DWO
}
static HRESULT WINAPI src_reader_GetPresentationAttribute(IMFSourceReader *iface, DWORD index,
REFGUID guid, PROPVARIANT *attr)
REFGUID guid, PROPVARIANT *value)
{
srcreader *This = impl_from_IMFSourceReader(iface);
FIXME("%p, 0x%08x, %s, %p\n", This, index, debugstr_guid(guid), attr);
struct source_reader *reader = impl_from_IMFSourceReader(iface);
HRESULT hr;
TRACE("%p, %#x, %s, %p.\n", iface, index, debugstr_guid(guid), value);
switch (index)
{
case MF_SOURCE_READER_MEDIASOURCE:
if (IsEqualGUID(guid, &MF_SOURCE_READER_MEDIASOURCE_CHARACTERISTICS))
{
DWORD flags;
if (FAILED(hr = IMFMediaSource_GetCharacteristics(reader->source, &flags)))
return hr;
value->vt = VT_UI4;
value->u.ulVal = flags;
return S_OK;
}
else
{
FIXME("Unsupported source attribute %s.\n", debugstr_guid(guid));
return E_NOTIMPL;
}
break;
default:
FIXME("Unsupported index %#x.\n", index);
return E_NOTIMPL;
}
return E_NOTIMPL;
}
......
......@@ -78,6 +78,8 @@ cpp_quote("EXTERN_GUID(MF_READWRITE_MMCSS_CLASS_AUDIO, 0x430847da, 0x08
cpp_quote("EXTERN_GUID(MF_READWRITE_MMCSS_PRIORITY_AUDIO, 0x273db885, 0x2de2, 0x4db2, 0xa6, 0xa7, 0xfd, 0xb6, 0x6f, 0xb4, 0x0b, 0x61);")
cpp_quote("EXTERN_GUID(MF_READWRITE_D3D_OPTIONAL, 0x216479d9, 0x3071, 0x42ca, 0xbb, 0x6c, 0x4c, 0x22, 0x10, 0x2e, 0x1d, 0x18);")
cpp_quote("EXTERN_GUID(MF_SOURCE_READER_MEDIASOURCE_CHARACTERISTICS, 0x6d23f5c8, 0xc5d7, 0x4a9b, 0x99, 0x71, 0x5d, 0x11, 0xf8, 0xbc, 0xa8, 0x80);")
interface IMFMediaSource;
[
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment