ReactOS 0.4.15-dev-7674-gc0b4db1
avimux.c File Reference
#include <stdarg.h>
#include <stdio.h>
#include "windef.h"
#include "winbase.h"
#include "wtypes.h"
#include "dshow.h"
#include "vfw.h"
#include "aviriff.h"
#include "qcap_main.h"
#include "wine/debug.h"
Include dependency graph for avimux.c:

Go to the source code of this file.

Classes

struct  AviMuxOut
 
struct  AviMuxIn
 
struct  AviMux
 

Macros

#define COBJMACROS
 
#define MAX_PIN_NO   128
 
#define AVISUPERINDEX_ENTRIES   2000
 
#define AVISTDINDEX_ENTRIES   4000
 
#define ALIGN(x)   ((x+1)/2*2)
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (qcap)
 
static HRESULT create_input_pin (AviMux *)
 
static AviMuximpl_from_BaseFilter (BaseFilter *filter)
 
static IPin *WINAPI AviMux_GetPin (BaseFilter *iface, int pos)
 
static LONG WINAPI AviMux_GetPinCount (BaseFilter *iface)
 
static AviMuximpl_from_IBaseFilter (IBaseFilter *iface)
 
static HRESULT WINAPI AviMux_QueryInterface (IBaseFilter *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI AviMux_Release (IBaseFilter *iface)
 
static HRESULT out_flush (AviMux *This)
 
static HRESULT out_seek (AviMux *This, int pos)
 
static HRESULT out_write (AviMux *This, const void *data, int size)
 
static HRESULT idx1_add_entry (AviMux *avimux, DWORD ckid, DWORD flags, DWORD off, DWORD len)
 
static HRESULT flush_queue (AviMux *avimux, AviMuxIn *avimuxin, BOOL closing)
 
static HRESULT queue_sample (AviMux *avimux, AviMuxIn *avimuxin, IMediaSample *sample)
 
static HRESULT WINAPI AviMux_Stop (IBaseFilter *iface)
 
static HRESULT WINAPI AviMux_Pause (IBaseFilter *iface)
 
static HRESULT WINAPI AviMux_Run (IBaseFilter *iface, REFERENCE_TIME tStart)
 
static HRESULT WINAPI AviMux_EnumPins (IBaseFilter *iface, IEnumPins **ppEnum)
 
static HRESULT WINAPI AviMux_FindPin (IBaseFilter *iface, LPCWSTR Id, IPin **ppPin)
 
static HRESULT WINAPI AviMux_QueryFilterInfo (IBaseFilter *iface, FILTER_INFO *pInfo)
 
static HRESULT WINAPI AviMux_QueryVendorInfo (IBaseFilter *iface, LPWSTR *pVendorInfo)
 
static AviMuximpl_from_IConfigAviMux (IConfigAviMux *iface)
 
static HRESULT WINAPI ConfigAviMux_QueryInterface (IConfigAviMux *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI ConfigAviMux_AddRef (IConfigAviMux *iface)
 
static ULONG WINAPI ConfigAviMux_Release (IConfigAviMux *iface)
 
static HRESULT WINAPI ConfigAviMux_SetMasterStream (IConfigAviMux *iface, LONG iStream)
 
static HRESULT WINAPI ConfigAviMux_GetMasterStream (IConfigAviMux *iface, LONG *pStream)
 
static HRESULT WINAPI ConfigAviMux_SetOutputCompatibilityIndex (IConfigAviMux *iface, BOOL fOldIndex)
 
static HRESULT WINAPI ConfigAviMux_GetOutputCompatibilityIndex (IConfigAviMux *iface, BOOL *pfOldIndex)
 
static AviMuximpl_from_IConfigInterleaving (IConfigInterleaving *iface)
 
static HRESULT WINAPI ConfigInterleaving_QueryInterface (IConfigInterleaving *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI ConfigInterleaving_AddRef (IConfigInterleaving *iface)
 
static ULONG WINAPI ConfigInterleaving_Release (IConfigInterleaving *iface)
 
static HRESULT WINAPI ConfigInterleaving_put_Mode (IConfigInterleaving *iface, InterleavingMode mode)
 
static HRESULT WINAPI ConfigInterleaving_get_Mode (IConfigInterleaving *iface, InterleavingMode *pMode)
 
static HRESULT WINAPI ConfigInterleaving_put_Interleaving (IConfigInterleaving *iface, const REFERENCE_TIME *prtInterleave, const REFERENCE_TIME *prtPreroll)
 
static HRESULT WINAPI ConfigInterleaving_get_Interleaving (IConfigInterleaving *iface, REFERENCE_TIME *prtInterleave, REFERENCE_TIME *prtPreroll)
 
static AviMuximpl_from_IMediaSeeking (IMediaSeeking *iface)
 
static HRESULT WINAPI MediaSeeking_QueryInterface (IMediaSeeking *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI MediaSeeking_AddRef (IMediaSeeking *iface)
 
static ULONG WINAPI MediaSeeking_Release (IMediaSeeking *iface)
 
static HRESULT WINAPI MediaSeeking_GetCapabilities (IMediaSeeking *iface, DWORD *pCapabilities)
 
static HRESULT WINAPI MediaSeeking_CheckCapabilities (IMediaSeeking *iface, DWORD *pCapabilities)
 
static HRESULT WINAPI MediaSeeking_IsFormatSupported (IMediaSeeking *iface, const GUID *pFormat)
 
static HRESULT WINAPI MediaSeeking_QueryPreferredFormat (IMediaSeeking *iface, GUID *pFormat)
 
static HRESULT WINAPI MediaSeeking_GetTimeFormat (IMediaSeeking *iface, GUID *pFormat)
 
static HRESULT WINAPI MediaSeeking_IsUsingTimeFormat (IMediaSeeking *iface, const GUID *pFormat)
 
static HRESULT WINAPI MediaSeeking_SetTimeFormat (IMediaSeeking *iface, const GUID *pFormat)
 
static HRESULT WINAPI MediaSeeking_GetDuration (IMediaSeeking *iface, LONGLONG *pDuration)
 
static HRESULT WINAPI MediaSeeking_GetStopPosition (IMediaSeeking *iface, LONGLONG *pStop)
 
static HRESULT WINAPI MediaSeeking_GetCurrentPosition (IMediaSeeking *iface, LONGLONG *pCurrent)
 
static HRESULT WINAPI MediaSeeking_ConvertTimeFormat (IMediaSeeking *iface, LONGLONG *pTarget, const GUID *pTargetFormat, LONGLONG Source, const GUID *pSourceFormat)
 
static HRESULT WINAPI MediaSeeking_SetPositions (IMediaSeeking *iface, LONGLONG *pCurrent, DWORD dwCurrentFlags, LONGLONG *pStop, DWORD dwStopFlags)
 
static HRESULT WINAPI MediaSeeking_GetPositions (IMediaSeeking *iface, LONGLONG *pCurrent, LONGLONG *pStop)
 
static HRESULT WINAPI MediaSeeking_GetAvailable (IMediaSeeking *iface, LONGLONG *pEarliest, LONGLONG *pLatest)
 
static HRESULT WINAPI MediaSeeking_SetRate (IMediaSeeking *iface, double dRate)
 
static HRESULT WINAPI MediaSeeking_GetRate (IMediaSeeking *iface, double *pdRate)
 
static HRESULT WINAPI MediaSeeking_GetPreroll (IMediaSeeking *iface, LONGLONG *pllPreroll)
 
static AviMuximpl_from_IPersistMediaPropertyBag (IPersistMediaPropertyBag *iface)
 
static HRESULT WINAPI PersistMediaPropertyBag_QueryInterface (IPersistMediaPropertyBag *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI PersistMediaPropertyBag_AddRef (IPersistMediaPropertyBag *iface)
 
static ULONG WINAPI PersistMediaPropertyBag_Release (IPersistMediaPropertyBag *iface)
 
static HRESULT WINAPI PersistMediaPropertyBag_GetClassID (IPersistMediaPropertyBag *iface, CLSID *pClassID)
 
static HRESULT WINAPI PersistMediaPropertyBag_InitNew (IPersistMediaPropertyBag *iface)
 
static HRESULT WINAPI PersistMediaPropertyBag_Load (IPersistMediaPropertyBag *iface, IMediaPropertyBag *pPropBag, IErrorLog *pErrorLog)
 
static HRESULT WINAPI PersistMediaPropertyBag_Save (IPersistMediaPropertyBag *iface, IMediaPropertyBag *pPropBag, BOOL fClearDirty, BOOL fSaveAllProperties)
 
static AviMuximpl_from_ISpecifyPropertyPages (ISpecifyPropertyPages *iface)
 
static HRESULT WINAPI SpecifyPropertyPages_QueryInterface (ISpecifyPropertyPages *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI SpecifyPropertyPages_AddRef (ISpecifyPropertyPages *iface)
 
static ULONG WINAPI SpecifyPropertyPages_Release (ISpecifyPropertyPages *iface)
 
static HRESULT WINAPI SpecifyPropertyPages_GetPages (ISpecifyPropertyPages *iface, CAUUID *pPages)
 
static HRESULT WINAPI AviMuxOut_AttemptConnection (BasePin *base, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
 
static LONG WINAPI AviMuxOut_GetMediaTypeVersion (BasePin *base)
 
static HRESULT WINAPI AviMuxOut_GetMediaType (BasePin *base, int iPosition, AM_MEDIA_TYPE *amt)
 
static HRESULT WINAPI AviMuxOut_DecideAllocator (BaseOutputPin *base, IMemInputPin *pPin, IMemAllocator **pAlloc)
 
static HRESULT WINAPI AviMuxOut_BreakConnect (BaseOutputPin *base)
 
static AviMuximpl_from_out_IPin (IPin *iface)
 
static HRESULT WINAPI AviMuxOut_QueryInterface (IPin *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI AviMuxOut_AddRef (IPin *iface)
 
static ULONG WINAPI AviMuxOut_Release (IPin *iface)
 
static HRESULT WINAPI AviMuxOut_Connect (IPin *iface, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
 
static HRESULT WINAPI AviMuxOut_ReceiveConnection (IPin *iface, IPin *pConnector, const AM_MEDIA_TYPE *pmt)
 
static HRESULT WINAPI AviMuxOut_Disconnect (IPin *iface)
 
static HRESULT WINAPI AviMuxOut_ConnectedTo (IPin *iface, IPin **pPin)
 
static HRESULT WINAPI AviMuxOut_ConnectionMediaType (IPin *iface, AM_MEDIA_TYPE *pmt)
 
static HRESULT WINAPI AviMuxOut_QueryPinInfo (IPin *iface, PIN_INFO *pInfo)
 
static HRESULT WINAPI AviMuxOut_QueryDirection (IPin *iface, PIN_DIRECTION *pPinDir)
 
static HRESULT WINAPI AviMuxOut_QueryId (IPin *iface, LPWSTR *Id)
 
static HRESULT WINAPI AviMuxOut_QueryAccept (IPin *iface, const AM_MEDIA_TYPE *pmt)
 
static HRESULT WINAPI AviMuxOut_EnumMediaTypes (IPin *iface, IEnumMediaTypes **ppEnum)
 
static HRESULT WINAPI AviMuxOut_QueryInternalConnections (IPin *iface, IPin **apPin, ULONG *nPin)
 
static HRESULT WINAPI AviMuxOut_EndOfStream (IPin *iface)
 
static HRESULT WINAPI AviMuxOut_BeginFlush (IPin *iface)
 
static HRESULT WINAPI AviMuxOut_EndFlush (IPin *iface)
 
static HRESULT WINAPI AviMuxOut_NewSegment (IPin *iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
 
static AviMuximpl_from_out_IQualityControl (IQualityControl *iface)
 
static HRESULT WINAPI AviMuxOut_QualityControl_QueryInterface (IQualityControl *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI AviMuxOut_QualityControl_AddRef (IQualityControl *iface)
 
static ULONG WINAPI AviMuxOut_QualityControl_Release (IQualityControl *iface)
 
static HRESULT WINAPI AviMuxOut_QualityControl_Notify (IQualityControl *iface, IBaseFilter *pSelf, Quality q)
 
static HRESULT WINAPI AviMuxOut_QualityControl_SetSink (IQualityControl *iface, IQualityControl *piqc)
 
static HRESULT WINAPI AviMuxIn_CheckMediaType (BasePin *base, const AM_MEDIA_TYPE *pmt)
 
static LONG WINAPI AviMuxIn_GetMediaTypeVersion (BasePin *base)
 
static HRESULT WINAPI AviMuxIn_GetMediaType (BasePin *base, int iPosition, AM_MEDIA_TYPE *amt)
 
static HRESULT WINAPI AviMuxIn_Receive (BaseInputPin *base, IMediaSample *pSample)
 
static AviMuximpl_from_in_IPin (IPin *iface)
 
static AviMuxInAviMuxIn_from_IPin (IPin *iface)
 
static HRESULT WINAPI AviMuxIn_QueryInterface (IPin *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI AviMuxIn_AddRef (IPin *iface)
 
static ULONG WINAPI AviMuxIn_Release (IPin *iface)
 
static HRESULT WINAPI AviMuxIn_Connect (IPin *iface, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
 
static HRESULT WINAPI AviMuxIn_ReceiveConnection (IPin *iface, IPin *pConnector, const AM_MEDIA_TYPE *pmt)
 
static HRESULT WINAPI AviMuxIn_Disconnect (IPin *iface)
 
static HRESULT WINAPI AviMuxIn_ConnectedTo (IPin *iface, IPin **pPin)
 
static HRESULT WINAPI AviMuxIn_ConnectionMediaType (IPin *iface, AM_MEDIA_TYPE *pmt)
 
static HRESULT WINAPI AviMuxIn_QueryPinInfo (IPin *iface, PIN_INFO *pInfo)
 
static HRESULT WINAPI AviMuxIn_QueryDirection (IPin *iface, PIN_DIRECTION *pPinDir)
 
static HRESULT WINAPI AviMuxIn_QueryId (IPin *iface, LPWSTR *Id)
 
static HRESULT WINAPI AviMuxIn_QueryAccept (IPin *iface, const AM_MEDIA_TYPE *pmt)
 
static HRESULT WINAPI AviMuxIn_EnumMediaTypes (IPin *iface, IEnumMediaTypes **ppEnum)
 
static HRESULT WINAPI AviMuxIn_QueryInternalConnections (IPin *iface, IPin **apPin, ULONG *nPin)
 
static HRESULT WINAPI AviMuxIn_EndOfStream (IPin *iface)
 
static HRESULT WINAPI AviMuxIn_BeginFlush (IPin *iface)
 
static HRESULT WINAPI AviMuxIn_EndFlush (IPin *iface)
 
static HRESULT WINAPI AviMuxIn_NewSegment (IPin *iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
 
static AviMuxInAviMuxIn_from_IAMStreamControl (IAMStreamControl *iface)
 
static HRESULT WINAPI AviMuxIn_AMStreamControl_QueryInterface (IAMStreamControl *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI AviMuxIn_AMStreamControl_AddRef (IAMStreamControl *iface)
 
static ULONG WINAPI AviMuxIn_AMStreamControl_Release (IAMStreamControl *iface)
 
static HRESULT WINAPI AviMuxIn_AMStreamControl_StartAt (IAMStreamControl *iface, const REFERENCE_TIME *ptStart, DWORD dwCookie)
 
static HRESULT WINAPI AviMuxIn_AMStreamControl_StopAt (IAMStreamControl *iface, const REFERENCE_TIME *ptStop, BOOL bSendExtra, DWORD dwCookie)
 
static HRESULT WINAPI AviMuxIn_AMStreamControl_GetInfo (IAMStreamControl *iface, AM_STREAM_INFO *pInfo)
 
static AviMuxInAviMuxIn_from_IMemInputPin (IMemInputPin *iface)
 
static HRESULT WINAPI AviMuxIn_MemInputPin_QueryInterface (IMemInputPin *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI AviMuxIn_MemInputPin_AddRef (IMemInputPin *iface)
 
static ULONG WINAPI AviMuxIn_MemInputPin_Release (IMemInputPin *iface)
 
static HRESULT WINAPI AviMuxIn_MemInputPin_GetAllocator (IMemInputPin *iface, IMemAllocator **ppAllocator)
 
static HRESULT WINAPI AviMuxIn_MemInputPin_NotifyAllocator (IMemInputPin *iface, IMemAllocator *pAllocator, BOOL bReadOnly)
 
static HRESULT WINAPI AviMuxIn_MemInputPin_GetAllocatorRequirements (IMemInputPin *iface, ALLOCATOR_PROPERTIES *pProps)
 
static HRESULT WINAPI AviMuxIn_MemInputPin_Receive (IMemInputPin *iface, IMediaSample *pSample)
 
static HRESULT WINAPI AviMuxIn_MemInputPin_ReceiveMultiple (IMemInputPin *iface, IMediaSample **pSamples, LONG nSamples, LONG *nSamplesProcessed)
 
static HRESULT WINAPI AviMuxIn_MemInputPin_ReceiveCanBlock (IMemInputPin *iface)
 
static AviMuxInAviMuxIn_from_IPropertyBag (IPropertyBag *iface)
 
static HRESULT WINAPI AviMuxIn_PropertyBag_QueryInterface (IPropertyBag *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI AviMuxIn_PropertyBag_AddRef (IPropertyBag *iface)
 
static ULONG WINAPI AviMuxIn_PropertyBag_Release (IPropertyBag *iface)
 
static HRESULT WINAPI AviMuxIn_PropertyBag_Read (IPropertyBag *iface, LPCOLESTR pszPropName, VARIANT *pVar, IErrorLog *pErrorLog)
 
static HRESULT WINAPI AviMuxIn_PropertyBag_Write (IPropertyBag *iface, LPCOLESTR pszPropName, VARIANT *pVar)
 
static AviMuxInAviMuxIn_from_IQualityControl (IQualityControl *iface)
 
static HRESULT WINAPI AviMuxIn_QualityControl_QueryInterface (IQualityControl *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI AviMuxIn_QualityControl_AddRef (IQualityControl *iface)
 
static ULONG WINAPI AviMuxIn_QualityControl_Release (IQualityControl *iface)
 
static HRESULT WINAPI AviMuxIn_QualityControl_Notify (IQualityControl *iface, IBaseFilter *pSelf, Quality q)
 
static HRESULT WINAPI AviMuxIn_QualityControl_SetSink (IQualityControl *iface, IQualityControl *piqc)
 
IUnknown *WINAPI QCAP_createAVIMux (IUnknown *pUnkOuter, HRESULT *phr)
 

Variables

static const BaseFilterFuncTable filter_func_table
 
static const IBaseFilterVtbl AviMuxVtbl
 
static const IConfigAviMuxVtbl ConfigAviMuxVtbl
 
static const IConfigInterleavingVtbl ConfigInterleavingVtbl
 
static const IMediaSeekingVtbl MediaSeekingVtbl
 
static const IPersistMediaPropertyBagVtbl PersistMediaPropertyBagVtbl
 
static const ISpecifyPropertyPagesVtbl SpecifyPropertyPagesVtbl
 
static const BaseOutputPinFuncTable AviMuxOut_BaseOutputFuncTable
 
static const IPinVtbl AviMuxOut_PinVtbl
 
static const IQualityControlVtbl AviMuxOut_QualityControlVtbl
 
static const BaseInputPinFuncTable AviMuxIn_BaseInputFuncTable
 
static const IPinVtbl AviMuxIn_PinVtbl
 
static const IAMStreamControlVtbl AviMuxIn_AMStreamControlVtbl
 
static const IMemInputPinVtbl AviMuxIn_MemInputPinVtbl
 
static const IPropertyBagVtbl AviMuxIn_PropertyBagVtbl
 
static const IQualityControlVtbl AviMuxIn_QualityControlVtbl
 

Macro Definition Documentation

◆ ALIGN

#define ALIGN (   x)    ((x+1)/2*2)

Definition at line 40 of file avimux.c.

◆ AVISTDINDEX_ENTRIES

#define AVISTDINDEX_ENTRIES   4000

Definition at line 39 of file avimux.c.

◆ AVISUPERINDEX_ENTRIES

#define AVISUPERINDEX_ENTRIES   2000

Definition at line 38 of file avimux.c.

◆ COBJMACROS

#define COBJMACROS

Definition at line 22 of file avimux.c.

◆ MAX_PIN_NO

#define MAX_PIN_NO   128

Definition at line 37 of file avimux.c.

Function Documentation

◆ AviMux_EnumPins()

static HRESULT WINAPI AviMux_EnumPins ( IBaseFilter iface,
IEnumPins **  ppEnum 
)
static

Definition at line 731 of file avimux.c.

732{
734 TRACE("(%p)->(%p)\n", This, ppEnum);
735 return BaseFilterImpl_EnumPins(iface, ppEnum);
736}
static AviMux * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: avimux.c:156
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT WINAPI BaseFilterImpl_EnumPins(IBaseFilter *iface, IEnumPins **ppEnum)
Definition: filter.c:135
Definition: avimux.c:96

◆ AviMux_FindPin()

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

Definition at line 738 of file avimux.c.

739{
741 int i;
742
743 TRACE("(%p)->(%s %p)\n", This, debugstr_w(Id), ppPin);
744
745 if(!Id || !ppPin)
746 return E_POINTER;
747
748 if(!lstrcmpiW(Id, This->out->pin.pin.pinInfo.achName)) {
749 IPin_AddRef(&This->out->pin.pin.IPin_iface);
750 *ppPin = &This->out->pin.pin.IPin_iface;
751 return S_OK;
752 }
753
754 for(i=0; i<This->input_pin_no; i++) {
755 if(lstrcmpiW(Id, This->in[i]->pin.pin.pinInfo.achName))
756 continue;
757
758 IPin_AddRef(&This->in[i]->pin.pin.IPin_iface);
759 *ppPin = &This->in[i]->pin.pin.IPin_iface;
760 return S_OK;
761 }
762
763 return VFW_E_NOT_FOUND;
764}
DWORD Id
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define S_OK
Definition: intsafe.h:52
#define debugstr_w
Definition: kernel32.h:32
int WINAPI lstrcmpiW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:194
#define VFW_E_NOT_FOUND
Definition: vfwmsgs.h:61
#define E_POINTER
Definition: winerror.h:2365

◆ AviMux_GetPin()

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

Definition at line 127 of file avimux.c.

128{
130
131 TRACE("(%p)->(%d)\n", This, pos);
132
133 if(pos == 0) {
134 IPin_AddRef(&This->out->pin.pin.IPin_iface);
135 return &This->out->pin.pin.IPin_iface;
136 }else if(pos>0 && pos<=This->input_pin_no) {
137 IPin_AddRef(&This->in[pos-1]->pin.pin.IPin_iface);
138 return &This->in[pos-1]->pin.pin.IPin_iface;
139 }
140
141 return NULL;
142}
static AviMux * impl_from_BaseFilter(BaseFilter *filter)
Definition: avimux.c:122
#define NULL
Definition: types.h:112

◆ AviMux_GetPinCount()

static LONG WINAPI AviMux_GetPinCount ( BaseFilter iface)
static

Definition at line 144 of file avimux.c.

145{
147 TRACE("(%p)\n", This);
148 return This->input_pin_no+1;
149}

◆ AviMux_Pause()

static HRESULT WINAPI AviMux_Pause ( IBaseFilter iface)
static

Definition at line 598 of file avimux.c.

599{
601 FIXME("(%p)\n", This);
602 return E_NOTIMPL;
603}
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ AviMux_QueryFilterInfo()

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

Definition at line 766 of file avimux.c.

767{
769 FIXME("(%p)->(%p)\n", This, pInfo);
770 return E_NOTIMPL;
771}

◆ AviMux_QueryInterface()

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

Definition at line 162 of file avimux.c.

163{
165
166 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
167
169 IsEqualIID(riid, &IID_IMediaFilter) || IsEqualIID(riid, &IID_IBaseFilter))
170 *ppv = &This->filter.IBaseFilter_iface;
171 else if(IsEqualIID(riid, &IID_IConfigAviMux))
172 *ppv = &This->IConfigAviMux_iface;
173 else if(IsEqualIID(riid, &IID_IConfigInterleaving))
174 *ppv = &This->IConfigInterleaving_iface;
175 else if(IsEqualIID(riid, &IID_IMediaSeeking))
176 *ppv = &This->IMediaSeeking_iface;
177 else if(IsEqualIID(riid, &IID_IPersistMediaPropertyBag))
178 *ppv = &This->IPersistMediaPropertyBag_iface;
180 *ppv = &This->ISpecifyPropertyPages_iface;
181 else {
182 FIXME("no interface for %s\n", debugstr_guid(riid));
183 *ppv = NULL;
184 return E_NOINTERFACE;
185 }
186
187 IUnknown_AddRef((IUnknown*)*ppv);
188 return S_OK;
189}
const GUID IID_IUnknown
const GUID IID_IBaseFilter
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define debugstr_guid
Definition: kernel32.h:35
const GUID IID_IPersist
Definition: proxy.cpp:14
const GUID IID_ISpecifyPropertyPages
Definition: proxy.cpp:12
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ AviMux_QueryVendorInfo()

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

Definition at line 773 of file avimux.c.

774{
776 FIXME("(%p)->(%p)\n", This, pVendorInfo);
777 return E_NOTIMPL;
778}

◆ AviMux_Release()

static ULONG WINAPI AviMux_Release ( IBaseFilter iface)
static

Definition at line 191 of file avimux.c.

192{
195
196 TRACE("(%p) new refcount: %u\n", This, ref);
197
198 if(!ref) {
199 int i;
200
201 BaseOutputPinImpl_Release(&This->out->pin.pin.IPin_iface);
202
203 for(i=0; i<This->input_pin_no; i++) {
204 IPin_Disconnect(&This->in[i]->pin.pin.IPin_iface);
205 IMemAllocator_Release(This->in[i]->samples_allocator);
206 This->in[i]->samples_allocator = NULL;
207 BaseInputPinImpl_Release(&This->in[i]->pin.pin.IPin_iface);
208 }
209
210 HeapFree(GetProcessHeap(), 0, This->idx1);
213 }
214 return ref;
215}
#define FALSE
Definition: types.h:117
#define GetProcessHeap()
Definition: compat.h:736
#define HeapFree(x, y, z)
Definition: compat.h:735
DWORD ObjectRefCount(BOOL increment)
Definition: qcap_main.c:193
ULONG WINAPI BaseInputPinImpl_Release(IPin *iface)
Definition: pin.c:868
ULONG WINAPI BaseFilterImpl_Release(IBaseFilter *iface)
Definition: filter.c:64
ULONG WINAPI BaseOutputPinImpl_Release(IPin *iface)
Definition: pin.c:392
Definition: send.c:48
uint32_t ULONG
Definition: typedefs.h:59

◆ AviMux_Run()

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

Definition at line 605 of file avimux.c.

606{
608 HRESULT hr;
609 int i, stream_id;
610
611 TRACE("(%p)->(%s)\n", This, wine_dbgstr_longlong(tStart));
612
613 if(This->filter.state == State_Running)
614 return S_OK;
615
616 if(This->mode != INTERLEAVE_FULL) {
617 FIXME("mode not supported (%d)\n", This->mode);
618 return E_NOTIMPL;
619 }
620
621 if(tStart)
622 FIXME("tStart parameter ignored\n");
623
624 for(i=0; i<This->input_pin_no; i++) {
625 IMediaSeeking *ms;
626 LONGLONG cur, stop;
627
628 if(!This->in[i]->pin.pin.pConnectedTo)
629 continue;
630
631 hr = IPin_QueryInterface(This->in[i]->pin.pin.pConnectedTo,
632 &IID_IMediaSeeking, (void**)&ms);
633 if(FAILED(hr))
634 continue;
635
636 hr = IMediaSeeking_GetPositions(ms, &cur, &stop);
637 if(FAILED(hr)) {
638 IMediaSeeking_Release(ms);
639 continue;
640 }
641
642 FIXME("Use IMediaSeeking to fill stream header\n");
643 IMediaSeeking_Release(ms);
644 }
645
646 if(This->out->pin.pMemInputPin) {
647 hr = IMemInputPin_QueryInterface(This->out->pin.pMemInputPin,
648 &IID_IStream, (void**)&This->out->stream);
649 if(FAILED(hr))
650 return hr;
651 }
652
653 This->idx1_entries = 0;
654 if(!This->idx1_size) {
655 This->idx1_size = 1024;
656 This->idx1 = HeapAlloc(GetProcessHeap(), 0, sizeof(*This->idx1)*This->idx1_size);
657 if(!This->idx1)
658 return E_OUTOFMEMORY;
659 }
660
661 This->out->size = 3*sizeof(RIFFLIST) + sizeof(AVIMAINHEADER) + sizeof(AVIEXTHEADER);
662 This->start = -1;
663 This->stop = -1;
664 memset(&This->avih, 0, sizeof(This->avih));
665 for(i=0; i<This->input_pin_no; i++) {
666 if(!This->in[i]->pin.pin.pConnectedTo)
667 continue;
668
669 This->avih.dwStreams++;
670 This->out->size += sizeof(RIFFLIST) + sizeof(AVISTREAMHEADER) + sizeof(RIFFCHUNK)
671 + This->in[i]->strf->cb + sizeof(This->in[i]->indx_data);
672
673 This->in[i]->strh.dwScale = MulDiv(This->in[i]->avg_time_per_frame, This->interleave, 10000000);
674 This->in[i]->strh.dwRate = This->interleave;
675
676 hr = IMemAllocator_Commit(This->in[i]->pin.pAllocator);
677 if(FAILED(hr)) {
678 if(This->out->stream) {
679 IStream_Release(This->out->stream);
680 This->out->stream = NULL;
681 }
682 return hr;
683 }
684 }
685
686 This->out->movi_off = This->out->size;
687 This->out->size += sizeof(RIFFLIST);
688
689 idx1_add_entry(This, FCC('7','F','x','x'), 0, This->out->movi_off+sizeof(RIFFLIST), 0);
690
691 stream_id = 0;
692 for(i=0; i<This->input_pin_no; i++) {
693 if(!This->in[i]->pin.pin.pConnectedTo)
694 continue;
695
696 This->in[i]->ix_off = This->out->size;
697 This->out->size += sizeof(This->in[i]->ix_data);
698 This->in[i]->ix->fcc = FCC('i','x','0'+stream_id/10,'0'+stream_id%10);
699 This->in[i]->ix->cb = sizeof(This->in[i]->ix_data) - sizeof(RIFFCHUNK);
700 This->in[i]->ix->wLongsPerEntry = 2;
701 This->in[i]->ix->bIndexSubType = 0;
702 This->in[i]->ix->bIndexType = AVI_INDEX_OF_CHUNKS;
703 This->in[i]->ix->dwChunkId = FCC('0'+stream_id/10,'0'+stream_id%10,'d','b');
704 This->in[i]->ix->qwBaseOffset = 0;
705
706 This->in[i]->indx->fcc = ckidAVISUPERINDEX;
707 This->in[i]->indx->cb = sizeof(This->in[i]->indx_data) - sizeof(RIFFCHUNK);
708 This->in[i]->indx->wLongsPerEntry = 4;
709 This->in[i]->indx->bIndexSubType = 0;
710 This->in[i]->indx->bIndexType = AVI_INDEX_OF_INDEXES;
711 This->in[i]->indx->dwChunkId = This->in[i]->ix->dwChunkId;
712 This->in[i]->stream_id = stream_id++;
713 }
714
715 This->out->buf_pos = 0;
716 This->out->out_pos = 0;
717
718 This->avih.fcc = ckidMAINAVIHEADER;
719 This->avih.cb = sizeof(AVIMAINHEADER) - sizeof(RIFFCHUNK);
720 /* TODO: Use first video stream */
721 This->avih.dwMicroSecPerFrame = This->in[0]->avg_time_per_frame/10;
722 This->avih.dwPaddingGranularity = 1;
723 This->avih.dwFlags = AVIF_TRUSTCKTYPE | AVIF_HASINDEX;
724 This->avih.dwWidth = ((BITMAPINFOHEADER*)This->in[0]->strf->data)->biWidth;
725 This->avih.dwHeight = ((BITMAPINFOHEADER*)This->in[0]->strf->data)->biHeight;
726
727 This->filter.state = State_Running;
728 return S_OK;
729}
static HRESULT idx1_add_entry(AviMux *avimux, DWORD ckid, DWORD flags, DWORD off, DWORD len)
Definition: avimux.c:284
#define ckidAVISUPERINDEX
Definition: aviriff.h:194
#define AVIF_HASINDEX
Definition: aviriff.h:46
#define FCC(ch0, ch1, ch2, ch3)
Definition: aviriff.h:38
#define ckidMAINAVIHEADER
Definition: aviriff.h:53
#define AVIF_TRUSTCKTYPE
Definition: aviriff.h:49
struct _aviextheader AVIEXTHEADER
struct _rifflist RIFFLIST
#define AVI_INDEX_OF_INDEXES
Definition: aviriff.h:172
struct _avimainheader AVIMAINHEADER
#define AVI_INDEX_OF_CHUNKS
Definition: aviriff.h:173
struct _riffchunk RIFFCHUNK
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define HeapAlloc
Definition: compat.h:733
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:49
FxCollectionEntry * cur
#define FAILED(hr)
Definition: intsafe.h:51
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
Definition: muldiv.c:25
#define memset(x, y, z)
Definition: compat.h:39
HRESULT hr
Definition: shlfolder.c:183
int64_t LONGLONG
Definition: typedefs.h:68

◆ AviMux_Stop()

static HRESULT WINAPI AviMux_Stop ( IBaseFilter iface)
static

Definition at line 456 of file avimux.c.

457{
459 HRESULT hr;
460 int i;
461
462 TRACE("(%p)\n", This);
463
464 if(This->filter.state == State_Stopped)
465 return S_OK;
466
467 if(This->out->stream) {
468 AVIEXTHEADER dmlh;
469 RIFFCHUNK rc;
470 RIFFLIST rl;
471 int idx1_off, empty_stream;
472
473 empty_stream = This->out->cur_stream;
474 for(i=empty_stream+1; ; i++) {
475 if(i >= This->input_pin_no-1)
476 i = 0;
477 if(i == empty_stream)
478 break;
479
480 This->out->cur_stream = i;
481 hr = flush_queue(This, This->in[This->out->cur_stream], TRUE);
482 if(FAILED(hr))
483 return hr;
484 }
485
486 idx1_off = This->out->size;
487 rc.fcc = ckidAVIOLDINDEX;
488 rc.cb = This->idx1_entries * sizeof(*This->idx1);
489 hr = out_write(This, &rc, sizeof(rc));
490 if(FAILED(hr))
491 return hr;
492 hr = out_write(This, This->idx1, This->idx1_entries * sizeof(*This->idx1));
493 if(FAILED(hr))
494 return hr;
495 /* native writes 8 '\0' characters after the end of RIFF data */
496 i = 0;
497 hr = out_write(This, &i, sizeof(i));
498 if(FAILED(hr))
499 return hr;
500 hr = out_write(This, &i, sizeof(i));
501 if(FAILED(hr))
502 return hr;
503
504 for(i=0; i<This->input_pin_no; i++) {
505 if(!This->in[i]->pin.pin.pConnectedTo)
506 continue;
507
508 hr = out_seek(This, This->in[i]->ix_off);
509 if(FAILED(hr))
510 return hr;
511
512 This->in[i]->indx->aIndex[This->in[i]->indx->nEntriesInUse].qwOffset = This->in[i]->ix_off;
513 This->in[i]->indx->aIndex[This->in[i]->indx->nEntriesInUse].dwSize = sizeof(This->in[i]->ix_data);
514 This->in[i]->indx->aIndex[This->in[i]->indx->nEntriesInUse].dwDuration = This->in[i]->strh.dwLength;
515 if(This->in[i]->indx->nEntriesInUse) {
516 This->in[i]->indx->aIndex[This->in[i]->indx->nEntriesInUse].dwDuration -=
517 This->in[i]->indx->aIndex[This->in[i]->indx->nEntriesInUse-1].dwDuration;
518 }
519 This->in[i]->indx->nEntriesInUse++;
520 hr = out_write(This, This->in[i]->ix, sizeof(This->in[i]->ix_data));
521 if(FAILED(hr))
522 return hr;
523 }
524
525 hr = out_seek(This, 0);
526 if(FAILED(hr))
527 return hr;
528
529 rl.fcc = FCC('R','I','F','F');
530 rl.cb = This->out->size-sizeof(RIFFCHUNK)-2*sizeof(int);
531 rl.fccListType = FCC('A','V','I',' ');
532 hr = out_write(This, &rl, sizeof(rl));
533 if(FAILED(hr))
534 return hr;
535
536 rl.fcc = FCC('L','I','S','T');
537 rl.cb = This->out->movi_off - sizeof(RIFFLIST) - sizeof(RIFFCHUNK);
538 rl.fccListType = FCC('h','d','r','l');
539 hr = out_write(This, &rl, sizeof(rl));
540 if(FAILED(hr))
541 return hr;
542
543 /* FIXME: set This->avih.dwMaxBytesPerSec value */
544 This->avih.dwTotalFrames = (This->stop-This->start) / 10 / This->avih.dwMicroSecPerFrame;
545 hr = out_write(This, &This->avih, sizeof(This->avih));
546 if(FAILED(hr))
547 return hr;
548
549 for(i=0; i<This->input_pin_no; i++) {
550 if(!This->in[i]->pin.pin.pConnectedTo)
551 continue;
552
553 rl.cb = sizeof(FOURCC) + sizeof(AVISTREAMHEADER) + sizeof(RIFFCHUNK) +
554 This->in[i]->strf->cb + sizeof(This->in[i]->indx_data);
556 hr = out_write(This, &rl, sizeof(rl));
557 if(FAILED(hr))
558 return hr;
559
560 hr = out_write(This, &This->in[i]->strh, sizeof(AVISTREAMHEADER));
561 if(FAILED(hr))
562 return hr;
563
564 hr = out_write(This, This->in[i]->strf, sizeof(RIFFCHUNK) + This->in[i]->strf->cb);
565 if(FAILED(hr))
566 return hr;
567
568 hr = out_write(This, This->in[i]->indx, sizeof(This->in[i]->indx_data));
569 if(FAILED(hr))
570 return hr;
571 }
572
573 rl.cb = sizeof(dmlh) + sizeof(FOURCC);
575 hr = out_write(This, &rl, sizeof(rl));
576 if(FAILED(hr))
577 return hr;
578
579 memset(&dmlh, 0, sizeof(dmlh));
580 dmlh.fcc = ckidAVIEXTHEADER;
581 dmlh.cb = sizeof(dmlh) - sizeof(RIFFCHUNK);
582 dmlh.dwGrandFrames = This->in[0]->strh.dwLength;
583 hr = out_write(This, &dmlh, sizeof(dmlh));
584
585 rl.cb = idx1_off - This->out->movi_off - sizeof(RIFFCHUNK);
586 rl.fccListType = FCC('m','o','v','i');
587 out_write(This, &rl, sizeof(rl));
589
590 IStream_Release(This->out->stream);
591 This->out->stream = NULL;
592 }
593
594 This->filter.state = State_Stopped;
595 return S_OK;
596}
static HRESULT flush_queue(AviMux *avimux, AviMuxIn *avimuxin, BOOL closing)
Definition: avimux.c:304
static HRESULT out_write(AviMux *This, const void *data, int size)
Definition: avimux.c:255
static HRESULT out_seek(AviMux *This, int pos)
Definition: avimux.c:235
static HRESULT out_flush(AviMux *This)
Definition: avimux.c:217
#define ckidAVIEXTHEADER
Definition: aviriff.h:72
#define ckidSTREAMLIST
Definition: aviriff.h:81
#define ckidAVIOLDINDEX
Definition: aviriff.h:127
#define ckidODML
Definition: aviriff.h:71
#define TRUE
Definition: types.h:120
DWORD FOURCC
Definition: dmdls.h:25
#define FOURCC(a, b, c, d)
Definition: memtrack.h:4
FOURCC fcc
Definition: aviriff.h:75
DWORD dwGrandFrames
Definition: aviriff.h:77
DWORD cb
Definition: aviriff.h:76
FOURCC fcc
Definition: aviriff.h:27
DWORD cb
Definition: aviriff.h:28
FOURCC fcc
Definition: aviriff.h:33
DWORD cb
Definition: aviriff.h:34
FOURCC fccListType
Definition: aviriff.h:35

◆ AviMuxIn_AddRef()

static ULONG WINAPI AviMuxIn_AddRef ( IPin iface)
static

Definition at line 1756 of file avimux.c.

1757{
1758 AviMux *This = impl_from_in_IPin(iface);
1759 return IBaseFilter_AddRef(&This->filter.IBaseFilter_iface);
1760}
static AviMux * impl_from_in_IPin(IPin *iface)
Definition: avimux.c:1713

◆ AviMuxIn_AMStreamControl_AddRef()

static ULONG WINAPI AviMuxIn_AMStreamControl_AddRef ( IAMStreamControl *  iface)
static

Definition at line 2008 of file avimux.c.

2009{
2010 AviMuxIn *avimuxin = AviMuxIn_from_IAMStreamControl(iface);
2012 return IBaseFilter_AddRef(&This->filter.IBaseFilter_iface);
2013}
static AviMuxIn * AviMuxIn_from_IAMStreamControl(IAMStreamControl *iface)
Definition: avimux.c:1996
BaseInputPin pin
Definition: avimux.c:59
BasePin pin
Definition: strmbase.h:90
IPin IPin_iface
Definition: strmbase.h:35

◆ AviMuxIn_AMStreamControl_GetInfo()

static HRESULT WINAPI AviMuxIn_AMStreamControl_GetInfo ( IAMStreamControl *  iface,
AM_STREAM_INFO pInfo 
)
static

Definition at line 2042 of file avimux.c.

2044{
2045 AviMuxIn *avimuxin = AviMuxIn_from_IAMStreamControl(iface);
2047 FIXME("(%p:%s)->(%p)\n", This, debugstr_w(avimuxin->pin.pin.pinInfo.achName), pInfo);
2048 return E_NOTIMPL;
2049}
PIN_INFO pinInfo
Definition: strmbase.h:38

◆ AviMuxIn_AMStreamControl_QueryInterface()

static HRESULT WINAPI AviMuxIn_AMStreamControl_QueryInterface ( IAMStreamControl *  iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 2001 of file avimux.c.

2003{
2004 AviMuxIn *avimuxin = AviMuxIn_from_IAMStreamControl(iface);
2005 return IPin_QueryInterface(&avimuxin->pin.pin.IPin_iface, riid, ppv);
2006}

◆ AviMuxIn_AMStreamControl_Release()

static ULONG WINAPI AviMuxIn_AMStreamControl_Release ( IAMStreamControl *  iface)
static

Definition at line 2015 of file avimux.c.

2016{
2017 AviMuxIn *avimuxin = AviMuxIn_from_IAMStreamControl(iface);
2019 return IBaseFilter_Release(&This->filter.IBaseFilter_iface);
2020}

◆ AviMuxIn_AMStreamControl_StartAt()

static HRESULT WINAPI AviMuxIn_AMStreamControl_StartAt ( IAMStreamControl *  iface,
const REFERENCE_TIME ptStart,
DWORD  dwCookie 
)
static

Definition at line 2022 of file avimux.c.

2024{
2025 AviMuxIn *avimuxin = AviMuxIn_from_IAMStreamControl(iface);
2027 FIXME("(%p:%s)->(%p %x)\n", This,
2028 debugstr_w(avimuxin->pin.pin.pinInfo.achName), ptStart, dwCookie);
2029 return E_NOTIMPL;
2030}
POINT ptStart
Definition: appswitch.c:60

◆ AviMuxIn_AMStreamControl_StopAt()

static HRESULT WINAPI AviMuxIn_AMStreamControl_StopAt ( IAMStreamControl *  iface,
const REFERENCE_TIME ptStop,
BOOL  bSendExtra,
DWORD  dwCookie 
)
static

Definition at line 2032 of file avimux.c.

2034{
2035 AviMuxIn *avimuxin = AviMuxIn_from_IAMStreamControl(iface);
2037 FIXME("(%p:%s)->(%p %x %x)\n", This, debugstr_w(avimuxin->pin.pin.pinInfo.achName),
2038 ptStop, bSendExtra, dwCookie);
2039 return E_NOTIMPL;
2040}

◆ AviMuxIn_BeginFlush()

static HRESULT WINAPI AviMuxIn_BeginFlush ( IPin iface)
static

Definition at line 1949 of file avimux.c.

1950{
1951 AviMux *This = impl_from_in_IPin(iface);
1952 AviMuxIn *avimuxin = AviMuxIn_from_IPin(iface);
1953 TRACE("(%p:%s)\n", This, debugstr_w(avimuxin->pin.pin.pinInfo.achName));
1954 return BaseInputPinImpl_BeginFlush(iface);
1955}
static AviMuxIn * AviMuxIn_from_IPin(IPin *iface)
Definition: avimux.c:1721
HRESULT WINAPI BaseInputPinImpl_BeginFlush(IPin *iface)
Definition: pin.c:968

◆ AviMuxIn_CheckMediaType()

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

Definition at line 1572 of file avimux.c.

1573{
1574 TRACE("(%p:%s)->(AM_MEDIA_TYPE(%p))\n", base, debugstr_w(base->pinInfo.achName), pmt);
1575 dump_AM_MEDIA_TYPE(pmt);
1576
1577 if(IsEqualIID(&pmt->majortype, &MEDIATYPE_Audio) &&
1578 IsEqualIID(&pmt->formattype, &FORMAT_WaveFormatEx))
1579 return S_OK;
1580 if(IsEqualIID(&pmt->majortype, &MEDIATYPE_Interleaved) &&
1581 IsEqualIID(&pmt->formattype, &FORMAT_DvInfo))
1582 return S_OK;
1583 if(IsEqualIID(&pmt->majortype, &MEDIATYPE_Video) &&
1584 (IsEqualIID(&pmt->formattype, &FORMAT_VideoInfo) ||
1585 IsEqualIID(&pmt->formattype, &FORMAT_DvInfo)))
1586 return S_OK;
1587 return S_FALSE;
1588}
void dump_AM_MEDIA_TYPE(const AM_MEDIA_TYPE *pmt)
Definition: enummedia.c:38
#define S_FALSE
Definition: winerror.h:2357

◆ AviMuxIn_Connect()

static HRESULT WINAPI AviMuxIn_Connect ( IPin iface,
IPin pReceivePin,
const AM_MEDIA_TYPE pmt 
)
static

Definition at line 1768 of file avimux.c.

1770{
1771 AviMux *This = impl_from_in_IPin(iface);
1772 AviMuxIn *avimuxin = AviMuxIn_from_IPin(iface);
1773 TRACE("(%p:%s)->(%p AM_MEDIA_TYPE(%p))\n", This,
1774 debugstr_w(avimuxin->pin.pin.pinInfo.achName), pReceivePin, pmt);
1775 dump_AM_MEDIA_TYPE(pmt);
1776 return BaseInputPinImpl_Connect(iface, pReceivePin, pmt);
1777}
HRESULT WINAPI BaseInputPinImpl_Connect(IPin *iface, IPin *pConnector, const AM_MEDIA_TYPE *pmt)
Definition: pin.c:881

◆ AviMuxIn_ConnectedTo()

static HRESULT WINAPI AviMuxIn_ConnectedTo ( IPin iface,
IPin **  pPin 
)
static

Definition at line 1874 of file avimux.c.

1875{
1876 AviMux *This = impl_from_in_IPin(iface);
1877 AviMuxIn *avimuxin = AviMuxIn_from_IPin(iface);
1878 TRACE("(%p:%s)->(%p)\n", This, debugstr_w(avimuxin->pin.pin.pinInfo.achName), pPin);
1879 return BasePinImpl_ConnectedTo(iface, pPin);
1880}
HRESULT WINAPI BasePinImpl_ConnectedTo(IPin *iface, IPin **ppPin)
Definition: pin.c:222

◆ AviMuxIn_ConnectionMediaType()

static HRESULT WINAPI AviMuxIn_ConnectionMediaType ( IPin iface,
AM_MEDIA_TYPE pmt 
)
static

Definition at line 1882 of file avimux.c.

1883{
1884 AviMux *This = impl_from_in_IPin(iface);
1885 AviMuxIn *avimuxin = AviMuxIn_from_IPin(iface);
1886 TRACE("(%p:%s)->(%p)\n", This, debugstr_w(avimuxin->pin.pin.pinInfo.achName), pmt);
1887 return BasePinImpl_ConnectionMediaType(iface, pmt);
1888}
HRESULT WINAPI BasePinImpl_ConnectionMediaType(IPin *iface, AM_MEDIA_TYPE *pmt)
Definition: pin.c:248

◆ AviMuxIn_Disconnect()

static HRESULT WINAPI AviMuxIn_Disconnect ( IPin iface)
static

Definition at line 1841 of file avimux.c.

1842{
1843 AviMux *This = impl_from_in_IPin(iface);
1844 AviMuxIn *avimuxin = AviMuxIn_from_IPin(iface);
1845 IMediaSample **prev, *cur;
1846 HRESULT hr;
1847
1848 TRACE("(%p:%s)\n", This, debugstr_w(avimuxin->pin.pin.pinInfo.achName));
1849
1850 hr = BasePinImpl_Disconnect(iface);
1851 if(FAILED(hr))
1852 return hr;
1853
1854 IMemAllocator_Decommit(avimuxin->samples_allocator);
1855 while(avimuxin->samples_head) {
1856 cur = avimuxin->samples_head;
1857 hr = IMediaSample_GetPointer(cur, (BYTE**)&prev);
1858 if(FAILED(hr))
1859 break;
1860 prev--;
1861
1862 cur = avimuxin->samples_head;
1863 avimuxin->samples_head = *prev;
1864 IMediaSample_Release(cur);
1865
1866 if(cur == avimuxin->samples_head)
1867 avimuxin->samples_head = NULL;
1868 }
1869 CoTaskMemFree(avimuxin->strf);
1870 avimuxin->strf = NULL;
1871 return hr;
1872}
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
HRESULT WINAPI BasePinImpl_Disconnect(IPin *iface)
Definition: pin.c:197
IMediaSample * samples_head
Definition: avimux.c:92
struct AviMuxIn::@264 * strf
IMemAllocator * samples_allocator
Definition: avimux.c:93
unsigned char BYTE
Definition: xxhash.c:193

◆ AviMuxIn_EndFlush()

static HRESULT WINAPI AviMuxIn_EndFlush ( IPin iface)
static

Definition at line 1957 of file avimux.c.

1958{
1959 AviMux *This = impl_from_in_IPin(iface);
1960 AviMuxIn *avimuxin = AviMuxIn_from_IPin(iface);
1961 TRACE("(%p:%s)\n", This, debugstr_w(avimuxin->pin.pin.pinInfo.achName));
1962 return BaseInputPinImpl_EndFlush(iface);
1963}
HRESULT WINAPI BaseInputPinImpl_EndFlush(IPin *iface)
Definition: pin.c:988

◆ AviMuxIn_EndOfStream()

static HRESULT WINAPI AviMuxIn_EndOfStream ( IPin iface)
static

Definition at line 1941 of file avimux.c.

1942{
1943 AviMux *This = impl_from_in_IPin(iface);
1944 AviMuxIn *avimuxin = AviMuxIn_from_IPin(iface);
1945 TRACE("(%p:%s)\n", This, debugstr_w(avimuxin->pin.pin.pinInfo.achName));
1946 return BaseInputPinImpl_EndOfStream(iface);
1947}
HRESULT WINAPI BaseInputPinImpl_EndOfStream(IPin *iface)
Definition: pin.c:944

◆ AviMuxIn_EnumMediaTypes()

static HRESULT WINAPI AviMuxIn_EnumMediaTypes ( IPin iface,
IEnumMediaTypes **  ppEnum 
)
static

Definition at line 1924 of file avimux.c.

1925{
1926 AviMux *This = impl_from_in_IPin(iface);
1927 AviMuxIn *avimuxin = AviMuxIn_from_IPin(iface);
1928 TRACE("(%p:%s)->(%p)\n", This, debugstr_w(avimuxin->pin.pin.pinInfo.achName), ppEnum);
1929 return BasePinImpl_EnumMediaTypes(iface, ppEnum);
1930}
HRESULT WINAPI BasePinImpl_EnumMediaTypes(IPin *iface, IEnumMediaTypes **ppEnum)
Definition: pin.c:318

◆ AviMuxIn_from_IAMStreamControl()

static AviMuxIn * AviMuxIn_from_IAMStreamControl ( IAMStreamControl *  iface)
inlinestatic

◆ AviMuxIn_from_IMemInputPin()

◆ AviMuxIn_from_IPin()

◆ AviMuxIn_from_IPropertyBag()

static AviMuxIn * AviMuxIn_from_IPropertyBag ( IPropertyBag iface)
inlinestatic

◆ AviMuxIn_from_IQualityControl()

static AviMuxIn * AviMuxIn_from_IQualityControl ( IQualityControl iface)
inlinestatic

◆ AviMuxIn_GetMediaType()

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

Definition at line 1595 of file avimux.c.

1596{
1597 return S_FALSE;
1598}

◆ AviMuxIn_GetMediaTypeVersion()

static LONG WINAPI AviMuxIn_GetMediaTypeVersion ( BasePin base)
static

Definition at line 1590 of file avimux.c.

1591{
1592 return 0;
1593}

◆ AviMuxIn_MemInputPin_AddRef()

static ULONG WINAPI AviMuxIn_MemInputPin_AddRef ( IMemInputPin iface)
static

Definition at line 2073 of file avimux.c.

2074{
2075 AviMuxIn *avimuxin = AviMuxIn_from_IMemInputPin(iface);
2077 return IBaseFilter_AddRef(&This->filter.IBaseFilter_iface);
2078}
static AviMuxIn * AviMuxIn_from_IMemInputPin(IMemInputPin *iface)
Definition: avimux.c:2060

◆ AviMuxIn_MemInputPin_GetAllocator()

static HRESULT WINAPI AviMuxIn_MemInputPin_GetAllocator ( IMemInputPin iface,
IMemAllocator **  ppAllocator 
)
static

Definition at line 2087 of file avimux.c.

2089{
2090 AviMuxIn *avimuxin = AviMuxIn_from_IMemInputPin(iface);
2092
2093 TRACE("(%p:%s)->(%p)\n", This, debugstr_w(avimuxin->pin.pin.pinInfo.achName), ppAllocator);
2094
2095 if(!ppAllocator)
2096 return E_POINTER;
2097
2098 IMemAllocator_AddRef(avimuxin->pin.pAllocator);
2099 *ppAllocator = avimuxin->pin.pAllocator;
2100 return S_OK;
2101}
IMemAllocator * pAllocator
Definition: strmbase.h:93

◆ AviMuxIn_MemInputPin_GetAllocatorRequirements()

static HRESULT WINAPI AviMuxIn_MemInputPin_GetAllocatorRequirements ( IMemInputPin iface,
ALLOCATOR_PROPERTIES pProps 
)
static

Definition at line 2127 of file avimux.c.

2129{
2130 AviMuxIn *avimuxin = AviMuxIn_from_IMemInputPin(iface);
2132
2133 TRACE("(%p:%s)->(%p)\n", This, debugstr_w(avimuxin->pin.pin.pinInfo.achName), pProps);
2134
2135 if(!pProps)
2136 return E_POINTER;
2137
2138 pProps->cbAlign = 1;
2139 pProps->cbPrefix = 8;
2140 return S_OK;
2141}

◆ AviMuxIn_MemInputPin_NotifyAllocator()

static HRESULT WINAPI AviMuxIn_MemInputPin_NotifyAllocator ( IMemInputPin iface,
IMemAllocator pAllocator,
BOOL  bReadOnly 
)
static

Definition at line 2103 of file avimux.c.

2105{
2106 AviMuxIn *avimuxin = AviMuxIn_from_IMemInputPin(iface);
2109 HRESULT hr;
2110
2111 TRACE("(%p:%s)->(%p %x)\n", This, debugstr_w(avimuxin->pin.pin.pinInfo.achName),
2112 pAllocator, bReadOnly);
2113
2114 if(!pAllocator)
2115 return E_POINTER;
2116
2117 memset(&props, 0, sizeof(props));
2118 hr = IMemAllocator_GetProperties(pAllocator, &props);
2119 if(FAILED(hr))
2120 return hr;
2121
2122 props.cbAlign = 1;
2123 props.cbPrefix = 8;
2124 return IMemAllocator_SetProperties(avimuxin->pin.pAllocator, &props, &props);
2125}
static const WCHAR props[]
Definition: wbemdisp.c:288

◆ AviMuxIn_MemInputPin_QueryInterface()

static HRESULT WINAPI AviMuxIn_MemInputPin_QueryInterface ( IMemInputPin iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 2066 of file avimux.c.

2068{
2069 AviMuxIn *avimuxin = AviMuxIn_from_IMemInputPin(iface);
2070 return IPin_QueryInterface(&avimuxin->pin.pin.IPin_iface, riid, ppv);
2071}

◆ AviMuxIn_MemInputPin_Receive()

static HRESULT WINAPI AviMuxIn_MemInputPin_Receive ( IMemInputPin iface,
IMediaSample pSample 
)
static

Definition at line 2143 of file avimux.c.

2145{
2146 AviMuxIn *avimuxin = AviMuxIn_from_IMemInputPin(iface);
2148
2149 TRACE("(%p:%s)->(%p)\n", This, debugstr_w(avimuxin->pin.pin.pinInfo.achName), pSample);
2150
2151 return avimuxin->pin.pFuncsTable->pfnReceive(&avimuxin->pin, pSample);
2152}
const struct BaseInputPinFuncTable * pFuncsTable
Definition: strmbase.h:97

◆ AviMuxIn_MemInputPin_ReceiveCanBlock()

static HRESULT WINAPI AviMuxIn_MemInputPin_ReceiveCanBlock ( IMemInputPin iface)
static

Definition at line 2174 of file avimux.c.

2175{
2176 AviMuxIn *avimuxin = AviMuxIn_from_IMemInputPin(iface);
2178 HRESULT hr;
2179
2180 TRACE("(%p:%s)\n", This, debugstr_w(avimuxin->pin.pin.pinInfo.achName));
2181
2182 if(!This->out->pin.pMemInputPin)
2183 return S_FALSE;
2184
2185 hr = IMemInputPin_ReceiveCanBlock(This->out->pin.pMemInputPin);
2186 return hr != S_FALSE ? S_OK : S_FALSE;
2187}

◆ AviMuxIn_MemInputPin_ReceiveMultiple()

static HRESULT WINAPI AviMuxIn_MemInputPin_ReceiveMultiple ( IMemInputPin iface,
IMediaSample **  pSamples,
LONG  nSamples,
LONG nSamplesProcessed 
)
static

Definition at line 2154 of file avimux.c.

2156{
2157 AviMuxIn *avimuxin = AviMuxIn_from_IMemInputPin(iface);
2159 HRESULT hr = S_OK;
2160
2161 TRACE("(%p:%s)->(%p %d %p)\n", This, debugstr_w(avimuxin->pin.pin.pinInfo.achName),
2162 pSamples, nSamples, nSamplesProcessed);
2163
2164 for(*nSamplesProcessed=0; *nSamplesProcessed<nSamples; (*nSamplesProcessed)++)
2165 {
2166 hr = avimuxin->pin.pFuncsTable->pfnReceive(&avimuxin->pin, pSamples[*nSamplesProcessed]);
2167 if(hr != S_OK)
2168 break;
2169 }
2170
2171 return hr;
2172}

◆ AviMuxIn_MemInputPin_Release()

static ULONG WINAPI AviMuxIn_MemInputPin_Release ( IMemInputPin iface)
static

Definition at line 2080 of file avimux.c.

2081{
2082 AviMuxIn *avimuxin = AviMuxIn_from_IMemInputPin(iface);
2084 return IBaseFilter_Release(&This->filter.IBaseFilter_iface);
2085}

◆ AviMuxIn_NewSegment()

static HRESULT WINAPI AviMuxIn_NewSegment ( IPin iface,
REFERENCE_TIME  tStart,
REFERENCE_TIME  tStop,
double  dRate 
)
static

Definition at line 1965 of file avimux.c.

1967{
1968 AviMux *This = impl_from_in_IPin(iface);
1969 AviMuxIn *avimuxin = AviMuxIn_from_IPin(iface);
1970 TRACE("(%p:%s)->(%s %s %f)\n", This, debugstr_w(avimuxin->pin.pin.pinInfo.achName),
1971 wine_dbgstr_longlong(tStart), wine_dbgstr_longlong(tStop), dRate);
1972 return BasePinImpl_NewSegment(iface, tStart, tStop, dRate);
1973}
HRESULT WINAPI BasePinImpl_NewSegment(IPin *iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
Definition: pin.c:338

◆ AviMuxIn_PropertyBag_AddRef()

static ULONG WINAPI AviMuxIn_PropertyBag_AddRef ( IPropertyBag iface)
static

Definition at line 2213 of file avimux.c.

2214{
2215 AviMuxIn *avimuxin = AviMuxIn_from_IPropertyBag(iface);
2217 return IBaseFilter_AddRef(&This->filter.IBaseFilter_iface);
2218}
static AviMuxIn * AviMuxIn_from_IPropertyBag(IPropertyBag *iface)
Definition: avimux.c:2201

◆ AviMuxIn_PropertyBag_QueryInterface()

static HRESULT WINAPI AviMuxIn_PropertyBag_QueryInterface ( IPropertyBag iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 2206 of file avimux.c.

2208{
2209 AviMuxIn *avimuxin = AviMuxIn_from_IPropertyBag(iface);
2210 return IPin_QueryInterface(&avimuxin->pin.pin.IPin_iface, riid, ppv);
2211}

◆ AviMuxIn_PropertyBag_Read()

static HRESULT WINAPI AviMuxIn_PropertyBag_Read ( IPropertyBag iface,
LPCOLESTR  pszPropName,
VARIANT pVar,
IErrorLog pErrorLog 
)
static

Definition at line 2227 of file avimux.c.

2229{
2230 AviMuxIn *avimuxin = AviMuxIn_from_IPropertyBag(iface);
2232 FIXME("(%p:%s)->(%s %p %p)\n", This, debugstr_w(avimuxin->pin.pin.pinInfo.achName),
2233 debugstr_w(pszPropName), pVar, pErrorLog);
2234 return E_NOTIMPL;
2235}

◆ AviMuxIn_PropertyBag_Release()

static ULONG WINAPI AviMuxIn_PropertyBag_Release ( IPropertyBag iface)
static

Definition at line 2220 of file avimux.c.

2221{
2222 AviMuxIn *avimuxin = AviMuxIn_from_IPropertyBag(iface);
2224 return IBaseFilter_Release(&This->filter.IBaseFilter_iface);
2225}

◆ AviMuxIn_PropertyBag_Write()

static HRESULT WINAPI AviMuxIn_PropertyBag_Write ( IPropertyBag iface,
LPCOLESTR  pszPropName,
VARIANT pVar 
)
static

Definition at line 2237 of file avimux.c.

2239{
2240 AviMuxIn *avimuxin = AviMuxIn_from_IPropertyBag(iface);
2242 FIXME("(%p:%s)->(%s %p)\n", This, debugstr_w(avimuxin->pin.pin.pinInfo.achName),
2243 debugstr_w(pszPropName), pVar);
2244 return E_NOTIMPL;
2245}

◆ AviMuxIn_QualityControl_AddRef()

static ULONG WINAPI AviMuxIn_QualityControl_AddRef ( IQualityControl iface)
static

Definition at line 2267 of file avimux.c.

2268{
2269 AviMuxIn *avimuxin = AviMuxIn_from_IQualityControl(iface);
2271 return IBaseFilter_AddRef(&This->filter.IBaseFilter_iface);
2272}
static AviMuxIn * AviMuxIn_from_IQualityControl(IQualityControl *iface)
Definition: avimux.c:2255

◆ AviMuxIn_QualityControl_Notify()

static HRESULT WINAPI AviMuxIn_QualityControl_Notify ( IQualityControl iface,
IBaseFilter pSelf,
Quality  q 
)
static

Definition at line 2281 of file avimux.c.

2283{
2284 AviMuxIn *avimuxin = AviMuxIn_from_IQualityControl(iface);
2286 FIXME("(%p:%s)->(%p { 0x%x %u %s %s })\n", This, debugstr_w(avimuxin->pin.pin.pinInfo.achName), pSelf,
2287 q.Type, q.Proportion,
2288 wine_dbgstr_longlong(q.Late),
2289 wine_dbgstr_longlong(q.TimeStamp));
2290 return E_NOTIMPL;
2291}
GLdouble GLdouble GLdouble GLdouble q
Definition: gl.h:2063

◆ AviMuxIn_QualityControl_QueryInterface()

static HRESULT WINAPI AviMuxIn_QualityControl_QueryInterface ( IQualityControl iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 2260 of file avimux.c.

2262{
2263 AviMuxIn *avimuxin = AviMuxIn_from_IQualityControl(iface);
2264 return IPin_QueryInterface(&avimuxin->pin.pin.IPin_iface, riid, ppv);
2265}

◆ AviMuxIn_QualityControl_Release()

static ULONG WINAPI AviMuxIn_QualityControl_Release ( IQualityControl iface)
static

Definition at line 2274 of file avimux.c.

2275{
2276 AviMuxIn *avimuxin = AviMuxIn_from_IQualityControl(iface);
2278 return IBaseFilter_Release(&This->filter.IBaseFilter_iface);
2279}

◆ AviMuxIn_QualityControl_SetSink()

static HRESULT WINAPI AviMuxIn_QualityControl_SetSink ( IQualityControl iface,
IQualityControl piqc 
)
static

Definition at line 2293 of file avimux.c.

2295{
2296 AviMuxIn *avimuxin = AviMuxIn_from_IQualityControl(iface);
2298 FIXME("(%p:%s)->(%p)\n", This, debugstr_w(avimuxin->pin.pin.pinInfo.achName), piqc);
2299 return E_NOTIMPL;
2300}

◆ AviMuxIn_QueryAccept()

static HRESULT WINAPI AviMuxIn_QueryAccept ( IPin iface,
const AM_MEDIA_TYPE pmt 
)
static

Definition at line 1914 of file avimux.c.

1915{
1916 AviMux *This = impl_from_in_IPin(iface);
1917 AviMuxIn *avimuxin = AviMuxIn_from_IPin(iface);
1918 TRACE("(%p:%s)->(AM_MEDIA_TYPE(%p))\n", This,
1919 debugstr_w(avimuxin->pin.pin.pinInfo.achName), pmt);
1920 dump_AM_MEDIA_TYPE(pmt);
1921 return BasePinImpl_QueryAccept(iface, pmt);
1922}
HRESULT WINAPI BasePinImpl_QueryAccept(IPin *iface, const AM_MEDIA_TYPE *pmt)
Definition: pin.c:311

◆ AviMuxIn_QueryDirection()

static HRESULT WINAPI AviMuxIn_QueryDirection ( IPin iface,
PIN_DIRECTION pPinDir 
)
static

Definition at line 1898 of file avimux.c.

1899{
1900 AviMux *This = impl_from_in_IPin(iface);
1901 AviMuxIn *avimuxin = AviMuxIn_from_IPin(iface);
1902 TRACE("(%p:%s)->(%p)\n", This, debugstr_w(avimuxin->pin.pin.pinInfo.achName), pPinDir);
1903 return BasePinImpl_QueryDirection(iface, pPinDir);
1904}
HRESULT WINAPI BasePinImpl_QueryDirection(IPin *iface, PIN_DIRECTION *pPinDir)
Definition: pin.c:285

◆ AviMuxIn_QueryId()

static HRESULT WINAPI AviMuxIn_QueryId ( IPin iface,
LPWSTR Id 
)
static

Definition at line 1906 of file avimux.c.

1907{
1908 AviMux *This = impl_from_in_IPin(iface);
1909 AviMuxIn *avimuxin = AviMuxIn_from_IPin(iface);
1910 TRACE("(%p:%s)->(%p)\n", This, debugstr_w(avimuxin->pin.pin.pinInfo.achName), Id);
1911 return BasePinImpl_QueryId(iface, Id);
1912}
HRESULT WINAPI BasePinImpl_QueryId(IPin *iface, LPWSTR *Id)
Definition: pin.c:296

◆ AviMuxIn_QueryInterface()

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

Definition at line 1728 of file avimux.c.

1729{
1730 AviMux *This = impl_from_in_IPin(iface);
1731 AviMuxIn *avimuxin = AviMuxIn_from_IPin(iface);
1732
1733 TRACE("(%p:%s)->(%s %p)\n", This, debugstr_w(avimuxin->pin.pin.pinInfo.achName),
1735
1737 *ppv = &avimuxin->pin.pin.IPin_iface;
1738 else if(IsEqualIID(riid, &IID_IAMStreamControl))
1739 *ppv = &avimuxin->IAMStreamControl_iface;
1740 else if(IsEqualIID(riid, &IID_IMemInputPin))
1741 *ppv = &avimuxin->pin.IMemInputPin_iface;
1742 else if(IsEqualIID(riid, &IID_IPropertyBag))
1743 *ppv = &avimuxin->IPropertyBag_iface;
1744 else if(IsEqualIID(riid, &IID_IQualityControl))
1745 *ppv = &avimuxin->IQualityControl_iface;
1746 else {
1747 FIXME("no interface for %s\n", debugstr_guid(riid));
1748 *ppv = NULL;
1749 return E_NOINTERFACE;
1750 }
1751
1752 IUnknown_AddRef((IUnknown*)*ppv);
1753 return S_OK;
1754}
const GUID IID_IPropertyBag
const GUID IID_IPin
Definition: pincontrol.cpp:15
IAMStreamControl IAMStreamControl_iface
Definition: avimux.c:60
IPropertyBag IPropertyBag_iface
Definition: avimux.c:61
IQualityControl IQualityControl_iface
Definition: avimux.c:62
IMemInputPin IMemInputPin_iface
Definition: strmbase.h:92

◆ AviMuxIn_QueryInternalConnections()

static HRESULT WINAPI AviMuxIn_QueryInternalConnections ( IPin iface,
IPin **  apPin,
ULONG nPin 
)
static

Definition at line 1932 of file avimux.c.

1934{
1935 AviMux *This = impl_from_in_IPin(iface);
1936 AviMuxIn *avimuxin = AviMuxIn_from_IPin(iface);
1937 TRACE("(%p:%s)->(%p %p)\n", This, debugstr_w(avimuxin->pin.pin.pinInfo.achName), apPin, nPin);
1938 return BasePinImpl_QueryInternalConnections(iface, apPin, nPin);
1939}
HRESULT WINAPI BasePinImpl_QueryInternalConnections(IPin *iface, IPin **apPin, ULONG *cPin)
Definition: pin.c:329

◆ AviMuxIn_QueryPinInfo()

static HRESULT WINAPI AviMuxIn_QueryPinInfo ( IPin iface,
PIN_INFO pInfo 
)
static

Definition at line 1890 of file avimux.c.

1891{
1892 AviMux *This = impl_from_in_IPin(iface);
1893 AviMuxIn *avimuxin = AviMuxIn_from_IPin(iface);
1894 TRACE("(%p:%s)->(%p)\n", This, debugstr_w(avimuxin->pin.pin.pinInfo.achName), pInfo);
1895 return BasePinImpl_QueryPinInfo(iface, pInfo);
1896}
HRESULT WINAPI BasePinImpl_QueryPinInfo(IPin *iface, PIN_INFO *pInfo)
Definition: pin.c:273

◆ AviMuxIn_Receive()

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

Definition at line 1600 of file avimux.c.

1601{
1603 AviMux *avimux = impl_from_IBaseFilter(base->pin.pinInfo.pFilter);
1604 REFERENCE_TIME start, stop;
1605 IMediaSample *sample;
1606 int frames_no;
1607 IMediaSample2 *ms2;
1608 BYTE *frame, *buf;
1610 DWORD flags;
1611 HRESULT hr;
1612
1613 TRACE("(%p:%s)->(%p)\n", base, debugstr_w(base->pin.pinInfo.achName), pSample);
1614
1615 hr = IMediaSample_QueryInterface(pSample, &IID_IMediaSample2, (void**)&ms2);
1616 if(SUCCEEDED(hr)) {
1618
1619 memset(&props, 0, sizeof(props));
1620 hr = IMediaSample2_GetProperties(ms2, sizeof(props), (BYTE*)&props);
1621 IMediaSample2_Release(ms2);
1622 if(FAILED(hr))
1623 return hr;
1624
1625 flags = props.dwSampleFlags;
1626 frame = props.pbBuffer;
1627 size = props.lActual;
1628 }else {
1629 flags = IMediaSample_IsSyncPoint(pSample) == S_OK ? AM_SAMPLE_SPLICEPOINT : 0;
1630 hr = IMediaSample_GetPointer(pSample, &frame);
1631 if(FAILED(hr))
1632 return hr;
1633 size = IMediaSample_GetActualDataLength(pSample);
1634 }
1635
1636 if(!avimuxin->pin.pin.mtCurrent.bTemporalCompression)
1638
1639 hr = IMediaSample_GetTime(pSample, &start, &stop);
1640 if(FAILED(hr))
1641 return hr;
1642
1643 if(avimuxin->stop>stop)
1645
1646 if(avimux->start == -1)
1647 avimux->start = start;
1648 if(avimux->stop < stop)
1649 avimux->stop = stop;
1650
1651 if(avimux->avih.dwSuggestedBufferSize < ALIGN(size)+sizeof(RIFFCHUNK))
1652 avimux->avih.dwSuggestedBufferSize = ALIGN(size) + sizeof(RIFFCHUNK);
1653 if(avimuxin->strh.dwSuggestedBufferSize < ALIGN(size)+sizeof(RIFFCHUNK))
1654 avimuxin->strh.dwSuggestedBufferSize = ALIGN(size) + sizeof(RIFFCHUNK);
1655
1656 frames_no = 1;
1657 if(avimuxin->stop!=-1 && start > avimuxin->stop) {
1658 frames_no += (double)(start - avimuxin->stop) / 10000000
1659 * avimuxin->strh.dwRate / avimuxin->strh.dwScale + 0.5;
1660 }
1661 avimuxin->stop = stop;
1662
1663 while(--frames_no) {
1664 /* TODO: store all control frames in one buffer */
1665 hr = IMemAllocator_GetBuffer(avimuxin->samples_allocator, &sample, NULL, NULL, 0);
1666 if(FAILED(hr))
1667 return hr;
1668 hr = IMediaSample_SetActualDataLength(sample, 0);
1669 if(SUCCEEDED(hr))
1670 hr = IMediaSample_SetDiscontinuity(sample, TRUE);
1671 if(SUCCEEDED(hr))
1672 hr = IMediaSample_SetSyncPoint(sample, FALSE);
1673 if(SUCCEEDED(hr))
1674 hr = queue_sample(avimux, avimuxin, sample);
1675 IMediaSample_Release(sample);
1676 if(FAILED(hr))
1677 return hr;
1678 }
1679
1680 hr = IMemAllocator_GetBuffer(avimuxin->samples_allocator, &sample, NULL, NULL, 0);
1681 if(FAILED(hr))
1682 return hr;
1683 max_size = IMediaSample_GetSize(sample);
1684 if(size > max_size)
1685 size = max_size;
1686 hr = IMediaSample_SetActualDataLength(sample, size);
1687 if(SUCCEEDED(hr))
1688 hr = IMediaSample_SetDiscontinuity(sample, FALSE);
1689 if(SUCCEEDED(hr))
1690 hr = IMediaSample_SetSyncPoint(sample, flags & AM_SAMPLE_SPLICEPOINT);
1691 /* TODO: avoid unnecessary copying */
1692 if(SUCCEEDED(hr))
1693 hr = IMediaSample_GetPointer(sample, &buf);
1694 if(SUCCEEDED(hr)) {
1695 memcpy(buf, frame, size);
1696 hr = queue_sample(avimux, avimuxin, sample);
1697 }
1698 IMediaSample_Release(sample);
1699
1700 return hr;
1701}
static HRESULT queue_sample(AviMux *avimux, AviMuxIn *avimuxin, IMediaSample *sample)
Definition: avimux.c:429
#define ALIGN(x)
Definition: avimux.c:40
@ AM_SAMPLE_SPLICEPOINT
Definition: axcore.idl:437
static INT max_size
Definition: history.c:51
LONGLONG REFERENCE_TIME
Definition: dmusicks.h:9
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint start
Definition: gl.h:1545
GLsizeiptr size
Definition: glext.h:5919
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLbitfield flags
Definition: glext.h:7161
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static const char mbstate_t *static wchar_t const char mbstate_t *static const wchar_t int *static double
Definition: string.c:80
REFERENCE_TIME stop
Definition: avimux.c:65
AVISTREAMHEADER strh
Definition: avimux.c:70
REFERENCE_TIME stop
Definition: avimux.c:112
REFERENCE_TIME start
Definition: avimux.c:112
AVIMAINHEADER avih
Definition: avimux.c:113
AM_MEDIA_TYPE mtCurrent
Definition: strmbase.h:40
DWORD dwSuggestedBufferSize
Definition: aviriff.h:65
DWORD dwSuggestedBufferSize
Definition: aviriff.h:112
#define VFW_E_START_TIME_AFTER_END
Definition: vfwmsgs.h:79

◆ AviMuxIn_ReceiveConnection()

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

Definition at line 1779 of file avimux.c.

1781{
1782 AviMux *This = impl_from_in_IPin(iface);
1783 AviMuxIn *avimuxin = AviMuxIn_from_IPin(iface);
1784 HRESULT hr;
1785
1786 TRACE("(%p:%s)->(%p AM_MEDIA_TYPE(%p))\n", This,
1787 debugstr_w(avimuxin->pin.pin.pinInfo.achName), pConnector, pmt);
1788 dump_AM_MEDIA_TYPE(pmt);
1789
1790 if(!pmt)
1791 return E_POINTER;
1792
1793 hr = BaseInputPinImpl_ReceiveConnection(iface, pConnector, pmt);
1794 if(FAILED(hr))
1795 return hr;
1796
1797 if(IsEqualIID(&pmt->majortype, &MEDIATYPE_Video) &&
1798 IsEqualIID(&pmt->formattype, &FORMAT_VideoInfo)) {
1799 ALLOCATOR_PROPERTIES req, act;
1800 VIDEOINFOHEADER *vih;
1801 int size;
1802
1803 vih = (VIDEOINFOHEADER*)pmt->pbFormat;
1804 avimuxin->strh.fcc = ckidSTREAMHEADER;
1805 avimuxin->strh.cb = sizeof(AVISTREAMHEADER) - FIELD_OFFSET(AVISTREAMHEADER, fccType);
1806 avimuxin->strh.fccType = streamtypeVIDEO;
1807 /* FIXME: fccHandler should be set differently */
1808 avimuxin->strh.fccHandler = vih->bmiHeader.biCompression ?
1809 vih->bmiHeader.biCompression : FCC('D','I','B',' ');
1810 avimuxin->avg_time_per_frame = vih->AvgTimePerFrame;
1811 avimuxin->stop = -1;
1812
1813 req.cBuffers = 32;
1814 req.cbBuffer = vih->bmiHeader.biSizeImage;
1815 req.cbAlign = 1;
1816 req.cbPrefix = sizeof(void*);
1817 hr = IMemAllocator_SetProperties(avimuxin->samples_allocator, &req, &act);
1818 if(SUCCEEDED(hr))
1819 hr = IMemAllocator_Commit(avimuxin->samples_allocator);
1820 if(FAILED(hr)) {
1822 return hr;
1823 }
1824
1825 size = pmt->cbFormat - FIELD_OFFSET(VIDEOINFOHEADER, bmiHeader);
1826 avimuxin->strf = CoTaskMemAlloc(sizeof(RIFFCHUNK) + ALIGN(FIELD_OFFSET(BITMAPINFO, bmiColors[vih->bmiHeader.biClrUsed])));
1827 avimuxin->strf->fcc = ckidSTREAMFORMAT;
1828 avimuxin->strf->cb = FIELD_OFFSET(BITMAPINFO, bmiColors[vih->bmiHeader.biClrUsed]);
1829 if(size > avimuxin->strf->cb)
1830 size = avimuxin->strf->cb;
1831 memcpy(avimuxin->strf->data, &vih->bmiHeader, size);
1832 }else {
1833 FIXME("format not supported: %s %s\n", debugstr_guid(&pmt->majortype),
1834 debugstr_guid(&pmt->formattype));
1835 return E_NOTIMPL;
1836 }
1837
1838 return create_input_pin(This);
1839}
static HRESULT create_input_pin(AviMux *)
Definition: avimux.c:2310
#define streamtypeVIDEO
Definition: aviriff.h:92
#define ckidSTREAMHEADER
Definition: aviriff.h:88
#define ckidSTREAMFORMAT
Definition: aviriff.h:125
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:426
HRESULT WINAPI BaseInputPinImpl_ReceiveConnection(IPin *iface, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
Definition: pin.c:889
REFERENCE_TIME avg_time_per_frame
Definition: avimux.c:64
DWORD biCompression
Definition: amvideo.idl:35
DWORD biSizeImage
Definition: amvideo.idl:36
FOURCC fccHandler
Definition: aviriff.h:103
FOURCC fccType
Definition: aviriff.h:102
BITMAPINFOHEADER bmiHeader
Definition: amvideo.idl:189
REFERENCE_TIME AvgTimePerFrame
Definition: amvideo.idl:187
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255

◆ AviMuxIn_Release()

static ULONG WINAPI AviMuxIn_Release ( IPin iface)
static

Definition at line 1762 of file avimux.c.

1763{
1764 AviMux *This = impl_from_in_IPin(iface);
1765 return IBaseFilter_Release(&This->filter.IBaseFilter_iface);
1766}

◆ AviMuxOut_AddRef()

static ULONG WINAPI AviMuxOut_AddRef ( IPin iface)
static

Definition at line 1348 of file avimux.c.

1349{
1350 AviMux *This = impl_from_out_IPin(iface);
1351 return IBaseFilter_AddRef(&This->filter.IBaseFilter_iface);
1352}
static AviMux * impl_from_out_IPin(IPin *iface)
Definition: avimux.c:1320

◆ AviMuxOut_AttemptConnection()

static HRESULT WINAPI AviMuxOut_AttemptConnection ( BasePin base,
IPin pReceivePin,
const AM_MEDIA_TYPE pmt 
)
static

Definition at line 1234 of file avimux.c.

1236{
1238 HRESULT hr;
1239
1240 TRACE("(%p)->(%p AM_MEDIA_TYPE(%p))\n", base, pReceivePin, pmt);
1241 dump_AM_MEDIA_TYPE(pmt);
1242
1243 hr = IPin_QueryDirection(pReceivePin, &dir);
1244 if(hr==S_OK && dir!=PINDIR_INPUT)
1246
1247 return BaseOutputPinImpl_AttemptConnection(base, pReceivePin, pmt);
1248}
unsigned int dir
Definition: maze.c:112
enum _PinDirection PIN_DIRECTION
@ PINDIR_INPUT
Definition: axcore.idl:41
HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(BasePin *This, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
Definition: pin.c:712
#define VFW_E_INVALID_DIRECTION
Definition: vfwmsgs.h:47

◆ AviMuxOut_BeginFlush()

static HRESULT WINAPI AviMuxOut_BeginFlush ( IPin iface)
static

Definition at line 1477 of file avimux.c.

1478{
1479 AviMux *This = impl_from_out_IPin(iface);
1480 TRACE("(%p)\n", This);
1481 return BaseOutputPinImpl_BeginFlush(iface);
1482}
HRESULT WINAPI BaseOutputPinImpl_BeginFlush(IPin *iface)
Definition: pin.c:536

◆ AviMuxOut_BreakConnect()

static HRESULT WINAPI AviMuxOut_BreakConnect ( BaseOutputPin base)
static

Definition at line 1302 of file avimux.c.

1303{
1304 FIXME("(%p)\n", base);
1305 return E_NOTIMPL;
1306}

◆ AviMuxOut_Connect()

static HRESULT WINAPI AviMuxOut_Connect ( IPin iface,
IPin pReceivePin,
const AM_MEDIA_TYPE pmt 
)
static

Definition at line 1360 of file avimux.c.

1362{
1363 AviMux *This = impl_from_out_IPin(iface);
1364 HRESULT hr;
1365 int i;
1366
1367 TRACE("(%p)->(%p AM_MEDIA_TYPE(%p))\n", This, pReceivePin, pmt);
1368 dump_AM_MEDIA_TYPE(pmt);
1369
1370 hr = BaseOutputPinImpl_Connect(iface, pReceivePin, pmt);
1371 if(FAILED(hr))
1372 return hr;
1373
1374 for(i=0; i<This->input_pin_no; i++) {
1375 if(!This->in[i]->pin.pin.pConnectedTo)
1376 continue;
1377
1378 hr = IFilterGraph_Reconnect(This->filter.filterInfo.pGraph, &This->in[i]->pin.pin.IPin_iface);
1379 if(FAILED(hr)) {
1381 break;
1382 }
1383 }
1384
1385 if(hr == S_OK)
1386 IBaseFilter_AddRef(&This->filter.IBaseFilter_iface);
1387 return hr;
1388}
HRESULT WINAPI BaseOutputPinImpl_Connect(IPin *iface, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
Definition: pin.c:405
HRESULT WINAPI BaseOutputPinImpl_Disconnect(IPin *iface)
Definition: pin.c:497

◆ AviMuxOut_ConnectedTo()

static HRESULT WINAPI AviMuxOut_ConnectedTo ( IPin iface,
IPin **  pPin 
)
static

Definition at line 1412 of file avimux.c.

1413{
1414 AviMux *This = impl_from_out_IPin(iface);
1415 TRACE("(%p)->(%p)\n", This, pPin);
1416 return BasePinImpl_ConnectedTo(iface, pPin);
1417}

◆ AviMuxOut_ConnectionMediaType()

static HRESULT WINAPI AviMuxOut_ConnectionMediaType ( IPin iface,
AM_MEDIA_TYPE pmt 
)
static

Definition at line 1419 of file avimux.c.

1420{
1421 AviMux *This = impl_from_out_IPin(iface);
1422 TRACE("(%p)->(%p)\n", This, pmt);
1423 return BasePinImpl_ConnectionMediaType(iface, pmt);
1424}

◆ AviMuxOut_DecideAllocator()

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

Definition at line 1276 of file avimux.c.

1278{
1279 ALLOCATOR_PROPERTIES req, actual;
1280 HRESULT hr;
1281
1282 TRACE("(%p)->(%p %p)\n", base, pPin, pAlloc);
1283
1285 if(FAILED(hr))
1286 return hr;
1287
1288 hr = IMemInputPin_GetAllocatorRequirements(pPin, &req);
1289 if(FAILED(hr))
1290 req.cbAlign = 1;
1291 req.cBuffers = 32;
1292 req.cbBuffer = 0;
1293 req.cbPrefix = 0;
1294
1295 hr = IMemAllocator_SetProperties(*pAlloc, &req, &actual);
1296 if(FAILED(hr))
1297 return hr;
1298
1299 return IMemInputPin_NotifyAllocator(pPin, *pAlloc, TRUE);
1300}
HRESULT WINAPI BaseOutputPinImpl_InitAllocator(BaseOutputPin *This, IMemAllocator **pMemAlloc)
Definition: pin.c:678

◆ AviMuxOut_Disconnect()

static HRESULT WINAPI AviMuxOut_Disconnect ( IPin iface)
static

Definition at line 1399 of file avimux.c.

1400{
1401 AviMux *This = impl_from_out_IPin(iface);
1402 HRESULT hr;
1403
1404 TRACE("(%p)\n", This);
1405
1407 if(hr == S_OK)
1408 IBaseFilter_Release(&This->filter.IBaseFilter_iface);
1409 return hr;
1410}

◆ AviMuxOut_EndFlush()

static HRESULT WINAPI AviMuxOut_EndFlush ( IPin iface)
static

Definition at line 1484 of file avimux.c.

1485{
1486 AviMux *This = impl_from_out_IPin(iface);
1487 TRACE("(%p)\n", This);
1488 return BaseOutputPinImpl_EndFlush(iface);
1489}
HRESULT WINAPI BaseOutputPinImpl_EndFlush(IPin *iface)
Definition: pin.c:545

◆ AviMuxOut_EndOfStream()

static HRESULT WINAPI AviMuxOut_EndOfStream ( IPin iface)
static

Definition at line 1470 of file avimux.c.

1471{
1472 AviMux *This = impl_from_out_IPin(iface);
1473 TRACE("(%p)\n", This);
1474 return BaseOutputPinImpl_EndOfStream(iface);
1475}
HRESULT WINAPI BaseOutputPinImpl_EndOfStream(IPin *iface)
Definition: pin.c:527

◆ AviMuxOut_EnumMediaTypes()

static HRESULT WINAPI AviMuxOut_EnumMediaTypes ( IPin iface,
IEnumMediaTypes **  ppEnum 
)
static

Definition at line 1455 of file avimux.c.

1456{
1457 AviMux *This = impl_from_out_IPin(iface);
1458 TRACE("(%p)->(%p)\n", This, ppEnum);
1459 return BasePinImpl_EnumMediaTypes(iface, ppEnum);
1460}

◆ AviMuxOut_GetMediaType()

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

Definition at line 1255 of file avimux.c.

1256{
1257 TRACE("(%p)->(%d %p)\n", base, iPosition, amt);
1258
1259 if(iPosition < 0)
1260 return E_INVALIDARG;
1261 if(iPosition > 0)
1262 return VFW_S_NO_MORE_ITEMS;
1263
1264 amt->majortype = MEDIATYPE_Stream;
1265 amt->subtype = MEDIASUBTYPE_Avi;
1266 amt->bFixedSizeSamples = TRUE;
1267 amt->bTemporalCompression = FALSE;
1268 amt->lSampleSize = 1;
1269 amt->formattype = GUID_NULL;
1270 amt->pUnk = NULL;
1271 amt->cbFormat = 0;
1272 amt->pbFormat = NULL;
1273 return S_OK;
1274}
#define E_INVALIDARG
Definition: ddrawi.h:101
#define GUID_NULL
Definition: ks.h:106
#define VFW_S_NO_MORE_ITEMS
Definition: vfwmsgs.h:19

◆ AviMuxOut_GetMediaTypeVersion()

static LONG WINAPI AviMuxOut_GetMediaTypeVersion ( BasePin base)
static

Definition at line 1250 of file avimux.c.

1251{
1252 return 0;
1253}

◆ AviMuxOut_NewSegment()

static HRESULT WINAPI AviMuxOut_NewSegment ( IPin iface,
REFERENCE_TIME  tStart,
REFERENCE_TIME  tStop,
double  dRate 
)
static

Definition at line 1491 of file avimux.c.

1493{
1494 AviMux *This = impl_from_out_IPin(iface);
1495 TRACE("(%p)->(%s %s %f)\n", This, wine_dbgstr_longlong(tStart), wine_dbgstr_longlong(tStop), dRate);
1496 return BasePinImpl_NewSegment(iface, tStart, tStop, dRate);
1497}

◆ AviMuxOut_QualityControl_AddRef()

static ULONG WINAPI AviMuxOut_QualityControl_AddRef ( IQualityControl iface)
static

Definition at line 1533 of file avimux.c.

1534{
1536 return IBaseFilter_AddRef(&This->filter.IBaseFilter_iface);
1537}
static AviMux * impl_from_out_IQualityControl(IQualityControl *iface)
Definition: avimux.c:1520

◆ AviMuxOut_QualityControl_Notify()

static HRESULT WINAPI AviMuxOut_QualityControl_Notify ( IQualityControl iface,
IBaseFilter pSelf,
Quality  q 
)
static

Definition at line 1545 of file avimux.c.

1547{
1549 FIXME("(%p)->(%p { 0x%x %u %s %s })\n", This, pSelf,
1550 q.Type, q.Proportion,
1551 wine_dbgstr_longlong(q.Late),
1552 wine_dbgstr_longlong(q.TimeStamp));
1553 return E_NOTIMPL;
1554}

◆ AviMuxOut_QualityControl_QueryInterface()

static HRESULT WINAPI AviMuxOut_QualityControl_QueryInterface ( IQualityControl iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 1526 of file avimux.c.

1528{
1530 return IPin_QueryInterface(&This->out->pin.pin.IPin_iface, riid, ppv);
1531}

◆ AviMuxOut_QualityControl_Release()

static ULONG WINAPI AviMuxOut_QualityControl_Release ( IQualityControl iface)
static

Definition at line 1539 of file avimux.c.

1540{
1542 return IBaseFilter_Release(&This->filter.IBaseFilter_iface);
1543}

◆ AviMuxOut_QualityControl_SetSink()

static HRESULT WINAPI AviMuxOut_QualityControl_SetSink ( IQualityControl iface,
IQualityControl piqc 
)
static

Definition at line 1556 of file avimux.c.

1558{
1560 FIXME("(%p)->(%p)\n", This, piqc);
1561 return E_NOTIMPL;
1562}

◆ AviMuxOut_QueryAccept()

static HRESULT WINAPI AviMuxOut_QueryAccept ( IPin iface,
const AM_MEDIA_TYPE pmt 
)
static

Definition at line 1447 of file avimux.c.

1448{
1449 AviMux *This = impl_from_out_IPin(iface);
1450 TRACE("(%p)->(AM_MEDIA_TYPE(%p))\n", This, pmt);
1451 dump_AM_MEDIA_TYPE(pmt);
1452 return BasePinImpl_QueryAccept(iface, pmt);
1453}

◆ AviMuxOut_QueryDirection()

static HRESULT WINAPI AviMuxOut_QueryDirection ( IPin iface,
PIN_DIRECTION pPinDir 
)
static

Definition at line 1433 of file avimux.c.

1434{
1435 AviMux *This = impl_from_out_IPin(iface);
1436 TRACE("(%p)->(%p)\n", This, pPinDir);
1437 return BasePinImpl_QueryDirection(iface, pPinDir);
1438}

◆ AviMuxOut_QueryId()

static HRESULT WINAPI AviMuxOut_QueryId ( IPin iface,
LPWSTR Id 
)
static

Definition at line 1440 of file avimux.c.

1441{
1442 AviMux *This = impl_from_out_IPin(iface);
1443 TRACE("(%p)->(%p)\n", This, Id);
1444 return BasePinImpl_QueryId(iface, Id);
1445}

◆ AviMuxOut_QueryInterface()

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

Definition at line 1328 of file avimux.c.

1329{
1330 AviMux *This = impl_from_out_IPin(iface);
1331
1332 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
1333
1335 *ppv = iface;
1336 else if(IsEqualIID(riid, &IID_IQualityControl))
1337 *ppv = &This->out->IQualityControl_iface;
1338 else {
1339 FIXME("no interface for %s\n", debugstr_guid(riid));
1340 *ppv = NULL;
1341 return E_NOINTERFACE;
1342 }
1343
1344 IUnknown_AddRef((IUnknown*)*ppv);
1345 return S_OK;
1346}

◆ AviMuxOut_QueryInternalConnections()

static HRESULT WINAPI AviMuxOut_QueryInternalConnections ( IPin iface,
IPin **  apPin,
ULONG nPin 
)
static

Definition at line 1462 of file avimux.c.

1464{
1465 AviMux *This = impl_from_out_IPin(iface);
1466 FIXME("(%p)->(%p %p)\n", This, apPin, nPin);
1467 return E_NOTIMPL;
1468}

◆ AviMuxOut_QueryPinInfo()

static HRESULT WINAPI AviMuxOut_QueryPinInfo ( IPin iface,
PIN_INFO pInfo 
)
static

Definition at line 1426 of file avimux.c.

1427{
1428 AviMux *This = impl_from_out_IPin(iface);
1429 TRACE("(%p)->(%p)\n", This, pInfo);
1430 return BasePinImpl_QueryPinInfo(iface, pInfo);
1431}

◆ AviMuxOut_ReceiveConnection()

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

Definition at line 1390 of file avimux.c.

1392{
1393 AviMux *This = impl_from_out_IPin(iface);
1394 TRACE("(%p)->(%p AM_MEDIA_TYPE(%p)\n", This, pConnector, pmt);
1395 dump_AM_MEDIA_TYPE(pmt);
1396 return BaseOutputPinImpl_ReceiveConnection(iface, pConnector, pmt);
1397}
HRESULT WINAPI BaseOutputPinImpl_ReceiveConnection(IPin *iface, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
Definition: pin.c:490

◆ AviMuxOut_Release()

static ULONG WINAPI AviMuxOut_Release ( IPin iface)
static

Definition at line 1354 of file avimux.c.

1355{
1356 AviMux *This = impl_from_out_IPin(iface);
1357 return IBaseFilter_Release(&This->filter.IBaseFilter_iface);
1358}

◆ ConfigAviMux_AddRef()

static ULONG WINAPI ConfigAviMux_AddRef ( IConfigAviMux iface)
static

Definition at line 810 of file avimux.c.

811{
813 return IBaseFilter_AddRef(&This->filter.IBaseFilter_iface);
814}
static AviMux * impl_from_IConfigAviMux(IConfigAviMux *iface)
Definition: avimux.c:798

◆ ConfigAviMux_GetMasterStream()

static HRESULT WINAPI ConfigAviMux_GetMasterStream ( IConfigAviMux iface,
LONG pStream 
)
static

Definition at line 829 of file avimux.c.

830{
832 FIXME("(%p)->(%p)\n", This, pStream);
833 return E_NOTIMPL;
834}

◆ ConfigAviMux_GetOutputCompatibilityIndex()

static HRESULT WINAPI ConfigAviMux_GetOutputCompatibilityIndex ( IConfigAviMux iface,
BOOL pfOldIndex 
)
static

Definition at line 844 of file avimux.c.

846{
848 FIXME("(%p)->(%p)\n", This, pfOldIndex);
849 return E_NOTIMPL;
850}

◆ ConfigAviMux_QueryInterface()

static HRESULT WINAPI ConfigAviMux_QueryInterface ( IConfigAviMux iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 803 of file avimux.c.

805{
807 return IBaseFilter_QueryInterface(&This->filter.IBaseFilter_iface, riid, ppv);
808}

◆ ConfigAviMux_Release()

static ULONG WINAPI ConfigAviMux_Release ( IConfigAviMux iface)
static

Definition at line 816 of file avimux.c.

817{
819 return IBaseFilter_Release(&This->filter.IBaseFilter_iface);
820}

◆ ConfigAviMux_SetMasterStream()

static HRESULT WINAPI ConfigAviMux_SetMasterStream ( IConfigAviMux iface,
LONG  iStream 
)
static

Definition at line 822 of file avimux.c.

823{
825 FIXME("(%p)->(%d)\n", This, iStream);
826 return E_NOTIMPL;
827}

◆ ConfigAviMux_SetOutputCompatibilityIndex()

static HRESULT WINAPI ConfigAviMux_SetOutputCompatibilityIndex ( IConfigAviMux iface,
BOOL  fOldIndex 
)
static

Definition at line 836 of file avimux.c.

838{
840 FIXME("(%p)->(%x)\n", This, fOldIndex);
841 return E_NOTIMPL;
842}

◆ ConfigInterleaving_AddRef()

static ULONG WINAPI ConfigInterleaving_AddRef ( IConfigInterleaving iface)
static

Definition at line 874 of file avimux.c.

875{
877 return IBaseFilter_AddRef(&This->filter.IBaseFilter_iface);
878}
static AviMux * impl_from_IConfigInterleaving(IConfigInterleaving *iface)
Definition: avimux.c:862

◆ ConfigInterleaving_get_Interleaving()

static HRESULT WINAPI ConfigInterleaving_get_Interleaving ( IConfigInterleaving iface,
REFERENCE_TIME prtInterleave,
REFERENCE_TIME prtPreroll 
)
static

Definition at line 932 of file avimux.c.

934{
936 FIXME("(%p)->(%p %p)\n", This, prtInterleave, prtPreroll);
937 return E_NOTIMPL;
938}

◆ ConfigInterleaving_get_Mode()

static HRESULT WINAPI ConfigInterleaving_get_Mode ( IConfigInterleaving iface,
InterleavingMode *  pMode 
)
static

Definition at line 910 of file avimux.c.

912{
914 FIXME("(%p)->(%p)\n", This, pMode);
915 return E_NOTIMPL;
916}

◆ ConfigInterleaving_put_Interleaving()

static HRESULT WINAPI ConfigInterleaving_put_Interleaving ( IConfigInterleaving iface,
const REFERENCE_TIME prtInterleave,
const REFERENCE_TIME prtPreroll 
)
static

Definition at line 918 of file avimux.c.

920{
922
923 TRACE("(%p)->(%p %p)\n", This, prtInterleave, prtPreroll);
924
925 if(prtInterleave)
926 This->interleave = *prtInterleave;
927 if(prtPreroll)
928 This->preroll = *prtPreroll;
929 return S_OK;
930}

◆ ConfigInterleaving_put_Mode()

static HRESULT WINAPI ConfigInterleaving_put_Mode ( IConfigInterleaving iface,
InterleavingMode  mode 
)
static

Definition at line 886 of file avimux.c.

888{
890
891 TRACE("(%p)->(%d)\n", This, mode);
892
893 if(mode>INTERLEAVE_NONE_BUFFERED)
894 return E_INVALIDARG;
895
896 if(This->mode != mode) {
897 if(This->out->pin.pin.pConnectedTo) {
898 HRESULT hr = IFilterGraph_Reconnect(This->filter.filterInfo.pGraph,
899 &This->out->pin.pin.IPin_iface);
900 if(FAILED(hr))
901 return hr;
902 }
903
904 This->mode = mode;
905 }
906
907 return S_OK;
908}
GLenum mode
Definition: glext.h:6217

◆ ConfigInterleaving_QueryInterface()

static HRESULT WINAPI ConfigInterleaving_QueryInterface ( IConfigInterleaving iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 867 of file avimux.c.

869{
871 return IBaseFilter_QueryInterface(&This->filter.IBaseFilter_iface, riid, ppv);
872}

◆ ConfigInterleaving_Release()

static ULONG WINAPI ConfigInterleaving_Release ( IConfigInterleaving iface)
static

Definition at line 880 of file avimux.c.

881{
883 return IBaseFilter_Release(&This->filter.IBaseFilter_iface);
884}

◆ create_input_pin()

static HRESULT create_input_pin ( AviMux avimux)
static

Definition at line 2310 of file avimux.c.

2311{
2312 static const WCHAR name[] = {'I','n','p','u','t',' ','0','0',0};
2313 PIN_INFO info;
2314 HRESULT hr;
2315
2316 if(avimux->input_pin_no >= MAX_PIN_NO-1)
2317 return E_FAIL;
2318
2319 info.dir = PINDIR_INPUT;
2320 info.pFilter = &avimux->filter.IBaseFilter_iface;
2321 memcpy(info.achName, name, sizeof(name));
2322 info.achName[7] = '0' + (avimux->input_pin_no+1) % 10;
2323 info.achName[6] = '0' + (avimux->input_pin_no+1) / 10;
2324
2326 &AviMuxIn_BaseInputFuncTable, &avimux->filter.csFilter, NULL, (IPin**)&avimux->in[avimux->input_pin_no]);
2327 if(FAILED(hr))
2328 return hr;
2331 avimux->in[avimux->input_pin_no]->IPropertyBag_iface.lpVtbl = &AviMuxIn_PropertyBagVtbl;
2333
2334 avimux->in[avimux->input_pin_no]->samples_head = NULL;
2335 hr = CoCreateInstance(&CLSID_MemoryAllocator, NULL, CLSCTX_INPROC_SERVER,
2336 &IID_IMemAllocator, (void**)&avimux->in[avimux->input_pin_no]->samples_allocator);
2337 if(FAILED(hr)) {
2339 return hr;
2340 }
2341
2342 hr = CoCreateInstance(&CLSID_MemoryAllocator, NULL, CLSCTX_INPROC_SERVER,
2343 &IID_IMemAllocator, (void**)&avimux->in[avimux->input_pin_no]->pin.pAllocator);
2344 if(FAILED(hr)) {
2345 IMemAllocator_Release(avimux->in[avimux->input_pin_no]->samples_allocator);
2347 return hr;
2348 }
2349
2350 avimux->in[avimux->input_pin_no]->stream_time = 0;
2351 memset(&avimux->in[avimux->input_pin_no]->strh, 0, sizeof(avimux->in[avimux->input_pin_no]->strh));
2352 avimux->in[avimux->input_pin_no]->strf = NULL;
2353 memset(&avimux->in[avimux->input_pin_no]->indx_data, 0, sizeof(avimux->in[avimux->input_pin_no]->indx_data));
2354 memset(&avimux->in[avimux->input_pin_no]->ix_data, 0, sizeof(avimux->in[avimux->input_pin_no]->ix_data));
2355 avimux->in[avimux->input_pin_no]->indx = (AVISUPERINDEX*)&avimux->in[avimux->input_pin_no]->indx_data;
2356 avimux->in[avimux->input_pin_no]->ix = (AVISTDINDEX*)avimux->in[avimux->input_pin_no]->ix_data;
2357
2358 avimux->input_pin_no++;
2359 return S_OK;
2360}
static const BaseInputPinFuncTable AviMuxIn_BaseInputFuncTable
Definition: avimux.c:1703
static const IPropertyBagVtbl AviMuxIn_PropertyBagVtbl
Definition: avimux.c:2247
static const IQualityControlVtbl AviMuxIn_QualityControlVtbl
Definition: avimux.c:2302
static const IPinVtbl AviMuxIn_PinVtbl
Definition: avimux.c:1975
#define MAX_PIN_NO
Definition: avimux.c:37
static const IAMStreamControlVtbl AviMuxIn_AMStreamControlVtbl
Definition: avimux.c:2051
static const IMemInputPinVtbl AviMuxIn_MemInputPinVtbl
Definition: avimux.c:2189
#define E_FAIL
Definition: ddrawi.h:102
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
Definition: axcore.idl:92
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
LONGLONG stream_time
Definition: avimux.c:67
BYTE ix_data[FIELD_OFFSET(AVISTDINDEX, aIndex[AVISTDINDEX_ENTRIES])]
Definition: avimux.c:89
AVISTDINDEX * ix
Definition: avimux.c:85
AVISUPERINDEX * indx
Definition: avimux.c:76
BYTE indx_data[FIELD_OFFSET(AVISUPERINDEX, aIndex[AVISUPERINDEX_ENTRIES])]
Definition: avimux.c:80
BaseFilter filter
Definition: avimux.c:97
int input_pin_no
Definition: avimux.c:109
AviMuxIn * in[MAX_PIN_NO-1]
Definition: avimux.c:110
IBaseFilter IBaseFilter_iface
Definition: strmbase.h:163
CRITICAL_SECTION csFilter
Definition: strmbase.h:165
Definition: name.c:39
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by AviMuxIn_ReceiveConnection(), and QCAP_createAVIMux().

◆ flush_queue()

static HRESULT flush_queue ( AviMux avimux,
AviMuxIn avimuxin,
BOOL  closing 
)
static

Definition at line 304 of file avimux.c.

305{
306 IMediaSample *sample, **prev, **head_prev;
307 BYTE *data;
308 RIFFCHUNK rf;
309 DWORD size;
310 DWORD flags;
311 HRESULT hr;
312
313 if(avimux->out->cur_stream != avimuxin->stream_id)
314 return S_OK;
315
316 while(avimuxin->samples_head) {
317 hr = IMediaSample_GetPointer(avimuxin->samples_head, (BYTE**)&head_prev);
318 if(FAILED(hr))
319 return hr;
320 head_prev--;
321
322 hr = IMediaSample_GetPointer(*head_prev, (BYTE**)&prev);
323 if(FAILED(hr))
324 return hr;
325 prev--;
326
327 sample = *head_prev;
328 size = IMediaSample_GetActualDataLength(sample);
329 hr = IMediaSample_GetPointer(sample, &data);
330 if(FAILED(hr))
331 return hr;
332 flags = IMediaSample_IsDiscontinuity(sample)==S_OK ? AM_SAMPLE_TIMEDISCONTINUITY : 0;
333 if(IMediaSample_IsSyncPoint(sample) == S_OK)
335
336 if(avimuxin->stream_time + (closing ? 0 : avimuxin->strh.dwScale) > avimux->out->cur_time &&
338 if(closing)
339 break;
340
341 avimux->out->cur_stream++;
342 if(avimux->out->cur_stream >= avimux->input_pin_no-1) {
343 avimux->out->cur_time += avimux->interleave;
344 avimux->out->cur_stream = 0;
345 }
346 avimuxin = avimux->in[avimux->out->cur_stream];
347 continue;
348 }
349
350 if(avimuxin->ix->nEntriesInUse == AVISTDINDEX_ENTRIES) {
351 /* TODO: use output pins Deliver/Receive method */
352 hr = out_seek(avimux, avimuxin->ix_off);
353 if(FAILED(hr))
354 return hr;
355 hr = out_write(avimux, avimuxin->ix, sizeof(avimuxin->ix_data));
356 if(FAILED(hr))
357 return hr;
358
359 avimuxin->indx->aIndex[avimuxin->indx->nEntriesInUse].qwOffset = avimuxin->ix_off;
360 avimuxin->indx->aIndex[avimuxin->indx->nEntriesInUse].dwSize = sizeof(avimuxin->ix_data);
361 avimuxin->indx->aIndex[avimuxin->indx->nEntriesInUse].dwDuration = AVISTDINDEX_ENTRIES;
362 avimuxin->indx->nEntriesInUse++;
363
364 memset(avimuxin->ix->aIndex, 0, sizeof(avimuxin->ix->aIndex)*avimuxin->ix->nEntriesInUse);
365 avimuxin->ix->nEntriesInUse = 0;
366 avimuxin->ix->qwBaseOffset = 0;
367
368 avimuxin->ix_off = avimux->out->size;
369 avimux->out->size += sizeof(avimuxin->ix_data);
370 }
371
372 if(*head_prev == avimuxin->samples_head)
373 avimuxin->samples_head = NULL;
374 else
375 *head_prev = *prev;
376
377 avimuxin->stream_time += avimuxin->strh.dwScale;
378 avimuxin->strh.dwLength++;
380 if(!avimuxin->ix->qwBaseOffset)
381 avimuxin->ix->qwBaseOffset = avimux->out->size;
382 avimuxin->ix->aIndex[avimuxin->ix->nEntriesInUse].dwOffset = avimux->out->size
383 + sizeof(RIFFCHUNK) - avimuxin->ix->qwBaseOffset;
384
385 hr = out_seek(avimux, avimux->out->size);
386 if(FAILED(hr)) {
387 IMediaSample_Release(sample);
388 return hr;
389 }
390 }
391 avimuxin->ix->aIndex[avimuxin->ix->nEntriesInUse].dwSize = size |
393 avimuxin->ix->nEntriesInUse++;
394
395 rf.fcc = FCC('0'+avimuxin->stream_id/10, '0'+avimuxin->stream_id%10,
396 'd', flags & AM_SAMPLE_SPLICEPOINT ? 'b' : 'c');
397 rf.cb = size;
400 avimux->idx1[avimux->idx1_entries-1].dwChunkOffset : avimux->out->size, size);
401 if(FAILED(hr)) {
402 IMediaSample_Release(sample);
403 return hr;
404 }
405
407 hr = out_write(avimux, &rf, sizeof(rf));
408 if(FAILED(hr)) {
409 IMediaSample_Release(sample);
410 return hr;
411 }
412 hr = out_write(avimux, data, size);
413 if(FAILED(hr)) {
414 IMediaSample_Release(sample);
415 return hr;
416 }
417 flags = 0;
418 hr = out_write(avimux, &flags, ALIGN(rf.cb)-rf.cb);
419 if(FAILED(hr)) {
420 IMediaSample_Release(sample);
421 return hr;
422 }
423 }
424 IMediaSample_Release(sample);
425 }
426 return S_OK;
427}
#define AVISTDINDEX_ENTRIES
Definition: avimux.c:39
#define AVIIF_KEYFRAME
Definition: aviriff.h:131
#define AVISTDINDEX_DELTAFRAME
Definition: aviriff.h:211
@ AM_SAMPLE_TIMEDISCONTINUITY
Definition: axcore.idl:442
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
int stream_id
Definition: avimux.c:66
int ix_off
Definition: avimux.c:84
int cur_stream
Definition: avimux.c:46
int size
Definition: avimux.c:54
LONGLONG cur_time
Definition: avimux.c:47
AviMuxOut * out
Definition: avimux.c:108
AVIINDEXENTRY * idx1
Definition: avimux.c:117
int idx1_entries
Definition: avimux.c:115
REFERENCE_TIME interleave
Definition: avimux.c:105
DWORD dwChunkOffset
Definition: vfw.h:988
DWORD dwSize
Definition: aviriff.h:216
DWORD dwOffset
Definition: aviriff.h:215
DWORD nEntriesInUse
Definition: aviriff.h:225
AVISTDINDEX_ENTRY aIndex[ANYSIZE_ARRAY]
Definition: aviriff.h:229
DWORDLONG qwBaseOffset
Definition: aviriff.h:227
DWORD dwLength
Definition: aviriff.h:111
struct _avisuperindex::_avisuperindex_entry aIndex[ANYSIZE_ARRAY]
DWORD nEntriesInUse
Definition: aviriff.h:201

Referenced by AviMux_Stop(), and queue_sample().

◆ idx1_add_entry()

static HRESULT idx1_add_entry ( AviMux avimux,
DWORD  ckid,
DWORD  flags,
DWORD  off,
DWORD  len 
)
inlinestatic

Definition at line 284 of file avimux.c.

285{
286 if(avimux->idx1_entries == avimux->idx1_size) {
287 AVIINDEXENTRY *new_idx = HeapReAlloc(GetProcessHeap(), 0, avimux->idx1,
288 sizeof(*avimux->idx1)*2*avimux->idx1_size);
289 if(!new_idx)
290 return E_OUTOFMEMORY;
291
292 avimux->idx1_size *= 2;
293 avimux->idx1 = new_idx;
294 }
295
296 avimux->idx1[avimux->idx1_entries].ckid = ckid;
297 avimux->idx1[avimux->idx1_entries].dwFlags = flags;
298 avimux->idx1[avimux->idx1_entries].dwChunkOffset = off;
299 avimux->idx1[avimux->idx1_entries].dwChunkLength = len;
300 avimux->idx1_entries++;
301 return S_OK;
302}
#define HeapReAlloc
Definition: compat.h:734
GLenum GLsizei len
Definition: glext.h:6722
int idx1_size
Definition: avimux.c:116
DWORD dwChunkLength
Definition: vfw.h:989
DWORD ckid
Definition: vfw.h:986
DWORD dwFlags
Definition: vfw.h:987

Referenced by AviMux_Run(), and flush_queue().

◆ impl_from_BaseFilter()

static AviMux * impl_from_BaseFilter ( BaseFilter filter)
inlinestatic

Definition at line 122 of file avimux.c.

123{
125}
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition: glext.h:7005

Referenced by AviMux_GetPin(), AviMux_GetPinCount(), and impl_from_IBaseFilter().

◆ impl_from_IBaseFilter()

◆ impl_from_IConfigAviMux()

◆ impl_from_IConfigInterleaving()

static AviMux * impl_from_IConfigInterleaving ( IConfigInterleaving iface)
inlinestatic

◆ impl_from_IMediaSeeking()

◆ impl_from_in_IPin()

static AviMux * impl_from_in_IPin ( IPin iface)
inlinestatic

◆ impl_from_IPersistMediaPropertyBag()

static AviMux * impl_from_IPersistMediaPropertyBag ( IPersistMediaPropertyBag iface)
inlinestatic

◆ impl_from_ISpecifyPropertyPages()

static AviMux * impl_from_ISpecifyPropertyPages ( ISpecifyPropertyPages iface)
inlinestatic

Definition at line 1195 of file avimux.c.

1196{
1197 return CONTAINING_RECORD(iface, AviMux, ISpecifyPropertyPages_iface);
1198}

Referenced by SpecifyPropertyPages_AddRef(), SpecifyPropertyPages_GetPages(), SpecifyPropertyPages_QueryInterface(), and SpecifyPropertyPages_Release().

◆ impl_from_out_IPin()

◆ impl_from_out_IQualityControl()

static AviMux * impl_from_out_IQualityControl ( IQualityControl iface)
inlinestatic

◆ MediaSeeking_AddRef()

static ULONG WINAPI MediaSeeking_AddRef ( IMediaSeeking iface)
static

Definition at line 962 of file avimux.c.

963{
965 return IBaseFilter_AddRef(&This->filter.IBaseFilter_iface);
966}
static AviMux * impl_from_IMediaSeeking(IMediaSeeking *iface)
Definition: avimux.c:950

◆ MediaSeeking_CheckCapabilities()

static HRESULT WINAPI MediaSeeking_CheckCapabilities ( IMediaSeeking iface,
DWORD pCapabilities 
)
static

Definition at line 982 of file avimux.c.

984{
986 FIXME("(%p)->(%p)\n", This, pCapabilities);
987 return E_NOTIMPL;
988}

◆ MediaSeeking_ConvertTimeFormat()

static HRESULT WINAPI MediaSeeking_ConvertTimeFormat ( IMediaSeeking iface,
LONGLONG pTarget,
const GUID pTargetFormat,
LONGLONG  Source,
const GUID pSourceFormat 
)
static

Definition at line 1054 of file avimux.c.

1056{
1058 FIXME("(%p)->(%p %s %s %s)\n", This, pTarget, debugstr_guid(pTargetFormat),
1059 wine_dbgstr_longlong(Source), debugstr_guid(pSourceFormat));
1060 return E_NOTIMPL;
1061}
FxIoTarget * pTarget
Definition: fxdeviceapi.cpp:97
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
Definition: ndis.h:3169

◆ MediaSeeking_GetAvailable()

static HRESULT WINAPI MediaSeeking_GetAvailable ( IMediaSeeking iface,
LONGLONG pEarliest,
LONGLONG pLatest 
)
static

Definition at line 1079 of file avimux.c.

1081{
1083 FIXME("(%p)->(%p %p)\n", This, pEarliest, pLatest);
1084 return E_NOTIMPL;
1085}

◆ MediaSeeking_GetCapabilities()

static HRESULT WINAPI MediaSeeking_GetCapabilities ( IMediaSeeking iface,
DWORD pCapabilities 
)
static

Definition at line 974 of file avimux.c.

976{
978 FIXME("(%p)->(%p)\n", This, pCapabilities);
979 return E_NOTIMPL;
980}

◆ MediaSeeking_GetCurrentPosition()

static HRESULT WINAPI MediaSeeking_GetCurrentPosition ( IMediaSeeking iface,
LONGLONG pCurrent 
)
static

Definition at line 1046 of file avimux.c.

1048{
1050 FIXME("(%p)->(%p)\n", This, pCurrent);
1051 return E_NOTIMPL;
1052}

◆ MediaSeeking_GetDuration()

static HRESULT WINAPI MediaSeeking_GetDuration ( IMediaSeeking iface,
LONGLONG pDuration 
)
static

Definition at line 1030 of file avimux.c.

1032{
1034 FIXME("(%p)->(%p)\n", This, pDuration);
1035 return E_NOTIMPL;
1036}

◆ MediaSeeking_GetPositions()

static HRESULT WINAPI MediaSeeking_GetPositions ( IMediaSeeking iface,
LONGLONG pCurrent,
LONGLONG pStop 
)
static

Definition at line 1071 of file avimux.c.

1073{
1075 FIXME("(%p)->(%p %p)\n", This, pCurrent, pStop);
1076 return E_NOTIMPL;
1077}

◆ MediaSeeking_GetPreroll()

static HRESULT WINAPI MediaSeeking_GetPreroll ( IMediaSeeking iface,
LONGLONG pllPreroll 
)
static

Definition at line 1101 of file avimux.c.

1102{
1104 FIXME("(%p)->(%p)\n", This, pllPreroll);
1105 return E_NOTIMPL;
1106}

◆ MediaSeeking_GetRate()

static HRESULT WINAPI MediaSeeking_GetRate ( IMediaSeeking iface,
double pdRate 
)
static

Definition at line 1094 of file avimux.c.

1095{
1097 FIXME("(%p)->(%p)\n", This, pdRate);
1098 return E_NOTIMPL;
1099}

◆ MediaSeeking_GetStopPosition()

static HRESULT WINAPI MediaSeeking_GetStopPosition ( IMediaSeeking iface,
LONGLONG pStop 
)
static

Definition at line 1038 of file avimux.c.

1040{
1042 FIXME("(%p)->(%p)\n", This, pStop);
1043 return E_NOTIMPL;
1044}

◆ MediaSeeking_GetTimeFormat()

static HRESULT WINAPI MediaSeeking_GetTimeFormat ( IMediaSeeking iface,
GUID pFormat 
)
static

Definition at line 1006 of file avimux.c.

1008{
1010 FIXME("(%p)->(%p)\n", This, pFormat);
1011 return E_NOTIMPL;
1012}

◆ MediaSeeking_IsFormatSupported()

static HRESULT WINAPI MediaSeeking_IsFormatSupported ( IMediaSeeking iface,
const GUID pFormat 
)
static

Definition at line 990 of file avimux.c.

992{
994 FIXME("(%p)->(%s)\n", This, debugstr_guid(pFormat));
995 return E_NOTIMPL;
996}

◆ MediaSeeking_IsUsingTimeFormat()

static HRESULT WINAPI MediaSeeking_IsUsingTimeFormat ( IMediaSeeking iface,
const GUID pFormat 
)
static

Definition at line 1014 of file avimux.c.

1016{
1018 FIXME("(%p)->(%s)\n", This, debugstr_guid(pFormat));
1019 return E_NOTIMPL;
1020}

◆ MediaSeeking_QueryInterface()

static HRESULT WINAPI MediaSeeking_QueryInterface ( IMediaSeeking iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 955 of file avimux.c.

957{
959 return IBaseFilter_QueryInterface(&This->filter.IBaseFilter_iface, riid, ppv);
960}

◆ MediaSeeking_QueryPreferredFormat()

static HRESULT WINAPI MediaSeeking_QueryPreferredFormat ( IMediaSeeking iface,
GUID pFormat 
)
static

Definition at line 998 of file avimux.c.

1000{
1002 FIXME("(%p)->(%p)\n", This, pFormat);
1003 return E_NOTIMPL;
1004}

◆ MediaSeeking_Release()

static ULONG WINAPI MediaSeeking_Release ( IMediaSeeking iface)
static

Definition at line 968 of file avimux.c.

969{
971 return IBaseFilter_Release(&This->filter.IBaseFilter_iface);
972}

◆ MediaSeeking_SetPositions()

static HRESULT WINAPI MediaSeeking_SetPositions ( IMediaSeeking iface,
LONGLONG pCurrent,
DWORD  dwCurrentFlags,
LONGLONG pStop,
DWORD  dwStopFlags 
)
static

Definition at line 1063 of file avimux.c.

1065{
1067 FIXME("(%p)->(%p %x %p %x)\n", This, pCurrent, dwCurrentFlags, pStop, dwStopFlags);
1068 return E_NOTIMPL;
1069}

◆ MediaSeeking_SetRate()

static HRESULT WINAPI MediaSeeking_SetRate ( IMediaSeeking iface,
double  dRate 
)
static

Definition at line 1087 of file avimux.c.

1088{
1090 FIXME("(%p)->(%lf)\n", This, dRate);
1091 return E_NOTIMPL;
1092}

◆ MediaSeeking_SetTimeFormat()

static HRESULT WINAPI MediaSeeking_SetTimeFormat ( IMediaSeeking iface,
const GUID pFormat 
)
static

Definition at line 1022 of file avimux.c.

1024{
1026 FIXME("(%p)->(%s)\n", This, debugstr_guid(pFormat));
1027 return E_NOTIMPL;
1028}

◆ out_flush()

static HRESULT out_flush ( AviMux This)
static

Definition at line 217 of file avimux.c.

218{
219 ULONG written;
220 HRESULT hr;
221
222 if(!This->out->buf_pos)
223 return S_OK;
224
225 hr = IStream_Write(This->out->stream, This->out->buf, This->out->buf_pos, &written);
226 if(FAILED(hr))
227 return hr;
228 if(written != This->out->buf_pos)
229 return E_FAIL;
230
231 This->out->buf_pos = 0;
232 return S_OK;
233}

Referenced by AviMux_Stop(), out_seek(), and out_write().

◆ out_seek()

static HRESULT out_seek ( AviMux This,
int  pos 
)
static

Definition at line 235 of file avimux.c.

236{
238 HRESULT hr;
239
240 hr = out_flush(This);
241 if(FAILED(hr))
242 return hr;
243
244 li.QuadPart = pos;
245 hr = IStream_Seek(This->out->stream, li, STREAM_SEEK_SET, NULL);
246 if(FAILED(hr))
247 return hr;
248
249 This->out->out_pos = pos;
250 if(This->out->out_pos > This->out->size)
251 This->out->size = This->out->out_pos;
252 return hr;
253}
LARGE_INTEGER li
Definition: fxtimerapi.cpp:235
LONGLONG QuadPart
Definition: typedefs.h:114

Referenced by AviMux_Stop(), and flush_queue().

◆ out_write()

static HRESULT out_write ( AviMux This,
const void data,
int  size 
)
static

Definition at line 255 of file avimux.c.

256{
257 int chunk_size;
258 HRESULT hr;
259
260 while(1) {
261 if(size > sizeof(This->out->buf)-This->out->buf_pos)
262 chunk_size = sizeof(This->out->buf)-This->out->buf_pos;
263 else
264 chunk_size = size;
265
266 memcpy(This->out->buf + This->out->buf_pos, data, chunk_size);
267 size -= chunk_size;
268 data = (const BYTE*)data + chunk_size;
269 This->out->buf_pos += chunk_size;
270 This->out->out_pos += chunk_size;
271 if(This->out->out_pos > This->out->size)
272 This->out->size = This->out->out_pos;
273
274 if(!size)
275 break;
276 hr = out_flush(This);
277 if(FAILED(hr))
278 return hr;
279 }
280
281 return S_OK;
282}

Referenced by AviMux_Stop(), and flush_queue().

◆ PersistMediaPropertyBag_AddRef()

static ULONG WINAPI PersistMediaPropertyBag_AddRef ( IPersistMediaPropertyBag iface)
static

Definition at line 1143 of file avimux.c.

1144{
1146 return IBaseFilter_AddRef(&This->filter.IBaseFilter_iface);
1147}
static AviMux * impl_from_IPersistMediaPropertyBag(IPersistMediaPropertyBag *iface)
Definition: avimux.c:1131

◆ PersistMediaPropertyBag_GetClassID()

static HRESULT WINAPI PersistMediaPropertyBag_GetClassID ( IPersistMediaPropertyBag iface,
CLSID pClassID 
)
static

Definition at line 1155 of file avimux.c.

1157{
1159 return IBaseFilter_GetClassID(&This->filter.IBaseFilter_iface, pClassID);
1160}

◆ PersistMediaPropertyBag_InitNew()

static HRESULT WINAPI PersistMediaPropertyBag_InitNew ( IPersistMediaPropertyBag iface)
static

Definition at line 1162 of file avimux.c.

1163{
1165 FIXME("(%p)->()\n", This);
1166 return E_NOTIMPL;
1167}

◆ PersistMediaPropertyBag_Load()

static HRESULT WINAPI PersistMediaPropertyBag_Load ( IPersistMediaPropertyBag iface,
IMediaPropertyBag pPropBag,
IErrorLog pErrorLog 
)
static

Definition at line 1169 of file avimux.c.

1171{
1173 FIXME("(%p)->()\n", This);
1174 return E_NOTIMPL;
1175}

◆ PersistMediaPropertyBag_QueryInterface()

static HRESULT WINAPI PersistMediaPropertyBag_QueryInterface ( IPersistMediaPropertyBag iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 1136 of file avimux.c.

1138{
1140 return IBaseFilter_QueryInterface(&This->filter.IBaseFilter_iface, riid, ppv);
1141}

◆ PersistMediaPropertyBag_Release()

static ULONG WINAPI PersistMediaPropertyBag_Release ( IPersistMediaPropertyBag iface)
static

Definition at line 1149 of file avimux.c.

1150{
1152 return IBaseFilter_Release(&This->filter.IBaseFilter_iface);
1153}

◆ PersistMediaPropertyBag_Save()

static HRESULT WINAPI PersistMediaPropertyBag_Save ( IPersistMediaPropertyBag iface,
IMediaPropertyBag pPropBag,
BOOL  fClearDirty,
BOOL  fSaveAllProperties 
)
static

Definition at line 1177 of file avimux.c.

1179{
1181 FIXME("(%p)->()\n", This);
1182 return E_NOTIMPL;
1183}

◆ QCAP_createAVIMux()

IUnknown *WINAPI QCAP_createAVIMux ( IUnknown pUnkOuter,
HRESULT phr 
)

Definition at line 2362 of file avimux.c.

2363{
2364 static const WCHAR output_name[] = {'A','V','I',' ','O','u','t',0};
2365
2366 AviMux *avimux;
2367 PIN_INFO info;
2368 HRESULT hr;
2369
2370 TRACE("(%p)\n", pUnkOuter);
2371
2372 if(pUnkOuter) {
2373 *phr = CLASS_E_NOAGGREGATION;
2374 return NULL;
2375 }
2376
2377 avimux = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(AviMux));
2378 if(!avimux) {
2379 *phr = E_OUTOFMEMORY;
2380 return NULL;
2381 }
2382
2383 BaseFilter_Init(&avimux->filter, &AviMuxVtbl, &CLSID_AviDest,
2384 (DWORD_PTR)(__FILE__ ": AviMux.csFilter"), &filter_func_table);
2385 avimux->IConfigAviMux_iface.lpVtbl = &ConfigAviMuxVtbl;
2387 avimux->IMediaSeeking_iface.lpVtbl = &MediaSeekingVtbl;
2390
2391 info.dir = PINDIR_OUTPUT;
2392 info.pFilter = &avimux->filter.IBaseFilter_iface;
2393 lstrcpyW(info.achName, output_name);
2395 &AviMuxOut_BaseOutputFuncTable, &avimux->filter.csFilter, (IPin**)&avimux->out);
2396 if(FAILED(hr)) {
2398 HeapFree(GetProcessHeap(), 0, avimux);
2399 *phr = hr;
2400 return NULL;
2401 }
2403 avimux->out->cur_stream = 0;
2404 avimux->out->cur_time = 0;
2405 avimux->out->stream = NULL;
2406
2407 hr = create_input_pin(avimux);
2408 if(FAILED(hr)) {
2411 HeapFree(GetProcessHeap(), 0, avimux);
2412 *phr = hr;
2413 return NULL;
2414 }
2415
2416 avimux->interleave = 10000000;
2417
2419 *phr = S_OK;
2420 return (IUnknown*)&avimux->filter.IBaseFilter_iface;
2421}
static const IMediaSeekingVtbl MediaSeekingVtbl
Definition: avimux.c:1108
static const IPersistMediaPropertyBagVtbl PersistMediaPropertyBagVtbl
Definition: avimux.c:1185
static const BaseFilterFuncTable filter_func_table
Definition: avimux.c:151
static const IConfigInterleavingVtbl ConfigInterleavingVtbl
Definition: avimux.c:940
static const IConfigAviMuxVtbl ConfigAviMuxVtbl
Definition: avimux.c:852
static const IQualityControlVtbl AviMuxOut_QualityControlVtbl
Definition: avimux.c:1564
static const IBaseFilterVtbl AviMuxVtbl
Definition: avimux.c:780
static const IPinVtbl AviMuxOut_PinVtbl
Definition: avimux.c:1499
static const BaseOutputPinFuncTable AviMuxOut_BaseOutputFuncTable
Definition: avimux.c:1308
static const ISpecifyPropertyPagesVtbl SpecifyPropertyPagesVtbl
Definition: avimux.c:1227
@ PINDIR_OUTPUT
Definition: axcore.idl:42
#define lstrcpyW
Definition: compat.h:749
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
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
IQualityControl IQualityControl_iface
Definition: avimux.c:44
IStream * stream
Definition: avimux.c:55
IPersistMediaPropertyBag IPersistMediaPropertyBag_iface
Definition: avimux.c:101
IMediaSeeking IMediaSeeking_iface
Definition: avimux.c:100
IConfigInterleaving IConfigInterleaving_iface
Definition: avimux.c:99
ISpecifyPropertyPages ISpecifyPropertyPages_iface
Definition: avimux.c:102
IConfigAviMux IConfigAviMux_iface
Definition: avimux.c:98
uint32_t DWORD_PTR
Definition: typedefs.h:65
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:2662

◆ queue_sample()

static HRESULT queue_sample ( AviMux avimux,
AviMuxIn avimuxin,
IMediaSample sample 
)
static

Definition at line 429 of file avimux.c.

430{
431 IMediaSample **prev, **head_prev;
432 HRESULT hr;
433
434 hr = IMediaSample_GetPointer(sample, (BYTE**)&prev);
435 if(FAILED(hr))
436 return hr;
437 prev--;
438
439 if(avimuxin->samples_head) {
440 hr = IMediaSample_GetPointer(avimuxin->samples_head, (BYTE**)&head_prev);
441 if(FAILED(hr))
442 return hr;
443 head_prev--;
444
445 *prev = *head_prev;
446 *head_prev = sample;
447 }else {
448 *prev = sample;
449 }
450 avimuxin->samples_head = sample;
451 IMediaSample_AddRef(sample);
452
453 return flush_queue(avimux, avimuxin, FALSE);
454}

Referenced by AviMuxIn_Receive().

◆ SpecifyPropertyPages_AddRef()

static ULONG WINAPI SpecifyPropertyPages_AddRef ( ISpecifyPropertyPages iface)
static

Definition at line 1207 of file avimux.c.

1208{
1210 return IBaseFilter_AddRef(&This->filter.IBaseFilter_iface);
1211}
static AviMux * impl_from_ISpecifyPropertyPages(ISpecifyPropertyPages *iface)
Definition: avimux.c:1195

◆ SpecifyPropertyPages_GetPages()

static HRESULT WINAPI SpecifyPropertyPages_GetPages ( ISpecifyPropertyPages iface,
CAUUID *  pPages 
)
static

Definition at line 1219 of file avimux.c.

1221{
1223 FIXME("(%p)->(%p)\n", This, pPages);
1224 return E_NOTIMPL;
1225}

◆ SpecifyPropertyPages_QueryInterface()

static HRESULT WINAPI SpecifyPropertyPages_QueryInterface ( ISpecifyPropertyPages iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 1200 of file avimux.c.

1202{
1204 return IBaseFilter_QueryInterface(&This->filter.IBaseFilter_iface, riid, ppv);
1205}

◆ SpecifyPropertyPages_Release()

static ULONG WINAPI SpecifyPropertyPages_Release ( ISpecifyPropertyPages iface)
static

Definition at line 1213 of file avimux.c.

1214{
1216 return IBaseFilter_Release(&This->filter.IBaseFilter_iface);
1217}

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( qcap  )

Variable Documentation

◆ AviMuxIn_AMStreamControlVtbl

const IAMStreamControlVtbl AviMuxIn_AMStreamControlVtbl
static
Initial value:
= {
}
static ULONG WINAPI AviMuxIn_AMStreamControl_Release(IAMStreamControl *iface)
Definition: avimux.c:2015
static HRESULT WINAPI AviMuxIn_AMStreamControl_QueryInterface(IAMStreamControl *iface, REFIID riid, void **ppv)
Definition: avimux.c:2001
static ULONG WINAPI AviMuxIn_AMStreamControl_AddRef(IAMStreamControl *iface)
Definition: avimux.c:2008
static HRESULT WINAPI AviMuxIn_AMStreamControl_StartAt(IAMStreamControl *iface, const REFERENCE_TIME *ptStart, DWORD dwCookie)
Definition: avimux.c:2022
static HRESULT WINAPI AviMuxIn_AMStreamControl_StopAt(IAMStreamControl *iface, const REFERENCE_TIME *ptStop, BOOL bSendExtra, DWORD dwCookie)
Definition: avimux.c:2032
static HRESULT WINAPI AviMuxIn_AMStreamControl_GetInfo(IAMStreamControl *iface, AM_STREAM_INFO *pInfo)
Definition: avimux.c:2042

Definition at line 2051 of file avimux.c.

Referenced by create_input_pin().

◆ AviMuxIn_BaseInputFuncTable

const BaseInputPinFuncTable AviMuxIn_BaseInputFuncTable
static
Initial value:
= {
{
},
}
static HRESULT WINAPI AviMuxIn_Receive(BaseInputPin *base, IMediaSample *pSample)
Definition: avimux.c:1600
static HRESULT WINAPI AviMuxIn_CheckMediaType(BasePin *base, const AM_MEDIA_TYPE *pmt)
Definition: avimux.c:1572
static LONG WINAPI AviMuxIn_GetMediaTypeVersion(BasePin *base)
Definition: avimux.c:1590
static HRESULT WINAPI AviMuxIn_GetMediaType(BasePin *base, int iPosition, AM_MEDIA_TYPE *amt)
Definition: avimux.c:1595

Definition at line 1703 of file avimux.c.

Referenced by create_input_pin().

◆ AviMuxIn_MemInputPinVtbl

const IMemInputPinVtbl AviMuxIn_MemInputPinVtbl
static
Initial value:
= {
}
static HRESULT WINAPI AviMuxIn_MemInputPin_GetAllocatorRequirements(IMemInputPin *iface, ALLOCATOR_PROPERTIES *pProps)
Definition: avimux.c:2127
static HRESULT WINAPI AviMuxIn_MemInputPin_GetAllocator(IMemInputPin *iface, IMemAllocator **ppAllocator)
Definition: avimux.c:2087
static HRESULT WINAPI AviMuxIn_MemInputPin_Receive(IMemInputPin *iface, IMediaSample *pSample)
Definition: avimux.c:2143
static HRESULT WINAPI AviMuxIn_MemInputPin_ReceiveMultiple(IMemInputPin *iface, IMediaSample **pSamples, LONG nSamples, LONG *nSamplesProcessed)
Definition: avimux.c:2154
static ULONG WINAPI AviMuxIn_MemInputPin_Release(IMemInputPin *iface)
Definition: avimux.c:2080
static HRESULT WINAPI AviMuxIn_MemInputPin_ReceiveCanBlock(IMemInputPin *iface)
Definition: avimux.c:2174
static ULONG WINAPI AviMuxIn_MemInputPin_AddRef(IMemInputPin *iface)
Definition: avimux.c:2073
static HRESULT WINAPI AviMuxIn_MemInputPin_NotifyAllocator(IMemInputPin *iface, IMemAllocator *pAllocator, BOOL bReadOnly)
Definition: avimux.c:2103
static HRESULT WINAPI AviMuxIn_MemInputPin_QueryInterface(IMemInputPin *iface, REFIID riid, void **ppv)
Definition: avimux.c:2066

Definition at line 2189 of file avimux.c.

Referenced by create_input_pin().

◆ AviMuxIn_PinVtbl

const IPinVtbl AviMuxIn_PinVtbl
static
Initial value:
= {
}
static HRESULT WINAPI AviMuxIn_QueryInternalConnections(IPin *iface, IPin **apPin, ULONG *nPin)
Definition: avimux.c:1932
static HRESULT WINAPI AviMuxIn_EnumMediaTypes(IPin *iface, IEnumMediaTypes **ppEnum)
Definition: avimux.c:1924
static ULONG WINAPI AviMuxIn_AddRef(IPin *iface)
Definition: avimux.c:1756
static HRESULT WINAPI AviMuxIn_Disconnect(IPin *iface)
Definition: avimux.c:1841
static ULONG WINAPI AviMuxIn_Release(IPin *iface)
Definition: avimux.c:1762
static HRESULT WINAPI AviMuxIn_BeginFlush(IPin *iface)
Definition: avimux.c:1949
static HRESULT WINAPI AviMuxIn_ReceiveConnection(IPin *iface, IPin *pConnector, const AM_MEDIA_TYPE *pmt)
Definition: avimux.c:1779
static HRESULT WINAPI AviMuxIn_QueryId(IPin *iface, LPWSTR *Id)
Definition: avimux.c:1906
static HRESULT WINAPI AviMuxIn_EndOfStream(IPin *iface)
Definition: avimux.c:1941
static HRESULT WINAPI AviMuxIn_EndFlush(IPin *iface)
Definition: avimux.c:1957
static HRESULT WINAPI AviMuxIn_ConnectionMediaType(IPin *iface, AM_MEDIA_TYPE *pmt)
Definition: avimux.c:1882
static HRESULT WINAPI AviMuxIn_QueryPinInfo(IPin *iface, PIN_INFO *pInfo)
Definition: avimux.c:1890
static HRESULT WINAPI AviMuxIn_QueryDirection(IPin *iface, PIN_DIRECTION *pPinDir)
Definition: avimux.c:1898
static HRESULT WINAPI AviMuxIn_QueryInterface(IPin *iface, REFIID riid, void **ppv)
Definition: avimux.c:1728
static HRESULT WINAPI AviMuxIn_Connect(IPin *iface, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
Definition: avimux.c:1768
static HRESULT WINAPI AviMuxIn_NewSegment(IPin *iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
Definition: avimux.c:1965
static HRESULT WINAPI AviMuxIn_QueryAccept(IPin *iface, const AM_MEDIA_TYPE *pmt)
Definition: avimux.c:1914
static HRESULT WINAPI AviMuxIn_ConnectedTo(IPin *iface, IPin **pPin)
Definition: avimux.c:1874

Definition at line 1975 of file avimux.c.

Referenced by create_input_pin().

◆ AviMuxIn_PropertyBagVtbl

const IPropertyBagVtbl AviMuxIn_PropertyBagVtbl
static
Initial value:
= {
}
static HRESULT WINAPI AviMuxIn_PropertyBag_QueryInterface(IPropertyBag *iface, REFIID riid, void **ppv)
Definition: avimux.c:2206
static ULONG WINAPI AviMuxIn_PropertyBag_AddRef(IPropertyBag *iface)
Definition: avimux.c:2213
static HRESULT WINAPI AviMuxIn_PropertyBag_Write(IPropertyBag *iface, LPCOLESTR pszPropName, VARIANT *pVar)
Definition: avimux.c:2237
static HRESULT WINAPI AviMuxIn_PropertyBag_Read(IPropertyBag *iface, LPCOLESTR pszPropName, VARIANT *pVar, IErrorLog *pErrorLog)
Definition: avimux.c:2227
static ULONG WINAPI AviMuxIn_PropertyBag_Release(IPropertyBag *iface)
Definition: avimux.c:2220

Definition at line 2247 of file avimux.c.

Referenced by create_input_pin().

◆ AviMuxIn_QualityControlVtbl

const IQualityControlVtbl AviMuxIn_QualityControlVtbl
static
Initial value:
= {
}
static HRESULT WINAPI AviMuxIn_QualityControl_QueryInterface(IQualityControl *iface, REFIID riid, void **ppv)
Definition: avimux.c:2260
static ULONG WINAPI AviMuxIn_QualityControl_AddRef(IQualityControl *iface)
Definition: avimux.c:2267
static HRESULT WINAPI AviMuxIn_QualityControl_Notify(IQualityControl *iface, IBaseFilter *pSelf, Quality q)
Definition: avimux.c:2281
static ULONG WINAPI AviMuxIn_QualityControl_Release(IQualityControl *iface)
Definition: avimux.c:2274
static HRESULT WINAPI AviMuxIn_QualityControl_SetSink(IQualityControl *iface, IQualityControl *piqc)
Definition: avimux.c:2293

Definition at line 2302 of file avimux.c.

Referenced by create_input_pin().

◆ AviMuxOut_BaseOutputFuncTable

const BaseOutputPinFuncTable AviMuxOut_BaseOutputFuncTable
static
Initial value:
= {
{
},
}
static LONG WINAPI AviMuxOut_GetMediaTypeVersion(BasePin *base)
Definition: avimux.c:1250
static HRESULT WINAPI AviMuxOut_DecideAllocator(BaseOutputPin *base, IMemInputPin *pPin, IMemAllocator **pAlloc)
Definition: avimux.c:1276
static HRESULT WINAPI AviMuxOut_AttemptConnection(BasePin *base, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
Definition: avimux.c:1234
static HRESULT WINAPI AviMuxOut_BreakConnect(BaseOutputPin *base)
Definition: avimux.c:1302
static HRESULT WINAPI AviMuxOut_GetMediaType(BasePin *base, int iPosition, AM_MEDIA_TYPE *amt)
Definition: avimux.c:1255

Definition at line 1308 of file avimux.c.

Referenced by QCAP_createAVIMux().

◆ AviMuxOut_PinVtbl

const IPinVtbl AviMuxOut_PinVtbl
static
Initial value:
= {
}
static HRESULT WINAPI AviMuxOut_Disconnect(IPin *iface)
Definition: avimux.c:1399
static HRESULT WINAPI AviMuxOut_QueryAccept(IPin *iface, const AM_MEDIA_TYPE *pmt)
Definition: avimux.c:1447
static HRESULT WINAPI AviMuxOut_QueryPinInfo(IPin *iface, PIN_INFO *pInfo)
Definition: avimux.c:1426
static ULONG WINAPI AviMuxOut_Release(IPin *iface)
Definition: avimux.c:1354
static HRESULT WINAPI AviMuxOut_ConnectionMediaType(IPin *iface, AM_MEDIA_TYPE *pmt)
Definition: avimux.c:1419
static HRESULT WINAPI AviMuxOut_ConnectedTo(IPin *iface, IPin **pPin)
Definition: avimux.c:1412
static HRESULT WINAPI AviMuxOut_BeginFlush(IPin *iface)
Definition: avimux.c:1477
static HRESULT WINAPI AviMuxOut_QueryDirection(IPin *iface, PIN_DIRECTION *pPinDir)
Definition: avimux.c:1433
static HRESULT WINAPI AviMuxOut_QueryInternalConnections(IPin *iface, IPin **apPin, ULONG *nPin)
Definition: avimux.c:1462
static ULONG WINAPI AviMuxOut_AddRef(IPin *iface)
Definition: avimux.c:1348
static HRESULT WINAPI AviMuxOut_ReceiveConnection(IPin *iface, IPin *pConnector, const AM_MEDIA_TYPE *pmt)
Definition: avimux.c:1390
static HRESULT WINAPI AviMuxOut_QueryId(IPin *iface, LPWSTR *Id)
Definition: avimux.c:1440
static HRESULT WINAPI AviMuxOut_Connect(IPin *iface, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
Definition: avimux.c:1360
static HRESULT WINAPI AviMuxOut_EndOfStream(IPin *iface)
Definition: avimux.c:1470
static HRESULT WINAPI AviMuxOut_QueryInterface(IPin *iface, REFIID riid, void **ppv)
Definition: avimux.c:1328
static HRESULT WINAPI AviMuxOut_EndFlush(IPin *iface)
Definition: avimux.c:1484
static HRESULT WINAPI AviMuxOut_NewSegment(IPin *iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
Definition: avimux.c:1491
static HRESULT WINAPI AviMuxOut_EnumMediaTypes(IPin *iface, IEnumMediaTypes **ppEnum)
Definition: avimux.c:1455

Definition at line 1499 of file avimux.c.

Referenced by QCAP_createAVIMux().

◆ AviMuxOut_QualityControlVtbl

const IQualityControlVtbl AviMuxOut_QualityControlVtbl
static
Initial value:
= {
}
static HRESULT WINAPI AviMuxOut_QualityControl_QueryInterface(IQualityControl *iface, REFIID riid, void **ppv)
Definition: avimux.c:1526
static ULONG WINAPI AviMuxOut_QualityControl_AddRef(IQualityControl *iface)
Definition: avimux.c:1533
static ULONG WINAPI AviMuxOut_QualityControl_Release(IQualityControl *iface)
Definition: avimux.c:1539
static HRESULT WINAPI AviMuxOut_QualityControl_SetSink(IQualityControl *iface, IQualityControl *piqc)
Definition: avimux.c:1556
static HRESULT WINAPI AviMuxOut_QualityControl_Notify(IQualityControl *iface, IBaseFilter *pSelf, Quality q)
Definition: avimux.c:1545

Definition at line 1564 of file avimux.c.

Referenced by QCAP_createAVIMux().

◆ AviMuxVtbl

const IBaseFilterVtbl AviMuxVtbl
static
Initial value:
= {
}
static HRESULT WINAPI AviMux_Run(IBaseFilter *iface, REFERENCE_TIME tStart)
Definition: avimux.c:605
static HRESULT WINAPI AviMux_Pause(IBaseFilter *iface)
Definition: avimux.c:598
static HRESULT WINAPI AviMux_QueryFilterInfo(IBaseFilter *iface, FILTER_INFO *pInfo)
Definition: avimux.c:766
static HRESULT WINAPI AviMux_QueryVendorInfo(IBaseFilter *iface, LPWSTR *pVendorInfo)
Definition: avimux.c:773
static HRESULT WINAPI AviMux_QueryInterface(IBaseFilter *iface, REFIID riid, void **ppv)
Definition: avimux.c:162
static ULONG WINAPI AviMux_Release(IBaseFilter *iface)
Definition: avimux.c:191
static HRESULT WINAPI AviMux_EnumPins(IBaseFilter *iface, IEnumPins **ppEnum)
Definition: avimux.c:731
static HRESULT WINAPI AviMux_Stop(IBaseFilter *iface)
Definition: avimux.c:456
static HRESULT WINAPI AviMux_FindPin(IBaseFilter *iface, LPCWSTR Id, IPin **ppPin)
Definition: avimux.c:738
HRESULT WINAPI BaseFilterImpl_SetSyncSource(IBaseFilter *iface, IReferenceClock *pClock)
Definition: filter.c:101
HRESULT WINAPI BaseFilterImpl_GetClassID(IBaseFilter *iface, CLSID *pClsid)
Definition: filter.c:77
ULONG WINAPI BaseFilterImpl_AddRef(IBaseFilter *iface)
Definition: filter.c:54
HRESULT WINAPI BaseFilterImpl_GetState(IBaseFilter *iface, DWORD dwMilliSecsTimeout, FILTER_STATE *pState)
Definition: filter.c:87
HRESULT WINAPI BaseFilterImpl_JoinFilterGraph(IBaseFilter *iface, IFilterGraph *pGraph, LPCWSTR pName)
Definition: filter.c:159
HRESULT WINAPI BaseFilterImpl_GetSyncSource(IBaseFilter *iface, IReferenceClock **ppClock)
Definition: filter.c:119

Definition at line 780 of file avimux.c.

Referenced by QCAP_createAVIMux().

◆ ConfigAviMuxVtbl

const IConfigAviMuxVtbl ConfigAviMuxVtbl
static
Initial value:
= {
}
static HRESULT WINAPI ConfigAviMux_GetMasterStream(IConfigAviMux *iface, LONG *pStream)
Definition: avimux.c:829
static HRESULT WINAPI ConfigAviMux_SetOutputCompatibilityIndex(IConfigAviMux *iface, BOOL fOldIndex)
Definition: avimux.c:836
static HRESULT WINAPI ConfigAviMux_GetOutputCompatibilityIndex(IConfigAviMux *iface, BOOL *pfOldIndex)
Definition: avimux.c:844
static HRESULT WINAPI ConfigAviMux_SetMasterStream(IConfigAviMux *iface, LONG iStream)
Definition: avimux.c:822
static HRESULT WINAPI ConfigAviMux_QueryInterface(IConfigAviMux *iface, REFIID riid, void **ppv)
Definition: avimux.c:803
static ULONG WINAPI ConfigAviMux_AddRef(IConfigAviMux *iface)
Definition: avimux.c:810
static ULONG WINAPI ConfigAviMux_Release(IConfigAviMux *iface)
Definition: avimux.c:816

Definition at line 852 of file avimux.c.

Referenced by QCAP_createAVIMux().

◆ ConfigInterleavingVtbl

const IConfigInterleavingVtbl ConfigInterleavingVtbl
static
Initial value:
= {
}
static HRESULT WINAPI ConfigInterleaving_get_Interleaving(IConfigInterleaving *iface, REFERENCE_TIME *prtInterleave, REFERENCE_TIME *prtPreroll)
Definition: avimux.c:932
static HRESULT WINAPI ConfigInterleaving_get_Mode(IConfigInterleaving *iface, InterleavingMode *pMode)
Definition: avimux.c:910
static ULONG WINAPI ConfigInterleaving_Release(IConfigInterleaving *iface)
Definition: avimux.c:880
static HRESULT WINAPI ConfigInterleaving_put_Mode(IConfigInterleaving *iface, InterleavingMode mode)
Definition: avimux.c:886
static HRESULT WINAPI ConfigInterleaving_put_Interleaving(IConfigInterleaving *iface, const REFERENCE_TIME *prtInterleave, const REFERENCE_TIME *prtPreroll)
Definition: avimux.c:918
static ULONG WINAPI ConfigInterleaving_AddRef(IConfigInterleaving *iface)
Definition: avimux.c:874
static HRESULT WINAPI ConfigInterleaving_QueryInterface(IConfigInterleaving *iface, REFIID riid, void **ppv)
Definition: avimux.c:867

Definition at line 940 of file avimux.c.

Referenced by QCAP_createAVIMux().

◆ filter_func_table

const BaseFilterFuncTable filter_func_table
static
Initial value:
= {
}
static IPin *WINAPI AviMux_GetPin(BaseFilter *iface, int pos)
Definition: avimux.c:127
static LONG WINAPI AviMux_GetPinCount(BaseFilter *iface)
Definition: avimux.c:144

Definition at line 151 of file avimux.c.

Referenced by QCAP_createAVIMux().

◆ MediaSeekingVtbl

const IMediaSeekingVtbl MediaSeekingVtbl
static
Initial value:
= {
}
static HRESULT WINAPI MediaSeeking_GetCapabilities(IMediaSeeking *iface, DWORD *pCapabilities)
Definition: avimux.c:974
static HRESULT WINAPI MediaSeeking_QueryInterface(IMediaSeeking *iface, REFIID riid, void **ppv)
Definition: avimux.c:955
static HRESULT WINAPI MediaSeeking_GetAvailable(IMediaSeeking *iface, LONGLONG *pEarliest, LONGLONG *pLatest)
Definition: avimux.c:1079
static HRESULT WINAPI MediaSeeking_IsFormatSupported(IMediaSeeking *iface, const GUID *pFormat)
Definition: avimux.c:990
static HRESULT WINAPI MediaSeeking_GetDuration(IMediaSeeking *iface, LONGLONG *pDuration)
Definition: avimux.c:1030
static HRESULT WINAPI MediaSeeking_CheckCapabilities(IMediaSeeking *iface, DWORD *pCapabilities)
Definition: avimux.c:982
static HRESULT WINAPI MediaSeeking_IsUsingTimeFormat(IMediaSeeking *iface, const GUID *pFormat)
Definition: avimux.c:1014
static HRESULT WINAPI MediaSeeking_GetPreroll(IMediaSeeking *iface, LONGLONG *pllPreroll)
Definition: avimux.c:1101
static HRESULT WINAPI MediaSeeking_SetRate(IMediaSeeking *iface, double dRate)
Definition: avimux.c:1087
static HRESULT WINAPI MediaSeeking_GetRate(IMediaSeeking *iface, double *pdRate)
Definition: avimux.c:1094
static HRESULT WINAPI MediaSeeking_SetPositions(IMediaSeeking *iface, LONGLONG *pCurrent, DWORD dwCurrentFlags, LONGLONG *pStop, DWORD dwStopFlags)
Definition: avimux.c:1063
static HRESULT WINAPI MediaSeeking_GetPositions(IMediaSeeking *iface, LONGLONG *pCurrent, LONGLONG *pStop)
Definition: avimux.c:1071
static ULONG WINAPI MediaSeeking_AddRef(IMediaSeeking *iface)
Definition: