Commit ae220de0 authored by Sven Baars's avatar Sven Baars Committed by Alexandre Julliard

mfplat: Move IMFAttributes interface up to avoid forward declarations.

parent ef19a461
......@@ -448,27 +448,27 @@ HRESULT WINAPI MFCopyImage(BYTE *dest, LONG deststride, const BYTE *src, LONG sr
return E_NOTIMPL;
}
typedef struct _mfbytestream
typedef struct _mfattributes
{
IMFByteStream IMFByteStream_iface;
IMFAttributes IMFAttributes_iface;
LONG ref;
} mfbytestream;
} mfattributes;
static inline mfbytestream *impl_from_IMFByteStream(IMFByteStream *iface)
static inline mfattributes *impl_from_IMFAttributes(IMFAttributes *iface)
{
return CONTAINING_RECORD(iface, mfbytestream, IMFByteStream_iface);
return CONTAINING_RECORD(iface, mfattributes, IMFAttributes_iface);
}
static HRESULT WINAPI mfbytestream_QueryInterface(IMFByteStream *iface, REFIID riid, void **out)
static HRESULT WINAPI mfattributes_QueryInterface(IMFAttributes *iface, REFIID riid, void **out)
{
mfbytestream *This = impl_from_IMFByteStream(iface);
mfattributes *This = impl_from_IMFAttributes(iface);
TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), out);
if(IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IMFByteStream))
IsEqualGUID(riid, &IID_IMFAttributes))
{
*out = &This->IMFByteStream_iface;
*out = &This->IMFAttributes_iface;
}
else
{
......@@ -481,9 +481,9 @@ static HRESULT WINAPI mfbytestream_QueryInterface(IMFByteStream *iface, REFIID r
return S_OK;
}
static ULONG WINAPI mfbytestream_AddRef(IMFByteStream *iface)
static ULONG WINAPI mfattributes_AddRef(IMFAttributes *iface)
{
mfbytestream *This = impl_from_IMFByteStream(iface);
mfattributes *This = impl_from_IMFAttributes(iface);
ULONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p) ref=%u\n", This, ref);
......@@ -491,9 +491,9 @@ static ULONG WINAPI mfbytestream_AddRef(IMFByteStream *iface)
return ref;
}
static ULONG WINAPI mfbytestream_Release(IMFByteStream *iface)
static ULONG WINAPI mfattributes_Release(IMFAttributes *iface)
{
mfbytestream *This = impl_from_IMFByteStream(iface);
mfattributes *This = impl_from_IMFAttributes(iface);
ULONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p) ref=%u\n", This, ref);
......@@ -506,302 +506,366 @@ static ULONG WINAPI mfbytestream_Release(IMFByteStream *iface)
return ref;
}
static HRESULT WINAPI mfbytestream_GetCapabilities(IMFByteStream *iface, DWORD *capabilities)
static HRESULT WINAPI mfattributes_GetItem(IMFAttributes *iface, REFGUID key, PROPVARIANT *value)
{
mfbytestream *This = impl_from_IMFByteStream(iface);
mfattributes *This = impl_from_IMFAttributes(iface);
FIXME("%p, %p\n", This, capabilities);
FIXME("%p, %s, %p\n", This, debugstr_guid(key), value);
return E_NOTIMPL;
}
static HRESULT WINAPI mfbytestream_GetLength(IMFByteStream *iface, QWORD *length)
static HRESULT WINAPI mfattributes_GetItemType(IMFAttributes *iface, REFGUID key, MF_ATTRIBUTE_TYPE *type)
{
mfbytestream *This = impl_from_IMFByteStream(iface);
mfattributes *This = impl_from_IMFAttributes(iface);
FIXME("%p, %p\n", This, length);
FIXME("%p, %s, %p\n", This, debugstr_guid(key), type);
return E_NOTIMPL;
}
static HRESULT WINAPI mfbytestream_SetLength(IMFByteStream *iface, QWORD length)
static HRESULT WINAPI mfattributes_CompareItem(IMFAttributes *iface, REFGUID key, REFPROPVARIANT value, BOOL *result)
{
mfbytestream *This = impl_from_IMFByteStream(iface);
mfattributes *This = impl_from_IMFAttributes(iface);
FIXME("%p, %s\n", This, wine_dbgstr_longlong(length));
FIXME("%p, %s, %p, %p\n", This, debugstr_guid(key), value, result);
return E_NOTIMPL;
}
static HRESULT WINAPI mfbytestream_GetCurrentPosition(IMFByteStream *iface, QWORD *position)
static HRESULT WINAPI mfattributes_Compare(IMFAttributes *iface, IMFAttributes *theirs, MF_ATTRIBUTES_MATCH_TYPE type,
BOOL *result)
{
mfbytestream *This = impl_from_IMFByteStream(iface);
mfattributes *This = impl_from_IMFAttributes(iface);
FIXME("%p, %p\n", This, position);
FIXME("%p, %p, %d, %p\n", This, theirs, type, result);
return E_NOTIMPL;
}
static HRESULT WINAPI mfbytestream_SetCurrentPosition(IMFByteStream *iface, QWORD position)
static HRESULT WINAPI mfattributes_GetUINT32(IMFAttributes *iface, REFGUID key, UINT32 *value)
{
mfbytestream *This = impl_from_IMFByteStream(iface);
mfattributes *This = impl_from_IMFAttributes(iface);
FIXME("%p, %s\n", This, wine_dbgstr_longlong(position));
FIXME("%p, %s, %p\n", This, debugstr_guid(key), value);
return E_NOTIMPL;
}
static HRESULT WINAPI mfbytestream_IsEndOfStream(IMFByteStream *iface, BOOL *endstream)
static HRESULT WINAPI mfattributes_GetUINT64(IMFAttributes *iface, REFGUID key, UINT64 *value)
{
mfbytestream *This = impl_from_IMFByteStream(iface);
FIXME("%p, %p\n", This, endstream);
mfattributes *This = impl_from_IMFAttributes(iface);
if(endstream)
*endstream = TRUE;
FIXME("%p, %s, %p\n", This, debugstr_guid(key), value);
return S_OK;
return E_NOTIMPL;
}
static HRESULT WINAPI mfbytestream_Read(IMFByteStream *iface, BYTE *data, ULONG count, ULONG *byte_read)
static HRESULT WINAPI mfattributes_GetDouble(IMFAttributes *iface, REFGUID key, double *value)
{
mfbytestream *This = impl_from_IMFByteStream(iface);
mfattributes *This = impl_from_IMFAttributes(iface);
FIXME("%p, %p, %u, %p\n", This, data, count, byte_read);
FIXME("%p, %s, %p\n", This, debugstr_guid(key), value);
return E_NOTIMPL;
}
static HRESULT WINAPI mfbytestream_BeginRead(IMFByteStream *iface, BYTE *data, ULONG count,
IMFAsyncCallback *callback, IUnknown *state)
static HRESULT WINAPI mfattributes_GetGUID(IMFAttributes *iface, REFGUID key, GUID *value)
{
mfbytestream *This = impl_from_IMFByteStream(iface);
mfattributes *This = impl_from_IMFAttributes(iface);
FIXME("%p, %p, %u, %p, %p\n", This, data, count, callback, state);
FIXME("%p, %s, %p\n", This, debugstr_guid(key), value);
return E_NOTIMPL;
}
static HRESULT WINAPI mfbytestream_EndRead(IMFByteStream *iface, IMFAsyncResult *result, ULONG *byte_read)
static HRESULT WINAPI mfattributes_GetStringLength(IMFAttributes *iface, REFGUID key, UINT32 *length)
{
mfbytestream *This = impl_from_IMFByteStream(iface);
mfattributes *This = impl_from_IMFAttributes(iface);
FIXME("%p, %p, %p\n", This, result, byte_read);
FIXME("%p, %s, %p\n", This, debugstr_guid(key), length);
return E_NOTIMPL;
}
static HRESULT WINAPI mfbytestream_Write(IMFByteStream *iface, const BYTE *data, ULONG count, ULONG *written)
static HRESULT WINAPI mfattributes_GetString(IMFAttributes *iface, REFGUID key, WCHAR *value,
UINT32 size, UINT32 *length)
{
mfbytestream *This = impl_from_IMFByteStream(iface);
mfattributes *This = impl_from_IMFAttributes(iface);
FIXME("%p, %p, %u, %p\n", This, data, count, written);
FIXME("%p, %s, %p, %d, %p\n", This, debugstr_guid(key), value, size, length);
return E_NOTIMPL;
}
static HRESULT WINAPI mfbytestream_BeginWrite(IMFByteStream *iface, const BYTE *data, ULONG count,
IMFAsyncCallback *callback, IUnknown *state)
static HRESULT WINAPI mfattributes_GetAllocatedString(IMFAttributes *iface, REFGUID key,
WCHAR **value, UINT32 *length)
{
mfbytestream *This = impl_from_IMFByteStream(iface);
mfattributes *This = impl_from_IMFAttributes(iface);
FIXME("%p, %p, %u, %p, %p\n", This, data, count, callback, state);
FIXME("%p, %s, %p, %p\n", This, debugstr_guid(key), value, length);
return E_NOTIMPL;
}
static HRESULT WINAPI mfbytestream_EndWrite(IMFByteStream *iface, IMFAsyncResult *result, ULONG *written)
static HRESULT WINAPI mfattributes_GetBlobSize(IMFAttributes *iface, REFGUID key, UINT32 *size)
{
mfbytestream *This = impl_from_IMFByteStream(iface);
mfattributes *This = impl_from_IMFAttributes(iface);
FIXME("%p, %p, %p\n", This, result, written);
FIXME("%p, %s, %p\n", This, debugstr_guid(key), size);
return E_NOTIMPL;
}
static HRESULT WINAPI mfbytestream_Seek(IMFByteStream *iface, MFBYTESTREAM_SEEK_ORIGIN seek, LONGLONG offset,
DWORD flags, QWORD *current)
static HRESULT WINAPI mfattributes_GetBlob(IMFAttributes *iface, REFGUID key, UINT8 *buf,
UINT32 bufsize, UINT32 *blobsize)
{
mfbytestream *This = impl_from_IMFByteStream(iface);
mfattributes *This = impl_from_IMFAttributes(iface);
FIXME("%p, %u, %s, 0x%08x, %p\n", This, seek, wine_dbgstr_longlong(offset), flags, current);
FIXME("%p, %s, %p, %d, %p\n", This, debugstr_guid(key), buf, bufsize, blobsize);
return E_NOTIMPL;
}
static HRESULT WINAPI mfbytestream_Flush(IMFByteStream *iface)
static HRESULT WINAPI mfattributes_GetAllocatedBlob(IMFAttributes *iface, REFGUID key, UINT8 **buf, UINT32 *size)
{
mfbytestream *This = impl_from_IMFByteStream(iface);
mfattributes *This = impl_from_IMFAttributes(iface);
FIXME("%p\n", This);
FIXME("%p, %s, %p, %p\n", This, debugstr_guid(key), buf, size);
return E_NOTIMPL;
}
static HRESULT WINAPI mfbytestream_Close(IMFByteStream *iface)
static HRESULT WINAPI mfattributes_GetUnknown(IMFAttributes *iface, REFGUID key, REFIID riid, void **ppv)
{
mfbytestream *This = impl_from_IMFByteStream(iface);
mfattributes *This = impl_from_IMFAttributes(iface);
FIXME("%p\n", This);
FIXME("%p, %s, %s, %p\n", This, debugstr_guid(key), debugstr_guid(riid), ppv);
return E_NOTIMPL;
}
static const IMFByteStreamVtbl mfbytesteam_vtbl =
{
mfbytestream_QueryInterface,
mfbytestream_AddRef,
mfbytestream_Release,
mfbytestream_GetCapabilities,
mfbytestream_GetLength,
mfbytestream_SetLength,
mfbytestream_GetCurrentPosition,
mfbytestream_SetCurrentPosition,
mfbytestream_IsEndOfStream,
mfbytestream_Read,
mfbytestream_BeginRead,
mfbytestream_EndRead,
mfbytestream_Write,
mfbytestream_BeginWrite,
mfbytestream_EndWrite,
mfbytestream_Seek,
mfbytestream_Flush,
mfbytestream_Close
};
HRESULT WINAPI MFCreateMFByteStreamOnStream(IStream *stream, IMFByteStream **bytestream)
static HRESULT WINAPI mfattributes_SetItem(IMFAttributes *iface, REFGUID key, REFPROPVARIANT Value)
{
mfbytestream *object;
mfattributes *This = impl_from_IMFAttributes(iface);
TRACE("(%p, %p): stub\n", stream, bytestream);
FIXME("%p, %s, %p\n", This, debugstr_guid(key), Value);
object = heap_alloc( sizeof(*object) );
if(!object)
return E_OUTOFMEMORY;
return E_NOTIMPL;
}
object->ref = 1;
object->IMFByteStream_iface.lpVtbl = &mfbytesteam_vtbl;
static HRESULT WINAPI mfattributes_DeleteItem(IMFAttributes *iface, REFGUID key)
{
mfattributes *This = impl_from_IMFAttributes(iface);
*bytestream = &object->IMFByteStream_iface;
FIXME("%p, %s\n", This, debugstr_guid(key));
return S_OK;
return E_NOTIMPL;
}
static HRESULT WINAPI MFPluginControl_QueryInterface(IMFPluginControl *iface, REFIID riid, void **ppv)
static HRESULT WINAPI mfattributes_DeleteAllItems(IMFAttributes *iface)
{
if(IsEqualGUID(riid, &IID_IUnknown)) {
TRACE("(IID_IUnknown %p)\n", ppv);
*ppv = iface;
}else if(IsEqualGUID(riid, &IID_IMFPluginControl)) {
TRACE("(IID_IMFPluginControl %p)\n", ppv);
*ppv = iface;
}else {
FIXME("(%s %p)\n", debugstr_guid(riid), ppv);
*ppv = NULL;
return E_NOINTERFACE;
}
mfattributes *This = impl_from_IMFAttributes(iface);
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
FIXME("%p\n", This);
return E_NOTIMPL;
}
static ULONG WINAPI MFPluginControl_AddRef(IMFPluginControl *iface)
static HRESULT WINAPI mfattributes_SetUINT32(IMFAttributes *iface, REFGUID key, UINT32 value)
{
TRACE("\n");
return 2;
mfattributes *This = impl_from_IMFAttributes(iface);
FIXME("%p, %s, %d\n", This, debugstr_guid(key), value);
return E_NOTIMPL;
}
static ULONG WINAPI MFPluginControl_Release(IMFPluginControl *iface)
static HRESULT WINAPI mfattributes_SetUINT64(IMFAttributes *iface, REFGUID key, UINT64 value)
{
TRACE("\n");
return 1;
mfattributes *This = impl_from_IMFAttributes(iface);
FIXME("%p, %s, %s\n", This, debugstr_guid(key), wine_dbgstr_longlong(value));
return E_NOTIMPL;
}
static HRESULT WINAPI MFPluginControl_GetPreferredClsid(IMFPluginControl *iface, DWORD plugin_type,
const WCHAR *selector, CLSID *clsid)
static HRESULT WINAPI mfattributes_SetDouble(IMFAttributes *iface, REFGUID key, double value)
{
FIXME("(%d %s %p)\n", plugin_type, debugstr_w(selector), clsid);
mfattributes *This = impl_from_IMFAttributes(iface);
FIXME("%p, %s, %f\n", This, debugstr_guid(key), value);
return E_NOTIMPL;
}
static HRESULT WINAPI MFPluginControl_GetPreferredClsidByIndex(IMFPluginControl *iface, DWORD plugin_type,
DWORD index, WCHAR **selector, CLSID *clsid)
static HRESULT WINAPI mfattributes_SetGUID(IMFAttributes *iface, REFGUID key, REFGUID value)
{
FIXME("(%d %d %p %p)\n", plugin_type, index, selector, clsid);
mfattributes *This = impl_from_IMFAttributes(iface);
FIXME("%p, %s, %s\n", This, debugstr_guid(key), debugstr_guid(value));
return E_NOTIMPL;
}
static HRESULT WINAPI MFPluginControl_SetPreferredClsid(IMFPluginControl *iface, DWORD plugin_type,
const WCHAR *selector, const CLSID *clsid)
static HRESULT WINAPI mfattributes_SetString(IMFAttributes *iface, REFGUID key, const WCHAR *value)
{
FIXME("(%d %s %s)\n", plugin_type, debugstr_w(selector), debugstr_guid(clsid));
mfattributes *This = impl_from_IMFAttributes(iface);
FIXME("%p, %s, %s\n", This, debugstr_guid(key), debugstr_w(value));
return E_NOTIMPL;
}
static HRESULT WINAPI MFPluginControl_IsDisabled(IMFPluginControl *iface, DWORD plugin_type, REFCLSID clsid)
static HRESULT WINAPI mfattributes_SetBlob(IMFAttributes *iface, REFGUID key, const UINT8 *buf, UINT32 size)
{
FIXME("(%d %s)\n", plugin_type, debugstr_guid(clsid));
mfattributes *This = impl_from_IMFAttributes(iface);
FIXME("%p, %s, %p, %d\n", This, debugstr_guid(key), buf, size);
return E_NOTIMPL;
}
static HRESULT WINAPI MFPluginControl_GetDisabledByIndex(IMFPluginControl *iface, DWORD plugin_type, DWORD index, CLSID *clsid)
static HRESULT WINAPI mfattributes_SetUnknown(IMFAttributes *iface, REFGUID key, IUnknown *unknown)
{
FIXME("(%d %d %p)\n", plugin_type, index, clsid);
mfattributes *This = impl_from_IMFAttributes(iface);
FIXME("%p, %s, %p\n", This, debugstr_guid(key), unknown);
return E_NOTIMPL;
}
static HRESULT WINAPI MFPluginControl_SetDisabled(IMFPluginControl *iface, DWORD plugin_type, REFCLSID clsid, BOOL disabled)
static HRESULT WINAPI mfattributes_LockStore(IMFAttributes *iface)
{
FIXME("(%d %s %x)\n", plugin_type, debugstr_guid(clsid), disabled);
mfattributes *This = impl_from_IMFAttributes(iface);
FIXME("%p\n", This);
return E_NOTIMPL;
}
static const IMFPluginControlVtbl MFPluginControlVtbl = {
MFPluginControl_QueryInterface,
MFPluginControl_AddRef,
MFPluginControl_Release,
MFPluginControl_GetPreferredClsid,
MFPluginControl_GetPreferredClsidByIndex,
MFPluginControl_SetPreferredClsid,
MFPluginControl_IsDisabled,
MFPluginControl_GetDisabledByIndex,
MFPluginControl_SetDisabled
static HRESULT WINAPI mfattributes_UnlockStore(IMFAttributes *iface)
{
mfattributes *This = impl_from_IMFAttributes(iface);
FIXME("%p\n", This);
return E_NOTIMPL;
}
static HRESULT WINAPI mfattributes_GetCount(IMFAttributes *iface, UINT32 *items)
{
mfattributes *This = impl_from_IMFAttributes(iface);
FIXME("%p, %p\n", This, items);
if(items)
*items = 0;
return E_NOTIMPL;
}
static HRESULT WINAPI mfattributes_GetItemByIndex(IMFAttributes *iface, UINT32 index, GUID *key, PROPVARIANT *value)
{
mfattributes *This = impl_from_IMFAttributes(iface);
FIXME("%p, %d, %p, %p\n", This, index, key, value);
return E_NOTIMPL;
}
static HRESULT WINAPI mfattributes_CopyAllItems(IMFAttributes *iface, IMFAttributes *dest)
{
mfattributes *This = impl_from_IMFAttributes(iface);
FIXME("%p, %p\n", This, dest);
return E_NOTIMPL;
}
static const IMFAttributesVtbl mfattributes_vtbl =
{
mfattributes_QueryInterface,
mfattributes_AddRef,
mfattributes_Release,
mfattributes_GetItem,
mfattributes_GetItemType,
mfattributes_CompareItem,
mfattributes_Compare,
mfattributes_GetUINT32,
mfattributes_GetUINT64,
mfattributes_GetDouble,
mfattributes_GetGUID,
mfattributes_GetStringLength,
mfattributes_GetString,
mfattributes_GetAllocatedString,
mfattributes_GetBlobSize,
mfattributes_GetBlob,
mfattributes_GetAllocatedBlob,
mfattributes_GetUnknown,
mfattributes_SetItem,
mfattributes_DeleteItem,
mfattributes_DeleteAllItems,
mfattributes_SetUINT32,
mfattributes_SetUINT64,
mfattributes_SetDouble,
mfattributes_SetGUID,
mfattributes_SetString,
mfattributes_SetBlob,
mfattributes_SetUnknown,
mfattributes_LockStore,
mfattributes_UnlockStore,
mfattributes_GetCount,
mfattributes_GetItemByIndex,
mfattributes_CopyAllItems
};
static IMFPluginControl plugin_control = { &MFPluginControlVtbl };
static void init_attribute_object(mfattributes *object, UINT32 size)
{
object->ref = 1;
object->IMFAttributes_iface.lpVtbl = &mfattributes_vtbl;
}
/***********************************************************************
* MFGetPluginControl (mfplat.@)
* MFCreateAttributes (mfplat.@)
*/
HRESULT WINAPI MFGetPluginControl(IMFPluginControl **ret)
HRESULT WINAPI MFCreateAttributes(IMFAttributes **attributes, UINT32 size)
{
TRACE("(%p)\n", ret);
mfattributes *object;
TRACE("%p, %d\n", attributes, size);
object = HeapAlloc( GetProcessHeap(), 0, sizeof(*object) );
if(!object)
return E_OUTOFMEMORY;
init_attribute_object(object, size);
*attributes = &object->IMFAttributes_iface;
*ret = &plugin_control;
return S_OK;
}
typedef struct _mfattributes
typedef struct _mfbytestream
{
IMFAttributes IMFAttributes_iface;
IMFByteStream IMFByteStream_iface;
LONG ref;
} mfattributes;
} mfbytestream;
static inline mfattributes *impl_from_IMFAttributes(IMFAttributes *iface)
static inline mfbytestream *impl_from_IMFByteStream(IMFByteStream *iface)
{
return CONTAINING_RECORD(iface, mfattributes, IMFAttributes_iface);
return CONTAINING_RECORD(iface, mfbytestream, IMFByteStream_iface);
}
static HRESULT WINAPI mfattributes_QueryInterface(IMFAttributes *iface, REFIID riid, void **out)
static HRESULT WINAPI mfbytestream_QueryInterface(IMFByteStream *iface, REFIID riid, void **out)
{
mfattributes *This = impl_from_IMFAttributes(iface);
mfbytestream *This = impl_from_IMFByteStream(iface);
TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), out);
if(IsEqualGUID(riid, &IID_IUnknown) ||
IsEqualGUID(riid, &IID_IMFAttributes))
IsEqualGUID(riid, &IID_IMFByteStream))
{
*out = &This->IMFAttributes_iface;
*out = &This->IMFByteStream_iface;
}
else
{
......@@ -814,9 +878,9 @@ static HRESULT WINAPI mfattributes_QueryInterface(IMFAttributes *iface, REFIID r
return S_OK;
}
static ULONG WINAPI mfattributes_AddRef(IMFAttributes *iface)
static ULONG WINAPI mfbytestream_AddRef(IMFByteStream *iface)
{
mfattributes *This = impl_from_IMFAttributes(iface);
mfbytestream *This = impl_from_IMFByteStream(iface);
ULONG ref = InterlockedIncrement(&This->ref);
TRACE("(%p) ref=%u\n", This, ref);
......@@ -824,9 +888,9 @@ static ULONG WINAPI mfattributes_AddRef(IMFAttributes *iface)
return ref;
}
static ULONG WINAPI mfattributes_Release(IMFAttributes *iface)
static ULONG WINAPI mfbytestream_Release(IMFByteStream *iface)
{
mfattributes *This = impl_from_IMFAttributes(iface);
mfbytestream *This = impl_from_IMFByteStream(iface);
ULONG ref = InterlockedDecrement(&This->ref);
TRACE("(%p) ref=%u\n", This, ref);
......@@ -839,342 +903,278 @@ static ULONG WINAPI mfattributes_Release(IMFAttributes *iface)
return ref;
}
static HRESULT WINAPI mfattributes_GetItem(IMFAttributes *iface, REFGUID key, PROPVARIANT *value)
{
mfattributes *This = impl_from_IMFAttributes(iface);
FIXME("%p, %s, %p\n", This, debugstr_guid(key), value);
return E_NOTIMPL;
}
static HRESULT WINAPI mfattributes_GetItemType(IMFAttributes *iface, REFGUID key, MF_ATTRIBUTE_TYPE *type)
{
mfattributes *This = impl_from_IMFAttributes(iface);
FIXME("%p, %s, %p\n", This, debugstr_guid(key), type);
return E_NOTIMPL;
}
static HRESULT WINAPI mfattributes_CompareItem(IMFAttributes *iface, REFGUID key, REFPROPVARIANT value, BOOL *result)
static HRESULT WINAPI mfbytestream_GetCapabilities(IMFByteStream *iface, DWORD *capabilities)
{
mfattributes *This = impl_from_IMFAttributes(iface);
mfbytestream *This = impl_from_IMFByteStream(iface);
FIXME("%p, %s, %p, %p\n", This, debugstr_guid(key), value, result);
FIXME("%p, %p\n", This, capabilities);
return E_NOTIMPL;
}
static HRESULT WINAPI mfattributes_Compare(IMFAttributes *iface, IMFAttributes *theirs, MF_ATTRIBUTES_MATCH_TYPE type,
BOOL *result)
static HRESULT WINAPI mfbytestream_GetLength(IMFByteStream *iface, QWORD *length)
{
mfattributes *This = impl_from_IMFAttributes(iface);
mfbytestream *This = impl_from_IMFByteStream(iface);
FIXME("%p, %p, %d, %p\n", This, theirs, type, result);
FIXME("%p, %p\n", This, length);
return E_NOTIMPL;
}
static HRESULT WINAPI mfattributes_GetUINT32(IMFAttributes *iface, REFGUID key, UINT32 *value)
static HRESULT WINAPI mfbytestream_SetLength(IMFByteStream *iface, QWORD length)
{
mfattributes *This = impl_from_IMFAttributes(iface);
mfbytestream *This = impl_from_IMFByteStream(iface);
FIXME("%p, %s, %p\n", This, debugstr_guid(key), value);
FIXME("%p, %s\n", This, wine_dbgstr_longlong(length));
return E_NOTIMPL;
}
static HRESULT WINAPI mfattributes_GetUINT64(IMFAttributes *iface, REFGUID key, UINT64 *value)
static HRESULT WINAPI mfbytestream_GetCurrentPosition(IMFByteStream *iface, QWORD *position)
{
mfattributes *This = impl_from_IMFAttributes(iface);
mfbytestream *This = impl_from_IMFByteStream(iface);
FIXME("%p, %s, %p\n", This, debugstr_guid(key), value);
FIXME("%p, %p\n", This, position);
return E_NOTIMPL;
}
static HRESULT WINAPI mfattributes_GetDouble(IMFAttributes *iface, REFGUID key, double *value)
static HRESULT WINAPI mfbytestream_SetCurrentPosition(IMFByteStream *iface, QWORD position)
{
mfattributes *This = impl_from_IMFAttributes(iface);
mfbytestream *This = impl_from_IMFByteStream(iface);
FIXME("%p, %s, %p\n", This, debugstr_guid(key), value);
FIXME("%p, %s\n", This, wine_dbgstr_longlong(position));
return E_NOTIMPL;
}
static HRESULT WINAPI mfattributes_GetGUID(IMFAttributes *iface, REFGUID key, GUID *value)
static HRESULT WINAPI mfbytestream_IsEndOfStream(IMFByteStream *iface, BOOL *endstream)
{
mfattributes *This = impl_from_IMFAttributes(iface);
FIXME("%p, %s, %p\n", This, debugstr_guid(key), value);
return E_NOTIMPL;
}
mfbytestream *This = impl_from_IMFByteStream(iface);
static HRESULT WINAPI mfattributes_GetStringLength(IMFAttributes *iface, REFGUID key, UINT32 *length)
{
mfattributes *This = impl_from_IMFAttributes(iface);
FIXME("%p, %p\n", This, endstream);
FIXME("%p, %s, %p\n", This, debugstr_guid(key), length);
if(endstream)
*endstream = TRUE;
return E_NOTIMPL;
return S_OK;
}
static HRESULT WINAPI mfattributes_GetString(IMFAttributes *iface, REFGUID key, WCHAR *value,
UINT32 size, UINT32 *length)
static HRESULT WINAPI mfbytestream_Read(IMFByteStream *iface, BYTE *data, ULONG count, ULONG *byte_read)
{
mfattributes *This = impl_from_IMFAttributes(iface);
mfbytestream *This = impl_from_IMFByteStream(iface);
FIXME("%p, %s, %p, %d, %p\n", This, debugstr_guid(key), value, size, length);
FIXME("%p, %p, %u, %p\n", This, data, count, byte_read);
return E_NOTIMPL;
}
static HRESULT WINAPI mfattributes_GetAllocatedString(IMFAttributes *iface, REFGUID key,
WCHAR **value, UINT32 *length)
static HRESULT WINAPI mfbytestream_BeginRead(IMFByteStream *iface, BYTE *data, ULONG count,
IMFAsyncCallback *callback, IUnknown *state)
{
mfattributes *This = impl_from_IMFAttributes(iface);
mfbytestream *This = impl_from_IMFByteStream(iface);
FIXME("%p, %s, %p, %p\n", This, debugstr_guid(key), value, length);
FIXME("%p, %p, %u, %p, %p\n", This, data, count, callback, state);
return E_NOTIMPL;
}
static HRESULT WINAPI mfattributes_GetBlobSize(IMFAttributes *iface, REFGUID key, UINT32 *size)
static HRESULT WINAPI mfbytestream_EndRead(IMFByteStream *iface, IMFAsyncResult *result, ULONG *byte_read)
{
mfattributes *This = impl_from_IMFAttributes(iface);
mfbytestream *This = impl_from_IMFByteStream(iface);
FIXME("%p, %s, %p\n", This, debugstr_guid(key), size);
FIXME("%p, %p, %p\n", This, result, byte_read);
return E_NOTIMPL;
}
static HRESULT WINAPI mfattributes_GetBlob(IMFAttributes *iface, REFGUID key, UINT8 *buf,
UINT32 bufsize, UINT32 *blobsize)
static HRESULT WINAPI mfbytestream_Write(IMFByteStream *iface, const BYTE *data, ULONG count, ULONG *written)
{
mfattributes *This = impl_from_IMFAttributes(iface);
mfbytestream *This = impl_from_IMFByteStream(iface);
FIXME("%p, %s, %p, %d, %p\n", This, debugstr_guid(key), buf, bufsize, blobsize);
FIXME("%p, %p, %u, %p\n", This, data, count, written);
return E_NOTIMPL;
}
static HRESULT WINAPI mfattributes_GetAllocatedBlob(IMFAttributes *iface, REFGUID key, UINT8 **buf, UINT32 *size)
static HRESULT WINAPI mfbytestream_BeginWrite(IMFByteStream *iface, const BYTE *data, ULONG count,
IMFAsyncCallback *callback, IUnknown *state)
{
mfattributes *This = impl_from_IMFAttributes(iface);
mfbytestream *This = impl_from_IMFByteStream(iface);
FIXME("%p, %s, %p, %p\n", This, debugstr_guid(key), buf, size);
FIXME("%p, %p, %u, %p, %p\n", This, data, count, callback, state);
return E_NOTIMPL;
}
static HRESULT WINAPI mfattributes_GetUnknown(IMFAttributes *iface, REFGUID key, REFIID riid, void **ppv)
static HRESULT WINAPI mfbytestream_EndWrite(IMFByteStream *iface, IMFAsyncResult *result, ULONG *written)
{
mfattributes *This = impl_from_IMFAttributes(iface);
mfbytestream *This = impl_from_IMFByteStream(iface);
FIXME("%p, %s, %s, %p\n", This, debugstr_guid(key), debugstr_guid(riid), ppv);
FIXME("%p, %p, %p\n", This, result, written);
return E_NOTIMPL;
}
static HRESULT WINAPI mfattributes_SetItem(IMFAttributes *iface, REFGUID key, REFPROPVARIANT Value)
static HRESULT WINAPI mfbytestream_Seek(IMFByteStream *iface, MFBYTESTREAM_SEEK_ORIGIN seek, LONGLONG offset,
DWORD flags, QWORD *current)
{
mfattributes *This = impl_from_IMFAttributes(iface);
mfbytestream *This = impl_from_IMFByteStream(iface);
FIXME("%p, %s, %p\n", This, debugstr_guid(key), Value);
FIXME("%p, %u, %s, 0x%08x, %p\n", This, seek, wine_dbgstr_longlong(offset), flags, current);
return E_NOTIMPL;
}
static HRESULT WINAPI mfattributes_DeleteItem(IMFAttributes *iface, REFGUID key)
static HRESULT WINAPI mfbytestream_Flush(IMFByteStream *iface)
{
mfattributes *This = impl_from_IMFAttributes(iface);
mfbytestream *This = impl_from_IMFByteStream(iface);
FIXME("%p, %s\n", This, debugstr_guid(key));
FIXME("%p\n", This);
return E_NOTIMPL;
}
static HRESULT WINAPI mfattributes_DeleteAllItems(IMFAttributes *iface)
static HRESULT WINAPI mfbytestream_Close(IMFByteStream *iface)
{
mfattributes *This = impl_from_IMFAttributes(iface);
mfbytestream *This = impl_from_IMFByteStream(iface);
FIXME("%p\n", This);
return E_NOTIMPL;
}
static HRESULT WINAPI mfattributes_SetUINT32(IMFAttributes *iface, REFGUID key, UINT32 value)
static const IMFByteStreamVtbl mfbytesteam_vtbl =
{
mfattributes *This = impl_from_IMFAttributes(iface);
FIXME("%p, %s, %d\n", This, debugstr_guid(key), value);
return E_NOTIMPL;
}
mfbytestream_QueryInterface,
mfbytestream_AddRef,
mfbytestream_Release,
mfbytestream_GetCapabilities,
mfbytestream_GetLength,
mfbytestream_SetLength,
mfbytestream_GetCurrentPosition,
mfbytestream_SetCurrentPosition,
mfbytestream_IsEndOfStream,
mfbytestream_Read,
mfbytestream_BeginRead,
mfbytestream_EndRead,
mfbytestream_Write,
mfbytestream_BeginWrite,
mfbytestream_EndWrite,
mfbytestream_Seek,
mfbytestream_Flush,
mfbytestream_Close
};
static HRESULT WINAPI mfattributes_SetUINT64(IMFAttributes *iface, REFGUID key, UINT64 value)
HRESULT WINAPI MFCreateMFByteStreamOnStream(IStream *stream, IMFByteStream **bytestream)
{
mfattributes *This = impl_from_IMFAttributes(iface);
mfbytestream *object;
FIXME("%p, %s, %s\n", This, debugstr_guid(key), wine_dbgstr_longlong(value));
TRACE("(%p, %p): stub\n", stream, bytestream);
return E_NOTIMPL;
}
object = heap_alloc( sizeof(*object) );
if(!object)
return E_OUTOFMEMORY;
static HRESULT WINAPI mfattributes_SetDouble(IMFAttributes *iface, REFGUID key, double value)
{
mfattributes *This = impl_from_IMFAttributes(iface);
object->ref = 1;
object->IMFByteStream_iface.lpVtbl = &mfbytesteam_vtbl;
FIXME("%p, %s, %f\n", This, debugstr_guid(key), value);
*bytestream = &object->IMFByteStream_iface;
return E_NOTIMPL;
return S_OK;
}
static HRESULT WINAPI mfattributes_SetGUID(IMFAttributes *iface, REFGUID key, REFGUID value)
static HRESULT WINAPI MFPluginControl_QueryInterface(IMFPluginControl *iface, REFIID riid, void **ppv)
{
mfattributes *This = impl_from_IMFAttributes(iface);
FIXME("%p, %s, %s\n", This, debugstr_guid(key), debugstr_guid(value));
if(IsEqualGUID(riid, &IID_IUnknown)) {
TRACE("(IID_IUnknown %p)\n", ppv);
*ppv = iface;
}else if(IsEqualGUID(riid, &IID_IMFPluginControl)) {
TRACE("(IID_IMFPluginControl %p)\n", ppv);
*ppv = iface;
}else {
FIXME("(%s %p)\n", debugstr_guid(riid), ppv);
*ppv = NULL;
return E_NOINTERFACE;
}
return E_NOTIMPL;
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
}
static HRESULT WINAPI mfattributes_SetString(IMFAttributes *iface, REFGUID key, const WCHAR *value)
static ULONG WINAPI MFPluginControl_AddRef(IMFPluginControl *iface)
{
mfattributes *This = impl_from_IMFAttributes(iface);
FIXME("%p, %s, %s\n", This, debugstr_guid(key), debugstr_w(value));
return E_NOTIMPL;
TRACE("\n");
return 2;
}
static HRESULT WINAPI mfattributes_SetBlob(IMFAttributes *iface, REFGUID key, const UINT8 *buf, UINT32 size)
static ULONG WINAPI MFPluginControl_Release(IMFPluginControl *iface)
{
mfattributes *This = impl_from_IMFAttributes(iface);
FIXME("%p, %s, %p, %d\n", This, debugstr_guid(key), buf, size);
return E_NOTIMPL;
TRACE("\n");
return 1;
}
static HRESULT WINAPI mfattributes_SetUnknown(IMFAttributes *iface, REFGUID key, IUnknown *unknown)
static HRESULT WINAPI MFPluginControl_GetPreferredClsid(IMFPluginControl *iface, DWORD plugin_type,
const WCHAR *selector, CLSID *clsid)
{
mfattributes *This = impl_from_IMFAttributes(iface);
FIXME("%p, %s, %p\n", This, debugstr_guid(key), unknown);
FIXME("(%d %s %p)\n", plugin_type, debugstr_w(selector), clsid);
return E_NOTIMPL;
}
static HRESULT WINAPI mfattributes_LockStore(IMFAttributes *iface)
static HRESULT WINAPI MFPluginControl_GetPreferredClsidByIndex(IMFPluginControl *iface, DWORD plugin_type,
DWORD index, WCHAR **selector, CLSID *clsid)
{
mfattributes *This = impl_from_IMFAttributes(iface);
FIXME("%p\n", This);
FIXME("(%d %d %p %p)\n", plugin_type, index, selector, clsid);
return E_NOTIMPL;
}
static HRESULT WINAPI mfattributes_UnlockStore(IMFAttributes *iface)
static HRESULT WINAPI MFPluginControl_SetPreferredClsid(IMFPluginControl *iface, DWORD plugin_type,
const WCHAR *selector, const CLSID *clsid)
{
mfattributes *This = impl_from_IMFAttributes(iface);
FIXME("%p\n", This);
FIXME("(%d %s %s)\n", plugin_type, debugstr_w(selector), debugstr_guid(clsid));
return E_NOTIMPL;
}
static HRESULT WINAPI mfattributes_GetCount(IMFAttributes *iface, UINT32 *items)
static HRESULT WINAPI MFPluginControl_IsDisabled(IMFPluginControl *iface, DWORD plugin_type, REFCLSID clsid)
{
mfattributes *This = impl_from_IMFAttributes(iface);
FIXME("%p, %p\n", This, items);
if(items)
*items = 0;
FIXME("(%d %s)\n", plugin_type, debugstr_guid(clsid));
return E_NOTIMPL;
}
static HRESULT WINAPI mfattributes_GetItemByIndex(IMFAttributes *iface, UINT32 index, GUID *key, PROPVARIANT *value)
static HRESULT WINAPI MFPluginControl_GetDisabledByIndex(IMFPluginControl *iface, DWORD plugin_type, DWORD index, CLSID *clsid)
{
mfattributes *This = impl_from_IMFAttributes(iface);
FIXME("%p, %d, %p, %p\n", This, index, key, value);
FIXME("(%d %d %p)\n", plugin_type, index, clsid);
return E_NOTIMPL;
}
static HRESULT WINAPI mfattributes_CopyAllItems(IMFAttributes *iface, IMFAttributes *dest)
static HRESULT WINAPI MFPluginControl_SetDisabled(IMFPluginControl *iface, DWORD plugin_type, REFCLSID clsid, BOOL disabled)
{
mfattributes *This = impl_from_IMFAttributes(iface);
FIXME("%p, %p\n", This, dest);
FIXME("(%d %s %x)\n", plugin_type, debugstr_guid(clsid), disabled);
return E_NOTIMPL;
}
static const IMFAttributesVtbl mfattributes_vtbl =
{
mfattributes_QueryInterface,
mfattributes_AddRef,
mfattributes_Release,
mfattributes_GetItem,
mfattributes_GetItemType,
mfattributes_CompareItem,
mfattributes_Compare,
mfattributes_GetUINT32,
mfattributes_GetUINT64,
mfattributes_GetDouble,
mfattributes_GetGUID,
mfattributes_GetStringLength,
mfattributes_GetString,
mfattributes_GetAllocatedString,
mfattributes_GetBlobSize,
mfattributes_GetBlob,
mfattributes_GetAllocatedBlob,
mfattributes_GetUnknown,
mfattributes_SetItem,
mfattributes_DeleteItem,
mfattributes_DeleteAllItems,
mfattributes_SetUINT32,
mfattributes_SetUINT64,
mfattributes_SetDouble,
mfattributes_SetGUID,
mfattributes_SetString,
mfattributes_SetBlob,
mfattributes_SetUnknown,
mfattributes_LockStore,
mfattributes_UnlockStore,
mfattributes_GetCount,
mfattributes_GetItemByIndex,
mfattributes_CopyAllItems
static const IMFPluginControlVtbl MFPluginControlVtbl = {
MFPluginControl_QueryInterface,
MFPluginControl_AddRef,
MFPluginControl_Release,
MFPluginControl_GetPreferredClsid,
MFPluginControl_GetPreferredClsidByIndex,
MFPluginControl_SetPreferredClsid,
MFPluginControl_IsDisabled,
MFPluginControl_GetDisabledByIndex,
MFPluginControl_SetDisabled
};
static void init_attribute_object(mfattributes *object, UINT32 size)
{
object->ref = 1;
object->IMFAttributes_iface.lpVtbl = &mfattributes_vtbl;
}
static IMFPluginControl plugin_control = { &MFPluginControlVtbl };
/***********************************************************************
* MFCreateAttributes (mfplat.@)
* MFGetPluginControl (mfplat.@)
*/
HRESULT WINAPI MFCreateAttributes(IMFAttributes **attributes, UINT32 size)
HRESULT WINAPI MFGetPluginControl(IMFPluginControl **ret)
{
mfattributes *object;
TRACE("%p, %d\n", attributes, size);
object = HeapAlloc( GetProcessHeap(), 0, sizeof(*object) );
if(!object)
return E_OUTOFMEMORY;
init_attribute_object(object, size);
*attributes = &object->IMFAttributes_iface;
TRACE("(%p)\n", ret);
*ret = &plugin_control;
return S_OK;
}
......
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