ReactOS 0.4.15-dev-7931-gfd331f1
amstream.c File Reference
#include "wine/debug.h"
#include "winbase.h"
#include "wingdi.h"
#include "amstream_private.h"
Include dependency graph for amstream.c:

Go to the source code of this file.

Classes

struct  IAMMultiMediaStreamImpl
 

Macros

#define COBJMACROS
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (amstream)
 
static IAMMultiMediaStreamImplimpl_from_IAMMultiMediaStream (IAMMultiMediaStream *iface)
 
HRESULT AM_create (IUnknown *pUnkOuter, LPVOID *ppObj)
 
static HRESULT WINAPI IAMMultiMediaStreamImpl_QueryInterface (IAMMultiMediaStream *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI IAMMultiMediaStreamImpl_AddRef (IAMMultiMediaStream *iface)
 
static ULONG WINAPI IAMMultiMediaStreamImpl_Release (IAMMultiMediaStream *iface)
 
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_GetState (IAMMultiMediaStream *iface, STREAM_STATE *pCurrentState)
 
static HRESULT WINAPI IAMMultiMediaStreamImpl_SetState (IAMMultiMediaStream *iface, STREAM_STATE new_state)
 
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetTime (IAMMultiMediaStream *iface, STREAM_TIME *pCurrentTime)
 
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetDuration (IAMMultiMediaStream *iface, STREAM_TIME *pDuration)
 
static HRESULT WINAPI IAMMultiMediaStreamImpl_Seek (IAMMultiMediaStream *iface, STREAM_TIME seek_time)
 
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetEndOfStream (IAMMultiMediaStream *iface, HANDLE *phEOS)
 
static HRESULT WINAPI IAMMultiMediaStreamImpl_Initialize (IAMMultiMediaStream *iface, STREAM_TYPE StreamType, DWORD dwFlags, IGraphBuilder *pFilterGraph)
 
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetFilterGraph (IAMMultiMediaStream *iface, IGraphBuilder **ppGraphBuilder)
 
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetFilter (IAMMultiMediaStream *iface, IMediaStreamFilter **ppFilter)
 
static HRESULT WINAPI IAMMultiMediaStreamImpl_AddMediaStream (IAMMultiMediaStream *iface, IUnknown *stream_object, const MSPID *PurposeId, DWORD dwFlags, IMediaStream **ppNewStream)
 
static HRESULT WINAPI IAMMultiMediaStreamImpl_OpenFile (IAMMultiMediaStream *iface, LPCWSTR filename, DWORD flags)
 
static HRESULT WINAPI IAMMultiMediaStreamImpl_OpenMoniker (IAMMultiMediaStream *iface, IBindCtx *pCtx, IMoniker *pMoniker, DWORD dwFlags)
 
static HRESULT WINAPI IAMMultiMediaStreamImpl_Render (IAMMultiMediaStream *iface, DWORD dwFlags)
 

Variables

static const struct IAMMultiMediaStreamVtbl AM_Vtbl
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 24 of file amstream.c.

Function Documentation

◆ AM_create()

HRESULT AM_create ( IUnknown pUnkOuter,
LPVOID ppObj 
)

Definition at line 54 of file amstream.c.

55{
57
58 TRACE("(%p,%p)\n", pUnkOuter, ppObj);
59
60 if( pUnkOuter )
62
64 if (!object)
65 return E_OUTOFMEMORY;
66
67 object->IAMMultiMediaStream_iface.lpVtbl = &AM_Vtbl;
68 object->ref = 1;
69
70 *ppObj = &object->IAMMultiMediaStream_iface;
71
72 return S_OK;
73}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static const struct IAMMultiMediaStreamVtbl AM_Vtbl
Definition: amstream.c:52
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
#define S_OK
Definition: intsafe.h:52
#define TRACE(s)
Definition: solgame.cpp:4
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:2662

◆ IAMMultiMediaStreamImpl_AddMediaStream()

static HRESULT WINAPI IAMMultiMediaStreamImpl_AddMediaStream ( IAMMultiMediaStream iface,
IUnknown stream_object,
const MSPID PurposeId,
DWORD  dwFlags,
IMediaStream **  ppNewStream 
)
static

Definition at line 329 of file amstream.c.

331{
333 HRESULT hr;
334 IAMMediaStream* pStream;
335 IAMMediaStream** pNewStreams;
336
337 TRACE("(%p/%p)->(%p,%s,%x,%p)\n", This, iface, stream_object, debugstr_guid(PurposeId), dwFlags, ppNewStream);
338
339 if (!IsEqualGUID(PurposeId, &MSPID_PrimaryVideo) && !IsEqualGUID(PurposeId, &MSPID_PrimaryAudio))
340 return MS_E_PURPOSEID;
341
342 if (stream_object)
343 FIXME("Specifying a stream object in params is not yet supported\n");
344
346 {
347 if (IsEqualGUID(PurposeId, &MSPID_PrimaryVideo))
348 {
349 /* Default renderer not supported by video stream */
350 return MS_E_PURPOSEID;
351 }
352 else
353 {
354 IBaseFilter* dsoundrender_filter;
355
356 /* Create the default renderer for audio */
357 hr = CoCreateInstance(&CLSID_DSoundRender, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (LPVOID*)&dsoundrender_filter);
358 if (SUCCEEDED(hr))
359 {
360 hr = IGraphBuilder_AddFilter(This->pFilterGraph, dsoundrender_filter, NULL);
361 IBaseFilter_Release(dsoundrender_filter);
362 }
363
364 /* No media stream created when the default renderer is used */
365 return hr;
366 }
367 }
368
369 if (IsEqualGUID(PurposeId, &MSPID_PrimaryVideo))
370 hr = ddrawmediastream_create((IMultiMediaStream*)iface, PurposeId, This->StreamType, &pStream);
371 else
372 hr = audiomediastream_create((IMultiMediaStream*)iface, PurposeId, This->StreamType, &pStream);
373 if (SUCCEEDED(hr))
374 {
375 pNewStreams = CoTaskMemRealloc(This->pStreams, (This->nbStreams+1) * sizeof(IAMMediaStream*));
376 if (!pNewStreams)
377 {
378 IAMMediaStream_Release(pStream);
379 return E_OUTOFMEMORY;
380 }
381 This->pStreams = pNewStreams;
382 This->pStreams[This->nbStreams] = pStream;
383 This->nbStreams++;
384
385 if (ppNewStream)
386 *ppNewStream = (IMediaStream*)pStream;
387 }
388
389 if (SUCCEEDED(hr))
390 {
391 /* Add stream to the media stream filter */
392 IMediaStreamFilter_AddMediaStream(This->media_stream_filter, pStream);
393 }
394
395 return hr;
396}
@ AMMSF_ADDDEFAULTRENDERER
Definition: amstream.idl:45
HRESULT ddrawmediastream_create(IMultiMediaStream *Parent, const MSPID *pPurposeId, STREAM_TYPE StreamType, IAMMediaStream **ppMediaStream) DECLSPEC_HIDDEN
Definition: mediastream.c:606
HRESULT audiomediastream_create(IMultiMediaStream *parent, const MSPID *purpose_id, STREAM_TYPE stream_type, IAMMediaStream **media_stream) DECLSPEC_HIDDEN
Definition: mediastream.c:1146
#define FIXME(fmt,...)
Definition: debug.h:111
const GUID IID_IBaseFilter
#define NULL
Definition: types.h:112
static IAMMultiMediaStreamImpl * impl_from_IAMMultiMediaStream(IAMMultiMediaStream *iface)
Definition: amstream.c:47
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
LPVOID WINAPI CoTaskMemRealloc(LPVOID pvOld, SIZE_T size)
Definition: ifs.c:460
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define debugstr_guid
Definition: kernel32.h:35
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
HRESULT hr
Definition: shlfolder.c:183
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176

◆ IAMMultiMediaStreamImpl_AddRef()

static ULONG WINAPI IAMMultiMediaStreamImpl_AddRef ( IAMMultiMediaStream iface)
static

Definition at line 96 of file amstream.c.

97{
99
100 TRACE("(%p/%p)\n", iface, This);
101
102 return InterlockedIncrement(&This->ref);
103}
#define InterlockedIncrement
Definition: armddk.h:53

◆ IAMMultiMediaStreamImpl_EnumMediaStreams()

static HRESULT WINAPI IAMMultiMediaStreamImpl_EnumMediaStreams ( IAMMultiMediaStream iface,
LONG  Index,
IMediaStream **  ppMediaStream 
)
static

Definition at line 166 of file amstream.c.

167{
169
170 FIXME("(%p/%p)->(%d,%p) stub!\n", This, iface, Index, ppMediaStream);
171
172 return E_NOTIMPL;
173}
#define E_NOTIMPL
Definition: ddrawi.h:99
_In_ WDFCOLLECTION _In_ ULONG Index

◆ IAMMultiMediaStreamImpl_GetDuration()

static HRESULT WINAPI IAMMultiMediaStreamImpl_GetDuration ( IAMMultiMediaStream iface,
STREAM_TIME pDuration 
)
static

Definition at line 208 of file amstream.c.

209{
211
212 FIXME("(%p/%p)->(%p) stub!\n", This, iface, pDuration);
213
214 return E_NOTIMPL;
215}

◆ IAMMultiMediaStreamImpl_GetEndOfStream()

static HRESULT WINAPI IAMMultiMediaStreamImpl_GetEndOfStream ( IAMMultiMediaStream iface,
HANDLE phEOS 
)
static

Definition at line 226 of file amstream.c.

227{
229
230 FIXME("(%p/%p)->(%p) stub!\n", This, iface, phEOS);
231
232 return E_NOTIMPL;
233}

◆ IAMMultiMediaStreamImpl_GetFilter()

static HRESULT WINAPI IAMMultiMediaStreamImpl_GetFilter ( IAMMultiMediaStream iface,
IMediaStreamFilter **  ppFilter 
)
static

Definition at line 313 of file amstream.c.

314{
316
317 TRACE("(%p/%p)->(%p)\n", This, iface, ppFilter);
318
319 if (!ppFilter)
320 return E_POINTER;
321
322 *ppFilter = This->media_stream_filter;
323 if (*ppFilter)
324 IMediaStreamFilter_AddRef(*ppFilter);
325
326 return S_OK;
327}
#define E_POINTER
Definition: winerror.h:2365

◆ IAMMultiMediaStreamImpl_GetFilterGraph()

static HRESULT WINAPI IAMMultiMediaStreamImpl_GetFilterGraph ( IAMMultiMediaStream iface,
IGraphBuilder **  ppGraphBuilder 
)
static

Definition at line 296 of file amstream.c.

297{
299
300 TRACE("(%p/%p)->(%p)\n", This, iface, ppGraphBuilder);
301
302 if (!ppGraphBuilder)
303 return E_POINTER;
304
305 if (This->pFilterGraph)
306 return IGraphBuilder_QueryInterface(This->pFilterGraph, &IID_IGraphBuilder, (void**)ppGraphBuilder);
307 else
308 *ppGraphBuilder = NULL;
309
310 return S_OK;
311}

◆ IAMMultiMediaStreamImpl_GetInformation()

static HRESULT WINAPI IAMMultiMediaStreamImpl_GetInformation ( IAMMultiMediaStream iface,
DWORD pdwFlags,
STREAM_TYPE pStreamType 
)
static

Definition at line 135 of file amstream.c.

136{
138
139 FIXME("(%p/%p)->(%p,%p) stub!\n", This, iface, pdwFlags, pStreamType);
140
141 return E_NOTIMPL;
142}

◆ IAMMultiMediaStreamImpl_GetMediaStream()

static HRESULT WINAPI IAMMultiMediaStreamImpl_GetMediaStream ( IAMMultiMediaStream iface,
REFMSPID  idPurpose,
IMediaStream **  ppMediaStream 
)
static

Definition at line 144 of file amstream.c.

145{
147 MSPID PurposeId;
148 unsigned int i;
149
150 TRACE("(%p/%p)->(%s,%p)\n", This, iface, debugstr_guid(idPurpose), ppMediaStream);
151
152 for (i = 0; i < This->nbStreams; i++)
153 {
154 IAMMediaStream_GetInformation(This->pStreams[i], &PurposeId, NULL);
155 if (IsEqualIID(&PurposeId, idPurpose))
156 {
157 *ppMediaStream = (IMediaStream*)This->pStreams[i];
158 IMediaStream_AddRef(*ppMediaStream);
159 return S_OK;
160 }
161 }
162
163 return MS_E_NOSTREAM;
164}
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
Definition: glfuncs.h:248
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ IAMMultiMediaStreamImpl_GetState()

static HRESULT WINAPI IAMMultiMediaStreamImpl_GetState ( IAMMultiMediaStream iface,
STREAM_STATE pCurrentState 
)
static

Definition at line 175 of file amstream.c.

176{
178
179 FIXME("(%p/%p)->(%p) stub!\n", This, iface, pCurrentState);
180
181 return E_NOTIMPL;
182}

◆ IAMMultiMediaStreamImpl_GetTime()

static HRESULT WINAPI IAMMultiMediaStreamImpl_GetTime ( IAMMultiMediaStream iface,
STREAM_TIME pCurrentTime 
)
static

Definition at line 199 of file amstream.c.

200{
202
203 FIXME("(%p/%p)->(%p) stub!\n", This, iface, pCurrentTime);
204
205 return E_NOTIMPL;
206}

◆ IAMMultiMediaStreamImpl_Initialize()

static HRESULT WINAPI IAMMultiMediaStreamImpl_Initialize ( IAMMultiMediaStream iface,
STREAM_TYPE  StreamType,
DWORD  dwFlags,
IGraphBuilder pFilterGraph 
)
static

Definition at line 236 of file amstream.c.

237{
239 HRESULT hr = S_OK;
240 const WCHAR filternameW[] = {'M','e','d','i','a','S','t','r','e','a','m','F','i','l','t','e','r',0};
241
242 TRACE("(%p/%p)->(%x,%x,%p)\n", This, iface, (DWORD)StreamType, dwFlags, pFilterGraph);
243
244 if (pFilterGraph)
245 {
246 This->pFilterGraph = pFilterGraph;
247 IGraphBuilder_AddRef(This->pFilterGraph);
248 }
249 else
250 {
251 hr = CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, &IID_IGraphBuilder, (LPVOID*)&This->pFilterGraph);
252 }
253
254 if (SUCCEEDED(hr))
255 {
256 This->StreamType = StreamType;
257 hr = IGraphBuilder_QueryInterface(This->pFilterGraph, &IID_IMediaSeeking, (void**)&This->media_seeking);
258 if (SUCCEEDED(hr))
259 hr = IGraphBuilder_QueryInterface(This->pFilterGraph, &IID_IMediaControl, (void**)&This->media_control);
260 if (SUCCEEDED(hr))
261 hr = CoCreateInstance(&CLSID_MediaStreamFilter, NULL, CLSCTX_INPROC_SERVER, &IID_IMediaStreamFilter, (void**)&This->media_stream_filter);
262 if (SUCCEEDED(hr))
263 hr = IGraphBuilder_AddFilter(This->pFilterGraph, (IBaseFilter*)This->media_stream_filter, filternameW);
264 if (SUCCEEDED(hr))
265 {
266 IMediaEventEx* media_event = NULL;
267 hr = IGraphBuilder_QueryInterface(This->pFilterGraph, &IID_IMediaEventEx, (void**)&media_event);
268 if (SUCCEEDED(hr))
269 hr = IMediaEventEx_GetEventHandle(media_event, &This->event);
270 if (SUCCEEDED(hr))
271 hr = IMediaEventEx_SetNotifyFlags(media_event, AM_MEDIAEVENT_NONOTIFY);
272 if (media_event)
273 IMediaEventEx_Release(media_event);
274 }
275 }
276
277 if (FAILED(hr))
278 {
279 if (This->media_stream_filter)
280 IMediaStreamFilter_Release(This->media_stream_filter);
281 This->media_stream_filter = NULL;
282 if (This->media_seeking)
283 IMediaSeeking_Release(This->media_seeking);
284 This->media_seeking = NULL;
285 if (This->media_control)
286 IMediaControl_Release(This->media_control);
287 This->media_control = NULL;
288 if (This->pFilterGraph)
289 IGraphBuilder_Release(This->pFilterGraph);
290 This->pFilterGraph = NULL;
291 }
292
293 return hr;
294}
@ AM_MEDIAEVENT_NONOTIFY
Definition: axcore.idl:670
unsigned long DWORD
Definition: ntddk_ex.h:95
#define FAILED(hr)
Definition: intsafe.h:51
__wchar_t WCHAR
Definition: xmlstorage.h:180

