ReactOS 0.4.15-dev-7918-g2a2556c
amstream_private.h File Reference
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "wtypes.h"
#include "wingdi.h"
#include "winuser.h"
#include "dshow.h"
#include "mmstream.h"
#include "austream.h"
#include "amstream.h"
Include dependency graph for amstream_private.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

HRESULT AM_create (IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN
 
HRESULT AMAudioData_create (IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN
 
HRESULT MediaStreamFilter_create (IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN
 
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
 

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

◆ AMAudioData_create()

HRESULT AMAudioData_create ( IUnknown pUnkOuter,
LPVOID ppObj 
)

Definition at line 222 of file audiodata.c.

223{
225
226 TRACE("(%p,%p)\n", pUnkOuter, ppObj);
227
228 if (pUnkOuter)
230
232 if (!object)
233 return E_OUTOFMEMORY;
234
235 object->IAudioData_iface.lpVtbl = &AudioData_Vtbl;
236 object->ref = 1;
237
238 object->wave_format.wFormatTag = WAVE_FORMAT_PCM;
239 object->wave_format.nChannels = 1;
240 object->wave_format.nSamplesPerSec = 11025;
241 object->wave_format.wBitsPerSample = 16;
242 object->wave_format.nBlockAlign = object->wave_format.wBitsPerSample * object->wave_format.nChannels / 8;
243 object->wave_format.nAvgBytesPerSec = object->wave_format.nBlockAlign * object->wave_format.nSamplesPerSec;
244
245 *ppObj = &object->IAudioData_iface;
246
247 return S_OK;
248}
static const struct IAudioDataVtbl AudioData_Vtbl
Definition: audiodata.c:207
#define WAVE_FORMAT_PCM
Definition: constants.h:425

◆ audiomediastream_create()

HRESULT audiomediastream_create ( IMultiMediaStream parent,
const MSPID purpose_id,
STREAM_TYPE  stream_type,
IAMMediaStream **  media_stream 
)

Definition at line 1146 of file mediastream.c.

1148{
1150 PIN_INFO pin_info;
1151 HRESULT hr;
1152
1153 TRACE("(%p,%s,%p)\n", parent, debugstr_guid(purpose_id), media_stream);
1154
1156 if (!object)
1157 return E_OUTOFMEMORY;
1158
1159 object->IAMMediaStream_iface.lpVtbl = &AudioMediaStreamImpl_IAMMediaStream_Vtbl;
1160 object->IAudioMediaStream_iface.lpVtbl = &AudioMediaStreamImpl_IAudioMediaStream_Vtbl;
1161 object->ref = 1;
1162
1163 InitializeCriticalSection(&object->critical_section);
1164
1165 pin_info.pFilter = NULL;
1166 pin_info.dir = PINDIR_INPUT;
1167 pin_info.achName[0] = 'I';
1168 StringFromGUID2(purpose_id, pin_info.achName + 1, MAX_PIN_NAME - 1);
1171 &object->critical_section, NULL, (IPin **)&object->input_pin);
1172 if (FAILED(hr))
1173 goto out_object;
1174
1175 object->input_pin->parent = object;
1176
1177 object->parent = parent;
1178 object->purpose_id = *purpose_id;
1179 object->stream_type = stream_type;
1180
1181 *media_stream = &object->IAMMediaStream_iface;
1182
1183 return S_OK;
1184
1185out_object:
1186 HeapFree(GetProcessHeap(), 0, object);
1187
1188 return hr;
1189}
#define MAX_PIN_NAME
Definition: axcore.idl:47
@ PINDIR_INPUT
Definition: axcore.idl:41
#define NULL
Definition: types.h:112
#define HeapFree(x, y, z)
Definition: compat.h:735
INT WINAPI StringFromGUID2(REFGUID id, LPOLESTR str, INT cmax)
Definition: compobj.c:2434
r parent
Definition: btrfs.c:3010
Definition: axcore.idl:92
#define FAILED(hr)
Definition: intsafe.h:51
#define debugstr_guid
Definition: kernel32.h:35
static const IPinVtbl AudioMediaStreamInputPin_IPin_Vtbl
Definition: mediastream.c:1063
static const BaseInputPinFuncTable AudioMediaStreamInputPin_FuncTable
Definition: mediastream.c:1135
static const struct IAudioMediaStreamVtbl AudioMediaStreamImpl_IAudioMediaStream_Vtbl
Definition: mediastream.c:1017
static const struct IAMMediaStreamVtbl AudioMediaStreamImpl_IAMMediaStream_Vtbl
Definition: mediastream.c:860
HRESULT hr
Definition: shlfolder.c:183
HRESULT BaseInputPin_Construct(const IPinVtbl *InputPin_Vtbl, LONG inputpin_size, const PIN_INFO *pPinInfo, const BaseInputPinFuncTable *pBaseInputFuncsTable, LPCRITICAL_SECTION pCritSec, IMemAllocator *, IPin **ppPin)
Definition: pin.c:1189
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
Definition: synch.c:751

Referenced by IAMMultiMediaStreamImpl_AddMediaStream().

◆ ddrawmediastream_create()

HRESULT ddrawmediastream_create ( IMultiMediaStream Parent,
const MSPID pPurposeId,
STREAM_TYPE  StreamType,
IAMMediaStream **  ppMediaStream 
)

Definition at line 606 of file mediastream.c.

608{
610 PIN_INFO pin_info;
611 HRESULT hr;
612
613 TRACE("(%p,%s,%p)\n", parent, debugstr_guid(purpose_id), media_stream);
614
616 if (!object)
617 return E_OUTOFMEMORY;
618
619 object->IAMMediaStream_iface.lpVtbl = &DirectDrawMediaStreamImpl_IAMMediaStream_Vtbl;
620 object->IDirectDrawMediaStream_iface.lpVtbl = &DirectDrawMediaStreamImpl_IDirectDrawMediaStream_Vtbl;
621 object->ref = 1;
622
623 InitializeCriticalSection(&object->critical_section);
624
625 pin_info.pFilter = NULL;
626 pin_info.dir = PINDIR_INPUT;
627 pin_info.achName[0] = 'I';
628 StringFromGUID2(purpose_id, pin_info.achName + 1, MAX_PIN_NAME - 1);
631 &object->critical_section, NULL, (IPin **)&object->input_pin);
632 if (FAILED(hr))
633 goto out_object;
634
635 object->input_pin->parent = object;
636
637 object->parent = parent;
638 object->purpose_id = *purpose_id;
639 object->stream_type = stream_type;
640
641 *media_stream = &object->IAMMediaStream_iface;
642
643 return S_OK;
644
645out_object:
646 HeapFree(GetProcessHeap(), 0, object);
647
648 return hr;
649}
static const struct IAMMediaStreamVtbl DirectDrawMediaStreamImpl_IAMMediaStream_Vtbl
Definition: mediastream.c:260
static const IPinVtbl DirectDrawMediaStreamInputPin_IPin_Vtbl
Definition: mediastream.c:494
static const struct IDirectDrawMediaStreamVtbl DirectDrawMediaStreamImpl_IDirectDrawMediaStream_Vtbl
Definition: mediastream.c:445
static const BaseInputPinFuncTable DirectDrawMediaStreamInputPin_FuncTable
Definition: mediastream.c:595

Referenced by IAMMultiMediaStreamImpl_AddMediaStream().

◆ MediaStreamFilter_create()

HRESULT MediaStreamFilter_create ( IUnknown pUnkOuter,
LPVOID ppObj 
)