mfplat: Implement MFCreateMediaEvent.
Signed-off-by: Sven Baars <sven.wine@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
186d107e4d
commit
d7b05b219d
5 changed files with 533 additions and 1 deletions
|
@ -1837,6 +1837,367 @@ HRESULT WINAPI MFCreateMediaType(IMFMediaType **type)
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
typedef struct _mfmediaevent
|
||||
{
|
||||
mfattributes attributes;
|
||||
IMFMediaEvent IMFMediaEvent_iface;
|
||||
|
||||
MediaEventType type;
|
||||
GUID extended_type;
|
||||
HRESULT status;
|
||||
PROPVARIANT value;
|
||||
} mfmediaevent;
|
||||
|
||||
static inline mfmediaevent *impl_from_IMFMediaEvent(IMFMediaEvent *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, mfmediaevent, IMFMediaEvent_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfmediaevent_QueryInterface(IMFMediaEvent *iface, REFIID riid, void **out)
|
||||
{
|
||||
mfmediaevent *This = impl_from_IMFMediaEvent(iface);
|
||||
|
||||
TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), out);
|
||||
|
||||
if(IsEqualGUID(riid, &IID_IUnknown) ||
|
||||
IsEqualGUID(riid, &IID_IMFAttributes) ||
|
||||
IsEqualGUID(riid, &IID_IMFMediaEvent))
|
||||
{
|
||||
*out = &This->IMFMediaEvent_iface;
|
||||
}
|
||||
else
|
||||
{
|
||||
FIXME("(%s, %p)\n", debugstr_guid(riid), out);
|
||||
*out = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
IUnknown_AddRef((IUnknown*)*out);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static ULONG WINAPI mfmediaevent_AddRef(IMFMediaEvent *iface)
|
||||
{
|
||||
mfmediaevent *This = impl_from_IMFMediaEvent(iface);
|
||||
ULONG ref = InterlockedIncrement(&This->attributes.ref);
|
||||
|
||||
TRACE("(%p) ref=%u\n", This, ref);
|
||||
|
||||
return ref;
|
||||
}
|
||||
|
||||
static ULONG WINAPI mfmediaevent_Release(IMFMediaEvent *iface)
|
||||
{
|
||||
mfmediaevent *This = impl_from_IMFMediaEvent(iface);
|
||||
ULONG ref = InterlockedDecrement(&This->attributes.ref);
|
||||
|
||||
TRACE("(%p) ref=%u\n", This, ref);
|
||||
|
||||
if (!ref)
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
}
|
||||
|
||||
return ref;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfmediaevent_GetItem(IMFMediaEvent *iface, REFGUID key, PROPVARIANT *value)
|
||||
{
|
||||
mfmediaevent *This = impl_from_IMFMediaEvent(iface);
|
||||
return IMFAttributes_GetItem(&This->attributes.IMFAttributes_iface, key, value);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfmediaevent_GetItemType(IMFMediaEvent *iface, REFGUID key, MF_ATTRIBUTE_TYPE *type)
|
||||
{
|
||||
mfmediaevent *This = impl_from_IMFMediaEvent(iface);
|
||||
return IMFAttributes_GetItemType(&This->attributes.IMFAttributes_iface, key, type);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfmediaevent_CompareItem(IMFMediaEvent *iface, REFGUID key, REFPROPVARIANT value, BOOL *result)
|
||||
{
|
||||
mfmediaevent *This = impl_from_IMFMediaEvent(iface);
|
||||
return IMFAttributes_CompareItem(&This->attributes.IMFAttributes_iface, key, value, result);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfmediaevent_Compare(IMFMediaEvent *iface, IMFAttributes *attrs, MF_ATTRIBUTES_MATCH_TYPE type,
|
||||
BOOL *result)
|
||||
{
|
||||
mfmediaevent *This = impl_from_IMFMediaEvent(iface);
|
||||
return IMFAttributes_Compare(&This->attributes.IMFAttributes_iface, attrs, type, result);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfmediaevent_GetUINT32(IMFMediaEvent *iface, REFGUID key, UINT32 *value)
|
||||
{
|
||||
mfmediaevent *This = impl_from_IMFMediaEvent(iface);
|
||||
return IMFAttributes_GetUINT32(&This->attributes.IMFAttributes_iface, key, value);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfmediaevent_GetUINT64(IMFMediaEvent *iface, REFGUID key, UINT64 *value)
|
||||
{
|
||||
mfmediaevent *This = impl_from_IMFMediaEvent(iface);
|
||||
return IMFAttributes_GetUINT64(&This->attributes.IMFAttributes_iface, key, value);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfmediaevent_GetDouble(IMFMediaEvent *iface, REFGUID key, double *value)
|
||||
{
|
||||
mfmediaevent *This = impl_from_IMFMediaEvent(iface);
|
||||
return IMFAttributes_GetDouble(&This->attributes.IMFAttributes_iface, key, value);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfmediaevent_GetGUID(IMFMediaEvent *iface, REFGUID key, GUID *value)
|
||||
{
|
||||
mfmediaevent *This = impl_from_IMFMediaEvent(iface);
|
||||
return IMFAttributes_GetGUID(&This->attributes.IMFAttributes_iface, key, value);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfmediaevent_GetStringLength(IMFMediaEvent *iface, REFGUID key, UINT32 *length)
|
||||
{
|
||||
mfmediaevent *This = impl_from_IMFMediaEvent(iface);
|
||||
return IMFAttributes_GetStringLength(&This->attributes.IMFAttributes_iface, key, length);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfmediaevent_GetString(IMFMediaEvent *iface, REFGUID key, WCHAR *value,
|
||||
UINT32 size, UINT32 *length)
|
||||
{
|
||||
mfmediaevent *This = impl_from_IMFMediaEvent(iface);
|
||||
return IMFAttributes_GetString(&This->attributes.IMFAttributes_iface, key, value, size, length);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfmediaevent_GetAllocatedString(IMFMediaEvent *iface, REFGUID key,
|
||||
WCHAR **value, UINT32 *length)
|
||||
{
|
||||
mfmediaevent *This = impl_from_IMFMediaEvent(iface);
|
||||
return IMFAttributes_GetAllocatedString(&This->attributes.IMFAttributes_iface, key, value, length);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfmediaevent_GetBlobSize(IMFMediaEvent *iface, REFGUID key, UINT32 *size)
|
||||
{
|
||||
mfmediaevent *This = impl_from_IMFMediaEvent(iface);
|
||||
return IMFAttributes_GetBlobSize(&This->attributes.IMFAttributes_iface, key, size);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfmediaevent_GetBlob(IMFMediaEvent *iface, REFGUID key, UINT8 *buf,
|
||||
UINT32 bufsize, UINT32 *blobsize)
|
||||
{
|
||||
mfmediaevent *This = impl_from_IMFMediaEvent(iface);
|
||||
return IMFAttributes_GetBlob(&This->attributes.IMFAttributes_iface, key, buf, bufsize, blobsize);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfmediaevent_GetAllocatedBlob(IMFMediaEvent *iface, REFGUID key, UINT8 **buf, UINT32 *size)
|
||||
{
|
||||
mfmediaevent *This = impl_from_IMFMediaEvent(iface);
|
||||
return IMFAttributes_GetAllocatedBlob(&This->attributes.IMFAttributes_iface, key, buf, size);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfmediaevent_GetUnknown(IMFMediaEvent *iface, REFGUID key, REFIID riid, void **ppv)
|
||||
{
|
||||
mfmediaevent *This = impl_from_IMFMediaEvent(iface);
|
||||
return IMFAttributes_GetUnknown(&This->attributes.IMFAttributes_iface, key, riid, ppv);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfmediaevent_SetItem(IMFMediaEvent *iface, REFGUID key, REFPROPVARIANT value)
|
||||
{
|
||||
mfmediaevent *This = impl_from_IMFMediaEvent(iface);
|
||||
return IMFAttributes_SetItem(&This->attributes.IMFAttributes_iface, key, value);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfmediaevent_DeleteItem(IMFMediaEvent *iface, REFGUID key)
|
||||
{
|
||||
mfmediaevent *This = impl_from_IMFMediaEvent(iface);
|
||||
return IMFAttributes_DeleteItem(&This->attributes.IMFAttributes_iface, key);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfmediaevent_DeleteAllItems(IMFMediaEvent *iface)
|
||||
{
|
||||
mfmediaevent *This = impl_from_IMFMediaEvent(iface);
|
||||
return IMFAttributes_DeleteAllItems(&This->attributes.IMFAttributes_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfmediaevent_SetUINT32(IMFMediaEvent *iface, REFGUID key, UINT32 value)
|
||||
{
|
||||
mfmediaevent *This = impl_from_IMFMediaEvent(iface);
|
||||
return IMFAttributes_SetUINT32(&This->attributes.IMFAttributes_iface, key, value);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfmediaevent_SetUINT64(IMFMediaEvent *iface, REFGUID key, UINT64 value)
|
||||
{
|
||||
mfmediaevent *This = impl_from_IMFMediaEvent(iface);
|
||||
return IMFAttributes_SetUINT64(&This->attributes.IMFAttributes_iface, key, value);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfmediaevent_SetDouble(IMFMediaEvent *iface, REFGUID key, double value)
|
||||
{
|
||||
mfmediaevent *This = impl_from_IMFMediaEvent(iface);
|
||||
return IMFAttributes_SetDouble(&This->attributes.IMFAttributes_iface, key, value);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfmediaevent_SetGUID(IMFMediaEvent *iface, REFGUID key, REFGUID value)
|
||||
{
|
||||
mfmediaevent *This = impl_from_IMFMediaEvent(iface);
|
||||
return IMFAttributes_SetGUID(&This->attributes.IMFAttributes_iface, key, value);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfmediaevent_SetString(IMFMediaEvent *iface, REFGUID key, const WCHAR *value)
|
||||
{
|
||||
mfmediaevent *This = impl_from_IMFMediaEvent(iface);
|
||||
return IMFAttributes_SetString(&This->attributes.IMFAttributes_iface, key, value);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfmediaevent_SetBlob(IMFMediaEvent *iface, REFGUID key, const UINT8 *buf, UINT32 size)
|
||||
{
|
||||
mfmediaevent *This = impl_from_IMFMediaEvent(iface);
|
||||
return IMFAttributes_SetBlob(&This->attributes.IMFAttributes_iface, key, buf, size);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfmediaevent_SetUnknown(IMFMediaEvent *iface, REFGUID key, IUnknown *unknown)
|
||||
{
|
||||
mfmediaevent *This = impl_from_IMFMediaEvent(iface);
|
||||
return IMFAttributes_SetUnknown(&This->attributes.IMFAttributes_iface, key, unknown);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfmediaevent_LockStore(IMFMediaEvent *iface)
|
||||
{
|
||||
mfmediaevent *This = impl_from_IMFMediaEvent(iface);
|
||||
return IMFAttributes_LockStore(&This->attributes.IMFAttributes_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfmediaevent_UnlockStore(IMFMediaEvent *iface)
|
||||
{
|
||||
mfmediaevent *This = impl_from_IMFMediaEvent(iface);
|
||||
return IMFAttributes_UnlockStore(&This->attributes.IMFAttributes_iface);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfmediaevent_GetCount(IMFMediaEvent *iface, UINT32 *items)
|
||||
{
|
||||
mfmediaevent *This = impl_from_IMFMediaEvent(iface);
|
||||
return IMFAttributes_GetCount(&This->attributes.IMFAttributes_iface, items);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfmediaevent_GetItemByIndex(IMFMediaEvent *iface, UINT32 index, GUID *key, PROPVARIANT *value)
|
||||
{
|
||||
mfmediaevent *This = impl_from_IMFMediaEvent(iface);
|
||||
return IMFAttributes_GetItemByIndex(&This->attributes.IMFAttributes_iface, index, key, value);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfmediaevent_CopyAllItems(IMFMediaEvent *iface, IMFAttributes *dest)
|
||||
{
|
||||
mfmediaevent *This = impl_from_IMFMediaEvent(iface);
|
||||
|
||||
FIXME("%p, %p\n", This, dest);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfmediaevent_GetType(IMFMediaEvent *iface, MediaEventType *type)
|
||||
{
|
||||
mfmediaevent *This = impl_from_IMFMediaEvent(iface);
|
||||
|
||||
TRACE("%p, %p\n", This, type);
|
||||
|
||||
*type = This->type;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfmediaevent_GetExtendedType(IMFMediaEvent *iface, GUID *extended_type)
|
||||
{
|
||||
mfmediaevent *This = impl_from_IMFMediaEvent(iface);
|
||||
|
||||
TRACE("%p, %p\n", This, extended_type);
|
||||
|
||||
*extended_type = This->extended_type;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfmediaevent_GetStatus(IMFMediaEvent *iface, HRESULT *status)
|
||||
{
|
||||
mfmediaevent *This = impl_from_IMFMediaEvent(iface);
|
||||
|
||||
TRACE("%p, %p\n", This, status);
|
||||
|
||||
*status = This->status;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI mfmediaevent_GetValue(IMFMediaEvent *iface, PROPVARIANT *value)
|
||||
{
|
||||
mfmediaevent *This = impl_from_IMFMediaEvent(iface);
|
||||
|
||||
PropVariantCopy(value, &This->value);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static const IMFMediaEventVtbl mfmediaevent_vtbl =
|
||||
{
|
||||
mfmediaevent_QueryInterface,
|
||||
mfmediaevent_AddRef,
|
||||
mfmediaevent_Release,
|
||||
mfmediaevent_GetItem,
|
||||
mfmediaevent_GetItemType,
|
||||
mfmediaevent_CompareItem,
|
||||
mfmediaevent_Compare,
|
||||
mfmediaevent_GetUINT32,
|
||||
mfmediaevent_GetUINT64,
|
||||
mfmediaevent_GetDouble,
|
||||
mfmediaevent_GetGUID,
|
||||
mfmediaevent_GetStringLength,
|
||||
mfmediaevent_GetString,
|
||||
mfmediaevent_GetAllocatedString,
|
||||
mfmediaevent_GetBlobSize,
|
||||
mfmediaevent_GetBlob,
|
||||
mfmediaevent_GetAllocatedBlob,
|
||||
mfmediaevent_GetUnknown,
|
||||
mfmediaevent_SetItem,
|
||||
mfmediaevent_DeleteItem,
|
||||
mfmediaevent_DeleteAllItems,
|
||||
mfmediaevent_SetUINT32,
|
||||
mfmediaevent_SetUINT64,
|
||||
mfmediaevent_SetDouble,
|
||||
mfmediaevent_SetGUID,
|
||||
mfmediaevent_SetString,
|
||||
mfmediaevent_SetBlob,
|
||||
mfmediaevent_SetUnknown,
|
||||
mfmediaevent_LockStore,
|
||||
mfmediaevent_UnlockStore,
|
||||
mfmediaevent_GetCount,
|
||||
mfmediaevent_GetItemByIndex,
|
||||
mfmediaevent_CopyAllItems,
|
||||
mfmediaevent_GetType,
|
||||
mfmediaevent_GetExtendedType,
|
||||
mfmediaevent_GetStatus,
|
||||
mfmediaevent_GetValue,
|
||||
};
|
||||
|
||||
HRESULT WINAPI MFCreateMediaEvent(MediaEventType type, REFGUID extended_type, HRESULT status,
|
||||
const PROPVARIANT *value, IMFMediaEvent **event)
|
||||
{
|
||||
mfmediaevent *object;
|
||||
|
||||
TRACE("%#x, %s, %08x, %p, %p\n", type, debugstr_guid(extended_type), status, value, event);
|
||||
|
||||
object = HeapAlloc( GetProcessHeap(), 0, sizeof(*object) );
|
||||
if(!object)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
init_attribute_object(&object->attributes, 0);
|
||||
object->IMFMediaEvent_iface.lpVtbl = &mfmediaevent_vtbl;
|
||||
|
||||
object->type = type;
|
||||
object->extended_type = *extended_type;
|
||||
object->status = status;
|
||||
|
||||
PropVariantInit(&object->value);
|
||||
if (value)
|
||||
PropVariantCopy(&object->value, value);
|
||||
|
||||
*event = &object->IMFMediaEvent_iface;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
typedef struct _mfeventqueue
|
||||
{
|
||||
IMFMediaEventQueue IMFMediaEventQueue_iface;
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
@ stdcall MFCreateMFByteStreamOnStream(ptr ptr)
|
||||
@ stub MFCreateMFVideoFormatFromMFMediaType
|
||||
@ stub MFCreateMediaBufferWrapper
|
||||
@ stub MFCreateMediaEvent
|
||||
@ stdcall MFCreateMediaEvent(long ptr long ptr ptr)
|
||||
@ stdcall MFCreateMediaType(ptr)
|
||||
@ stub MFCreateMediaTypeFromRepresentation
|
||||
@ stdcall MFCreateMemoryBuffer(long ptr)
|
||||
|
|
|
@ -40,6 +40,7 @@ static HRESULT (WINAPI *pMFCreateSourceResolver)(IMFSourceResolver **resolver);
|
|||
static HRESULT (WINAPI *pMFCreateMFByteStreamOnStream)(IStream *stream, IMFByteStream **bytestream);
|
||||
static HRESULT (WINAPI *pMFCreateMemoryBuffer)(DWORD max_length, IMFMediaBuffer **buffer);
|
||||
|
||||
DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
|
||||
|
||||
DEFINE_GUID(MF_READWRITE_ENABLE_HARDWARE_TRANSFORMS, 0xa634a91c, 0x822b, 0x41b9, 0xa4, 0x94, 0x4d, 0xe4, 0x64, 0x36, 0x12, 0xb0);
|
||||
|
||||
|
@ -261,6 +262,70 @@ if(0)
|
|||
MFShutdown();
|
||||
}
|
||||
|
||||
static void test_MFCreateMediaEvent(void)
|
||||
{
|
||||
HRESULT hr;
|
||||
IMFMediaEvent *mediaevent;
|
||||
|
||||
MediaEventType type;
|
||||
GUID extended_type;
|
||||
HRESULT status;
|
||||
PROPVARIANT value;
|
||||
|
||||
PropVariantInit(&value);
|
||||
value.vt = VT_UNKNOWN;
|
||||
|
||||
hr = MFCreateMediaEvent(MEError, &GUID_NULL, E_FAIL, &value, &mediaevent);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
|
||||
PropVariantClear(&value);
|
||||
|
||||
hr = IMFMediaEvent_GetType(mediaevent, &type);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(type == MEError, "got %#x\n", type);
|
||||
|
||||
hr = IMFMediaEvent_GetExtendedType(mediaevent, &extended_type);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(IsEqualGUID(&extended_type, &GUID_NULL), "got %s\n",
|
||||
wine_dbgstr_guid(&extended_type));
|
||||
|
||||
hr = IMFMediaEvent_GetStatus(mediaevent, &status);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(status == E_FAIL, "got 0x%08x\n", status);
|
||||
|
||||
PropVariantInit(&value);
|
||||
hr = IMFMediaEvent_GetValue(mediaevent, &value);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(value.vt == VT_UNKNOWN, "got %#x\n", value.vt);
|
||||
PropVariantClear(&value);
|
||||
|
||||
IMFMediaEvent_Release(mediaevent);
|
||||
|
||||
hr = MFCreateMediaEvent(MEUnknown, &DUMMY_GUID1, S_OK, NULL, &mediaevent);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
|
||||
hr = IMFMediaEvent_GetType(mediaevent, &type);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(type == MEUnknown, "got %#x\n", type);
|
||||
|
||||
hr = IMFMediaEvent_GetExtendedType(mediaevent, &extended_type);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(IsEqualGUID(&extended_type, &DUMMY_GUID1), "got %s\n",
|
||||
wine_dbgstr_guid(&extended_type));
|
||||
|
||||
hr = IMFMediaEvent_GetStatus(mediaevent, &status);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(status == S_OK, "got 0x%08x\n", status);
|
||||
|
||||
PropVariantInit(&value);
|
||||
hr = IMFMediaEvent_GetValue(mediaevent, &value);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(value.vt == VT_EMPTY, "got %#x\n", value.vt);
|
||||
PropVariantClear(&value);
|
||||
|
||||
IMFMediaEvent_Release(mediaevent);
|
||||
}
|
||||
|
||||
static void test_MFCreateAttributes(void)
|
||||
{
|
||||
IMFAttributes *attributes;
|
||||
|
@ -556,6 +621,7 @@ START_TEST(mfplat)
|
|||
test_register();
|
||||
test_source_resolver();
|
||||
test_MFCreateMediaType();
|
||||
test_MFCreateMediaEvent();
|
||||
test_MFCreateAttributes();
|
||||
test_MFSample();
|
||||
test_MFCreateFile();
|
||||
|
|
|
@ -69,6 +69,8 @@ HRESULT WINAPI MFCreateAttributes(IMFAttributes **attributes, UINT32 size);
|
|||
HRESULT WINAPI MFCreateEventQueue(IMFMediaEventQueue **queue);
|
||||
HRESULT WINAPI MFCreateFile(MF_FILE_ACCESSMODE accessmode, MF_FILE_OPENMODE openmode, MF_FILE_FLAGS flags,
|
||||
LPCWSTR url, IMFByteStream **bytestream);
|
||||
HRESULT WINAPI MFCreateMediaEvent(MediaEventType type, REFGUID extended_type, HRESULT status,
|
||||
const PROPVARIANT *value, IMFMediaEvent **event);
|
||||
HRESULT WINAPI MFCreateMediaType(IMFMediaType **type);
|
||||
HRESULT WINAPI MFCreateSample(IMFSample **sample);
|
||||
HRESULT WINAPI MFCreateMemoryBuffer(DWORD max_length, IMFMediaBuffer **buffer);
|
||||
|
|
|
@ -435,6 +435,109 @@ cpp_quote("#define MFASYNC_CALLBACK_QUEUE_LONG_FUNCTION 0x00000007")
|
|||
cpp_quote("#define MFASYNC_CALLBACK_QUEUE_PRIVATE_MASK 0xffff0000")
|
||||
cpp_quote("#define MFASYNC_CALLBACK_QUEUE_ALL 0xffffffff")
|
||||
|
||||
enum {
|
||||
MEUnknown = 0,
|
||||
MEError = 1,
|
||||
MEExtendedType = 2,
|
||||
MENonFatalError = 3,
|
||||
MEGenericV1Anchor = MENonFatalError,
|
||||
MESessionUnknown = 100,
|
||||
MESessionTopologySet = 101,
|
||||
MESessionTopologiesCleared = 102,
|
||||
MESessionStarted = 103,
|
||||
MESessionPaused = 104,
|
||||
MESessionStopped = 105,
|
||||
MESessionClosed = 106,
|
||||
MESessionEnded = 107,
|
||||
MESessionRateChanged = 108,
|
||||
MESessionScrubSampleComplete = 109,
|
||||
MESessionCapabilitiesChanged = 110,
|
||||
MESessionTopologyStatus = 111,
|
||||
MESessionNotifyPresentationTime = 112,
|
||||
MENewPresentation = 113,
|
||||
MELicenseAcquisitionStart = 114,
|
||||
MELicenseAcquisitionCompleted = 115,
|
||||
MEIndividualizationStart = 116,
|
||||
MEIndividualizationCompleted = 117,
|
||||
MEEnablerProgress = 118,
|
||||
MEEnablerCompleted = 119,
|
||||
MEPolicyError = 120,
|
||||
MEPolicyReport = 121,
|
||||
MEBufferingStarted = 122,
|
||||
MEBufferingStopped = 123,
|
||||
MEConnectStart = 124,
|
||||
MEConnectEnd = 125,
|
||||
MEReconnectStart = 126,
|
||||
MEReconnectEnd = 127,
|
||||
MERendererEvent = 128,
|
||||
MESessionStreamSinkFormatChanged = 129,
|
||||
MESessionV1Anchor = MESessionStreamSinkFormatChanged,
|
||||
MESourceUnknown = 200,
|
||||
MESourceStarted = 201,
|
||||
MEStreamStarted = 202,
|
||||
MESourceSeeked = 203,
|
||||
MEStreamSeeked = 204,
|
||||
MENewStream = 205,
|
||||
MEUpdatedStream = 206,
|
||||
MESourceStopped = 207,
|
||||
MEStreamStopped = 208,
|
||||
MESourcePaused = 209,
|
||||
MEStreamPaused = 210,
|
||||
MEEndOfPresentation = 211,
|
||||
MEEndOfStream = 212,
|
||||
MEMediaSample = 213,
|
||||
MEStreamTick = 214,
|
||||
MEStreamThinMode = 215,
|
||||
MEStreamFormatChanged = 216,
|
||||
MESourceRateChanged = 217,
|
||||
MEEndOfPresentationSegment = 218,
|
||||
MESourceCharacteristicsChanged = 219,
|
||||
MESourceRateChangeRequested = 220,
|
||||
MESourceMetadataChanged = 221,
|
||||
MESequencerSourceTopologyUpdated = 222,
|
||||
MESourceV1Anchor = MESequencerSourceTopologyUpdated,
|
||||
MESinkUnknown = 300,
|
||||
MEStreamSinkStarted = 301,
|
||||
MEStreamSinkStopped = 302,
|
||||
MEStreamSinkPaused = 303,
|
||||
MEStreamSinkRateChanged = 304,
|
||||
MEStreamSinkRequestSample = 305,
|
||||
MEStreamSinkMarker = 306,
|
||||
MEStreamSinkPrerolled = 307,
|
||||
MEStreamSinkScrubSampleComplete = 308,
|
||||
MEStreamSinkFormatChanged = 309,
|
||||
MEStreamSinkDeviceChanged = 310,
|
||||
MEQualityNotify = 311,
|
||||
MESinkInvalidated = 312,
|
||||
MEAudioSessionNameChanged = 313,
|
||||
MEAudioSessionVolumeChanged = 314,
|
||||
MEAudioSessionDeviceRemoved = 315,
|
||||
MEAudioSessionServerShutdown = 316,
|
||||
MEAudioSessionGroupingParamChanged = 317,
|
||||
MEAudioSessionIconChanged = 318,
|
||||
MEAudioSessionFormatChanged = 319,
|
||||
MEAudioSessionDisconnected = 320,
|
||||
MEAudioSessionExclusiveModeOverride = 321,
|
||||
MESinkV1Anchor = MEAudioSessionExclusiveModeOverride,
|
||||
METrustUnknown = 400,
|
||||
MEPolicyChanged = 401,
|
||||
MEContentProtectionMessage = 402,
|
||||
MEPolicySet = 403,
|
||||
METrustV1Anchor = MEPolicySet,
|
||||
MEWMDRMLicenseBackupCompleted = 500,
|
||||
MEWMDRMLicenseBackupProgress = 501,
|
||||
MEWMDRMLicenseRestoreCompleted = 502,
|
||||
MEWMDRMLicenseRestoreProgress = 503,
|
||||
MEWMDRMLicenseAcquisitionCompleted = 506,
|
||||
MEWMDRMIndividualizationCompleted = 508,
|
||||
MEWMDRMIndividualizationProgress = 513,
|
||||
MEWMDRMProximityCompleted = 514,
|
||||
MEWMDRMLicenseStoreCleaned = 515,
|
||||
MEWMDRMRevocationDownloadCompleted = 516,
|
||||
MEWMDRMV1Anchor = MEWMDRMRevocationDownloadCompleted,
|
||||
MEReservedMax = 10000
|
||||
};
|
||||
|
||||
typedef DWORD MediaEventType;
|
||||
|
||||
[
|
||||
|
|
Loading…
Add table
Reference in a new issue