◆ IAMMultiMediaStreamImpl_OpenFile()

static HRESULT WINAPI IAMMultiMediaStreamImpl_OpenFile ( IAMMultiMediaStream iface,
LPCWSTR  filename,
DWORD  flags 
)
static

Definition at line 398 of file amstream.c.

399{
401 HRESULT ret = S_OK;
403 IEnumPins *EnumPins = NULL;
404 IPin *ipin;
405 PIN_DIRECTION pin_direction;
406 const WCHAR sourceW[] = {'S','o','u','r','c','e',0};
407
408 TRACE("(%p/%p)->(%s,%x)\n", This, iface, debugstr_w(filename), flags);
409
410 if (!filename)
411 return E_POINTER;
412
413 /* If Initialize was not called before, we do it here */
414 if (!This->pFilterGraph)
415 ret = IAMMultiMediaStream_Initialize(iface, STREAMTYPE_READ, 0, NULL);
416
417 if (SUCCEEDED(ret))
418 ret = IGraphBuilder_AddSourceFilter(This->pFilterGraph, filename, sourceW, &BaseFilter);
419
420 if (SUCCEEDED(ret))
421 ret = IBaseFilter_EnumPins(BaseFilter, &EnumPins);
422
423 if (SUCCEEDED(ret))
424 ret = IEnumPins_Next(EnumPins, 1, &ipin, NULL);
425
426 if (SUCCEEDED(ret))
427 {
428 ret = IPin_QueryDirection(ipin, &pin_direction);
429 if (ret == S_OK && pin_direction == PINDIR_OUTPUT)
430 This->ipin = ipin;
431 }
432
433 if (SUCCEEDED(ret) && !(flags & AMMSF_NORENDER))
434 ret = IGraphBuilder_Render(This->pFilterGraph, This->ipin);
435
436 if (EnumPins)
437 IEnumPins_Release(EnumPins);
438 if (BaseFilter)
439 IBaseFilter_Release(BaseFilter);
440 return ret;
441}
@ AMMSF_NORENDER
Definition: amstream.idl:55
enum _PinDirection PIN_DIRECTION
@ PINDIR_OUTPUT
Definition: axcore.idl:42
GLbitfield flags
Definition: glext.h:7161
Definition: axcore.idl:92
const char * filename
Definition: ioapi.h:137
static const WCHAR sourceW[]
Definition: jsregexp.c:37
#define debugstr_w
Definition: kernel32.h:32
@ STREAMTYPE_READ
Definition: mmstream.idl:51
int ret

