52static const struct IAMMultiMediaStreamVtbl
AM_Vtbl;
58 TRACE(
"(%p,%p)\n", pUnkOuter, ppObj);
67 object->IAMMultiMediaStream_iface.lpVtbl = &
AM_Vtbl;
70 *ppObj = &
object->IAMMultiMediaStream_iface;
86 IAMMultiMediaStream_AddRef(iface);
115 for(
i = 0;
i <
This->nbStreams;
i++)
116 IAMMediaStream_Release(
This->pStreams[
i]);
119 IPin_Release(
This->ipin);
120 if (
This->media_stream_filter)
121 IMediaStreamFilter_Release(
This->media_stream_filter);
122 if (
This->media_seeking)
123 IMediaSeeking_Release(
This->media_seeking);
124 if (
This->media_control)
125 IMediaControl_Release(
This->media_control);
126 if (
This->pFilterGraph)
127 IGraphBuilder_Release(
This->pFilterGraph);
139 FIXME(
"(%p/%p)->(%p,%p) stub!\n",
This, iface, pdwFlags, pStreamType);
152 for (
i = 0;
i <
This->nbStreams;
i++)
154 IAMMediaStream_GetInformation(
This->pStreams[
i], &PurposeId,
NULL);
158 IMediaStream_AddRef(*ppMediaStream);
163 return MS_E_NOSTREAM;
170 FIXME(
"(%p/%p)->(%d,%p) stub!\n",
This, iface,
Index, ppMediaStream);
179 FIXME(
"(%p/%p)->(%p) stub!\n",
This, iface, pCurrentState);
189 TRACE(
"(%p/%p)->(%u)\n",
This, iface, new_state);
192 hr = IMediaControl_Run(
This->media_control);
194 hr = IMediaControl_Stop(
This->media_control);
203 FIXME(
"(%p/%p)->(%p) stub!\n",
This, iface, pCurrentTime);
212 FIXME(
"(%p/%p)->(%p) stub!\n",
This, iface, pDuration);
230 FIXME(
"(%p/%p)->(%p) stub!\n",
This, iface, phEOS);
240 const WCHAR filternameW[] = {
'M',
'e',
'd',
'i',
'a',
'S',
't',
'r',
'e',
'a',
'm',
'F',
'i',
'l',
't',
'e',
'r',0};
246 This->pFilterGraph = pFilterGraph;
247 IGraphBuilder_AddRef(
This->pFilterGraph);
256 This->StreamType = StreamType;
257 hr = IGraphBuilder_QueryInterface(
This->pFilterGraph, &IID_IMediaSeeking, (
void**)&
This->media_seeking);
259 hr = IGraphBuilder_QueryInterface(
This->pFilterGraph, &IID_IMediaControl, (
void**)&
This->media_control);
261 hr =
CoCreateInstance(&CLSID_MediaStreamFilter,
NULL, CLSCTX_INPROC_SERVER, &IID_IMediaStreamFilter, (
void**)&
This->media_stream_filter);
263 hr = IGraphBuilder_AddFilter(
This->pFilterGraph, (
IBaseFilter*)
This->media_stream_filter, filternameW);
266 IMediaEventEx* media_event =
NULL;
267 hr = IGraphBuilder_QueryInterface(
This->pFilterGraph, &IID_IMediaEventEx, (
void**)&media_event);
269 hr = IMediaEventEx_GetEventHandle(media_event, &
This->event);
273 IMediaEventEx_Release(media_event);
279 if (
This->media_stream_filter)
280 IMediaStreamFilter_Release(
This->media_stream_filter);
282 if (
This->media_seeking)
283 IMediaSeeking_Release(
This->media_seeking);
285 if (
This->media_control)
286 IMediaControl_Release(
This->media_control);
288 if (
This->pFilterGraph)
289 IGraphBuilder_Release(
This->pFilterGraph);
300 TRACE(
"(%p/%p)->(%p)\n",
This, iface, ppGraphBuilder);
305 if (
This->pFilterGraph)
306 return IGraphBuilder_QueryInterface(
This->pFilterGraph, &IID_IGraphBuilder, (
void**)ppGraphBuilder);
308 *ppGraphBuilder =
NULL;
317 TRACE(
"(%p/%p)->(%p)\n",
This, iface, ppFilter);
322 *ppFilter =
This->media_stream_filter;
324 IMediaStreamFilter_AddRef(*ppFilter);
340 return MS_E_PURPOSEID;
343 FIXME(
"Specifying a stream object in params is not yet supported\n");
350 return MS_E_PURPOSEID;
360 hr = IGraphBuilder_AddFilter(
This->pFilterGraph, dsoundrender_filter,
NULL);
361 IBaseFilter_Release(dsoundrender_filter);
378 IAMMediaStream_Release(pStream);
381 This->pStreams = pNewStreams;
382 This->pStreams[
This->nbStreams] = pStream;
392 IMediaStreamFilter_AddMediaStream(
This->media_stream_filter, pStream);
414 if (!
This->pFilterGraph)
424 ret = IEnumPins_Next(EnumPins, 1, &ipin,
NULL);
428 ret = IPin_QueryDirection(ipin, &pin_direction);
434 ret = IGraphBuilder_Render(
This->pFilterGraph,
This->ipin);
437 IEnumPins_Release(EnumPins);
461 return IGraphBuilder_Render(
This->pFilterGraph,
This->ipin);
464static const IAMMultiMediaStreamVtbl
AM_Vtbl =
@ AMMSF_ADDDEFAULTRENDERER
HRESULT ddrawmediastream_create(IMultiMediaStream *Parent, const MSPID *pPurposeId, STREAM_TYPE StreamType, IAMMediaStream **ppMediaStream) DECLSPEC_HIDDEN
HRESULT audiomediastream_create(IMultiMediaStream *parent, const MSPID *purpose_id, STREAM_TYPE stream_type, IAMMediaStream **media_stream) DECLSPEC_HIDDEN
#define InterlockedIncrement
#define InterlockedDecrement
@ AM_SEEKING_NoPositioning
@ AM_SEEKING_AbsolutePositioning
enum _PinDirection PIN_DIRECTION
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
const GUID IID_IBaseFilter
static HRESULT WINAPI IAMMultiMediaStreamImpl_QueryInterface(IAMMultiMediaStream *iface, REFIID riid, void **ppvObject)
static const struct IAMMultiMediaStreamVtbl AM_Vtbl
static HRESULT WINAPI IAMMultiMediaStreamImpl_Seek(IAMMultiMediaStream *iface, STREAM_TIME seek_time)
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetFilterGraph(IAMMultiMediaStream *iface, IGraphBuilder **ppGraphBuilder)
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetDuration(IAMMultiMediaStream *iface, STREAM_TIME *pDuration)
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetTime(IAMMultiMediaStream *iface, STREAM_TIME *pCurrentTime)
static ULONG WINAPI IAMMultiMediaStreamImpl_Release(IAMMultiMediaStream *iface)
static ULONG WINAPI IAMMultiMediaStreamImpl_AddRef(IAMMultiMediaStream *iface)
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetFilter(IAMMultiMediaStream *iface, IMediaStreamFilter **ppFilter)
static HRESULT WINAPI IAMMultiMediaStreamImpl_OpenMoniker(IAMMultiMediaStream *iface, IBindCtx *pCtx, IMoniker *pMoniker, DWORD dwFlags)
static HRESULT WINAPI IAMMultiMediaStreamImpl_Initialize(IAMMultiMediaStream *iface, STREAM_TYPE StreamType, DWORD dwFlags, IGraphBuilder *pFilterGraph)
HRESULT AM_create(IUnknown *pUnkOuter, LPVOID *ppObj)
static HRESULT WINAPI IAMMultiMediaStreamImpl_SetState(IAMMultiMediaStream *iface, STREAM_STATE new_state)
static IAMMultiMediaStreamImpl * impl_from_IAMMultiMediaStream(IAMMultiMediaStream *iface)
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetState(IAMMultiMediaStream *iface, STREAM_STATE *pCurrentState)
static HRESULT WINAPI IAMMultiMediaStreamImpl_Render(IAMMultiMediaStream *iface, DWORD dwFlags)
static HRESULT WINAPI IAMMultiMediaStreamImpl_AddMediaStream(IAMMultiMediaStream *iface, IUnknown *stream_object, const MSPID *PurposeId, DWORD dwFlags, IMediaStream **ppNewStream)
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetInformation(IAMMultiMediaStream *iface, DWORD *pdwFlags, STREAM_TYPE *pStreamType)
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetMediaStream(IAMMultiMediaStream *iface, REFMSPID idPurpose, IMediaStream **ppMediaStream)
static HRESULT WINAPI IAMMultiMediaStreamImpl_EnumMediaStreams(IAMMultiMediaStream *iface, LONG Index, IMediaStream **ppMediaStream)
static HRESULT WINAPI IAMMultiMediaStreamImpl_OpenFile(IAMMultiMediaStream *iface, LPCWSTR filename, DWORD flags)
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetEndOfStream(IAMMultiMediaStream *iface, HANDLE *phEOS)
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
#define HeapFree(x, y, z)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
LPVOID WINAPI CoTaskMemRealloc(LPVOID pvOld, SIZE_T size)
VOID WINAPI CoTaskMemFree(LPVOID ptr)
static const WCHAR sourceW[]
#define IsEqualGUID(rguid1, rguid2)
#define IsEqualIID(riid1, riid2)
#define CONTAINING_RECORD(address, type, field)
_In_ WDFCOLLECTION _In_ ULONG Index
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
#define CLASS_E_NOAGGREGATION