Commit 8af6ed68 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

amstream: Get rid of the IAMMultiMediaStreamImpl typedef.

parent 0a7933a4
...@@ -30,7 +30,8 @@ ...@@ -30,7 +30,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(amstream); WINE_DEFAULT_DEBUG_CHANNEL(amstream);
typedef struct { struct multimedia_stream
{
IAMMultiMediaStream IAMMultiMediaStream_iface; IAMMultiMediaStream IAMMultiMediaStream_iface;
LONG ref; LONG ref;
IGraphBuilder* pFilterGraph; IGraphBuilder* pFilterGraph;
...@@ -42,18 +43,18 @@ typedef struct { ...@@ -42,18 +43,18 @@ typedef struct {
IAMMediaStream **pStreams; IAMMediaStream **pStreams;
STREAM_TYPE StreamType; STREAM_TYPE StreamType;
OAEVENT event; OAEVENT event;
} IAMMultiMediaStreamImpl; };
static inline IAMMultiMediaStreamImpl *impl_from_IAMMultiMediaStream(IAMMultiMediaStream *iface) static inline struct multimedia_stream *impl_from_IAMMultiMediaStream(IAMMultiMediaStream *iface)
{ {
return CONTAINING_RECORD(iface, IAMMultiMediaStreamImpl, IAMMultiMediaStream_iface); return CONTAINING_RECORD(iface, struct multimedia_stream, IAMMultiMediaStream_iface);
} }
static const struct IAMMultiMediaStreamVtbl AM_Vtbl; static const struct IAMMultiMediaStreamVtbl AM_Vtbl;
HRESULT AM_create(IUnknown *pUnkOuter, LPVOID *ppObj) HRESULT AM_create(IUnknown *pUnkOuter, LPVOID *ppObj)
{ {
IAMMultiMediaStreamImpl *object; struct multimedia_stream *object;
HRESULT hr; HRESULT hr;
TRACE("(%p,%p)\n", pUnkOuter, ppObj); TRACE("(%p,%p)\n", pUnkOuter, ppObj);
...@@ -61,8 +62,7 @@ HRESULT AM_create(IUnknown *pUnkOuter, LPVOID *ppObj) ...@@ -61,8 +62,7 @@ HRESULT AM_create(IUnknown *pUnkOuter, LPVOID *ppObj)
if( pUnkOuter ) if( pUnkOuter )
return CLASS_E_NOAGGREGATION; return CLASS_E_NOAGGREGATION;
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IAMMultiMediaStreamImpl)); if (!(object = heap_alloc_zero(sizeof(*object))))
if (!object)
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
object->IAMMultiMediaStream_iface.lpVtbl = &AM_Vtbl; object->IAMMultiMediaStream_iface.lpVtbl = &AM_Vtbl;
...@@ -84,7 +84,7 @@ HRESULT AM_create(IUnknown *pUnkOuter, LPVOID *ppObj) ...@@ -84,7 +84,7 @@ HRESULT AM_create(IUnknown *pUnkOuter, LPVOID *ppObj)
/*** IUnknown methods ***/ /*** IUnknown methods ***/
static HRESULT WINAPI IAMMultiMediaStreamImpl_QueryInterface(IAMMultiMediaStream* iface, REFIID riid, void** ppvObject) static HRESULT WINAPI IAMMultiMediaStreamImpl_QueryInterface(IAMMultiMediaStream* iface, REFIID riid, void** ppvObject)
{ {
IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface); struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface);
TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppvObject); TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppvObject);
...@@ -104,7 +104,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_QueryInterface(IAMMultiMediaStream ...@@ -104,7 +104,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_QueryInterface(IAMMultiMediaStream
static ULONG WINAPI IAMMultiMediaStreamImpl_AddRef(IAMMultiMediaStream* iface) static ULONG WINAPI IAMMultiMediaStreamImpl_AddRef(IAMMultiMediaStream* iface)
{ {
IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface); struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface);
TRACE("(%p/%p)\n", iface, This); TRACE("(%p/%p)\n", iface, This);
...@@ -113,7 +113,7 @@ static ULONG WINAPI IAMMultiMediaStreamImpl_AddRef(IAMMultiMediaStream* iface) ...@@ -113,7 +113,7 @@ static ULONG WINAPI IAMMultiMediaStreamImpl_AddRef(IAMMultiMediaStream* iface)
static ULONG WINAPI IAMMultiMediaStreamImpl_Release(IAMMultiMediaStream* iface) static ULONG WINAPI IAMMultiMediaStreamImpl_Release(IAMMultiMediaStream* iface)
{ {
IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface); struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface);
ULONG ref = InterlockedDecrement(&This->ref); ULONG ref = InterlockedDecrement(&This->ref);
ULONG i; ULONG i;
...@@ -142,7 +142,7 @@ static ULONG WINAPI IAMMultiMediaStreamImpl_Release(IAMMultiMediaStream* iface) ...@@ -142,7 +142,7 @@ static ULONG WINAPI IAMMultiMediaStreamImpl_Release(IAMMultiMediaStream* iface)
/*** IMultiMediaStream methods ***/ /*** IMultiMediaStream methods ***/
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetInformation(IAMMultiMediaStream* iface, DWORD* pdwFlags, STREAM_TYPE* pStreamType) static HRESULT WINAPI IAMMultiMediaStreamImpl_GetInformation(IAMMultiMediaStream* iface, DWORD* pdwFlags, STREAM_TYPE* pStreamType)
{ {
IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface); struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface);
FIXME("(%p/%p)->(%p,%p) stub!\n", This, iface, pdwFlags, pStreamType); FIXME("(%p/%p)->(%p,%p) stub!\n", This, iface, pdwFlags, pStreamType);
...@@ -151,7 +151,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_GetInformation(IAMMultiMediaStream ...@@ -151,7 +151,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_GetInformation(IAMMultiMediaStream
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetMediaStream(IAMMultiMediaStream* iface, REFMSPID idPurpose, IMediaStream** ppMediaStream) static HRESULT WINAPI IAMMultiMediaStreamImpl_GetMediaStream(IAMMultiMediaStream* iface, REFMSPID idPurpose, IMediaStream** ppMediaStream)
{ {
IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface); struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface);
MSPID PurposeId; MSPID PurposeId;
unsigned int i; unsigned int i;
...@@ -173,7 +173,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_GetMediaStream(IAMMultiMediaStream ...@@ -173,7 +173,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_GetMediaStream(IAMMultiMediaStream
static HRESULT WINAPI IAMMultiMediaStreamImpl_EnumMediaStreams(IAMMultiMediaStream* iface, LONG Index, IMediaStream** ppMediaStream) static HRESULT WINAPI IAMMultiMediaStreamImpl_EnumMediaStreams(IAMMultiMediaStream* iface, LONG Index, IMediaStream** ppMediaStream)
{ {
IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface); struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface);
FIXME("(%p/%p)->(%d,%p) stub!\n", This, iface, Index, ppMediaStream); FIXME("(%p/%p)->(%d,%p) stub!\n", This, iface, Index, ppMediaStream);
...@@ -182,7 +182,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_EnumMediaStreams(IAMMultiMediaStre ...@@ -182,7 +182,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_EnumMediaStreams(IAMMultiMediaStre
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetState(IAMMultiMediaStream* iface, STREAM_STATE* pCurrentState) static HRESULT WINAPI IAMMultiMediaStreamImpl_GetState(IAMMultiMediaStream* iface, STREAM_STATE* pCurrentState)
{ {
IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface); struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface);
FIXME("(%p/%p)->(%p) stub!\n", This, iface, pCurrentState); FIXME("(%p/%p)->(%p) stub!\n", This, iface, pCurrentState);
...@@ -191,7 +191,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_GetState(IAMMultiMediaStream* ifac ...@@ -191,7 +191,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_GetState(IAMMultiMediaStream* ifac
static HRESULT WINAPI IAMMultiMediaStreamImpl_SetState(IAMMultiMediaStream* iface, STREAM_STATE new_state) static HRESULT WINAPI IAMMultiMediaStreamImpl_SetState(IAMMultiMediaStream* iface, STREAM_STATE new_state)
{ {
IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface); struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface);
HRESULT hr = E_INVALIDARG; HRESULT hr = E_INVALIDARG;
TRACE("(%p/%p)->(%u)\n", This, iface, new_state); TRACE("(%p/%p)->(%u)\n", This, iface, new_state);
...@@ -206,7 +206,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_SetState(IAMMultiMediaStream* ifac ...@@ -206,7 +206,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_SetState(IAMMultiMediaStream* ifac
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetTime(IAMMultiMediaStream* iface, STREAM_TIME* pCurrentTime) static HRESULT WINAPI IAMMultiMediaStreamImpl_GetTime(IAMMultiMediaStream* iface, STREAM_TIME* pCurrentTime)
{ {
IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface); struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface);
FIXME("(%p/%p)->(%p) stub!\n", This, iface, pCurrentTime); FIXME("(%p/%p)->(%p) stub!\n", This, iface, pCurrentTime);
...@@ -215,7 +215,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_GetTime(IAMMultiMediaStream* iface ...@@ -215,7 +215,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_GetTime(IAMMultiMediaStream* iface
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetDuration(IAMMultiMediaStream* iface, STREAM_TIME* pDuration) static HRESULT WINAPI IAMMultiMediaStreamImpl_GetDuration(IAMMultiMediaStream* iface, STREAM_TIME* pDuration)
{ {
IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface); struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface);
FIXME("(%p/%p)->(%p) stub!\n", This, iface, pDuration); FIXME("(%p/%p)->(%p) stub!\n", This, iface, pDuration);
...@@ -224,7 +224,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_GetDuration(IAMMultiMediaStream* i ...@@ -224,7 +224,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_GetDuration(IAMMultiMediaStream* i
static HRESULT WINAPI IAMMultiMediaStreamImpl_Seek(IAMMultiMediaStream* iface, STREAM_TIME seek_time) static HRESULT WINAPI IAMMultiMediaStreamImpl_Seek(IAMMultiMediaStream* iface, STREAM_TIME seek_time)
{ {
IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface); struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface);
TRACE("(%p/%p)->(%s)\n", This, iface, wine_dbgstr_longlong(seek_time)); TRACE("(%p/%p)->(%s)\n", This, iface, wine_dbgstr_longlong(seek_time));
...@@ -233,7 +233,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_Seek(IAMMultiMediaStream* iface, S ...@@ -233,7 +233,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_Seek(IAMMultiMediaStream* iface, S
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetEndOfStream(IAMMultiMediaStream* iface, HANDLE* phEOS) static HRESULT WINAPI IAMMultiMediaStreamImpl_GetEndOfStream(IAMMultiMediaStream* iface, HANDLE* phEOS)
{ {
IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface); struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface);
FIXME("(%p/%p)->(%p) stub!\n", This, iface, phEOS); FIXME("(%p/%p)->(%p) stub!\n", This, iface, phEOS);
...@@ -244,7 +244,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_GetEndOfStream(IAMMultiMediaStream ...@@ -244,7 +244,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_GetEndOfStream(IAMMultiMediaStream
static HRESULT WINAPI IAMMultiMediaStreamImpl_Initialize(IAMMultiMediaStream* iface, STREAM_TYPE StreamType, DWORD dwFlags, IGraphBuilder* pFilterGraph) static HRESULT WINAPI IAMMultiMediaStreamImpl_Initialize(IAMMultiMediaStream* iface, STREAM_TYPE StreamType, DWORD dwFlags, IGraphBuilder* pFilterGraph)
{ {
static const WCHAR filternameW[] = {'M','e','d','i','a','S','t','r','e','a','m','F','i','l','t','e','r',0}; static const WCHAR filternameW[] = {'M','e','d','i','a','S','t','r','e','a','m','F','i','l','t','e','r',0};
IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface); struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface);
HRESULT hr = S_OK; HRESULT hr = S_OK;
TRACE("(%p/%p)->(%x,%x,%p)\n", This, iface, (DWORD)StreamType, dwFlags, pFilterGraph); TRACE("(%p/%p)->(%x,%x,%p)\n", This, iface, (DWORD)StreamType, dwFlags, pFilterGraph);
...@@ -298,7 +298,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_Initialize(IAMMultiMediaStream* if ...@@ -298,7 +298,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_Initialize(IAMMultiMediaStream* if
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetFilterGraph(IAMMultiMediaStream* iface, IGraphBuilder** ppGraphBuilder) static HRESULT WINAPI IAMMultiMediaStreamImpl_GetFilterGraph(IAMMultiMediaStream* iface, IGraphBuilder** ppGraphBuilder)
{ {
IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface); struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface);
TRACE("(%p/%p)->(%p)\n", This, iface, ppGraphBuilder); TRACE("(%p/%p)->(%p)\n", This, iface, ppGraphBuilder);
...@@ -315,7 +315,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_GetFilterGraph(IAMMultiMediaStream ...@@ -315,7 +315,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_GetFilterGraph(IAMMultiMediaStream
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetFilter(IAMMultiMediaStream *iface, IMediaStreamFilter **filter) static HRESULT WINAPI IAMMultiMediaStreamImpl_GetFilter(IAMMultiMediaStream *iface, IMediaStreamFilter **filter)
{ {
IAMMultiMediaStreamImpl *mmstream = impl_from_IAMMultiMediaStream(iface); struct multimedia_stream *mmstream = impl_from_IAMMultiMediaStream(iface);
TRACE("mmstream %p, filter %p.\n", mmstream, filter); TRACE("mmstream %p, filter %p.\n", mmstream, filter);
...@@ -330,7 +330,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_GetFilter(IAMMultiMediaStream *ifa ...@@ -330,7 +330,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_GetFilter(IAMMultiMediaStream *ifa
static HRESULT WINAPI IAMMultiMediaStreamImpl_AddMediaStream(IAMMultiMediaStream* iface, IUnknown* stream_object, const MSPID* PurposeId, static HRESULT WINAPI IAMMultiMediaStreamImpl_AddMediaStream(IAMMultiMediaStream* iface, IUnknown* stream_object, const MSPID* PurposeId,
DWORD dwFlags, IMediaStream** ppNewStream) DWORD dwFlags, IMediaStream** ppNewStream)
{ {
IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface); struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface);
HRESULT hr; HRESULT hr;
IAMMediaStream* pStream; IAMMediaStream* pStream;
IAMMediaStream** pNewStreams; IAMMediaStream** pNewStreams;
...@@ -398,7 +398,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_AddMediaStream(IAMMultiMediaStream ...@@ -398,7 +398,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_AddMediaStream(IAMMultiMediaStream
static HRESULT WINAPI IAMMultiMediaStreamImpl_OpenFile(IAMMultiMediaStream* iface, LPCWSTR filename, DWORD flags) static HRESULT WINAPI IAMMultiMediaStreamImpl_OpenFile(IAMMultiMediaStream* iface, LPCWSTR filename, DWORD flags)
{ {
static const WCHAR sourceW[] = {'S','o','u','r','c','e',0}; static const WCHAR sourceW[] = {'S','o','u','r','c','e',0};
IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface); struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface);
HRESULT ret = S_OK; HRESULT ret = S_OK;
IBaseFilter *BaseFilter = NULL; IBaseFilter *BaseFilter = NULL;
IEnumPins *EnumPins = NULL; IEnumPins *EnumPins = NULL;
...@@ -442,7 +442,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_OpenFile(IAMMultiMediaStream* ifac ...@@ -442,7 +442,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_OpenFile(IAMMultiMediaStream* ifac
static HRESULT WINAPI IAMMultiMediaStreamImpl_OpenMoniker(IAMMultiMediaStream* iface, IBindCtx* pCtx, IMoniker* pMoniker, DWORD dwFlags) static HRESULT WINAPI IAMMultiMediaStreamImpl_OpenMoniker(IAMMultiMediaStream* iface, IBindCtx* pCtx, IMoniker* pMoniker, DWORD dwFlags)
{ {
IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface); struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface);
FIXME("(%p/%p)->(%p,%p,%x) stub!\n", This, iface, pCtx, pMoniker, dwFlags); FIXME("(%p/%p)->(%p,%p,%x) stub!\n", This, iface, pCtx, pMoniker, dwFlags);
...@@ -451,7 +451,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_OpenMoniker(IAMMultiMediaStream* i ...@@ -451,7 +451,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_OpenMoniker(IAMMultiMediaStream* i
static HRESULT WINAPI IAMMultiMediaStreamImpl_Render(IAMMultiMediaStream* iface, DWORD dwFlags) static HRESULT WINAPI IAMMultiMediaStreamImpl_Render(IAMMultiMediaStream* iface, DWORD dwFlags)
{ {
IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface); struct multimedia_stream *This = impl_from_IAMMultiMediaStream(iface);
FIXME("(%p/%p)->(%x) partial stub!\n", This, iface, dwFlags); FIXME("(%p/%p)->(%x) partial stub!\n", This, iface, dwFlags);
......
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