◆ IAMMultiMediaStreamImpl_OpenMoniker()

static HRESULT WINAPI IAMMultiMediaStreamImpl_OpenMoniker ( IAMMultiMediaStream iface,
IBindCtx pCtx,
IMoniker pMoniker,
DWORD  dwFlags 
)
static

Definition at line 443 of file amstream.c.

444{
446
447 FIXME("(%p/%p)->(%p,%p,%x) stub!\n", This, iface, pCtx, pMoniker, dwFlags);
448
449 return E_NOTIMPL;
450}

◆ IAMMultiMediaStreamImpl_QueryInterface()

static HRESULT WINAPI IAMMultiMediaStreamImpl_QueryInterface ( IAMMultiMediaStream iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 76 of file amstream.c.

77{
79
80 TRACE("(%p/%p)->(%s,%p)\n", iface, This, debugstr_guid(riid), ppvObject);
81
83 IsEqualGUID(riid, &IID_IMultiMediaStream) ||
84 IsEqualGUID(riid, &IID_IAMMultiMediaStream))
85 {
86 IAMMultiMediaStream_AddRef(iface);
87 *ppvObject = iface;
88 return S_OK;
89 }
90
91 ERR("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppvObject);
92
93 return E_NOINTERFACE;
94}
const GUID IID_IUnknown
#define ERR(fmt,...)
Definition: debug.h:110
REFIID riid
Definition: atlbase.h:39
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
Definition: wincrypt.h:6082
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ IAMMultiMediaStreamImpl_Release()

static ULONG WINAPI IAMMultiMediaStreamImpl_Release ( IAMMultiMediaStream iface)
static

Definition at line 105 of file amstream.c.

106{
109 ULONG i;
110
111 TRACE("(%p/%p)\n", iface, This);
112
113 if (!ref)
114 {
115 for(i = 0; i < This->nbStreams; i++)
116 IAMMediaStream_Release(This->pStreams[i]);
117 CoTaskMemFree(This->pStreams);
118 if (This->ipin)
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);
129 }
130
131 return ref;
132}
#define InterlockedDecrement
Definition: armddk.h:52
#define HeapFree(x, y, z)
Definition: compat.h:735
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
Definition: send.c:48
uint32_t ULONG
Definition: typedefs.h:59

