ReactOS 0.4.17-dev-934-g091855f
acmwrapper.c
Go to the documentation of this file.
1/*
2 * ACM Wrapper
3 *
4 * Copyright 2005 Christian Costa
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#include "quartz_private.h"
22
23#include "uuids.h"
24#include "mmreg.h"
25#include "windef.h"
26#include "winbase.h"
27#include "dshow.h"
28#include "strmif.h"
29#include "vfwmsgs.h"
30#include "msacm.h"
31
32#include <assert.h>
33
34#include "wine/debug.h"
35
37
39{
41
46
48
50 HACMSTREAM has;
52
55};
56
58{
59 return CONTAINING_RECORD(iface, struct acm_wrapper, filter);
60}
61
63{
65
66 if (IsEqualGUID(iid, &IID_IMemInputPin))
67 *out = &filter->sink.IMemInputPin_iface;
68 else
69 return E_NOINTERFACE;
70
71 IUnknown_AddRef((IUnknown *)*out);
72 return S_OK;
73}
74
76{
77 return S_OK;
78}
79
81{
82 struct acm_wrapper *This = impl_from_strmbase_filter(iface->pin.filter);
83 IMediaSample* pOutSample = NULL;
84 DWORD cbDstStream, cbSrcStream;
85 LPBYTE pbDstStream;
86 LPBYTE pbSrcStream = NULL;
88 BOOL unprepare_header = FALSE, preroll;
90 HRESULT hr;
91 LONGLONG tStart = -1, tStop = -1, tMed;
92 LONGLONG mtStart = -1, mtStop = -1, mtMed;
93
94 /* We do not expect pin connection state to change while the filter is
95 * running. This guarantee is necessary, since otherwise we would have to
96 * take the filter lock, and we can't take the filter lock from a streaming
97 * thread. */
98 if (!This->source.pMemInputPin)
99 {
100 WARN("Source is not connected, returning VFW_E_NOT_CONNECTED.\n");
101 return VFW_E_NOT_CONNECTED;
102 }
103
104 if (This->filter.state == State_Stopped)
105 return VFW_E_WRONG_STATE;
106
107 if (This->sink.flushing)
108 return S_FALSE;
109
110 hr = IMediaSample_GetPointer(pSample, &pbSrcStream);
111 if (FAILED(hr))
112 {
113 ERR("Failed to get input buffer pointer, hr %#lx.\n", hr);
114 return hr;
115 }
116
117 preroll = (IMediaSample_IsPreroll(pSample) == S_OK);
118
119 IMediaSample_GetTime(pSample, &tStart, &tStop);
120 if (IMediaSample_GetMediaTime(pSample, &mtStart, &mtStop) != S_OK)
121 mtStart = mtStop = -1;
122 cbSrcStream = IMediaSample_GetActualDataLength(pSample);
123
124 /* Prevent discontinuities when codecs 'absorb' data but not give anything back in return */
125 if (IMediaSample_IsDiscontinuity(pSample) == S_OK)
126 {
127 This->lasttime_real = tStart;
128 This->lasttime_sent = tStart;
129 }
130 else if (This->lasttime_real == tStart)
131 tStart = This->lasttime_sent;
132 else
133 WARN("Discontinuity\n");
134
135 tMed = tStart;
136 mtMed = mtStart;
137
138 ash.pbSrc = pbSrcStream;
139 ash.cbSrcLength = cbSrcStream;
140
141 while(hr == S_OK && ash.cbSrcLength)
142 {
143 if (FAILED(hr = IMemAllocator_GetBuffer(This->source.pAllocator, &pOutSample, NULL, NULL, 0)))
144 {
145 ERR("Failed to get sample, hr %#lx.\n", hr);
146 return hr;
147 }
148 IMediaSample_SetPreroll(pOutSample, preroll);
149
150 hr = IMediaSample_SetActualDataLength(pOutSample, 0);
151 assert(hr == S_OK);
152
153 hr = IMediaSample_GetPointer(pOutSample, &pbDstStream);
154 if (FAILED(hr)) {
155 ERR("Failed to get output buffer pointer, hr %#lx.\n", hr);
156 goto error;
157 }
158 cbDstStream = IMediaSample_GetSize(pOutSample);
159
160 ash.cbStruct = sizeof(ash);
161 ash.fdwStatus = 0;
162 ash.dwUser = 0;
163 ash.pbDst = pbDstStream;
164 ash.cbDstLength = cbDstStream;
165
166 if ((res = acmStreamPrepareHeader(This->has, &ash, 0))) {
167 ERR("Cannot prepare header %d\n", res);
168 goto error;
169 }
170 unprepare_header = TRUE;
171
172 if (IMediaSample_IsDiscontinuity(pSample) == S_OK)
173 {
175 IMediaSample_SetDiscontinuity(pOutSample, TRUE);
176 /* One sample could be converted to multiple packets */
177 IMediaSample_SetDiscontinuity(pSample, FALSE);
178 }
179 else
180 {
181 res = acmStreamConvert(This->has, &ash, 0);
182 IMediaSample_SetDiscontinuity(pOutSample, FALSE);
183 }
184
185 if (res)
186 {
188 ERR("Cannot convert data header %d\n", res);
189 goto error;
190 }
191
192 TRACE("used in %lu/%lu, used out %lu/%lu\n", ash.cbSrcLengthUsed, ash.cbSrcLength, ash.cbDstLengthUsed, ash.cbDstLength);
193
194 hr = IMediaSample_SetActualDataLength(pOutSample, ash.cbDstLengthUsed);
195 assert(hr == S_OK);
196
197 /* Bug in acm codecs? It apparently uses the input, but doesn't necessarily output immediately */
198 if (!ash.cbSrcLengthUsed)
199 {
200 WARN("Sample was skipped? Outputted: %lu\n", ash.cbDstLengthUsed);
201 ash.cbSrcLength = 0;
202 goto error;
203 }
204
205 TRACE("Sample start time: %s.\n", debugstr_time(tStart));
206 if (ash.cbSrcLengthUsed == cbSrcStream)
207 {
208 IMediaSample_SetTime(pOutSample, &tStart, &tStop);
209 tStart = tMed = tStop;
210 }
211 else if (tStop != tStart)
212 {
213 tMed = tStop - tStart;
214 tMed = tStart + tMed * ash.cbSrcLengthUsed / cbSrcStream;
215 IMediaSample_SetTime(pOutSample, &tStart, &tMed);
216 tStart = tMed;
217 }
218 else
219 {
220 ERR("No valid timestamp found\n");
221 IMediaSample_SetTime(pOutSample, NULL, NULL);
222 }
223
224 if (mtStart < 0) {
225 IMediaSample_SetMediaTime(pOutSample, NULL, NULL);
226 } else if (ash.cbSrcLengthUsed == cbSrcStream) {
227 IMediaSample_SetMediaTime(pOutSample, &mtStart, &mtStop);
228 mtStart = mtMed = mtStop;
229 } else if (mtStop >= mtStart) {
230 mtMed = mtStop - mtStart;
231 mtMed = mtStart + mtMed * ash.cbSrcLengthUsed / cbSrcStream;
232 IMediaSample_SetMediaTime(pOutSample, &mtStart, &mtMed);
233 mtStart = mtMed;
234 } else {
235 IMediaSample_SetMediaTime(pOutSample, NULL, NULL);
236 }
237
238 TRACE("Sample stop time: %s\n", debugstr_time(tStart));
239
240 hr = IMemInputPin_Receive(This->source.pMemInputPin, pOutSample);
241 if (hr != S_OK && hr != VFW_E_NOT_CONNECTED) {
242 if (FAILED(hr))
243 ERR("Failed to send sample, hr %#lx.\n", hr);
244 goto error;
245 }
246
247error:
248 if (unprepare_header && (res = acmStreamUnprepareHeader(This->has, &ash, 0)))
249 ERR("Cannot unprepare header %d\n", res);
250 unprepare_header = FALSE;
251 ash.pbSrc += ash.cbSrcLengthUsed;
252 ash.cbSrcLength -= ash.cbSrcLengthUsed;
253
254 IMediaSample_Release(pOutSample);
255 pOutSample = NULL;
256
257 }
258
259 This->lasttime_real = tStop;
260 This->lasttime_sent = tMed;
261
262 return hr;
263}
264
266{
267 return !memcmp(&guid->Data2, &MEDIATYPE_Audio.Data2, sizeof(GUID) - sizeof(int));
268}
269
271{
272 struct acm_wrapper *filter = impl_from_strmbase_filter(iface->pin.filter);
273 const WAVEFORMATEX *wfx = (WAVEFORMATEX *)mt->pbFormat;
274 HACMSTREAM drv;
276
277 if (!IsEqualGUID(&mt->majortype, &MEDIATYPE_Audio) || !is_audio_subtype(&mt->subtype)
278 || !IsEqualGUID(&mt->formattype, &FORMAT_WaveFormatEx) || !wfx
281
282 CopyMediaType(&filter->mt, mt);
283 filter->mt.subtype.Data1 = WAVE_FORMAT_PCM;
284 filter->pWfOut = (WAVEFORMATEX *)filter->mt.pbFormat;
285 filter->pWfOut->wFormatTag = WAVE_FORMAT_PCM;
286 filter->pWfOut->wBitsPerSample = 16;
287 filter->pWfOut->nBlockAlign = filter->pWfOut->wBitsPerSample * filter->pWfOut->nChannels / 8;
288 filter->pWfOut->cbSize = 0;
289 filter->pWfOut->nAvgBytesPerSec = filter->pWfOut->nChannels * filter->pWfOut->nSamplesPerSec
290 * (filter->pWfOut->wBitsPerSample / 8);
291
292 if ((res = acmStreamOpen(&drv, NULL, (WAVEFORMATEX *)wfx, filter->pWfOut, NULL, 0, 0, 0)))
293 {
294 ERR("Failed to open stream, error %u.\n", res);
295 FreeMediaType(&filter->mt);
297 }
298
299 filter->has = drv;
300
301 return S_OK;
302}
303
305{
306 struct acm_wrapper *filter = impl_from_strmbase_filter(iface->pin.filter);
307
308 if (filter->has)
309 acmStreamClose(filter->has, 0);
310 filter->has = 0;
311 filter->lasttime_real = filter->lasttime_sent = -1;
312}
313
314static const struct strmbase_sink_ops sink_ops =
315{
316 .base.pin_query_interface = acm_wrapper_sink_query_interface,
317 .base.pin_query_accept = acm_wrapper_sink_query_accept,
318 .pfnReceive = acm_wrapper_sink_Receive,
319 .sink_connect = acm_wrapper_sink_connect,
320 .sink_disconnect = acm_wrapper_sink_disconnect,
321};
322
324{
326
327 if (IsEqualGUID(iid, &IID_IQualityControl))
328 *out = &filter->source_IQualityControl_iface;
329 else if (IsEqualGUID(iid, &IID_IMediaSeeking))
330 *out = &filter->passthrough.IMediaSeeking_iface;
331 else
332 return E_NOINTERFACE;
333
334 IUnknown_AddRef((IUnknown *)*out);
335 return S_OK;
336}
337
339{
341
342 if (IsEqualGUID(&mt->majortype, &filter->mt.majortype)
343 && (IsEqualGUID(&mt->subtype, &filter->mt.subtype)
344 || IsEqualGUID(&filter->mt.subtype, &GUID_NULL)))
345 return S_OK;
346 return S_FALSE;
347}
348
350 unsigned int index, AM_MEDIA_TYPE *mt)
351{
353
354 if (index)
355 return VFW_S_NO_MORE_ITEMS;
356 CopyMediaType(mt, &filter->mt);
357 return S_OK;
358}
359
361 IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *ppropInputRequest)
362{
363 struct acm_wrapper *filter = impl_from_strmbase_filter(iface->pin.filter);
365
366 if (!ppropInputRequest->cbAlign)
367 ppropInputRequest->cbAlign = 1;
368
369 if (ppropInputRequest->cbBuffer < filter->pWfOut->nAvgBytesPerSec / 2)
370 ppropInputRequest->cbBuffer = filter->pWfOut->nAvgBytesPerSec / 2;
371
372 if (!ppropInputRequest->cBuffers)
373 ppropInputRequest->cBuffers = 1;
374
375 return IMemAllocator_SetProperties(pAlloc, ppropInputRequest, &actual);
376}
377
378static const struct strmbase_source_ops source_ops =
379{
380 .base.pin_query_interface = acm_wrapper_source_query_interface,
381 .base.pin_query_accept = acm_wrapper_source_query_accept,
382 .base.pin_get_media_type = acm_wrapper_source_get_media_type,
383 .pfnAttemptConnection = BaseOutputPinImpl_AttemptConnection,
384 .pfnDecideAllocator = BaseOutputPinImpl_DecideAllocator,
385 .pfnDecideBufferSize = acm_wrapper_source_DecideBufferSize,
386};
387
389{
391}
392
394 REFIID iid, void **out)
395{
397 return IPin_QueryInterface(&filter->source.pin.IPin_iface, iid, out);
398}
399
401{
403 return IPin_AddRef(&filter->source.pin.IPin_iface);
404}
405
407{
409 return IPin_Release(&filter->source.pin.IPin_iface);
410}
411
413 IBaseFilter *sender, Quality q)
414{
416 IQualityControl *peer;
417 HRESULT hr = S_OK;
418
419 TRACE("filter %p, sender %p, type %#x, proportion %ld, late %s, timestamp %s.\n",
420 filter, sender, q.Type, q.Proportion, debugstr_time(q.Late), debugstr_time(q.TimeStamp));
421
422 if (filter->source_qc_sink)
423 return IQualityControl_Notify(filter->source_qc_sink, &filter->filter.IBaseFilter_iface, q);
424
425 if (filter->sink.pin.peer
426 && SUCCEEDED(IPin_QueryInterface(filter->sink.pin.peer, &IID_IQualityControl, (void **)&peer)))
427 {
428 hr = IQualityControl_Notify(peer, &filter->filter.IBaseFilter_iface, q);
429 IQualityControl_Release(peer);
430 }
431 return hr;
432}
433
435{
437
438 TRACE("filter %p, sink %p.\n", filter, sink);
439
440 filter->source_qc_sink = sink;
441
442 return S_OK;
443}
444
445static const IQualityControlVtbl source_qc_vtbl =
446{
452};
453
454static struct strmbase_pin *acm_wrapper_get_pin(struct strmbase_filter *iface, unsigned int index)
455{
457
458 if (index == 0)
459 return &filter->sink.pin;
460 else if (index == 1)
461 return &filter->source.pin;
462 return NULL;
463}
464
465static void acm_wrapper_destroy(struct strmbase_filter *iface)
466{
468
469 if (filter->sink.pin.peer)
470 IPin_Disconnect(filter->sink.pin.peer);
471 IPin_Disconnect(&filter->sink.pin.IPin_iface);
472
473 if (filter->source.pin.peer)
474 IPin_Disconnect(filter->source.pin.peer);
475 IPin_Disconnect(&filter->source.pin.IPin_iface);
476
480
481 FreeMediaType(&filter->mt);
483 free(filter);
484}
485
487{
489 HRESULT hr;
490
491 if (filter->source.pin.peer && FAILED(hr = IMemAllocator_Commit(filter->source.pAllocator)))
492 ERR("Failed to commit allocator, hr %#lx.\n", hr);
493 return S_OK;
494}
495
497{
499
500 if (filter->source.pin.peer)
501 IMemAllocator_Decommit(filter->source.pAllocator);
502 return S_OK;
503}
504
505static const struct strmbase_filter_ops filter_ops =
506{
507 .filter_get_pin = acm_wrapper_get_pin,
508 .filter_destroy = acm_wrapper_destroy,
509 .filter_init_stream = acm_wrapper_init_stream,
510 .filter_cleanup_stream = acm_wrapper_cleanup_stream,
511};
512
514{
515 struct acm_wrapper *object;
516
517 if (!(object = calloc(1, sizeof(*object))))
518 return E_OUTOFMEMORY;
519
520 strmbase_filter_init(&object->filter, outer, &CLSID_ACMWrapper, &filter_ops);
521
522 strmbase_sink_init(&object->sink, &object->filter, L"In", &sink_ops, NULL);
523 wcscpy(object->sink.pin.name, L"Input");
524
525 strmbase_source_init(&object->source, &object->filter, L"Out", &source_ops);
526 wcscpy(object->source.pin.name, L"Output");
527
528 object->source_IQualityControl_iface.lpVtbl = &source_qc_vtbl;
529 strmbase_passthrough_init(&object->passthrough, (IUnknown *)&object->source.pin.IPin_iface);
530 ISeekingPassThru_Init(&object->passthrough.ISeekingPassThru_iface, FALSE,
531 &object->sink.pin.IPin_iface);
532
533 object->lasttime_real = object->lasttime_sent = -1;
534
535 TRACE("Created ACM wrapper %p.\n", object);
536 *out = &object->filter.IUnknown_inner;
537
538 return S_OK;
539}
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define WAVE_FORMAT_PCM
Definition: constants.h:425
#define WARN(fmt,...)
Definition: precomp.h:61
#define ERR(fmt,...)
Definition: precomp.h:57
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define free
Definition: debug_ros.c:5
HRESULT hr
Definition: delayimp.cpp:582
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
static BOOL is_audio_subtype(const GUID *guid)
Definition: acmwrapper.c:265
static HRESULT WINAPI acm_wrapper_source_DecideBufferSize(struct strmbase_source *iface, IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *ppropInputRequest)
Definition: acmwrapper.c:360
HRESULT acm_wrapper_create(IUnknown *outer, IUnknown **out)
Definition: acmwrapper.c:513
static HRESULT acm_wrapper_sink_query_accept(struct strmbase_pin *iface, const AM_MEDIA_TYPE *mt)
Definition: acmwrapper.c:75
static ULONG WINAPI acm_wrapper_source_qc_Release(IQualityControl *iface)
Definition: acmwrapper.c:406
static HRESULT acm_wrapper_sink_connect(struct strmbase_sink *iface, IPin *peer, const AM_MEDIA_TYPE *mt)
Definition: acmwrapper.c:270
static const IQualityControlVtbl source_qc_vtbl
Definition: acmwrapper.c:445
static struct acm_wrapper * impl_from_strmbase_filter(struct strmbase_filter *iface)
Definition: acmwrapper.c:57
static HRESULT WINAPI acm_wrapper_source_qc_Notify(IQualityControl *iface, IBaseFilter *sender, Quality q)
Definition: acmwrapper.c:412
static HRESULT acm_wrapper_init_stream(struct strmbase_filter *iface)
Definition: acmwrapper.c:486
static HRESULT acm_wrapper_source_get_media_type(struct strmbase_pin *iface, unsigned int index, AM_MEDIA_TYPE *mt)
Definition: acmwrapper.c:349
static const struct strmbase_source_ops source_ops
Definition: acmwrapper.c:378
static HRESULT acm_wrapper_source_query_interface(struct strmbase_pin *iface, REFIID iid, void **out)
Definition: acmwrapper.c:323
static const struct strmbase_sink_ops sink_ops
Definition: acmwrapper.c:314
static const struct strmbase_filter_ops filter_ops
Definition: acmwrapper.c:505
static HRESULT acm_wrapper_source_query_accept(struct strmbase_pin *iface, const AM_MEDIA_TYPE *mt)
Definition: acmwrapper.c:338
static struct strmbase_pin * acm_wrapper_get_pin(struct strmbase_filter *iface, unsigned int index)
Definition: acmwrapper.c:454
static HRESULT acm_wrapper_cleanup_stream(struct strmbase_filter *iface)
Definition: acmwrapper.c:496
static HRESULT WINAPI acm_wrapper_source_qc_QueryInterface(IQualityControl *iface, REFIID iid, void **out)
Definition: acmwrapper.c:393
static struct acm_wrapper * impl_from_source_IQualityControl(IQualityControl *iface)
Definition: acmwrapper.c:388
static ULONG WINAPI acm_wrapper_source_qc_AddRef(IQualityControl *iface)
Definition: acmwrapper.c:400
static HRESULT WINAPI acm_wrapper_sink_Receive(struct strmbase_sink *iface, IMediaSample *pSample)
Definition: acmwrapper.c:80
static HRESULT acm_wrapper_sink_query_interface(struct strmbase_pin *iface, REFIID iid, void **out)
Definition: acmwrapper.c:62
static HRESULT WINAPI acm_wrapper_source_qc_SetSink(IQualityControl *iface, IQualityControl *sink)
Definition: acmwrapper.c:434
static void acm_wrapper_sink_disconnect(struct strmbase_sink *iface)
Definition: acmwrapper.c:304
static void acm_wrapper_destroy(struct strmbase_filter *iface)
Definition: acmwrapper.c:465
GUID guid
Definition: version.c:147
MMRESULT WINAPI acmStreamClose(HACMSTREAM has, DWORD fdwClose)
Definition: stream.c:65
MMRESULT WINAPI acmStreamPrepareHeader(HACMSTREAM has, PACMSTREAMHEADER pash, DWORD fdwPrepare)
Definition: stream.c:299
MMRESULT WINAPI acmStreamConvert(HACMSTREAM has, PACMSTREAMHEADER pash, DWORD fdwConvert)
Definition: stream.c:89
MMRESULT WINAPI acmStreamUnprepareHeader(HACMSTREAM has, PACMSTREAMHEADER pash, DWORD fdwUnprepare)
Definition: stream.c:449
MMRESULT WINAPI acmStreamOpen(PHACMSTREAM phas, HACMDRIVER had, PWAVEFORMATEX pwfxSrc, PWAVEFORMATEX pwfxDst, PWAVEFILTER pwfltr, DWORD_PTR dwCallback, DWORD_PTR dwInstance, DWORD fdwOpen)
Definition: stream.c:149
#define assert(_expr)
Definition: assert.h:32
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
Definition: string.c:2807
#define L(x)
Definition: resources.c:13
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLdouble GLdouble GLdouble GLdouble q
Definition: gl.h:2063
GLuint res
Definition: glext.h:9613
GLuint index
Definition: glext.h:6031
GLsizei GLenum GLboolean sink
Definition: glext.h:5672
Definition: axcore.idl:92
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
#define GUID_NULL
Definition: ks.h:106
#define WAVE_FORMAT_EXTENSIBLE
Definition: ksmedia.h:651
if(dx< 0)
Definition: linetemp.h:194
#define error(str)
Definition: mkdosfs.c:1605
UINT MMRESULT
Definition: mmsystem.h:964
#define MMSYSERR_MOREDATA
Definition: mmsystem.h:117
static IUnknown * outer
Definition: compobj.c:82
#define ACM_STREAMCONVERTF_START
Definition: msacm.h:206
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
#define calloc
Definition: rosglue.h:14
wcscpy
#define TRACE(s)
Definition: solgame.cpp:4
static const char * debugstr_time(REFERENCE_TIME time)
Definition: strmbase.h:32
HRESULT WINAPI CopyMediaType(AM_MEDIA_TYPE *pDest, const AM_MEDIA_TYPE *pSrc)
Definition: mediatype.c:150
void WINAPI FreeMediaType(AM_MEDIA_TYPE *pMediaType)
Definition: mediatype.c:165
HRESULT WINAPI BaseOutputPinImpl_DecideAllocator(struct strmbase_source *pin, IMemInputPin *peer, IMemAllocator **allocator)
Definition: pin.c:680
void strmbase_passthrough_cleanup(struct strmbase_passthrough *passthrough)
Definition: pospass.c:738
void strmbase_source_init(struct strmbase_source *pin, struct strmbase_filter *filter, const WCHAR *name, const struct strmbase_source_ops *func_table)
Definition: pin.c:765
void strmbase_sink_cleanup(struct strmbase_sink *pin)
Definition: pin.c:1185
void strmbase_sink_init(struct strmbase_sink *pin, struct strmbase_filter *filter, const WCHAR *name, const struct strmbase_sink_ops *ops, IMemAllocator *allocator)
Definition: pin.c:1168
void strmbase_filter_cleanup(struct strmbase_filter *filter)
Definition: filter.c:540
void strmbase_passthrough_init(struct strmbase_passthrough *passthrough, IUnknown *outer)
Definition: pospass.c:725
void strmbase_source_cleanup(struct strmbase_source *pin)
Definition: pin.c:778
void strmbase_filter_init(struct strmbase_filter *filter, IUnknown *outer, const CLSID *clsid, const struct strmbase_filter_ops *func_table)
Definition: filter.c:517
HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(struct strmbase_source *pin, IPin *peer, const AM_MEDIA_TYPE *mt)
Definition: pin.c:710
DWORD fdwStatus
Definition: msacm.h:551
DWORD cbSrcLengthUsed
Definition: msacm.h:555
DWORD cbStruct
Definition: msacm.h:550
LPBYTE pbDst
Definition: msacm.h:557
DWORD_PTR dwUser
Definition: msacm.h:552
DWORD cbDstLength
Definition: msacm.h:558
DWORD cbSrcLength
Definition: msacm.h:554
DWORD cbDstLengthUsed
Definition: msacm.h:559
LPBYTE pbSrc
Definition: msacm.h:553
LONGLONG lasttime_sent
Definition: acmwrapper.c:54
HACMSTREAM has
Definition: acmwrapper.c:50
AM_MEDIA_TYPE mt
Definition: acmwrapper.c:49
LPWAVEFORMATEX pWfOut
Definition: acmwrapper.c:51
struct strmbase_passthrough passthrough
Definition: acmwrapper.c:45
IQualityControl * source_qc_sink
Definition: acmwrapper.c:44
LONGLONG lasttime_real
Definition: acmwrapper.c:53
IQualityControl source_IQualityControl_iface
Definition: acmwrapper.c:43
Definition: filter.c:165
IBaseFilter * filter
Definition: filtergraph.c:75
IMediaSeeking IMediaSeeking_iface
Definition: filter.c:167
struct strmbase_filter * filter
Definition: strmbase.h:58
struct strmbase_pin pin
Definition: strmbase.h:106
struct strmbase_pin pin
Definition: strmbase.h:79
unsigned char * LPBYTE
Definition: typedefs.h:53
int64_t LONGLONG
Definition: typedefs.h:68
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
#define VFW_E_TYPE_NOT_ACCEPTED
Definition: vfwmsgs.h:81
#define VFW_E_WRONG_STATE
Definition: vfwmsgs.h:78
#define VFW_S_NO_MORE_ITEMS
Definition: vfwmsgs.h:19
#define VFW_E_NOT_CONNECTED
Definition: vfwmsgs.h:48
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
Definition: wcsftime.cpp:383
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:3451
#define E_NOINTERFACE
Definition: winerror.h:3479