77 FIXME(
"ICOpen failed\n");
95 if(
size !=
sizeof(icinfo))
100 FIXME(
"ICCompressGetFormatSize failed\n");
114 This->videoinfo->dwBitRate = 10000000/src_videoinfo->
AvgTimePerFrame *
This->videoinfo->bmiHeader.biSizeImage * 8;
116 This->max_frame_size =
This->videoinfo->bmiHeader.biSizeImage;
126 *
ppv = &
This->filter.IBaseFilter_iface;
129 *
ppv = &
This->filter.IBaseFilter_iface;
132 *
ppv = &
This->filter.IBaseFilter_iface;
135 *
ppv = &
This->filter.IBaseFilter_iface;
137 TRACE(
"(%p)->(IID_IPersistPropertyBag %p)\n",
This,
ppv);
138 *
ppv = &
This->IPersistPropertyBag_iface;
177 if(
This->filter.state == State_Stopped)
181 This->filter.state = State_Stopped;
199 if(
This->filter.state == State_Running)
202 hres = IMemAllocator_Commit(
This->out->pAllocator);
210 This->filter.state = State_Running;
231 FIXME(
"(%p)->(%p)\n",
This, pVendorInfo);
262 ret = &
This->in->pin.IPin_iface;
265 ret = &
This->out->pin.IPin_iface;
294 return IBaseFilter_QueryInterface(&
This->filter.IBaseFilter_iface,
riid,
ppv);
300 return IBaseFilter_AddRef(&
This->filter.IBaseFilter_iface);
306 return IBaseFilter_Release(&
This->filter.IBaseFilter_iface);
312 return IBaseFilter_GetClassID(&
This->filter.IBaseFilter_iface, pClassID);
329 static const WCHAR fcc_handlerW[] = {
'F',
'c',
'c',
'H',
'a',
'n',
'd',
'l',
'e',
'r',0};
331 TRACE(
"(%p)->(%p %p)\n",
This, pPropBag, pErrorLog);
334 hres = IPropertyBag_Read(pPropBag, fcc_handlerW, &
v,
NULL);
336 WARN(
"Could not read FccHandler: %08x\n",
hres);
349 FIXME(
"Invalid FccHandler len\n");
360 BOOL fClearDirty,
BOOL fSaveAllProperties)
363 FIXME(
"(%p)->(%p %x %x)\n",
This, pPropBag, fClearDirty, fSaveAllProperties);
391 return IBaseFilter_AddRef(&
This->filter.IBaseFilter_iface);
397 return IBaseFilter_Release(&
This->filter.IBaseFilter_iface);
406 TRACE(
"(%p)->(%p AM_MEDIA_TYPE(%p))\n",
This, pConnector, pmt);
463 TRACE(
"(%p)->(AM_MEDIA_TYPE(%p))\n",
base, pmt);
466 if(!
IsEqualIID(&pmt->majortype, &MEDIATYPE_Video))
469 if(!
IsEqualIID(&pmt->formattype, &FORMAT_VideoInfo)) {
490 TRACE(
"(%p)->(%d %p)\n",
base, iPosition, amt);
502 DWORD comp_flags = 0;
512 FIXME(
"Driver not loaded\n");
516 hres = IMediaSample_QueryInterface(pSample, &IID_IMediaSample2, (
void**)&sample2);
518 FIXME(
"Use IMediaSample2\n");
519 IMediaSample2_Release(sample2);
522 is_preroll = IMediaSample_IsPreroll(pSample) ==
S_OK;
523 sync_point = IMediaSample_IsSyncPoint(pSample) ==
S_OK;
525 hres = IMediaSample_GetTime(pSample, &
start, &stop);
527 WARN(
"GetTime failed: %08x\n",
hres);
531 hres = IMediaSample_GetMediaType(pSample, &mt);
535 hres = IMediaSample_GetPointer(pSample, &
ptr);
537 WARN(
"GetPointer failed: %08x\n",
hres);
545 hres = IMediaSample_GetPointer(out_sample, &
buf);
550 FIXME(
"Unsupported temporal compression\n");
553 This->videoinfo->bmiHeader.biSizeImage =
This->max_frame_size;
557 WARN(
"ICCompress failed: %d\n",
res);
558 IMediaSample_Release(out_sample);
562 IMediaSample_SetActualDataLength(out_sample,
This->videoinfo->bmiHeader.biSizeImage);
563 IMediaSample_SetPreroll(out_sample, is_preroll);
564 IMediaSample_SetSyncPoint(out_sample, (comp_flags&
AVIIF_KEYFRAME) != 0);
565 IMediaSample_SetDiscontinuity(out_sample, (IMediaSample_IsDiscontinuity(pSample) ==
S_OK));
567 if (IMediaSample_GetMediaTime(pSample, &
start, &stop) ==
S_OK)
568 IMediaSample_SetMediaTime(out_sample, &
start, &stop);
570 IMediaSample_SetMediaTime(out_sample,
NULL,
NULL);
574 WARN(
"Deliver failed: %08x\n",
hres);
576 IMediaSample_Release(out_sample);
599 return IBaseFilter_AddRef(&
This->filter.IBaseFilter_iface);
605 return IBaseFilter_Release(&
This->filter.IBaseFilter_iface);
639 TRACE(
"(%p)->(%d %p)\n",
base, iPosition, amt);
641 if(iPosition || !
This->videoinfo)
644 amt->majortype = MEDIATYPE_Video;
645 amt->subtype = MEDIASUBTYPE_PCM;
646 amt->bFixedSizeSamples =
FALSE;
648 amt->lSampleSize =
This->in->pin.mtCurrent.lSampleSize;
649 amt->formattype = FORMAT_VideoInfo;
651 amt->cbFormat =
This->videoinfo_size;
652 amt->pbFormat = (
BYTE*)
This->videoinfo;
667 if (!ppropInputRequest->
cbAlign)
668 ppropInputRequest->
cbAlign = 1;
670 return IMemAllocator_SetProperties(
alloc, ppropInputRequest, &actual);
676 TRACE(
"(%p)->(%p %p)\n",
base, pPin, pAlloc);
707 compressor = heap_alloc_zero(
sizeof(*compressor));
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
static HRESULT WINAPI AVICompressor_Pause(IBaseFilter *iface)
static LONG WINAPI AVICompressor_GetPinCount(BaseFilter *iface)
static IPin *WINAPI AVICompressor_GetPin(BaseFilter *iface, int pos)
static HRESULT WINAPI AVICompressorIn_CheckMediaType(BasePin *base, const AM_MEDIA_TYPE *pmt)
static HRESULT WINAPI AVICompressor_QueryVendorInfo(IBaseFilter *iface, LPWSTR *pVendorInfo)
static HRESULT WINAPI AVICompressor_FindPin(IBaseFilter *iface, LPCWSTR Id, IPin **ppPin)
static const IPinVtbl AVICompressorOutputPinVtbl
static const BaseFilterFuncTable filter_func_table
static AVICompressor * impl_from_IPin(IPin *iface)
static HRESULT WINAPI AVICompressorOut_DecideAllocator(BaseOutputPin *base, IMemInputPin *pPin, IMemAllocator **pAlloc)
static HRESULT WINAPI AVICompressor_Stop(IBaseFilter *iface)
static ULONG WINAPI AVICompressorPropertyBag_Release(IPersistPropertyBag *iface)
static HRESULT WINAPI AVICompressorPropertyBag_Save(IPersistPropertyBag *iface, IPropertyBag *pPropBag, BOOL fClearDirty, BOOL fSaveAllProperties)
static HRESULT WINAPI AVICompressorOut_DecideBufferSize(BaseOutputPin *base, IMemAllocator *alloc, ALLOCATOR_PROPERTIES *ppropInputRequest)
static LONG WINAPI AVICompressorIn_GetMediaTypeVersion(BasePin *base)
static ULONG WINAPI AVICompressorOut_AddRef(IPin *iface)
static HRESULT WINAPI AVICompressorIn_Disconnect(IPin *iface)
static LONG WINAPI AVICompressorOut_GetMediaTypeVersion(BasePin *base)
static const IBaseFilterVtbl AVICompressorVtbl
static HRESULT WINAPI AVICompressorPropertyBag_GetClassID(IPersistPropertyBag *iface, CLSID *pClassID)
static ULONG WINAPI AVICompressorOut_Release(IPin *iface)
static ULONG WINAPI AVICompressor_Release(IBaseFilter *iface)
static HRESULT WINAPI AVICompressorOut_BreakConnect(BaseOutputPin *base)
static ULONG WINAPI AVICompressorIn_AddRef(IPin *iface)
static HRESULT WINAPI AVICompressorIn_GetMediaType(BasePin *base, int iPosition, AM_MEDIA_TYPE *amt)
static HRESULT WINAPI AVICompressor_Run(IBaseFilter *iface, REFERENCE_TIME tStart)
static HRESULT WINAPI AVICompressorPropertyBag_Load(IPersistPropertyBag *iface, IPropertyBag *pPropBag, IErrorLog *pErrorLog)
static ULONG WINAPI AVICompressorIn_Release(IPin *iface)
static HRESULT fill_format_info(AVICompressor *This, VIDEOINFOHEADER *src_videoinfo)
static HRESULT WINAPI AVICompressorIn_ReceiveConnection(IPin *iface, IPin *pConnector, const AM_MEDIA_TYPE *pmt)
static AVICompressor * impl_from_IPersistPropertyBag(IPersistPropertyBag *iface)
static HRESULT WINAPI AVICompressorPropertyBag_InitNew(IPersistPropertyBag *iface)
IUnknown *WINAPI QCAP_createAVICompressor(IUnknown *outer, HRESULT *phr)
static HRESULT WINAPI AVICompressorIn_QueryInterface(IPin *iface, REFIID riid, void **ppv)
static AVICompressor * impl_from_BasePin(BasePin *pin)
static AVICompressor * impl_from_IBaseFilter(IBaseFilter *iface)
static HRESULT ensure_driver(AVICompressor *This)
static HRESULT WINAPI AVICompressorOut_QueryInterface(IPin *iface, REFIID riid, void **ppv)
static const IPinVtbl AVICompressorInputPinVtbl
static const IPersistPropertyBagVtbl PersistPropertyBagVtbl
static AVICompressor * impl_from_BaseFilter(BaseFilter *filter)
static const BaseOutputPinFuncTable AVICompressorBaseOutputPinVtbl
static ULONG WINAPI AVICompressorPropertyBag_AddRef(IPersistPropertyBag *iface)
static const BaseInputPinFuncTable AVICompressorBaseInputPinVtbl
static HRESULT WINAPI AVICompressorPropertyBag_QueryInterface(IPersistPropertyBag *iface, REFIID riid, void **ppv)
static HRESULT WINAPI AVICompressor_QueryFilterInfo(IBaseFilter *iface, FILTER_INFO *pInfo)
static HRESULT WINAPI AVICompressor_QueryInterface(IBaseFilter *iface, REFIID riid, void **ppv)
static HRESULT WINAPI AVICompressorIn_Receive(BaseInputPin *base, IMediaSample *pSample)
static HRESULT WINAPI AVICompressorOut_GetMediaType(BasePin *base, int iPosition, AM_MEDIA_TYPE *amt)
#define FCC(ch0, ch1, ch2, ch3)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
const GUID IID_IBaseFilter
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
GLenum GLuint GLenum GLsizei const GLchar * buf
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
HIC VFWAPI ICOpen(DWORD fccType, DWORD fccHandler, UINT wMode)
LRESULT VFWAPI ICGetInfo(HIC hic, ICINFO *picinfo, DWORD cb)
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)
LRESULT WINAPI ICClose(HIC hic)
UINT WINAPI SysStringLen(BSTR str)
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
const GUID IID_IPersistPropertyBag
#define IsEqualIID(riid1, riid2)
HRESULT WINAPI BasePinImpl_ConnectionMediaType(IPin *iface, AM_MEDIA_TYPE *pmt)
HRESULT WINAPI BaseInputPinImpl_EndFlush(IPin *iface)
HRESULT WINAPI BaseFilterImpl_SetSyncSource(IBaseFilter *iface, IReferenceClock *pClock)
ULONG WINAPI BaseInputPinImpl_Release(IPin *iface)
HRESULT WINAPI BasePinImpl_QueryInternalConnections(IPin *iface, IPin **apPin, ULONG *cPin)
HRESULT WINAPI BaseOutputPinImpl_EndFlush(IPin *iface)
HRESULT WINAPI BasePinImpl_ConnectedTo(IPin *iface, IPin **ppPin)
HRESULT WINAPI BaseInputPinImpl_NewSegment(IPin *iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
HRESULT WINAPI BasePinImpl_NewSegment(IPin *iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
HRESULT WINAPI BaseFilterImpl_GetClassID(IBaseFilter *iface, CLSID *pClsid)
ULONG WINAPI BaseFilterImpl_Release(IBaseFilter *iface)
HRESULT WINAPI BasePinImpl_QueryId(IPin *iface, LPWSTR *Id)
HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(BasePin *This, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
HRESULT BaseInputPin_Construct(const IPinVtbl *InputPin_Vtbl, LONG inputpin_size, const PIN_INFO *pPinInfo, const BaseInputPinFuncTable *pBaseInputFuncsTable, LPCRITICAL_SECTION pCritSec, IMemAllocator *, IPin **ppPin)
HRESULT WINAPI BasePinImpl_QueryPinInfo(IPin *iface, PIN_INFO *pInfo)
HRESULT WINAPI BaseOutputPinImpl_EndOfStream(IPin *iface)
ULONG WINAPI BaseFilterImpl_AddRef(IBaseFilter *iface)
HRESULT WINAPI BaseOutputPinImpl_Deliver(BaseOutputPin *This, IMediaSample *pSample)
HRESULT WINAPI BaseOutputPinImpl_BeginFlush(IPin *iface)
HRESULT WINAPI BaseOutputPinImpl_DecideAllocator(BaseOutputPin *This, IMemInputPin *pPin, IMemAllocator **pAlloc)
HRESULT WINAPI BaseFilterImpl_GetState(IBaseFilter *iface, DWORD dwMilliSecsTimeout, FILTER_STATE *pState)
HRESULT WINAPI BaseOutputPin_Construct(const IPinVtbl *OutputPin_Vtbl, LONG outputpin_size, const PIN_INFO *pPinInfo, const BaseOutputPinFuncTable *pBaseOutputFuncsTable, LPCRITICAL_SECTION pCritSec, IPin **ppPin)
HRESULT WINAPI BaseInputPinImpl_QueryInterface(IPin *iface, REFIID riid, LPVOID *ppv)
ULONG WINAPI BaseOutputPinImpl_Release(IPin *iface)
HRESULT WINAPI BasePinImpl_EnumMediaTypes(IPin *iface, IEnumMediaTypes **ppEnum)
HRESULT WINAPI BaseFilterImpl_JoinFilterGraph(IBaseFilter *iface, IFilterGraph *pGraph, LPCWSTR pName)
HRESULT WINAPI BaseInputPinImpl_BeginFlush(IPin *iface)
HRESULT WINAPI BaseOutputPinImpl_Connect(IPin *iface, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
HRESULT WINAPI BaseFilterImpl_GetSyncSource(IBaseFilter *iface, IReferenceClock **ppClock)
HRESULT WINAPI BasePinImpl_Disconnect(IPin *iface)
HRESULT WINAPI BasePinImpl_QueryDirection(IPin *iface, PIN_DIRECTION *pPinDir)
HRESULT WINAPI BasePinImpl_QueryAccept(IPin *iface, const AM_MEDIA_TYPE *pmt)
HRESULT WINAPI BaseOutputPinImpl_ReceiveConnection(IPin *iface, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
HRESULT WINAPI BaseInputPinImpl_ReceiveConnection(IPin *iface, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
HRESULT WINAPI BaseOutputPinImpl_Disconnect(IPin *iface)
HRESULT WINAPI BaseOutputPinImpl_GetDeliveryBuffer(BaseOutputPin *This, IMediaSample **ppSample, REFERENCE_TIME *tStart, REFERENCE_TIME *tStop, DWORD dwFlags)
HRESULT WINAPI BaseInputPinImpl_Connect(IPin *iface, IPin *pConnector, const AM_MEDIA_TYPE *pmt)
HRESULT WINAPI BaseInputPinImpl_EndOfStream(IPin *iface)
HRESULT WINAPI BaseFilterImpl_EnumPins(IBaseFilter *iface, IEnumPins **ppEnum)
HRESULT WINAPI BaseFilter_Init(BaseFilter *This, const IBaseFilterVtbl *Vtbl, const CLSID *pClsid, DWORD_PTR DebugInfo, const BaseFilterFuncTable *pBaseFuncsTable)
IPersistPropertyBag IPersistPropertyBag_iface
VIDEOINFOHEADER * videoinfo
IBaseFilter IBaseFilter_iface
CRITICAL_SECTION csFilter
#define FIELD_OFFSET(t, f)
#define CONTAINING_RECORD(address, type, field)
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
#define ICCompressGetFormat(hic, lpbiInput, lpbiOutput)
#define VIDCF_FASTTEMPORALC
#define ICCOMPRESS_KEYFRAME
#define ICCompressEnd(hic)
#define ICCompressQuery(hic, lpbiInput, lpbiOutput)
#define ICCompressGetFormatSize(hic, lpbi)