ReactOS 0.4.17-dev-966-gf06eace
avico.c
Go to the documentation of this file.
1/*
2 * Copyright 2013 Jacek Caban for CodeWeavers
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19#include "qcap_private.h"
20#include "vfw.h"
21#include "aviriff.h"
22
24
25typedef struct {
28
31
33 HIC hic;
34
39
42
44{
46}
47
49{
50 return impl_from_strmbase_filter(pin->filter);
51}
52
54{
55 if(This->hic)
56 return S_OK;
57
58 This->hic = ICOpen(FCC('v','i','d','c'), This->fcc_handler, ICMODE_COMPRESS);
59 if(!This->hic) {
60 FIXME("ICOpen failed\n");
61 return E_FAIL;
62 }
63
64 return S_OK;
65}
66
68{
69 DWORD size;
70 ICINFO icinfo;
72
74 if(hres != S_OK)
75 return hres;
76
77 size = ICGetInfo(This->hic, &icinfo, sizeof(icinfo));
78 if(size != sizeof(icinfo))
79 return E_FAIL;
80
81 size = ICCompressGetFormatSize(This->hic, &src_videoinfo->bmiHeader);
82 if(!size) {
83 FIXME("ICCompressGetFormatSize failed\n");
84 return E_FAIL;
85 }
86
87 size += FIELD_OFFSET(VIDEOINFOHEADER, bmiHeader);
88 if (!(This->videoinfo = calloc(1, size)))
89 return E_OUTOFMEMORY;
90
91 This->videoinfo_size = size;
92 This->driver_flags = icinfo.dwFlags;
93 ICCompressGetFormat(This->hic, &src_videoinfo->bmiHeader, &This->videoinfo->bmiHeader);
94
95 This->videoinfo->dwBitRate = 10000000/src_videoinfo->AvgTimePerFrame * This->videoinfo->bmiHeader.biSizeImage * 8;
96 This->videoinfo->AvgTimePerFrame = src_videoinfo->AvgTimePerFrame;
97 This->max_frame_size = This->videoinfo->bmiHeader.biSizeImage;
98 return S_OK;
99}
100
101static struct strmbase_pin *avi_compressor_get_pin(struct strmbase_filter *iface, unsigned int index)
102{
104
105 if (index == 0)
106 return &filter->sink.pin;
107 else if (index == 1)
108 return &filter->source.pin;
109 return NULL;
110}
111
112static void avi_compressor_destroy(struct strmbase_filter *iface)
113{
115
116 if (filter->hic)
117 ICClose(filter->hic);
118 free(filter->videoinfo);
122 free(filter);
123}
124
126{
128
130 *out = &filter->IPersistPropertyBag_iface;
131 else
132 return E_NOINTERFACE;
133
134 IUnknown_AddRef((IUnknown *)*out);
135 return S_OK;
136}
137
139{
141 HRESULT hr;
142
143 if (filter->source.pAllocator && FAILED(hr = IMemAllocator_Commit(filter->source.pAllocator)))
144 {
145 ERR("Failed to commit allocator, hr %#lx.\n", hr);
146 return hr;
147 }
148
149 filter->frame_cnt = 0;
150
151 return S_OK;
152}
153
155{
157
158 ICCompressEnd(filter->hic);
159 return S_OK;
160}
161
162static const struct strmbase_filter_ops filter_ops =
163{
164 .filter_get_pin = avi_compressor_get_pin,
165 .filter_destroy = avi_compressor_destroy,
166 .filter_query_interface = avi_compressor_query_interface,
167 .filter_init_stream = avi_compressor_init_stream,
168 .filter_cleanup_stream = avi_compressor_cleanup_stream,
169};
170
172{
173 return CONTAINING_RECORD(iface, AVICompressor, IPersistPropertyBag_iface);
174}
175
177{
179 return IBaseFilter_QueryInterface(&This->filter.IBaseFilter_iface, riid, ppv);
180}
181
183{
185 return IBaseFilter_AddRef(&This->filter.IBaseFilter_iface);
186}
187
189{
191 return IBaseFilter_Release(&This->filter.IBaseFilter_iface);
192}
193
195{
197 return IBaseFilter_GetClassID(&This->filter.IBaseFilter_iface, pClassID);
198}
199
201{
203 FIXME("(%p)->()\n", This);
204 return E_NOTIMPL;
205}
206
208{
210 BSTR str;
211 VARIANT v;
213
214 TRACE("(%p)->(%p %p)\n", This, pPropBag, pErrorLog);
215
216 V_VT(&v) = VT_BSTR;
217 hres = IPropertyBag_Read(pPropBag, L"FccHandler", &v, NULL);
218 if(FAILED(hres)) {
219 ERR("Failed to read FccHandler value, hr %#lx.\n", hres);
220 return hres;
221 }
222
223 if(V_VT(&v) != VT_BSTR) {
224 FIXME("Got vt %d\n", V_VT(&v));
225 VariantClear(&v);
226 return E_FAIL;
227 }
228
229 str = V_BSTR(&v);
230 TRACE("FccHandler = %s\n", debugstr_w(str));
231 if(SysStringLen(str) != 4) {
232 FIXME("Invalid FccHandler len\n");
234 return E_FAIL;
235 }
236
237 This->fcc_handler = FCC(str[0], str[1], str[2], str[3]);
239 return S_OK;
240}
241
243 BOOL fClearDirty, BOOL fSaveAllProperties)
244{
246 FIXME("(%p)->(%p %x %x)\n", This, pPropBag, fClearDirty, fSaveAllProperties);
247 return E_NOTIMPL;
248}
249
250static const IPersistPropertyBagVtbl PersistPropertyBagVtbl = {
258};
259
261{
263 VIDEOINFOHEADER *videoinfo;
265 DWORD res;
266
267 TRACE("(%p)->(AM_MEDIA_TYPE(%p))\n", base, pmt);
268
269 if(!IsEqualIID(&pmt->majortype, &MEDIATYPE_Video))
270 return S_FALSE;
271
272 if(!IsEqualIID(&pmt->formattype, &FORMAT_VideoInfo)) {
273 FIXME("formattype %s unsupported\n", debugstr_guid(&pmt->formattype));
274 return S_FALSE;
275 }
276
278 if(hres != S_OK)
279 return hres;
280
281 videoinfo = (VIDEOINFOHEADER*)pmt->pbFormat;
282 res = ICCompressQuery(This->hic, &videoinfo->bmiHeader, NULL);
283 return res == ICERR_OK ? S_OK : S_FALSE;
284}
285
286static HRESULT sink_query_interface(struct strmbase_pin *iface, REFIID iid, void **out)
287{
289
290 if (IsEqualGUID(iid, &IID_IMemInputPin))
291 *out = &filter->sink.IMemInputPin_iface;
292 else
293 return E_NOINTERFACE;
294
295 IUnknown_AddRef((IUnknown *)*out);
296 return S_OK;
297}
298
300{
302 IMemInputPin *meminput = This->source.pMemInputPin;
303 VIDEOINFOHEADER *src_videoinfo;
304 REFERENCE_TIME start, stop;
305 IMediaSample *out_sample;
306 AM_MEDIA_TYPE *mt;
307 IMediaSample2 *sample2;
308 DWORD comp_flags = 0;
309 BOOL is_preroll;
310 BOOL sync_point;
311 BYTE *ptr, *buf;
312 LRESULT res;
314
315 TRACE("(%p)->(%p)\n", base, pSample);
316
317 if (!meminput)
318 {
319 WARN("Source is not connected, returning VFW_E_NOT_CONNECTED.\n");
320 return VFW_E_NOT_CONNECTED;
321 }
322
323 if(!This->hic) {
324 FIXME("Driver not loaded\n");
325 return E_UNEXPECTED;
326 }
327
328 hres = IMediaSample_QueryInterface(pSample, &IID_IMediaSample2, (void**)&sample2);
329 if(SUCCEEDED(hres)) {
330 FIXME("Use IMediaSample2\n");
331 IMediaSample2_Release(sample2);
332 }
333
334 is_preroll = IMediaSample_IsPreroll(pSample) == S_OK;
335 sync_point = IMediaSample_IsSyncPoint(pSample) == S_OK;
336
337 hres = IMediaSample_GetTime(pSample, &start, &stop);
338 if(FAILED(hres)) {
339 WARN("Failed to get sample time, hr %#lx.\n", hres);
340 return hres;
341 }
342
343 hres = IMediaSample_GetMediaType(pSample, &mt);
344 if(FAILED(hres))
345 return hres;
346
347 hres = IMediaSample_GetPointer(pSample, &ptr);
348 if(FAILED(hres)) {
349 ERR("Failed to get input buffer pointer, hr %#lx.\n", hres);
350 return hres;
351 }
352
353 if (FAILED(hres = IMemAllocator_GetBuffer(This->source.pAllocator, &out_sample, &start, &stop, 0)))
354 {
355 ERR("Failed to get sample, hr %#lx.\n", hres);
356 return hres;
357 }
358
359 if (FAILED(hres = IMediaSample_SetTime(out_sample, &start, &stop)))
360 ERR("Failed to set time, hr %#lx.\n", hres);
361
362 hres = IMediaSample_GetPointer(out_sample, &buf);
363 if(FAILED(hres))
364 return hres;
365
366 if((This->driver_flags & VIDCF_TEMPORAL) && !(This->driver_flags & VIDCF_FASTTEMPORALC))
367 FIXME("Unsupported temporal compression\n");
368
369 src_videoinfo = (VIDEOINFOHEADER *)This->sink.pin.mt.pbFormat;
370 This->videoinfo->bmiHeader.biSizeImage = This->max_frame_size;
371 res = ICCompress(This->hic, sync_point ? ICCOMPRESS_KEYFRAME : 0, &This->videoinfo->bmiHeader, buf,
372 &src_videoinfo->bmiHeader, ptr, 0, &comp_flags, This->frame_cnt, 0, 0, NULL, NULL);
373 if(res != ICERR_OK) {
374 ERR("Failed to compress frame, error %Id.\n", res);
375 IMediaSample_Release(out_sample);
376 return E_FAIL;
377 }
378
379 IMediaSample_SetActualDataLength(out_sample, This->videoinfo->bmiHeader.biSizeImage);
380 IMediaSample_SetPreroll(out_sample, is_preroll);
381 IMediaSample_SetSyncPoint(out_sample, (comp_flags&AVIIF_KEYFRAME) != 0);
382 IMediaSample_SetDiscontinuity(out_sample, (IMediaSample_IsDiscontinuity(pSample) == S_OK));
383
384 if (IMediaSample_GetMediaTime(pSample, &start, &stop) == S_OK)
385 IMediaSample_SetMediaTime(out_sample, &start, &stop);
386 else
387 IMediaSample_SetMediaTime(out_sample, NULL, NULL);
388
389 hres = IMemInputPin_Receive(meminput, out_sample);
390 if(FAILED(hres))
391 WARN("Failed to deliver sample, hr %#lx.\n", hres);
392
393 IMediaSample_Release(out_sample);
394 This->frame_cnt++;
395 return hres;
396}
397
398static HRESULT sink_connect(struct strmbase_sink *iface, IPin *peer, const AM_MEDIA_TYPE *mt)
399{
401 return fill_format_info(filter, (VIDEOINFOHEADER *)mt->pbFormat);
402}
403
404static void sink_disconnect(struct strmbase_sink *iface)
405{
407 free(filter->videoinfo);
408 filter->videoinfo = NULL;
409}
410
411static const struct strmbase_sink_ops sink_ops =
412{
413 .base.pin_query_accept = sink_query_accept,
414 .base.pin_query_interface = sink_query_interface,
415 .pfnReceive = AVICompressorIn_Receive,
416 .sink_connect = sink_connect,
417 .sink_disconnect = sink_disconnect,
418};
419
420static HRESULT source_get_media_type(struct strmbase_pin *base, unsigned int iPosition, AM_MEDIA_TYPE *amt)
421{
423
424 if(iPosition || !This->videoinfo)
425 return S_FALSE;
426
427 amt->majortype = MEDIATYPE_Video;
428 amt->subtype = MEDIASUBTYPE_PCM;
429 amt->bFixedSizeSamples = FALSE;
430 amt->bTemporalCompression = (This->driver_flags & VIDCF_TEMPORAL) != 0;
431 amt->lSampleSize = This->sink.pin.mt.lSampleSize;
432 amt->formattype = FORMAT_VideoInfo;
433 amt->pUnk = NULL;
434 amt->cbFormat = This->videoinfo_size;
435 amt->pbFormat = (BYTE*)This->videoinfo;
436 return S_OK;
437}
438
440 IMemAllocator *alloc, ALLOCATOR_PROPERTIES *ppropInputRequest)
441{
444
445 TRACE("(%p)\n", This);
446
447 if (!ppropInputRequest->cBuffers)
448 ppropInputRequest->cBuffers = 1;
449 if (ppropInputRequest->cbBuffer < This->max_frame_size)
450 ppropInputRequest->cbBuffer = This->max_frame_size;
451 if (!ppropInputRequest->cbAlign)
452 ppropInputRequest->cbAlign = 1;
453
454 return IMemAllocator_SetProperties(alloc, ppropInputRequest, &actual);
455}
456
458 IMemInputPin *pPin, IMemAllocator **pAlloc)
459{
460 TRACE("(%p)->(%p %p)\n", base, pPin, pAlloc);
461 return BaseOutputPinImpl_DecideAllocator(base, pPin, pAlloc);
462}
463
464static const struct strmbase_source_ops source_ops =
465{
466 .base.pin_get_media_type = source_get_media_type,
467 .pfnAttemptConnection = BaseOutputPinImpl_AttemptConnection,
468 .pfnDecideBufferSize = AVICompressorOut_DecideBufferSize,
469 .pfnDecideAllocator = AVICompressorOut_DecideAllocator,
470};
471
473{
475
476 if (!(object = calloc(1, sizeof(*object))))
477 return E_OUTOFMEMORY;
478
479 strmbase_filter_init(&object->filter, outer, &CLSID_AVICo, &filter_ops);
480 object->IPersistPropertyBag_iface.lpVtbl = &PersistPropertyBagVtbl;
481
482 strmbase_sink_init(&object->sink, &object->filter, L"In", &sink_ops, NULL);
483 wcscpy(object->sink.pin.name, L"Input");
484
485 strmbase_source_init(&object->source, &object->filter, L"Out", &source_ops);
486 wcscpy(object->source.pin.name, L"Output");
487
488 TRACE("Created AVI compressor %p.\n", object);
489 *out = &object->filter.IUnknown_inner;
490 return S_OK;
491}
static HRESULT WINAPI AVICompressorOut_DecideBufferSize(struct strmbase_source *base, IMemAllocator *alloc, ALLOCATOR_PROPERTIES *ppropInputRequest)
Definition: avico.c:439
static struct strmbase_pin * avi_compressor_get_pin(struct strmbase_filter *iface, unsigned int index)
Definition: avico.c:101
static ULONG WINAPI AVICompressorPropertyBag_Release(IPersistPropertyBag *iface)
Definition: avico.c:188
static HRESULT WINAPI AVICompressorPropertyBag_Save(IPersistPropertyBag *iface, IPropertyBag *pPropBag, BOOL fClearDirty, BOOL fSaveAllProperties)
Definition: avico.c:242
static HRESULT avi_compressor_query_interface(struct strmbase_filter *iface, REFIID iid, void **out)
Definition: avico.c:125
static HRESULT WINAPI AVICompressorPropertyBag_GetClassID(IPersistPropertyBag *iface, CLSID *pClassID)
Definition: avico.c:194
static HRESULT sink_connect(struct strmbase_sink *iface, IPin *peer, const AM_MEDIA_TYPE *mt)
Definition: avico.c:398
static void sink_disconnect(struct strmbase_sink *iface)
Definition: avico.c:404
static AVICompressor * impl_from_strmbase_pin(struct strmbase_pin *pin)
Definition: avico.c:48
static HRESULT WINAPI AVICompressorPropertyBag_Load(IPersistPropertyBag *iface, IPropertyBag *pPropBag, IErrorLog *pErrorLog)
Definition: avico.c:207
static AVICompressor * impl_from_strmbase_filter(struct strmbase_filter *filter)
Definition: avico.c:43
static HRESULT fill_format_info(AVICompressor *This, VIDEOINFOHEADER *src_videoinfo)
Definition: avico.c:67
static const struct strmbase_source_ops source_ops
Definition: avico.c:464
static AVICompressor * impl_from_IPersistPropertyBag(IPersistPropertyBag *iface)
Definition: avico.c:171
static const struct strmbase_sink_ops sink_ops
Definition: avico.c:411
static HRESULT WINAPI AVICompressorPropertyBag_InitNew(IPersistPropertyBag *iface)
Definition: avico.c:200
static HRESULT sink_query_accept(struct strmbase_pin *base, const AM_MEDIA_TYPE *pmt)
Definition: avico.c:260
static const struct strmbase_filter_ops filter_ops
Definition: avico.c:162
HRESULT avi_compressor_create(IUnknown *outer, IUnknown **out)
Definition: avico.c:472
static HRESULT ensure_driver(AVICompressor *This)
Definition: avico.c:53
static HRESULT WINAPI AVICompressorOut_DecideAllocator(struct strmbase_source *base, IMemInputPin *pPin, IMemAllocator **pAlloc)
Definition: avico.c:457
static void avi_compressor_destroy(struct strmbase_filter *iface)
Definition: avico.c:112
static HRESULT source_get_media_type(struct strmbase_pin *base, unsigned int iPosition, AM_MEDIA_TYPE *amt)
Definition: avico.c:420
static const IPersistPropertyBagVtbl PersistPropertyBagVtbl
Definition: avico.c:250
static ULONG WINAPI AVICompressorPropertyBag_AddRef(IPersistPropertyBag *iface)
Definition: avico.c:182
static HRESULT WINAPI AVICompressorPropertyBag_QueryInterface(IPersistPropertyBag *iface, REFIID riid, void **ppv)
Definition: avico.c:176
static HRESULT avi_compressor_init_stream(struct strmbase_filter *iface)
Definition: avico.c:138
static HRESULT avi_compressor_cleanup_stream(struct strmbase_filter *iface)
Definition: avico.c:154
static HRESULT WINAPI AVICompressorIn_Receive(struct strmbase_sink *base, IMediaSample *pSample)
Definition: avico.c:299
static HRESULT sink_query_interface(struct strmbase_pin *iface, REFIID iid, void **out)
Definition: avico.c:286
#define AVIIF_KEYFRAME
Definition: aviriff.h:131
#define FCC(ch0, ch1, ch2, ch3)
Definition: aviriff.h:38
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
#define ERR(fmt,...)
Definition: precomp.h:57
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
#define free
Definition: debug_ros.c:5
HRESULT hr
Definition: delayimp.cpp:582
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
OLECHAR * BSTR
Definition: compat.h:2293
@ VT_BSTR
Definition: compat.h:2303
LONGLONG REFERENCE_TIME
Definition: dmusicks.h:9
#define L(x)
Definition: resources.c:13
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint start
Definition: gl.h:1545
const GLdouble * v
Definition: gl.h:2040
GLuint res
Definition: glext.h:9613
GLsizeiptr size
Definition: glext.h:5919
GLuint index
Definition: glext.h:6031
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLsizei GLenum GLboolean sink
Definition: glext.h:5672
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
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 debugstr_guid
Definition: kernel32.h:35
#define debugstr_w
Definition: kernel32.h:32
LONG_PTR LRESULT
Definition: minwindef.h:176
static PVOID ptr
Definition: dispmode.c:27
HRESULT hres
Definition: protocol.c:432
static IUnknown * outer
Definition: compobj.c:82
HIC VFWAPI ICOpen(DWORD fccType, DWORD fccHandler, UINT wMode)
Definition: msvideo_main.c:428
LRESULT VFWAPI ICGetInfo(HIC hic, ICINFO *picinfo, DWORD cb)
Definition: msvideo_main.c:581
DWORD VFWAPIV ICCompress(HIC hic, DWORD dwFlags, LPBITMAPINFOHEADER lpbiOutput, LPVOID lpData, LPBITMAPINFOHEADER lpbiInput, LPVOID lpBits, LPDWORD lpckid, LPDWORD lpdwFlags, LONG lFrameNum, DWORD dwFrameSize, DWORD dwQuality, LPBITMAPINFOHEADER lpbiPrev, LPVOID lpPrev)
Definition: msvideo_main.c:784
LRESULT WINAPI ICClose(HIC hic)
UINT WINAPI SysStringLen(BSTR str)
Definition: oleaut.c:198
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:273
#define V_VT(A)
Definition: oleauto.h:211
#define V_BSTR(A)
Definition: oleauto.h:226
const GUID IID_IPersistPropertyBag
Definition: proxy.cpp:11
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define REFIID
Definition: guiddef.h:118
#define alloc
Definition: rosglue.h:13
#define calloc
Definition: rosglue.h:14
const WCHAR * str
wcscpy
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT WINAPI BaseOutputPinImpl_DecideAllocator(struct strmbase_source *pin, IMemInputPin *peer, IMemAllocator **allocator)
Definition: pin.c:680
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_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
IPersistPropertyBag IPersistPropertyBag_iface
Definition: avico.c:27
DWORD max_frame_size
Definition: avico.c:38
size_t videoinfo_size
Definition: avico.c:36
DWORD driver_flags
Definition: avico.c:37
VIDEOINFOHEADER * videoinfo
Definition: avico.c:35
DWORD frame_cnt
Definition: avico.c:40
DWORD fcc_handler
Definition: avico.c:32
HIC hic
Definition: avico.c:33
Definition: vfw.h:280
DWORD dwFlags
Definition: vfw.h:284
Definition: filter.c:165
IBaseFilter * filter
Definition: filtergraph.c:75
struct strmbase_pin pin
Definition: strmbase.h:106
struct strmbase_pin pin
Definition: strmbase.h:79
BITMAPINFOHEADER bmiHeader
Definition: amvideo.idl:189
REFERENCE_TIME AvgTimePerFrame
Definition: amvideo.idl:187
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:626
#define ICERR_OK
Definition: vfw.h:50
#define ICCompressGetFormat(hic, lpbiInput, lpbiOutput)
Definition: vfw.h:204
#define VIDCF_FASTTEMPORALC
Definition: vfw.h:302
#define ICMODE_COMPRESS
Definition: vfw.h:268
#define ICCOMPRESS_KEYFRAME
Definition: vfw.h:170
#define VIDCF_TEMPORAL
Definition: vfw.h:299
#define ICCompressEnd(hic)
Definition: vfw.h:230
#define ICCompressQuery(hic, lpbiInput, lpbiOutput)
Definition: vfw.h:224
#define ICCompressGetFormatSize(hic, lpbi)
Definition: vfw.h:210
#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
#define E_UNEXPECTED
Definition: winerror.h:3528
unsigned char BYTE
Definition: xxhash.c:193