ReactOS  0.4.15-dev-1206-g731eddf
avico.c File Reference
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "dshow.h"
#include "vfw.h"
#include "aviriff.h"
#include "qcap_main.h"
#include "wine/debug.h"
#include "wine/heap.h"
Include dependency graph for avico.c:

Go to the source code of this file.

Classes

struct  AVICompressor
 

Macros

#define COBJMACROS
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (qcap)
 
static AVICompressorimpl_from_BaseFilter (BaseFilter *filter)
 
static AVICompressorimpl_from_IBaseFilter (IBaseFilter *iface)
 
static AVICompressorimpl_from_BasePin (BasePin *pin)
 
static HRESULT ensure_driver (AVICompressor *This)
 
static HRESULT fill_format_info (AVICompressor *This, VIDEOINFOHEADER *src_videoinfo)
 
static HRESULT WINAPI AVICompressor_QueryInterface (IBaseFilter *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI AVICompressor_Release (IBaseFilter *iface)
 
static HRESULT WINAPI AVICompressor_Stop (IBaseFilter *iface)
 
static HRESULT WINAPI AVICompressor_Pause (IBaseFilter *iface)
 
static HRESULT WINAPI AVICompressor_Run (IBaseFilter *iface, REFERENCE_TIME tStart)
 
static HRESULT WINAPI AVICompressor_FindPin (IBaseFilter *iface, LPCWSTR Id, IPin **ppPin)
 
static HRESULT WINAPI AVICompressor_QueryFilterInfo (IBaseFilter *iface, FILTER_INFO *pInfo)
 
static HRESULT WINAPI AVICompressor_QueryVendorInfo (IBaseFilter *iface, LPWSTR *pVendorInfo)
 
static IPin *WINAPI AVICompressor_GetPin (BaseFilter *iface, int pos)
 
static LONG WINAPI AVICompressor_GetPinCount (BaseFilter *iface)
 
static AVICompressorimpl_from_IPersistPropertyBag (IPersistPropertyBag *iface)
 
static HRESULT WINAPI AVICompressorPropertyBag_QueryInterface (IPersistPropertyBag *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI AVICompressorPropertyBag_AddRef (IPersistPropertyBag *iface)
 
static ULONG WINAPI AVICompressorPropertyBag_Release (IPersistPropertyBag *iface)
 
static HRESULT WINAPI AVICompressorPropertyBag_GetClassID (IPersistPropertyBag *iface, CLSID *pClassID)
 
static HRESULT WINAPI AVICompressorPropertyBag_InitNew (IPersistPropertyBag *iface)
 
static HRESULT WINAPI AVICompressorPropertyBag_Load (IPersistPropertyBag *iface, IPropertyBag *pPropBag, IErrorLog *pErrorLog)
 
static HRESULT WINAPI AVICompressorPropertyBag_Save (IPersistPropertyBag *iface, IPropertyBag *pPropBag, BOOL fClearDirty, BOOL fSaveAllProperties)
 
static AVICompressorimpl_from_IPin (IPin *iface)
 
static HRESULT WINAPI AVICompressorIn_QueryInterface (IPin *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI AVICompressorIn_AddRef (IPin *iface)
 
static ULONG WINAPI AVICompressorIn_Release (IPin *iface)
 
static HRESULT WINAPI AVICompressorIn_ReceiveConnection (IPin *iface, IPin *pConnector, const AM_MEDIA_TYPE *pmt)
 
static HRESULT WINAPI AVICompressorIn_Disconnect (IPin *iface)
 
static HRESULT WINAPI AVICompressorIn_CheckMediaType (BasePin *base, const AM_MEDIA_TYPE *pmt)
 
static LONG WINAPI AVICompressorIn_GetMediaTypeVersion (BasePin *base)
 
static HRESULT WINAPI AVICompressorIn_GetMediaType (BasePin *base, int iPosition, AM_MEDIA_TYPE *amt)
 
static HRESULT WINAPI AVICompressorIn_Receive (BaseInputPin *base, IMediaSample *pSample)
 
static HRESULT WINAPI AVICompressorOut_QueryInterface (IPin *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI AVICompressorOut_AddRef (IPin *iface)
 
static ULONG WINAPI AVICompressorOut_Release (IPin *iface)
 
static LONG WINAPI AVICompressorOut_GetMediaTypeVersion (BasePin *base)
 
static HRESULT WINAPI AVICompressorOut_GetMediaType (BasePin *base, int iPosition, AM_MEDIA_TYPE *amt)
 
static HRESULT WINAPI AVICompressorOut_DecideBufferSize (BaseOutputPin *base, IMemAllocator *alloc, ALLOCATOR_PROPERTIES *ppropInputRequest)
 
static HRESULT WINAPI AVICompressorOut_DecideAllocator (BaseOutputPin *base, IMemInputPin *pPin, IMemAllocator **pAlloc)
 
static HRESULT WINAPI AVICompressorOut_BreakConnect (BaseOutputPin *base)
 
IUnknown *WINAPI QCAP_createAVICompressor (IUnknown *outer, HRESULT *phr)
 

Variables

static const IBaseFilterVtbl AVICompressorVtbl
 
static const BaseFilterFuncTable filter_func_table
 
static const IPersistPropertyBagVtbl PersistPropertyBagVtbl
 
static const IPinVtbl AVICompressorInputPinVtbl
 
static const BaseInputPinFuncTable AVICompressorBaseInputPinVtbl
 
static const IPinVtbl AVICompressorOutputPinVtbl
 
static const BaseOutputPinFuncTable AVICompressorBaseOutputPinVtbl
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 21 of file avico.c.

Function Documentation

◆ AVICompressor_FindPin()

static HRESULT WINAPI AVICompressor_FindPin ( IBaseFilter iface,
LPCWSTR  Id,
IPin **  ppPin 
)
static

Definition at line 214 of file avico.c.

215 {
217  FIXME("(%p)->(%s %p)\n", This, debugstr_w(Id), ppPin);
218  return VFW_E_NOT_FOUND;
219 }
DWORD Id
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
#define VFW_E_NOT_FOUND
Definition: vfwmsgs.h:61
static AVICompressor * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: avico.c:59

◆ AVICompressor_GetPin()

static IPin* WINAPI AVICompressor_GetPin ( BaseFilter iface,
int  pos 
)
static

Definition at line 253 of file avico.c.

254 {
256  IPin *ret;
257 
258  TRACE("(%p)->(%d)\n", This, pos);
259 
260  switch(pos) {
261  case 0:
262  ret = &This->in->pin.IPin_iface;
263  break;
264  case 1:
265  ret = &This->out->pin.IPin_iface;
266  break;
267  default:
268  TRACE("No pin %d\n", pos);
269  return NULL;
270  };
271 
272  IPin_AddRef(ret);
273  return ret;
274 }
static AVICompressor * impl_from_BaseFilter(BaseFilter *filter)
Definition: avico.c:54
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
int ret
Definition: axcore.idl:91

◆ AVICompressor_GetPinCount()

static LONG WINAPI AVICompressor_GetPinCount ( BaseFilter iface)
static

Definition at line 276 of file avico.c.

277 {
278  return 2;
279 }

◆ AVICompressor_Pause()

static HRESULT WINAPI AVICompressor_Pause ( IBaseFilter iface)
static

Definition at line 185 of file avico.c.

186 {
188  FIXME("(%p)\n", This);
189  return E_NOTIMPL;
190 }
#define FIXME(fmt,...)
Definition: debug.h:111
static AVICompressor * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: avico.c:59
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ AVICompressor_QueryFilterInfo()

static HRESULT WINAPI AVICompressor_QueryFilterInfo ( IBaseFilter iface,
FILTER_INFO *  pInfo 
)
static

Definition at line 221 of file avico.c.

222 {
224  FIXME("(%p)->(%p)\n", This, pInfo);
225  return E_NOTIMPL;
226 }
#define FIXME(fmt,...)
Definition: debug.h:111
static AVICompressor * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: avico.c:59
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ AVICompressor_QueryInterface()

static HRESULT WINAPI AVICompressor_QueryInterface ( IBaseFilter iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 120 of file avico.c.

121 {
123 
124  if(IsEqualIID(riid, &IID_IUnknown)) {
125  TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
126  *ppv = &This->filter.IBaseFilter_iface;
127  }else if(IsEqualIID(riid, &IID_IPersist)) {
128  TRACE("(%p)->(IID_IPersist %p)\n", This, ppv);
129  *ppv = &This->filter.IBaseFilter_iface;
130  }else if(IsEqualIID(riid, &IID_IMediaFilter)) {
131  TRACE("(%p)->(IID_IMediaFilter %p)\n", This, ppv);
132  *ppv = &This->filter.IBaseFilter_iface;
133  }else if(IsEqualIID(riid, &IID_IBaseFilter)) {
134  TRACE("(%p)->(IID_IBaseFilter %p)\n", This, ppv);
135  *ppv = &This->filter.IBaseFilter_iface;
137  TRACE("(%p)->(IID_IPersistPropertyBag %p)\n", This, ppv);
138  *ppv = &This->IPersistPropertyBag_iface;
139  }else {
140  FIXME("no interface for %s\n", debugstr_guid(riid));
141  *ppv = NULL;
142  return E_NOINTERFACE;
143  }
144 
145  IUnknown_AddRef((IUnknown*)*ppv);
146  return S_OK;
147 
148 }
const GUID IID_IBaseFilter
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
const GUID IID_IPersist
Definition: proxy.cpp:14
REFIID LPVOID * ppv
Definition: atlbase.h:39
const GUID IID_IPersistPropertyBag
Definition: proxy.cpp:11
#define FIXME(fmt,...)
Definition: debug.h:111
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
static AVICompressor * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: avico.c:59
#define S_OK
Definition: intsafe.h:51
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ AVICompressor_QueryVendorInfo()

static HRESULT WINAPI AVICompressor_QueryVendorInfo ( IBaseFilter iface,
LPWSTR pVendorInfo 
)
static

Definition at line 228 of file avico.c.

229 {
231  FIXME("(%p)->(%p)\n", This, pVendorInfo);
232  return E_NOTIMPL;
233 }
#define FIXME(fmt,...)
Definition: debug.h:111
static AVICompressor * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: avico.c:59
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ AVICompressor_Release()

static ULONG WINAPI AVICompressor_Release ( IBaseFilter iface)
static

Definition at line 150 of file avico.c.

151 {
153  ULONG ref = BaseFilterImpl_Release(&This->filter.IBaseFilter_iface);
154 
155  TRACE("(%p) ref=%d\n", This, ref);
156 
157  if(!ref) {
158  if(This->hic)
159  ICClose(This->hic);
160  heap_free(This->videoinfo);
161  if(This->in)
162  BaseInputPinImpl_Release(&This->in->pin.IPin_iface);
163  if(This->out)
164  BaseOutputPinImpl_Release(&This->out->pin.IPin_iface);
165  heap_free(This);
166  }
167 
168  return ref;
169 }
Definition: send.c:48
ULONG WINAPI BaseFilterImpl_Release(IBaseFilter *iface)
Definition: filter.c:64
LRESULT WINAPI ICClose(HIC hic)
GLenum GLint ref
Definition: glext.h:6028
ULONG WINAPI BaseInputPinImpl_Release(IPin *iface)
Definition: pin.c:868
#define TRACE(s)
Definition: solgame.cpp:4
ULONG WINAPI BaseOutputPinImpl_Release(IPin *iface)
Definition: pin.c:392
static AVICompressor * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: avico.c:59
unsigned int ULONG
Definition: retypes.h:1
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ AVICompressor_Run()

static HRESULT WINAPI AVICompressor_Run ( IBaseFilter iface,
REFERENCE_TIME  tStart 
)
static

Definition at line 192 of file avico.c.

193 {
195  HRESULT hres;
196 
197  TRACE("(%p)->(%s)\n", This, wine_dbgstr_longlong(tStart));
198 
199  if(This->filter.state == State_Running)
200  return S_OK;
201 
202  hres = IMemAllocator_Commit(This->out->pAllocator);
203  if(FAILED(hres)) {
204  FIXME("Commit failed: %08x\n", hres);
205  return hres;
206  }
207 
208  This->frame_cnt = 0;
209 
210  This->filter.state = State_Running;
211  return S_OK;
212 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:79
static AVICompressor * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: avico.c:59
#define S_OK
Definition: intsafe.h:51
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:49

◆ AVICompressor_Stop()

static HRESULT WINAPI AVICompressor_Stop ( IBaseFilter iface)
static

Definition at line 171 of file avico.c.

172 {
174 
175  TRACE("(%p)\n", This);
176 
177  if(This->filter.state == State_Stopped)
178  return S_OK;
179 
180  ICCompressEnd(This->hic);
181  This->filter.state = State_Stopped;
182  return S_OK;
183 }
#define ICCompressEnd(hic)
Definition: vfw.h:230
#define TRACE(s)
Definition: solgame.cpp:4
static AVICompressor * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: avico.c:59
#define S_OK
Definition: intsafe.h:51

◆ AVICompressorIn_AddRef()

static ULONG WINAPI AVICompressorIn_AddRef ( IPin iface)
static

Definition at line 388 of file avico.c.

389 {
391  return IBaseFilter_AddRef(&This->filter.IBaseFilter_iface);
392 }
static AVICompressor * impl_from_IPin(IPin *iface)
Definition: avico.c:377

◆ AVICompressorIn_CheckMediaType()

static HRESULT WINAPI AVICompressorIn_CheckMediaType ( BasePin base,
const AM_MEDIA_TYPE pmt 
)
static

Definition at line 456 of file avico.c.

457 {
459  VIDEOINFOHEADER *videoinfo;
460  HRESULT hres;
461  DWORD res;
462 
463  TRACE("(%p)->(AM_MEDIA_TYPE(%p))\n", base, pmt);
464  dump_AM_MEDIA_TYPE(pmt);
465 
466  if(!IsEqualIID(&pmt->majortype, &MEDIATYPE_Video))
467  return S_FALSE;
468 
469  if(!IsEqualIID(&pmt->formattype, &FORMAT_VideoInfo)) {
470  FIXME("formattype %s unsupported\n", debugstr_guid(&pmt->formattype));
471  return S_FALSE;
472  }
473 
475  if(hres != S_OK)
476  return hres;
477 
478  videoinfo = (VIDEOINFOHEADER*)pmt->pbFormat;
479  res = ICCompressQuery(This->hic, &videoinfo->bmiHeader, NULL);
480  return res == ICERR_OK ? S_OK : S_FALSE;
481 }
#define ICERR_OK
Definition: vfw.h:50
#define ICCompressQuery(hic, lpbiInput, lpbiOutput)
Definition: vfw.h:224
#define FIXME(fmt,...)
Definition: debug.h:111
#define S_FALSE
Definition: winerror.h:2357
smooth NULL
Definition: ftsmooth.c:416
BITMAPINFOHEADER bmiHeader
Definition: amvideo.idl:189
#define debugstr_guid
Definition: kernel32.h:35
void dump_AM_MEDIA_TYPE(const AM_MEDIA_TYPE *pmt)
Definition: enummedia.c:38
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
static AVICompressor * impl_from_BasePin(BasePin *pin)
Definition: avico.c:65
LONG HRESULT
Definition: typedefs.h:79
unsigned long DWORD
Definition: ntddk_ex.h:95
static HRESULT ensure_driver(AVICompressor *This)
Definition: avico.c:70
#define S_OK
Definition: intsafe.h:51
GLuint res
Definition: glext.h:9613
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ AVICompressorIn_Disconnect()

static HRESULT WINAPI AVICompressorIn_Disconnect ( IPin iface)
static

Definition at line 419 of file avico.c.

420 {
422  HRESULT hres;
423 
424  TRACE("(%p)\n", This);
425 
426  hres = BasePinImpl_Disconnect(iface);
427  if(FAILED(hres))
428  return hres;
429 
430  heap_free(This->videoinfo);
431  This->videoinfo = NULL;
432  return S_OK;
433 }
HRESULT WINAPI BasePinImpl_Disconnect(IPin *iface)
Definition: pin.c:197
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:79
#define S_OK
Definition: intsafe.h:51
static AVICompressor * impl_from_IPin(IPin *iface)
Definition: avico.c:377
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ AVICompressorIn_GetMediaType()

static HRESULT WINAPI AVICompressorIn_GetMediaType ( BasePin base,
int  iPosition,
AM_MEDIA_TYPE amt 
)
static

Definition at line 488 of file avico.c.

489 {
490  TRACE("(%p)->(%d %p)\n", base, iPosition, amt);
491  return S_FALSE;
492 }
#define S_FALSE
Definition: winerror.h:2357
#define TRACE(s)
Definition: solgame.cpp:4

◆ AVICompressorIn_GetMediaTypeVersion()

static LONG WINAPI AVICompressorIn_GetMediaTypeVersion ( BasePin base)
static

Definition at line 483 of file avico.c.

484 {
485  return 0;
486 }

◆ AVICompressorIn_QueryInterface()

static HRESULT WINAPI AVICompressorIn_QueryInterface ( IPin iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 383 of file avico.c.

384 {
385  return BaseInputPinImpl_QueryInterface(iface, riid, ppv);
386 }
HRESULT WINAPI BaseInputPinImpl_QueryInterface(IPin *iface, REFIID riid, LPVOID *ppv)
Definition: pin.c:838
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39

◆ AVICompressorIn_Receive()

static HRESULT WINAPI AVICompressorIn_Receive ( BaseInputPin base,
IMediaSample pSample 
)
static

Definition at line 494 of file avico.c.

495 {
497  VIDEOINFOHEADER *src_videoinfo;
498  REFERENCE_TIME start, stop;
499  IMediaSample *out_sample;
500  AM_MEDIA_TYPE *mt;
501  IMediaSample2 *sample2;
502  DWORD comp_flags = 0;
503  BOOL is_preroll;
504  BOOL sync_point;
505  BYTE *ptr, *buf;
506  DWORD res;
507  HRESULT hres;
508 
509  TRACE("(%p)->(%p)\n", base, pSample);
510 
511  if(!This->hic) {
512  FIXME("Driver not loaded\n");
513  return E_UNEXPECTED;
514  }
515 
516  hres = IMediaSample_QueryInterface(pSample, &IID_IMediaSample2, (void**)&sample2);
517  if(SUCCEEDED(hres)) {
518  FIXME("Use IMediaSample2\n");
519  IMediaSample2_Release(sample2);
520  }
521 
522  is_preroll = IMediaSample_IsPreroll(pSample) == S_OK;
523  sync_point = IMediaSample_IsSyncPoint(pSample) == S_OK;
524 
525  hres = IMediaSample_GetTime(pSample, &start, &stop);
526  if(FAILED(hres)) {
527  WARN("GetTime failed: %08x\n", hres);
528  return hres;
529  }
530 
531  hres = IMediaSample_GetMediaType(pSample, &mt);
532  if(FAILED(hres))
533  return hres;
534 
535  hres = IMediaSample_GetPointer(pSample, &ptr);
536  if(FAILED(hres)) {
537  WARN("GetPointer failed: %08x\n", hres);
538  return hres;
539  }
540 
541  hres = BaseOutputPinImpl_GetDeliveryBuffer(This->out, &out_sample, &start, &stop, 0);
542  if(FAILED(hres))
543  return hres;
544 
545  hres = IMediaSample_GetPointer(out_sample, &buf);
546  if(FAILED(hres))
547  return hres;
548 
549  if((This->driver_flags & VIDCF_TEMPORAL) && !(This->driver_flags & VIDCF_FASTTEMPORALC))
550  FIXME("Unsupported temporal compression\n");
551 
552  src_videoinfo = (VIDEOINFOHEADER*)This->in->pin.mtCurrent.pbFormat;
553  This->videoinfo->bmiHeader.biSizeImage = This->max_frame_size;
554  res = ICCompress(This->hic, sync_point ? ICCOMPRESS_KEYFRAME : 0, &This->videoinfo->bmiHeader, buf,
555  &src_videoinfo->bmiHeader, ptr, 0, &comp_flags, This->frame_cnt, 0, 0, NULL, NULL);
556  if(res != ICERR_OK) {
557  WARN("ICCompress failed: %d\n", res);
558  IMediaSample_Release(out_sample);
559  return E_FAIL;
560  }
561 
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));
566 
567  if (IMediaSample_GetMediaTime(pSample, &start, &stop) == S_OK)
568  IMediaSample_SetMediaTime(out_sample, &start, &stop);
569  else
570  IMediaSample_SetMediaTime(out_sample, NULL, NULL);
571 
572  hres = BaseOutputPinImpl_Deliver(This->out, out_sample);
573  if(FAILED(hres))
574  WARN("Deliver failed: %08x\n", hres);
575 
576  IMediaSample_Release(out_sample);
577  This->frame_cnt++;
578  return hres;
579 }
HRESULT WINAPI BaseOutputPinImpl_GetDeliveryBuffer(BaseOutputPin *This, IMediaSample **ppSample, REFERENCE_TIME *tStart, REFERENCE_TIME *tStop, DWORD dwFlags)
Definition: pin.c:554
#define ICCOMPRESS_KEYFRAME
Definition: vfw.h:170
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define WARN(fmt,...)
Definition: debug.h:112
#define AVIIF_KEYFRAME
Definition: aviriff.h:131
#define VIDCF_TEMPORAL
Definition: vfw.h:299
#define ICERR_OK
Definition: vfw.h:50
#define E_FAIL
Definition: ddrawi.h:102
unsigned int BOOL
Definition: ntddk_ex.h:94
#define FIXME(fmt,...)
Definition: debug.h:111
static PVOID ptr
Definition: dispmode.c:27
smooth NULL
Definition: ftsmooth.c:416
BITMAPINFOHEADER bmiHeader
Definition: amvideo.idl:189
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:797
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
static AVICompressor * impl_from_BasePin(BasePin *pin)
Definition: avico.c:65
LONGLONG REFERENCE_TIME
Definition: dmusicks.h:9
LONG HRESULT
Definition: typedefs.h:79
unsigned long DWORD
Definition: ntddk_ex.h:95
#define VIDCF_FASTTEMPORALC
Definition: vfw.h:302
unsigned char BYTE
Definition: xxhash.c:193
#define S_OK
Definition: intsafe.h:51
GLuint start
Definition: gl.h:1545
#define E_UNEXPECTED
Definition: winerror.h:2456
HRESULT WINAPI BaseOutputPinImpl_Deliver(BaseOutputPin *This, IMediaSample *pSample)
Definition: pin.c:574
GLuint res
Definition: glext.h:9613
#define SUCCEEDED(hr)
Definition: intsafe.h:49

◆ AVICompressorIn_ReceiveConnection()

static HRESULT WINAPI AVICompressorIn_ReceiveConnection ( IPin iface,
IPin pConnector,
const AM_MEDIA_TYPE pmt 
)
static

Definition at line 400 of file avico.c.

402 {
404  HRESULT hres;
405 
406  TRACE("(%p)->(%p AM_MEDIA_TYPE(%p))\n", This, pConnector, pmt);
407  dump_AM_MEDIA_TYPE(pmt);
408 
409  hres = BaseInputPinImpl_ReceiveConnection(iface, pConnector, pmt);
410  if(FAILED(hres))
411  return hres;
412 
413  hres = fill_format_info(This, (VIDEOINFOHEADER*)pmt->pbFormat);
414  if(FAILED(hres))
415  BasePinImpl_Disconnect(iface);
416  return hres;
417 }
static HRESULT fill_format_info(AVICompressor *This, VIDEOINFOHEADER *src_videoinfo)
Definition: avico.c:84
HRESULT WINAPI BasePinImpl_Disconnect(IPin *iface)
Definition: pin.c:197
void dump_AM_MEDIA_TYPE(const AM_MEDIA_TYPE *pmt)
Definition: enummedia.c:38
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:79
HRESULT WINAPI BaseInputPinImpl_ReceiveConnection(IPin *iface, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
Definition: pin.c:889
static AVICompressor * impl_from_IPin(IPin *iface)
Definition: avico.c:377

◆ AVICompressorIn_Release()

static ULONG WINAPI AVICompressorIn_Release ( IPin iface)
static

Definition at line 394 of file avico.c.

395 {
397  return IBaseFilter_Release(&This->filter.IBaseFilter_iface);
398 }
static AVICompressor * impl_from_IPin(IPin *iface)
Definition: avico.c:377

◆ AVICompressorOut_AddRef()

static ULONG WINAPI AVICompressorOut_AddRef ( IPin iface)
static

Definition at line 596 of file avico.c.

597 {
599  return IBaseFilter_AddRef(&This->filter.IBaseFilter_iface);
600 }
static AVICompressor * impl_from_IPin(IPin *iface)
Definition: avico.c:377

◆ AVICompressorOut_BreakConnect()

static HRESULT WINAPI AVICompressorOut_BreakConnect ( BaseOutputPin base)
static

Definition at line 680 of file avico.c.

681 {
682  FIXME("(%p)\n", base);
683  return E_NOTIMPL;
684 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ AVICompressorOut_DecideAllocator()

static HRESULT WINAPI AVICompressorOut_DecideAllocator ( BaseOutputPin base,
IMemInputPin pPin,
IMemAllocator **  pAlloc 
)
static

Definition at line 673 of file avico.c.

675 {
676  TRACE("(%p)->(%p %p)\n", base, pPin, pAlloc);
677  return BaseOutputPinImpl_DecideAllocator(base, pPin, pAlloc);
678 }
HRESULT WINAPI BaseOutputPinImpl_DecideAllocator(BaseOutputPin *This, IMemInputPin *pPin, IMemAllocator **pAlloc)
Definition: pin.c:683
#define TRACE(s)
Definition: solgame.cpp:4

◆ AVICompressorOut_DecideBufferSize()

static HRESULT WINAPI AVICompressorOut_DecideBufferSize ( BaseOutputPin base,
IMemAllocator alloc,
ALLOCATOR_PROPERTIES ppropInputRequest 
)
static

Definition at line 656 of file avico.c.

657 {
659  ALLOCATOR_PROPERTIES actual;
660 
661  TRACE("(%p)\n", This);
662 
663  if (!ppropInputRequest->cBuffers)
664  ppropInputRequest->cBuffers = 1;
665  if (ppropInputRequest->cbBuffer < This->max_frame_size)
666  ppropInputRequest->cbBuffer = This->max_frame_size;
667  if (!ppropInputRequest->cbAlign)
668  ppropInputRequest->cbAlign = 1;
669 
670  return IMemAllocator_SetProperties(alloc, ppropInputRequest, &actual);
671 }
#define TRACE(s)
Definition: solgame.cpp:4
static AVICompressor * impl_from_BasePin(BasePin *pin)
Definition: avico.c:65
#define alloc
Definition: rosglue.h:13

◆ AVICompressorOut_GetMediaType()

static HRESULT WINAPI AVICompressorOut_GetMediaType ( BasePin base,
int  iPosition,
AM_MEDIA_TYPE amt 
)
static

Definition at line 635 of file avico.c.

636 {
637  AVICompressor *This = impl_from_IBaseFilter(base->pinInfo.pFilter);
638 
639  TRACE("(%p)->(%d %p)\n", base, iPosition, amt);
640 
641  if(iPosition || !This->videoinfo)
642  return S_FALSE;
643 
644  amt->majortype = MEDIATYPE_Video;
645  amt->subtype = MEDIASUBTYPE_PCM;
646  amt->bFixedSizeSamples = FALSE;
647  amt->bTemporalCompression = (This->driver_flags & VIDCF_TEMPORAL) != 0;
648  amt->lSampleSize = This->in->pin.mtCurrent.lSampleSize;
649  amt->formattype = FORMAT_VideoInfo;
650  amt->pUnk = NULL;
651  amt->cbFormat = This->videoinfo_size;
652  amt->pbFormat = (BYTE*)This->videoinfo;
653  return S_OK;
654 }
#define VIDCF_TEMPORAL
Definition: vfw.h:299
#define FALSE
Definition: types.h:117
#define S_FALSE
Definition: winerror.h:2357
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
unsigned char BYTE
Definition: xxhash.c:193
static AVICompressor * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: avico.c:59
#define S_OK
Definition: intsafe.h:51

◆ AVICompressorOut_GetMediaTypeVersion()

static LONG WINAPI AVICompressorOut_GetMediaTypeVersion ( BasePin base)
static

Definition at line 629 of file avico.c.

630 {
631  FIXME("(%p)\n", base);
632  return 0;
633 }
#define FIXME(fmt,...)
Definition: debug.h:111

◆ AVICompressorOut_QueryInterface()

static HRESULT WINAPI AVICompressorOut_QueryInterface ( IPin iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 591 of file avico.c.

592 {
593  return BaseInputPinImpl_QueryInterface(iface, riid, ppv);
594 }
HRESULT WINAPI BaseInputPinImpl_QueryInterface(IPin *iface, REFIID riid, LPVOID *ppv)
Definition: pin.c:838
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39

◆ AVICompressorOut_Release()

static ULONG WINAPI AVICompressorOut_Release ( IPin iface)
static

Definition at line 602 of file avico.c.

603 {
605  return IBaseFilter_Release(&This->filter.IBaseFilter_iface);
606 }
static AVICompressor * impl_from_IPin(IPin *iface)
Definition: avico.c:377

◆ AVICompressorPropertyBag_AddRef()

static ULONG WINAPI AVICompressorPropertyBag_AddRef ( IPersistPropertyBag iface)
static

Definition at line 297 of file avico.c.

298 {
300  return IBaseFilter_AddRef(&This->filter.IBaseFilter_iface);
301 }
static AVICompressor * impl_from_IPersistPropertyBag(IPersistPropertyBag *iface)
Definition: avico.c:286

◆ AVICompressorPropertyBag_GetClassID()

static HRESULT WINAPI AVICompressorPropertyBag_GetClassID ( IPersistPropertyBag iface,
CLSID pClassID 
)
static

Definition at line 309 of file avico.c.

310 {
312  return IBaseFilter_GetClassID(&This->filter.IBaseFilter_iface, pClassID);
313 }
static AVICompressor * impl_from_IPersistPropertyBag(IPersistPropertyBag *iface)
Definition: avico.c:286

◆ AVICompressorPropertyBag_InitNew()

static HRESULT WINAPI AVICompressorPropertyBag_InitNew ( IPersistPropertyBag iface)
static

Definition at line 315 of file avico.c.

316 {
318  FIXME("(%p)->()\n", This);
319  return E_NOTIMPL;
320 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99
static AVICompressor * impl_from_IPersistPropertyBag(IPersistPropertyBag *iface)
Definition: avico.c:286

◆ AVICompressorPropertyBag_Load()

static HRESULT WINAPI AVICompressorPropertyBag_Load ( IPersistPropertyBag iface,
IPropertyBag pPropBag,
IErrorLog pErrorLog 
)
static

Definition at line 322 of file avico.c.

323 {
325  BSTR str;
326  VARIANT v;
327  HRESULT hres;
328 
329  static const WCHAR fcc_handlerW[] = {'F','c','c','H','a','n','d','l','e','r',0};
330 
331  TRACE("(%p)->(%p %p)\n", This, pPropBag, pErrorLog);
332 
333  V_VT(&v) = VT_EMPTY;
334  hres = IPropertyBag_Read(pPropBag, fcc_handlerW, &v, NULL);
335  if(FAILED(hres)) {
336  WARN("Could not read FccHandler: %08x\n", hres);
337  return hres;
338  }
339 
340  if(V_VT(&v) != VT_BSTR) {
341  FIXME("Got vt %d\n", V_VT(&v));
342  VariantClear(&v);
343  return E_FAIL;
344  }
345 
346  str = V_BSTR(&v);
347  TRACE("FccHandler = %s\n", debugstr_w(str));
348  if(SysStringLen(str) != 4) {
349  FIXME("Invalid FccHandler len\n");
351  return E_FAIL;
352  }
353 
354  This->fcc_handler = FCC(str[0], str[1], str[2], str[3]);
356  return S_OK;
357 }
#define WARN(fmt,...)
Definition: debug.h:112
OLECHAR * BSTR
Definition: compat.h:2152
#define E_FAIL
Definition: ddrawi.h:102
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:416
#define FCC(ch0, ch1, ch2, ch3)
Definition: aviriff.h:38
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:79
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:648
#define V_VT(A)
Definition: oleauto.h:211
UINT WINAPI SysStringLen(BSTR str)
Definition: oleaut.c:196
#define V_BSTR(A)
Definition: oleauto.h:226
#define S_OK
Definition: intsafe.h:51
const GLdouble * v
Definition: gl.h:2040
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
static AVICompressor * impl_from_IPersistPropertyBag(IPersistPropertyBag *iface)
Definition: avico.c:286

◆ AVICompressorPropertyBag_QueryInterface()

static HRESULT WINAPI AVICompressorPropertyBag_QueryInterface ( IPersistPropertyBag iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 291 of file avico.c.

292 {
294  return IBaseFilter_QueryInterface(&This->filter.IBaseFilter_iface, riid, ppv);
295 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static AVICompressor * impl_from_IPersistPropertyBag(IPersistPropertyBag *iface)
Definition: avico.c:286

◆ AVICompressorPropertyBag_Release()

static ULONG WINAPI AVICompressorPropertyBag_Release ( IPersistPropertyBag iface)
static

Definition at line 303 of file avico.c.

304 {
306  return IBaseFilter_Release(&This->filter.IBaseFilter_iface);
307 }
static AVICompressor * impl_from_IPersistPropertyBag(IPersistPropertyBag *iface)
Definition: avico.c:286

◆ AVICompressorPropertyBag_Save()

static HRESULT WINAPI AVICompressorPropertyBag_Save ( IPersistPropertyBag iface,
IPropertyBag pPropBag,
BOOL  fClearDirty,
BOOL  fSaveAllProperties 
)
static

Definition at line 359 of file avico.c.

361 {
363  FIXME("(%p)->(%p %x %x)\n", This, pPropBag, fClearDirty, fSaveAllProperties);
364  return E_NOTIMPL;
365 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99
static AVICompressor * impl_from_IPersistPropertyBag(IPersistPropertyBag *iface)
Definition: avico.c:286

◆ ensure_driver()

static HRESULT ensure_driver ( AVICompressor This)
static

Definition at line 70 of file avico.c.

71 {
72  if(This->hic)
73  return S_OK;
74 
75  This->hic = ICOpen(FCC('v','i','d','c'), This->fcc_handler, ICMODE_COMPRESS);
76  if(!This->hic) {
77  FIXME("ICOpen failed\n");
78  return E_FAIL;
79  }
80 
81  return S_OK;
82 }
HIC VFWAPI ICOpen(DWORD fccType, DWORD fccHandler, UINT wMode)
Definition: msvideo_main.c:441
#define E_FAIL
Definition: ddrawi.h:102
#define FIXME(fmt,...)
Definition: debug.h:111
#define FCC(ch0, ch1, ch2, ch3)
Definition: aviriff.h:38
#define ICMODE_COMPRESS
Definition: vfw.h:268
#define S_OK
Definition: intsafe.h:51

Referenced by AVICompressorIn_CheckMediaType(), and fill_format_info().

◆ fill_format_info()

static HRESULT fill_format_info ( AVICompressor This,
VIDEOINFOHEADER src_videoinfo 
)
static

Definition at line 84 of file avico.c.

85 {
86  DWORD size;
87  ICINFO icinfo;
88  HRESULT hres;
89 
91  if(hres != S_OK)
92  return hres;
93 
94  size = ICGetInfo(This->hic, &icinfo, sizeof(icinfo));
95  if(size != sizeof(icinfo))
96  return E_FAIL;
97 
98  size = ICCompressGetFormatSize(This->hic, &src_videoinfo->bmiHeader);
99  if(!size) {
100  FIXME("ICCompressGetFormatSize failed\n");
101  return E_FAIL;
102  }
103 
104  size += FIELD_OFFSET(VIDEOINFOHEADER, bmiHeader);
105  This->videoinfo = heap_alloc(size);
106  if(!This->videoinfo)
107  return E_OUTOFMEMORY;
108 
109  This->videoinfo_size = size;
110  This->driver_flags = icinfo.dwFlags;
111  memset(This->videoinfo, 0, sizeof(*This->videoinfo));
112  ICCompressGetFormat(This->hic, &src_videoinfo->bmiHeader, &This->videoinfo->bmiHeader);
113 
114  This->videoinfo->dwBitRate = 10000000/src_videoinfo->AvgTimePerFrame * This->videoinfo->bmiHeader.biSizeImage * 8;
115  This->videoinfo->AvgTimePerFrame = src_videoinfo->AvgTimePerFrame;
116  This->max_frame_size = This->videoinfo->bmiHeader.biSizeImage;
117  return S_OK;
118 }
DWORD dwFlags
Definition: vfw.h:284
#define E_FAIL
Definition: ddrawi.h:102
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
#define ICCompressGetFormat(hic, lpbiInput, lpbiOutput)
Definition: vfw.h:204
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define FIXME(fmt,...)
Definition: debug.h:111
REFERENCE_TIME AvgTimePerFrame
Definition: amvideo.idl:187
BITMAPINFOHEADER bmiHeader
Definition: amvideo.idl:189
#define ICCompressGetFormatSize(hic, lpbi)
Definition: vfw.h:210
LRESULT VFWAPI ICGetInfo(HIC hic, ICINFO *picinfo, DWORD cb)
Definition: msvideo_main.c:594
GLsizeiptr size
Definition: glext.h:5919
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:79
unsigned long DWORD
Definition: ntddk_ex.h:95
static HRESULT ensure_driver(AVICompressor *This)
Definition: avico.c:70
Definition: vfw.h:280
#define S_OK
Definition: intsafe.h:51
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
#define memset(x, y, z)
Definition: compat.h:39

Referenced by AVICompressorIn_ReceiveConnection().

◆ impl_from_BaseFilter()

static AVICompressor* impl_from_BaseFilter ( BaseFilter filter)
inlinestatic

Definition at line 54 of file avico.c.

55 {
57 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition: glext.h:7005

Referenced by AVICompressor_GetPin(), and impl_from_IBaseFilter().

◆ impl_from_BasePin()

static AVICompressor* impl_from_BasePin ( BasePin pin)
inlinestatic

Definition at line 65 of file avico.c.

66 {
67  return impl_from_IBaseFilter(pin->pinInfo.pFilter);
68 }
Definition: regsvr.c:103
static AVICompressor * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: avico.c:59

Referenced by AVICompressorIn_CheckMediaType(), AVICompressorIn_Receive(), and AVICompressorOut_DecideBufferSize().

◆ impl_from_IBaseFilter()

static AVICompressor* impl_from_IBaseFilter ( IBaseFilter iface)
inlinestatic

Definition at line 59 of file avico.c.

60 {
61  BaseFilter *filter = CONTAINING_RECORD(iface, BaseFilter, IBaseFilter_iface);
63 }
static AVICompressor * impl_from_BaseFilter(BaseFilter *filter)
Definition: avico.c:54
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition: glext.h:7005

Referenced by AVICompressor_FindPin(), AVICompressor_Pause(), AVICompressor_QueryFilterInfo(), AVICompressor_QueryInterface(), AVICompressor_QueryVendorInfo(), AVICompressor_Release(), AVICompressor_Run(), AVICompressor_Stop(), AVICompressorOut_GetMediaType(), impl_from_BasePin(), and impl_from_IPin().

◆ impl_from_IPersistPropertyBag()

static AVICompressor* impl_from_IPersistPropertyBag ( IPersistPropertyBag iface)
static

Definition at line 286 of file avico.c.

287 {
288  return CONTAINING_RECORD(iface, AVICompressor, IPersistPropertyBag_iface);
289 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by AVICompressorPropertyBag_AddRef(), AVICompressorPropertyBag_GetClassID(), AVICompressorPropertyBag_InitNew(), AVICompressorPropertyBag_Load(), AVICompressorPropertyBag_QueryInterface(), AVICompressorPropertyBag_Release(), and AVICompressorPropertyBag_Save().

◆ impl_from_IPin()

static AVICompressor* impl_from_IPin ( IPin iface)
inlinestatic

Definition at line 377 of file avico.c.

378 {
379  BasePin *bp = CONTAINING_RECORD(iface, BasePin, IPin_iface);
380  return impl_from_IBaseFilter(bp->pinInfo.pFilter);
381 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
static AVICompressor * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: avico.c:59
PIN_INFO pinInfo
Definition: strmbase.h:38

Referenced by AVICompressorIn_AddRef(), AVICompressorIn_Disconnect(), AVICompressorIn_ReceiveConnection(), AVICompressorIn_Release(), AVICompressorOut_AddRef(), and AVICompressorOut_Release().

◆ QCAP_createAVICompressor()

IUnknown *WINAPI QCAP_createAVICompressor ( IUnknown outer,
HRESULT phr 
)

Definition at line 698 of file avico.c.

699 {
700  PIN_INFO in_pin_info = {NULL, PINDIR_INPUT, {'I','n','p','u','t',0}};
701  PIN_INFO out_pin_info = {NULL, PINDIR_OUTPUT, {'O','u','t','p','u','t',0}};
702  AVICompressor *compressor;
703  HRESULT hres;
704 
705  TRACE("\n");
706 
707  compressor = heap_alloc_zero(sizeof(*compressor));
708  if(!compressor) {
709  *phr = E_NOINTERFACE;
710  return NULL;
711  }
712 
713  BaseFilter_Init(&compressor->filter, &AVICompressorVtbl, &CLSID_AVICo,
714  (DWORD_PTR)(__FILE__ ": AVICompressor.csFilter"), &filter_func_table);
715 
717 
718  in_pin_info.pFilter = &compressor->filter.IBaseFilter_iface;
720  &AVICompressorBaseInputPinVtbl, &compressor->filter.csFilter, NULL, (IPin**)&compressor->in);
721  if(FAILED(hres)) {
722  IBaseFilter_Release(&compressor->filter.IBaseFilter_iface);
723  *phr = hres;
724  return NULL;
725  }
726 
727  out_pin_info.pFilter = &compressor->filter.IBaseFilter_iface;
729  &AVICompressorBaseOutputPinVtbl, &compressor->filter.csFilter, (IPin**)&compressor->out);
730  if(FAILED(hres)) {
731  IBaseFilter_Release(&compressor->filter.IBaseFilter_iface);
732  *phr = hres;
733  return NULL;
734  }
735 
736  *phr = S_OK;
737  return (IUnknown*)&compressor->filter.IBaseFilter_iface;
738 }
static const BaseInputPinFuncTable AVICompressorBaseInputPinVtbl
Definition: avico.c:581
#define E_NOINTERFACE
Definition: winerror.h:2364
static const IBaseFilterVtbl AVICompressorVtbl
Definition: avico.c:235
smooth NULL
Definition: ftsmooth.c:416
static const IPinVtbl AVICompressorOutputPinVtbl
Definition: avico.c:608
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
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:79
BaseFilter filter
Definition: avico.c:37
IBaseFilter IBaseFilter_iface
Definition: strmbase.h:163
static const IPersistPropertyBagVtbl PersistPropertyBagVtbl
Definition: avico.c:367
CRITICAL_SECTION csFilter
Definition: strmbase.h:165
static const BaseFilterFuncTable filter_func_table
Definition: avico.c:281
uint32_t DWORD_PTR
Definition: typedefs.h:65
BaseInputPin * in
Definition: avico.c:40
static const IPinVtbl AVICompressorInputPinVtbl
Definition: avico.c:435
#define S_OK
Definition: intsafe.h:51
Definition: axcore.idl:91
IPersistPropertyBag IPersistPropertyBag_iface
Definition: avico.c:38
HRESULT WINAPI BaseOutputPin_Construct(const IPinVtbl *OutputPin_Vtbl, LONG outputpin_size, const PIN_INFO *pPinInfo, const BaseOutputPinFuncTable *pBaseOutputFuncsTable, LPCRITICAL_SECTION pCritSec, IPin **ppPin)
Definition: pin.c:791
HRESULT WINAPI BaseFilter_Init(BaseFilter *This, const IBaseFilterVtbl *Vtbl, const CLSID *pClsid, DWORD_PTR DebugInfo, const BaseFilterFuncTable *pBaseFuncsTable)
Definition: filter.c:196
static const BaseOutputPinFuncTable AVICompressorBaseOutputPinVtbl
Definition: avico.c:686
BaseOutputPin * out
Definition: avico.c:41

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( qcap  )

Variable Documentation

◆ AVICompressorBaseInputPinVtbl

const BaseInputPinFuncTable AVICompressorBaseInputPinVtbl
static
Initial value:
= {
{
},
}
static HRESULT WINAPI AVICompressorIn_GetMediaType(BasePin *base, int iPosition, AM_MEDIA_TYPE *amt)
Definition: avico.c:488
static HRESULT WINAPI AVICompressorIn_Receive(BaseInputPin *base, IMediaSample *pSample)
Definition: avico.c:494
smooth NULL
Definition: ftsmooth.c:416
static LONG WINAPI AVICompressorIn_GetMediaTypeVersion(BasePin *base)
Definition: avico.c:483
static HRESULT WINAPI AVICompressorIn_CheckMediaType(BasePin *base, const AM_MEDIA_TYPE *pmt)
Definition: avico.c:456

Definition at line 581 of file avico.c.

Referenced by QCAP_createAVICompressor().

◆ AVICompressorBaseOutputPinVtbl

const BaseOutputPinFuncTable AVICompressorBaseOutputPinVtbl
static
Initial value:
= {
{
},
}
static HRESULT WINAPI AVICompressorOut_GetMediaType(BasePin *base, int iPosition, AM_MEDIA_TYPE *amt)
Definition: avico.c:635
static LONG WINAPI AVICompressorOut_GetMediaTypeVersion(BasePin *base)
Definition: avico.c:629
smooth NULL
Definition: ftsmooth.c:416
static HRESULT WINAPI AVICompressorOut_BreakConnect(BaseOutputPin *base)
Definition: avico.c:680
HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(BasePin *This, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
Definition: pin.c:712
static HRESULT WINAPI AVICompressorOut_DecideBufferSize(BaseOutputPin *base, IMemAllocator *alloc, ALLOCATOR_PROPERTIES *ppropInputRequest)
Definition: avico.c:656
static HRESULT WINAPI AVICompressorOut_DecideAllocator(BaseOutputPin *base, IMemInputPin *pPin, IMemAllocator **pAlloc)
Definition: avico.c:673

Definition at line 686 of file avico.c.

Referenced by QCAP_createAVICompressor().

◆ AVICompressorInputPinVtbl

const IPinVtbl AVICompressorInputPinVtbl
static
Initial value:
= {
}
static HRESULT WINAPI AVICompressorIn_ReceiveConnection(IPin *iface, IPin *pConnector, const AM_MEDIA_TYPE *pmt)
Definition: avico.c:400
HRESULT WINAPI BaseInputPinImpl_Connect(IPin *iface, IPin *pConnector, const AM_MEDIA_TYPE *pmt)
Definition: pin.c:881
HRESULT WINAPI BaseInputPinImpl_EndFlush(IPin *iface)
Definition: pin.c:988
static ULONG WINAPI AVICompressorIn_Release(IPin *iface)
Definition: avico.c:394
static HRESULT WINAPI AVICompressorIn_Disconnect(IPin *iface)
Definition: avico.c:419
HRESULT WINAPI BasePinImpl_QueryAccept(IPin *iface, const AM_MEDIA_TYPE *pmt)
Definition: pin.c:311
HRESULT WINAPI BasePinImpl_QueryDirection(IPin *iface, PIN_DIRECTION *pPinDir)
Definition: pin.c:285
HRESULT WINAPI BasePinImpl_ConnectedTo(IPin *iface, IPin **ppPin)
Definition: pin.c:222
HRESULT WINAPI BasePinImpl_EnumMediaTypes(IPin *iface, IEnumMediaTypes **ppEnum)
Definition: pin.c:318
static ULONG WINAPI AVICompressorIn_AddRef(IPin *iface)
Definition: avico.c:388
HRESULT WINAPI BaseInputPinImpl_BeginFlush(IPin *iface)
Definition: pin.c:968
HRESULT WINAPI BasePinImpl_QueryPinInfo(IPin *iface, PIN_INFO *pInfo)
Definition: pin.c:273
HRESULT WINAPI BasePinImpl_QueryId(IPin *iface, LPWSTR *Id)
Definition: pin.c:296
HRESULT WINAPI BasePinImpl_QueryInternalConnections(IPin *iface, IPin **apPin, ULONG *cPin)
Definition: pin.c:329
static HRESULT WINAPI AVICompressorIn_QueryInterface(IPin *iface, REFIID riid, void **ppv)
Definition: avico.c:383
HRESULT WINAPI BaseInputPinImpl_NewSegment(IPin *iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
Definition: pin.c:1015
HRESULT WINAPI BasePinImpl_ConnectionMediaType(IPin *iface, AM_MEDIA_TYPE *pmt)
Definition: pin.c:248
HRESULT WINAPI BaseInputPinImpl_EndOfStream(IPin *iface)
Definition: pin.c:944

Definition at line 435 of file avico.c.

Referenced by QCAP_createAVICompressor().

◆ AVICompressorOutputPinVtbl

const IPinVtbl AVICompressorOutputPinVtbl
static
Initial value:
= {
}
HRESULT WINAPI BaseOutputPinImpl_EndOfStream(IPin *iface)
Definition: pin.c:527
HRESULT WINAPI BaseOutputPinImpl_EndFlush(IPin *iface)
Definition: pin.c:545
HRESULT WINAPI BasePinImpl_QueryAccept(IPin *iface, const AM_MEDIA_TYPE *pmt)
Definition: pin.c:311
HRESULT WINAPI BasePinImpl_QueryDirection(IPin *iface, PIN_DIRECTION *pPinDir)
Definition: pin.c:285
HRESULT WINAPI BasePinImpl_ConnectedTo(IPin *iface, IPin **ppPin)
Definition: pin.c:222
HRESULT WINAPI BasePinImpl_EnumMediaTypes(IPin *iface, IEnumMediaTypes **ppEnum)
Definition: pin.c:318
static HRESULT WINAPI AVICompressorOut_QueryInterface(IPin *iface, REFIID riid, void **ppv)
Definition: avico.c:591
HRESULT WINAPI BasePinImpl_NewSegment(IPin *iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
Definition: pin.c:338
HRESULT WINAPI BaseOutputPinImpl_BeginFlush(IPin *iface)
Definition: pin.c:536
HRESULT WINAPI BasePinImpl_QueryPinInfo(IPin *iface, PIN_INFO *pInfo)
Definition: pin.c:273
HRESULT WINAPI BasePinImpl_QueryId(IPin *iface, LPWSTR *Id)
Definition: pin.c:296
HRESULT WINAPI BasePinImpl_QueryInternalConnections(IPin *iface, IPin **apPin, ULONG *cPin)
Definition: pin.c:329
HRESULT WINAPI BaseOutputPinImpl_Connect(IPin *iface, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
Definition: pin.c:405
HRESULT WINAPI BaseOutputPinImpl_ReceiveConnection(IPin *iface, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
Definition: pin.c:490
HRESULT WINAPI BasePinImpl_ConnectionMediaType(IPin *iface, AM_MEDIA_TYPE *pmt)
Definition: pin.c:248
static ULONG WINAPI AVICompressorOut_Release(IPin *iface)
Definition: avico.c:602
HRESULT WINAPI BaseOutputPinImpl_Disconnect(IPin *iface)
Definition: pin.c:497
static ULONG WINAPI AVICompressorOut_AddRef(IPin *iface)
Definition: avico.c:596

Definition at line 608 of file avico.c.

Referenced by QCAP_createAVICompressor().

◆ AVICompressorVtbl

const IBaseFilterVtbl AVICompressorVtbl
static
Initial value:
= {
}
static HRESULT WINAPI AVICompressor_Pause(IBaseFilter *iface)
Definition: avico.c:185
HRESULT WINAPI BaseFilterImpl_SetSyncSource(IBaseFilter *iface, IReferenceClock *pClock)
Definition: filter.c:101
HRESULT WINAPI BaseFilterImpl_GetState(IBaseFilter *iface, DWORD dwMilliSecsTimeout, FILTER_STATE *pState)
Definition: filter.c:87
static HRESULT WINAPI AVICompressor_QueryFilterInfo(IBaseFilter *iface, FILTER_INFO *pInfo)
Definition: avico.c:221
static HRESULT WINAPI AVICompressor_FindPin(IBaseFilter *iface, LPCWSTR Id, IPin **ppPin)
Definition: avico.c:214
HRESULT WINAPI BaseFilterImpl_GetClassID(IBaseFilter *iface, CLSID *pClsid)
Definition: filter.c:77
HRESULT WINAPI BaseFilterImpl_EnumPins(IBaseFilter *iface, IEnumPins **ppEnum)
Definition: filter.c:135
static HRESULT WINAPI AVICompressor_QueryVendorInfo(IBaseFilter *iface, LPWSTR *pVendorInfo)
Definition: avico.c:228
static HRESULT WINAPI AVICompressor_Run(IBaseFilter *iface, REFERENCE_TIME tStart)
Definition: avico.c:192
static HRESULT WINAPI AVICompressor_Stop(IBaseFilter *iface)
Definition: avico.c:171
ULONG WINAPI BaseFilterImpl_AddRef(IBaseFilter *iface)
Definition: filter.c:54
HRESULT WINAPI BaseFilterImpl_GetSyncSource(IBaseFilter *iface, IReferenceClock **ppClock)
Definition: filter.c:119
HRESULT WINAPI BaseFilterImpl_JoinFilterGraph(IBaseFilter *iface, IFilterGraph *pGraph, LPCWSTR pName)
Definition: filter.c:159
static ULONG WINAPI AVICompressor_Release(IBaseFilter *iface)
Definition: avico.c:150
static HRESULT WINAPI AVICompressor_QueryInterface(IBaseFilter *iface, REFIID riid, void **ppv)
Definition: avico.c:120

Definition at line 235 of file avico.c.

Referenced by QCAP_createAVICompressor().

◆ filter_func_table

const BaseFilterFuncTable filter_func_table
static
Initial value:
= {
}
static IPin *WINAPI AVICompressor_GetPin(BaseFilter *iface, int pos)
Definition: avico.c:253
static LONG WINAPI AVICompressor_GetPinCount(BaseFilter *iface)
Definition: avico.c:276

Definition at line 281 of file avico.c.

Referenced by QCAP_createAVICompressor().

◆ PersistPropertyBagVtbl

const IPersistPropertyBagVtbl PersistPropertyBagVtbl
static
Initial value:
= {
}
static HRESULT WINAPI AVICompressorPropertyBag_GetClassID(IPersistPropertyBag *iface, CLSID *pClassID)
Definition: avico.c:309
static HRESULT WINAPI AVICompressorPropertyBag_Save(IPersistPropertyBag *iface, IPropertyBag *pPropBag, BOOL fClearDirty, BOOL fSaveAllProperties)
Definition: avico.c:359
static HRESULT WINAPI AVICompressorPropertyBag_Load(IPersistPropertyBag *iface, IPropertyBag *pPropBag, IErrorLog *pErrorLog)
Definition: avico.c:322
static HRESULT WINAPI AVICompressorPropertyBag_InitNew(IPersistPropertyBag *iface)
Definition: avico.c:315
static ULONG WINAPI AVICompressorPropertyBag_AddRef(IPersistPropertyBag *iface)
Definition: avico.c:297
static ULONG WINAPI AVICompressorPropertyBag_Release(IPersistPropertyBag *iface)
Definition: avico.c:303
static HRESULT WINAPI AVICompressorPropertyBag_QueryInterface(IPersistPropertyBag *iface, REFIID riid, void **ppv)
Definition: avico.c:291

Definition at line 367 of file avico.c.

Referenced by QCAP_createAVICompressor().