◆ IAMMultiMediaStreamImpl_Render()

static HRESULT WINAPI IAMMultiMediaStreamImpl_Render ( IAMMultiMediaStream iface,
DWORD  dwFlags 
)
static

Definition at line 452 of file amstream.c.

453{
455
456 FIXME("(%p/%p)->(%x) partial stub!\n", This, iface, dwFlags);
457
459 return E_INVALIDARG;
460
461 return IGraphBuilder_Render(This->pFilterGraph, This->ipin);
462}
@ AMMSF_NOCLOCK
Definition: amstream.idl:56
#define E_INVALIDARG
Definition: ddrawi.h:101

◆ IAMMultiMediaStreamImpl_Seek()

static HRESULT WINAPI IAMMultiMediaStreamImpl_Seek ( IAMMultiMediaStream iface,
STREAM_TIME  seek_time 
)
static

Definition at line 217 of file amstream.c.

218{
220
221 TRACE("(%p/%p)->(%s)\n", This, iface, wine_dbgstr_longlong(seek_time));
222
223 return IMediaSeeking_SetPositions(This->media_seeking, &seek_time, AM_SEEKING_AbsolutePositioning, NULL, AM_SEEKING_NoPositioning);
224}
@ AM_SEEKING_NoPositioning
Definition: axcore.idl:591
@ AM_SEEKING_AbsolutePositioning
Definition: axcore.idl:592
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:49

