mfplat: Remove remaining typedef for bytestream object structure.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2021-06-03 18:09:50 +03:00 committed by Alexandre Julliard
parent cdfe9ad67c
commit 602e99426f
1 changed files with 36 additions and 47 deletions

View File

@ -3458,7 +3458,7 @@ HRESULT WINAPI MFInitAttributesFromBlob(IMFAttributes *dest, const UINT8 *buffer
return hr; return hr;
} }
typedef struct bytestream struct bytestream
{ {
struct attributes attributes; struct attributes attributes;
IMFByteStream IMFByteStream_iface; IMFByteStream IMFByteStream_iface;
@ -3471,11 +3471,11 @@ typedef struct bytestream
DWORD capabilities; DWORD capabilities;
struct list pending; struct list pending;
CRITICAL_SECTION cs; CRITICAL_SECTION cs;
} mfbytestream; };
static inline mfbytestream *impl_from_IMFByteStream(IMFByteStream *iface) static inline struct bytestream *impl_from_IMFByteStream(IMFByteStream *iface)
{ {
return CONTAINING_RECORD(iface, mfbytestream, IMFByteStream_iface); return CONTAINING_RECORD(iface, struct bytestream, IMFByteStream_iface);
} }
static struct bytestream *impl_bytestream_from_IMFGetService(IMFGetService *iface) static struct bytestream *impl_bytestream_from_IMFGetService(IMFGetService *iface)
@ -3773,11 +3773,9 @@ static HRESULT WINAPI bytestream_GetCapabilities(IMFByteStream *iface, DWORD *ca
return S_OK; return S_OK;
} }
static HRESULT WINAPI mfbytestream_SetLength(IMFByteStream *iface, QWORD length) static HRESULT WINAPI bytestream_SetLength(IMFByteStream *iface, QWORD length)
{ {
mfbytestream *This = impl_from_IMFByteStream(iface); FIXME("%p, %s\n", iface, wine_dbgstr_longlong(length));
FIXME("%p, %s\n", This, wine_dbgstr_longlong(length));
return E_NOTIMPL; return E_NOTIMPL;
} }
@ -3880,11 +3878,9 @@ static HRESULT WINAPI bytestream_EndRead(IMFByteStream *iface, IMFAsyncResult *r
return bytestream_complete_io_request(stream, ASYNC_STREAM_OP_READ, result, byte_read); return bytestream_complete_io_request(stream, ASYNC_STREAM_OP_READ, result, byte_read);
} }
static HRESULT WINAPI mfbytestream_Write(IMFByteStream *iface, const BYTE *data, ULONG count, ULONG *written) static HRESULT WINAPI bytestream_Write(IMFByteStream *iface, const BYTE *data, ULONG count, ULONG *written)
{ {
mfbytestream *This = impl_from_IMFByteStream(iface); FIXME("%p, %p, %u, %p\n", iface, data, count, written);
FIXME("%p, %p, %u, %p\n", This, data, count, written);
return E_NOTIMPL; return E_NOTIMPL;
} }
@ -3908,30 +3904,24 @@ static HRESULT WINAPI bytestream_EndWrite(IMFByteStream *iface, IMFAsyncResult *
return bytestream_complete_io_request(stream, ASYNC_STREAM_OP_WRITE, result, written); return bytestream_complete_io_request(stream, ASYNC_STREAM_OP_WRITE, result, written);
} }
static HRESULT WINAPI mfbytestream_Seek(IMFByteStream *iface, MFBYTESTREAM_SEEK_ORIGIN seek, LONGLONG offset, static HRESULT WINAPI bytestream_Seek(IMFByteStream *iface, MFBYTESTREAM_SEEK_ORIGIN seek, LONGLONG offset,
DWORD flags, QWORD *current) DWORD flags, QWORD *current)
{ {
mfbytestream *This = impl_from_IMFByteStream(iface); FIXME("%p, %u, %s, 0x%08x, %p\n", iface, seek, wine_dbgstr_longlong(offset), flags, current);
FIXME("%p, %u, %s, 0x%08x, %p\n", This, seek, wine_dbgstr_longlong(offset), flags, current);
return E_NOTIMPL; return E_NOTIMPL;
} }
static HRESULT WINAPI mfbytestream_Flush(IMFByteStream *iface) static HRESULT WINAPI bytestream_Flush(IMFByteStream *iface)
{ {
mfbytestream *This = impl_from_IMFByteStream(iface); FIXME("%p\n", iface);
FIXME("%p\n", This);
return E_NOTIMPL; return E_NOTIMPL;
} }
static HRESULT WINAPI mfbytestream_Close(IMFByteStream *iface) static HRESULT WINAPI bytestream_Close(IMFByteStream *iface)
{ {
mfbytestream *This = impl_from_IMFByteStream(iface); FIXME("%p\n", iface);
FIXME("%p\n", This);
return E_NOTIMPL; return E_NOTIMPL;
} }
@ -3956,19 +3946,19 @@ static const IMFByteStreamVtbl bytestream_file_vtbl =
bytestream_Release, bytestream_Release,
bytestream_GetCapabilities, bytestream_GetCapabilities,
bytestream_file_GetLength, bytestream_file_GetLength,
mfbytestream_SetLength, bytestream_SetLength,
bytestream_file_GetCurrentPosition, bytestream_file_GetCurrentPosition,
bytestream_SetCurrentPosition, bytestream_SetCurrentPosition,
bytestream_file_IsEndOfStream, bytestream_file_IsEndOfStream,
bytestream_file_Read, bytestream_file_Read,
bytestream_BeginRead, bytestream_BeginRead,
bytestream_EndRead, bytestream_EndRead,
mfbytestream_Write, bytestream_Write,
bytestream_BeginWrite, bytestream_BeginWrite,
bytestream_EndWrite, bytestream_EndWrite,
mfbytestream_Seek, bytestream_Seek,
mfbytestream_Flush, bytestream_Flush,
mfbytestream_Close bytestream_Close
}; };
static HRESULT WINAPI bytestream_stream_GetLength(IMFByteStream *iface, QWORD *length) static HRESULT WINAPI bytestream_stream_GetLength(IMFByteStream *iface, QWORD *length)
@ -4146,35 +4136,34 @@ static const IMFByteStreamVtbl bytestream_stream_vtbl =
bytestream_stream_Close, bytestream_stream_Close,
}; };
static inline mfbytestream *impl_from_IMFByteStream_IMFAttributes(IMFAttributes *iface) static inline struct bytestream *impl_from_IMFByteStream_IMFAttributes(IMFAttributes *iface)
{ {
return CONTAINING_RECORD(iface, mfbytestream, attributes.IMFAttributes_iface); return CONTAINING_RECORD(iface, struct bytestream, attributes.IMFAttributes_iface);
} }
static HRESULT WINAPI mfbytestream_attributes_QueryInterface( static HRESULT WINAPI bytestream_attributes_QueryInterface(IMFAttributes *iface, REFIID riid, void **out)
IMFAttributes *iface, REFIID riid, void **out)
{ {
mfbytestream *This = impl_from_IMFByteStream_IMFAttributes(iface); struct bytestream *stream = impl_from_IMFByteStream_IMFAttributes(iface);
return IMFByteStream_QueryInterface(&This->IMFByteStream_iface, riid, out); return IMFByteStream_QueryInterface(&stream->IMFByteStream_iface, riid, out);
} }
static ULONG WINAPI mfbytestream_attributes_AddRef(IMFAttributes *iface) static ULONG WINAPI bytestream_attributes_AddRef(IMFAttributes *iface)
{ {
mfbytestream *This = impl_from_IMFByteStream_IMFAttributes(iface); struct bytestream *stream = impl_from_IMFByteStream_IMFAttributes(iface);
return IMFByteStream_AddRef(&This->IMFByteStream_iface); return IMFByteStream_AddRef(&stream->IMFByteStream_iface);
} }
static ULONG WINAPI mfbytestream_attributes_Release(IMFAttributes *iface) static ULONG WINAPI bytestream_attributes_Release(IMFAttributes *iface)
{ {
mfbytestream *This = impl_from_IMFByteStream_IMFAttributes(iface); struct bytestream *stream = impl_from_IMFByteStream_IMFAttributes(iface);
return IMFByteStream_Release(&This->IMFByteStream_iface); return IMFByteStream_Release(&stream->IMFByteStream_iface);
} }
static const IMFAttributesVtbl mfbytestream_attributes_vtbl = static const IMFAttributesVtbl bytestream_attributes_vtbl =
{ {
mfbytestream_attributes_QueryInterface, bytestream_attributes_QueryInterface,
mfbytestream_attributes_AddRef, bytestream_attributes_AddRef,
mfbytestream_attributes_Release, bytestream_attributes_Release,
mfattributes_GetItem, mfattributes_GetItem,
mfattributes_GetItemType, mfattributes_GetItemType,
mfattributes_CompareItem, mfattributes_CompareItem,
@ -4311,7 +4300,7 @@ HRESULT WINAPI MFCreateMFByteStreamOnStream(IStream *stream, IMFByteStream **byt
} }
object->IMFByteStream_iface.lpVtbl = &bytestream_stream_vtbl; object->IMFByteStream_iface.lpVtbl = &bytestream_stream_vtbl;
object->attributes.IMFAttributes_iface.lpVtbl = &mfbytestream_attributes_vtbl; object->attributes.IMFAttributes_iface.lpVtbl = &bytestream_attributes_vtbl;
object->read_callback.lpVtbl = &bytestream_stream_read_callback_vtbl; object->read_callback.lpVtbl = &bytestream_stream_read_callback_vtbl;
object->write_callback.lpVtbl = &bytestream_stream_write_callback_vtbl; object->write_callback.lpVtbl = &bytestream_stream_write_callback_vtbl;
InitializeCriticalSection(&object->cs); InitializeCriticalSection(&object->cs);
@ -4478,7 +4467,7 @@ HRESULT WINAPI MFCreateFile(MF_FILE_ACCESSMODE accessmode, MF_FILE_OPENMODE open
return hr; return hr;
} }
object->IMFByteStream_iface.lpVtbl = &bytestream_file_vtbl; object->IMFByteStream_iface.lpVtbl = &bytestream_file_vtbl;
object->attributes.IMFAttributes_iface.lpVtbl = &mfbytestream_attributes_vtbl; object->attributes.IMFAttributes_iface.lpVtbl = &bytestream_attributes_vtbl;
object->IMFGetService_iface.lpVtbl = &bytestream_file_getservice_vtbl; object->IMFGetService_iface.lpVtbl = &bytestream_file_getservice_vtbl;
object->read_callback.lpVtbl = &bytestream_file_read_callback_vtbl; object->read_callback.lpVtbl = &bytestream_file_read_callback_vtbl;
object->write_callback.lpVtbl = &bytestream_file_write_callback_vtbl; object->write_callback.lpVtbl = &bytestream_file_write_callback_vtbl;