◆ IAMMultiMediaStreamImpl_SetState()

static HRESULT WINAPI IAMMultiMediaStreamImpl_SetState ( IAMMultiMediaStream iface,
STREAM_STATE  new_state 
)
static

Definition at line 184 of file amstream.c.

185{
188
189 TRACE("(%p/%p)->(%u)\n", This, iface, new_state);
190
191 if (new_state == STREAMSTATE_RUN)
192 hr = IMediaControl_Run(This->media_control);
193 else if (new_state == STREAMSTATE_STOP)
194 hr = IMediaControl_Stop(This->media_control);
195
196 return hr;
197}
@ STREAMSTATE_STOP
Definition: mmstream.idl:57
@ STREAMSTATE_RUN
Definition: mmstream.idl:58

◆ impl_from_IAMMultiMediaStream()

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( amstream  )

Variable Documentation

◆ AM_Vtbl

static const IAMMultiMediaStreamVtbl AM_Vtbl
static
Initial value:
=
{
}
static HRESULT WINAPI IAMMultiMediaStreamImpl_QueryInterface(IAMMultiMediaStream *iface, REFIID riid, void **ppvObject)
Definition: amstream.c:76
static HRESULT WINAPI IAMMultiMediaStreamImpl_Seek(IAMMultiMediaStream *iface, STREAM_TIME seek_time)
Definition: amstream.c:217
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetFilterGraph(IAMMultiMediaStream *iface, IGraphBuilder **ppGraphBuilder)
Definition: amstream.c:296
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetDuration(IAMMultiMediaStream *iface, STREAM_TIME *pDuration)
Definition: amstream.c:208
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetTime(IAMMultiMediaStream *iface, STREAM_TIME *pCurrentTime)
Definition: amstream.c:199
static ULONG WINAPI IAMMultiMediaStreamImpl_Release(IAMMultiMediaStream *iface)
Definition: amstream.c:105
static ULONG WINAPI IAMMultiMediaStreamImpl_AddRef(IAMMultiMediaStream *iface)
Definition: amstream.c:96
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetFilter(IAMMultiMediaStream *iface, IMediaStreamFilter **ppFilter)
Definition: amstream.c:313
static HRESULT WINAPI IAMMultiMediaStreamImpl_OpenMoniker(IAMMultiMediaStream *iface, IBindCtx *pCtx, IMoniker *pMoniker, DWORD dwFlags)
Definition: amstream.c:443
static HRESULT WINAPI IAMMultiMediaStreamImpl_Initialize(IAMMultiMediaStream *iface, STREAM_TYPE StreamType, DWORD dwFlags, IGraphBuilder *pFilterGraph)
Definition: amstream.c:236
static HRESULT WINAPI IAMMultiMediaStreamImpl_SetState(IAMMultiMediaStream *iface, STREAM_STATE new_state)
Definition: amstream.c:184
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetState(IAMMultiMediaStream *iface, STREAM_STATE *pCurrentState)
Definition: amstream.c:175
static HRESULT WINAPI IAMMultiMediaStreamImpl_Render(IAMMultiMediaStream *iface, DWORD dwFlags)
Definition: amstream.c:452
static HRESULT WINAPI IAMMultiMediaStreamImpl_AddMediaStream(IAMMultiMediaStream *iface, IUnknown *stream_object, const MSPID *PurposeId, DWORD dwFlags, IMediaStream **ppNewStream)
Definition: amstream.c:329
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetInformation(IAMMultiMediaStream *iface, DWORD *pdwFlags, STREAM_TYPE *pStreamType)
Definition: amstream.c:135
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetMediaStream(IAMMultiMediaStream *iface, REFMSPID idPurpose, IMediaStream **ppMediaStream)
Definition: amstream.c:144
static HRESULT WINAPI IAMMultiMediaStreamImpl_EnumMediaStreams(IAMMultiMediaStream *iface, LONG Index, IMediaStream **ppMediaStream)
Definition: amstream.c:166
static HRESULT WINAPI IAMMultiMediaStreamImpl_OpenFile(IAMMultiMediaStream *iface, LPCWSTR filename, DWORD flags)
Definition: amstream.c:398
static HRESULT WINAPI IAMMultiMediaStreamImpl_GetEndOfStream(IAMMultiMediaStream *iface, HANDLE *phEOS)
Definition: amstream.c:226

Definition at line 52 of file amstream.c.

Referenced by AM_create().