ReactOS  0.4.15-dev-1206-g731eddf
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 }
Definition: avimux.c:96
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT WINAPI BaseFilterImpl_EnumPins(IBaseFilter *iface, IEnumPins **ppEnum)
Definition: filter.c:135
static AviMux * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: avimux.c:156

◆ 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 }
Definition: avimux.c:96
int WINAPI lstrcmpiW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:194
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 debugstr_w
Definition: kernel32.h:32
#define VFW_E_NOT_FOUND
Definition: vfwmsgs.h:61
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:51
static AviMux * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: avimux.c:156
#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 {
129  AviMux *This = impl_from_BaseFilter(iface);
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 }
Definition: avimux.c:96
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
static AviMux * impl_from_BaseFilter(BaseFilter *filter)
Definition: avimux.c:122

◆ AviMux_GetPinCount()

static LONG WINAPI AviMux_GetPinCount ( BaseFilter iface)
static

Definition at line 144 of file avimux.c.

145 {
146  AviMux *This = impl_from_BaseFilter(iface);
147  TRACE("(%p)\n", This);
148  return This->input_pin_no+1;
149 }
Definition: avimux.c:96
#define TRACE(s)
Definition: solgame.cpp:4
static AviMux * impl_from_BaseFilter(BaseFilter *filter)
Definition: avimux.c:122

◆ 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 }
Definition: avimux.c:96
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99
static AviMux * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: avimux.c:156

◆ 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 }
Definition: avimux.c:96
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99
static AviMux * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: avimux.c:156

◆ 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_IBaseFilter
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
const GUID IID_IPersist
Definition: proxy.cpp:14
REFIID LPVOID * ppv
Definition: atlbase.h:39
Definition: avimux.c:96
const GUID IID_ISpecifyPropertyPages
Definition: proxy.cpp:12
#define FIXME(fmt,...)
Definition: debug.h:111
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:51
static AviMux * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: avimux.c:156
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ 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 }
Definition: avimux.c:96
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99
static AviMux * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: avimux.c:156

◆ 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 }
Definition: avimux.c:96
Definition: send.c:48
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
ULONG WINAPI BaseFilterImpl_Release(IBaseFilter *iface)
Definition: filter.c:64
#define FALSE
Definition: types.h:117
GLenum GLint ref
Definition: glext.h:6028
smooth NULL
Definition: ftsmooth.c:416
ULONG WINAPI BaseInputPinImpl_Release(IPin *iface)
Definition: pin.c:868
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:595
ULONG WINAPI BaseOutputPinImpl_Release(IPin *iface)
Definition: pin.c:392
DWORD ObjectRefCount(BOOL increment)
Definition: qcap_main.c:193
static AviMux * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: avimux.c:156
unsigned int ULONG
Definition: retypes.h:1
#define HeapFree(x, y, z)
Definition: compat.h:594

◆ 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 }
#define ckidMAINAVIHEADER
Definition: aviriff.h:53
HRESULT hr
Definition: shlfolder.c:183
#define AVI_INDEX_OF_INDEXES
Definition: aviriff.h:172
Definition: avimux.c:96
#define AVI_INDEX_OF_CHUNKS
Definition: aviriff.h:173
struct _avimainheader AVIMAINHEADER
#define AVIF_HASINDEX
Definition: aviriff.h:46
struct _aviextheader AVIEXTHEADER
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 E_OUTOFMEMORY
Definition: ddrawi.h:100
#define FIXME(fmt,...)
Definition: debug.h:111
smooth NULL
Definition: ftsmooth.c:416
#define AVIF_TRUSTCKTYPE
Definition: aviriff.h:49
#define FCC(ch0, ch1, ch2, ch3)
Definition: aviriff.h:38
int64_t LONGLONG
Definition: typedefs.h:68
#define TRACE(s)
Definition: solgame.cpp:4
struct _rifflist RIFFLIST
#define GetProcessHeap()
Definition: compat.h:595
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
LONG HRESULT
Definition: typedefs.h:79
struct _riffchunk RIFFCHUNK
#define S_OK
Definition: intsafe.h:51
#define ckidAVISUPERINDEX
Definition: aviriff.h:194
#define E_NOTIMPL
Definition: ddrawi.h:99
static HRESULT idx1_add_entry(AviMux *avimux, DWORD ckid, DWORD flags, DWORD off, DWORD len)
Definition: avimux.c:284
static AviMux * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: avimux.c:156
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:49
#define memset(x, y, z)
Definition: compat.h:39
#define MulDiv(x, y, z)
Definition: gdifloat.h:86

◆ 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);
574  rl.fccListType = ckidODML;
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));
588  out_flush(This);
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
HRESULT hr
Definition: shlfolder.c:183
static HRESULT out_seek(AviMux *This, int pos)
Definition: avimux.c:235
#define ckidSTREAMLIST
Definition: aviriff.h:81
#define TRUE
Definition: types.h:120
Definition: avimux.c:96
FOURCC fcc
Definition: aviriff.h:27
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
FOURCC fcc
Definition: aviriff.h:33
#define ckidODML
Definition: aviriff.h:71
#define ckidAVIOLDINDEX
Definition: aviriff.h:127
DWORD cb
Definition: aviriff.h:28
smooth NULL
Definition: ftsmooth.c:416
#define FCC(ch0, ch1, ch2, ch3)
Definition: aviriff.h:38
#define TRACE(s)
Definition: solgame.cpp:4
struct _rifflist RIFFLIST
LONG HRESULT
Definition: typedefs.h:79
static HRESULT out_write(AviMux *This, const void *data, int size)
Definition: avimux.c:255
struct _riffchunk RIFFCHUNK
FOURCC fccListType
Definition: aviriff.h:35
DWORD cb
Definition: aviriff.h:34
FOURCC fcc
Definition: aviriff.h:75
static HRESULT out_flush(AviMux *This)
Definition: avimux.c:217
DWORD FOURCC
Definition: dmdls.h:25
#define ckidAVIEXTHEADER
Definition: aviriff.h:72
#define S_OK
Definition: intsafe.h:51
DWORD cb
Definition: aviriff.h:76
static AviMux * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: avimux.c:156
#define FOURCC(a, b, c, d)
Definition: memtrack.h:4
#define memset(x, y, z)
Definition: compat.h:39
DWORD dwGrandFrames
Definition: aviriff.h:77

◆ 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
Definition: avimux.c:96

◆ 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);
2011  AviMux *This = impl_from_in_IPin(&avimuxin->pin.pin.IPin_iface);
2012  return IBaseFilter_AddRef(&This->filter.IBaseFilter_iface);
2013 }
static AviMux * impl_from_in_IPin(IPin *iface)
Definition: avimux.c:1713
IPin IPin_iface
Definition: strmbase.h:35
Definition: avimux.c:96
BasePin pin
Definition: strmbase.h:90
BaseInputPin pin
Definition: avimux.c:59
static AviMuxIn * AviMuxIn_from_IAMStreamControl(IAMStreamControl *iface)
Definition: avimux.c:1996

◆ 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);
2046  AviMux *This = impl_from_in_IPin(&avimuxin->pin.pin.IPin_iface);
2047  FIXME("(%p:%s)->(%p)\n", This, debugstr_w(avimuxin->pin.pin.pinInfo.achName), pInfo);
2048  return E_NOTIMPL;
2049 }
static AviMux * impl_from_in_IPin(IPin *iface)
Definition: avimux.c:1713
IPin IPin_iface
Definition: strmbase.h:35
Definition: avimux.c:96
BasePin pin
Definition: strmbase.h:90
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
BaseInputPin pin
Definition: avimux.c:59
#define E_NOTIMPL
Definition: ddrawi.h:99
PIN_INFO pinInfo
Definition: strmbase.h:38
static AviMuxIn * AviMuxIn_from_IAMStreamControl(IAMStreamControl *iface)
Definition: avimux.c:1996

◆ 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 }
REFIID riid
Definition: precomp.h:44
IPin IPin_iface
Definition: strmbase.h:35
REFIID LPVOID * ppv
Definition: atlbase.h:39
BasePin pin
Definition: strmbase.h:90
BaseInputPin pin
Definition: avimux.c:59
static AviMuxIn * AviMuxIn_from_IAMStreamControl(IAMStreamControl *iface)
Definition: avimux.c:1996

◆ 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);
2018  AviMux *This = impl_from_in_IPin(&avimuxin->pin.pin.IPin_iface);
2019  return IBaseFilter_Release(&This->filter.IBaseFilter_iface);
2020 }
static AviMux * impl_from_in_IPin(IPin *iface)
Definition: avimux.c:1713
IPin IPin_iface
Definition: strmbase.h:35
Definition: avimux.c:96
BasePin pin
Definition: strmbase.h:90
BaseInputPin pin
Definition: avimux.c:59
static AviMuxIn * AviMuxIn_from_IAMStreamControl(IAMStreamControl *iface)
Definition: avimux.c:1996

◆ 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);
2026  AviMux *This = impl_from_in_IPin(&avimuxin->pin.pin.IPin_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
static AviMux * impl_from_in_IPin(IPin *iface)
Definition: avimux.c:1713
IPin IPin_iface
Definition: strmbase.h:35
Definition: avimux.c:96
BasePin pin
Definition: strmbase.h:90
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
BaseInputPin pin
Definition: avimux.c:59
#define E_NOTIMPL
Definition: ddrawi.h:99
PIN_INFO pinInfo
Definition: strmbase.h:38
static AviMuxIn * AviMuxIn_from_IAMStreamControl(IAMStreamControl *iface)
Definition: avimux.c:1996

◆ 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);
2036  AviMux *This = impl_from_in_IPin(&avimuxin->pin.pin.IPin_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 }
static AviMux * impl_from_in_IPin(IPin *iface)
Definition: avimux.c:1713
IPin IPin_iface
Definition: strmbase.h:35
Definition: avimux.c:96
BasePin pin
Definition: strmbase.h:90
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
BaseInputPin pin
Definition: avimux.c:59
#define E_NOTIMPL
Definition: ddrawi.h:99
PIN_INFO pinInfo
Definition: strmbase.h:38
static AviMuxIn * AviMuxIn_from_IAMStreamControl(IAMStreamControl *iface)
Definition: avimux.c:1996

◆ 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 AviMux * impl_from_in_IPin(IPin *iface)
Definition: avimux.c:1713
Definition: avimux.c:96
BasePin pin
Definition: strmbase.h:90
#define debugstr_w
Definition: kernel32.h:32
BaseInputPin pin
Definition: avimux.c:59
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT WINAPI BaseInputPinImpl_BeginFlush(IPin *iface)
Definition: pin.c:968
static AviMuxIn * AviMuxIn_from_IPin(IPin *iface)
Definition: avimux.c:1721
PIN_INFO pinInfo
Definition: strmbase.h:38

◆ 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 }
#define debugstr_w
Definition: kernel32.h:32
#define S_FALSE
Definition: winerror.h:2357
void dump_AM_MEDIA_TYPE(const AM_MEDIA_TYPE *pmt)
Definition: enummedia.c:38
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:51
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ 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 }
static AviMux * impl_from_in_IPin(IPin *iface)
Definition: avimux.c:1713
HRESULT WINAPI BaseInputPinImpl_Connect(IPin *iface, IPin *pConnector, const AM_MEDIA_TYPE *pmt)
Definition: pin.c:881
Definition: avimux.c:96
BasePin pin
Definition: strmbase.h:90
#define debugstr_w
Definition: kernel32.h:32
BaseInputPin pin
Definition: avimux.c:59
void dump_AM_MEDIA_TYPE(const AM_MEDIA_TYPE *pmt)
Definition: enummedia.c:38
#define TRACE(s)
Definition: solgame.cpp:4
static AviMuxIn * AviMuxIn_from_IPin(IPin *iface)
Definition: avimux.c:1721
PIN_INFO pinInfo
Definition: strmbase.h:38

◆ 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 }
static AviMux * impl_from_in_IPin(IPin *iface)
Definition: avimux.c:1713
Definition: avimux.c:96
BasePin pin
Definition: strmbase.h:90
#define debugstr_w
Definition: kernel32.h:32
HRESULT WINAPI BasePinImpl_ConnectedTo(IPin *iface, IPin **ppPin)
Definition: pin.c:222
BaseInputPin pin
Definition: avimux.c:59
#define TRACE(s)
Definition: solgame.cpp:4
static AviMuxIn * AviMuxIn_from_IPin(IPin *iface)
Definition: avimux.c:1721
PIN_INFO pinInfo
Definition: strmbase.h:38

◆ 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 }
static AviMux * impl_from_in_IPin(IPin *iface)
Definition: avimux.c:1713
Definition: avimux.c:96
BasePin pin
Definition: strmbase.h:90
#define debugstr_w
Definition: kernel32.h:32
BaseInputPin pin
Definition: avimux.c:59
#define TRACE(s)
Definition: solgame.cpp:4
static AviMuxIn * AviMuxIn_from_IPin(IPin *iface)
Definition: avimux.c:1721
PIN_INFO pinInfo
Definition: strmbase.h:38
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 hr
Definition: shlfolder.c:183
static AviMux * impl_from_in_IPin(IPin *iface)
Definition: avimux.c:1713
Definition: avimux.c:96
BasePin pin
Definition: strmbase.h:90
#define debugstr_w
Definition: kernel32.h:32
HRESULT WINAPI BasePinImpl_Disconnect(IPin *iface)
Definition: pin.c:197
IMediaSample * samples_head
Definition: avimux.c:92
smooth NULL
Definition: ftsmooth.c:416
BaseInputPin pin
Definition: avimux.c:59
IMemAllocator * samples_allocator
Definition: avimux.c:93
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
static AviMuxIn * AviMuxIn_from_IPin(IPin *iface)
Definition: avimux.c:1721
struct AviMuxIn::@256 * strf
unsigned char BYTE
Definition: xxhash.c:193
PIN_INFO pinInfo
Definition: strmbase.h:38

◆ 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 }
static AviMux * impl_from_in_IPin(IPin *iface)
Definition: avimux.c:1713
HRESULT WINAPI BaseInputPinImpl_EndFlush(IPin *iface)
Definition: pin.c:988
Definition: avimux.c:96
BasePin pin
Definition: strmbase.h:90
#define debugstr_w
Definition: kernel32.h:32
BaseInputPin pin
Definition: avimux.c:59
#define TRACE(s)
Definition: solgame.cpp:4
static AviMuxIn * AviMuxIn_from_IPin(IPin *iface)
Definition: avimux.c:1721
PIN_INFO pinInfo
Definition: strmbase.h:38

◆ 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 }
static AviMux * impl_from_in_IPin(IPin *iface)
Definition: avimux.c:1713
Definition: avimux.c:96
BasePin pin
Definition: strmbase.h:90
#define debugstr_w
Definition: kernel32.h:32
BaseInputPin pin
Definition: avimux.c:59
#define TRACE(s)
Definition: solgame.cpp:4
static AviMuxIn * AviMuxIn_from_IPin(IPin *iface)
Definition: avimux.c:1721
PIN_INFO pinInfo
Definition: strmbase.h:38
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 }
static AviMux * impl_from_in_IPin(IPin *iface)
Definition: avimux.c:1713
Definition: avimux.c:96
BasePin pin
Definition: strmbase.h:90
#define debugstr_w
Definition: kernel32.h:32
HRESULT WINAPI BasePinImpl_EnumMediaTypes(IPin *iface, IEnumMediaTypes **ppEnum)
Definition: pin.c:318
BaseInputPin pin
Definition: avimux.c:59
#define TRACE(s)
Definition: solgame.cpp:4
static AviMuxIn * AviMuxIn_from_IPin(IPin *iface)
Definition: avimux.c:1721
PIN_INFO pinInfo
Definition: strmbase.h:38

◆ AviMuxIn_from_IAMStreamControl()

static AviMuxIn* AviMuxIn_from_IAMStreamControl ( IAMStreamControl *  iface)
inlinestatic

Definition at line 1996 of file avimux.c.

1997 {
1998  return CONTAINING_RECORD(iface, AviMuxIn, IAMStreamControl_iface);
1999 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by AviMuxIn_AMStreamControl_AddRef(), AviMuxIn_AMStreamControl_GetInfo(), AviMuxIn_AMStreamControl_QueryInterface(), AviMuxIn_AMStreamControl_Release(), AviMuxIn_AMStreamControl_StartAt(), and AviMuxIn_AMStreamControl_StopAt().

◆ AviMuxIn_from_IMemInputPin()

static AviMuxIn* AviMuxIn_from_IMemInputPin ( IMemInputPin iface)
inlinestatic

Definition at line 2060 of file avimux.c.

2061 {
2062  BaseInputPin *bip = CONTAINING_RECORD(iface, BaseInputPin, IMemInputPin_iface);
2063  return CONTAINING_RECORD(bip, AviMuxIn, pin);
2064 }
Definition: regsvr.c:103
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by AviMuxIn_MemInputPin_AddRef(), AviMuxIn_MemInputPin_GetAllocator(), AviMuxIn_MemInputPin_GetAllocatorRequirements(), AviMuxIn_MemInputPin_NotifyAllocator(), AviMuxIn_MemInputPin_QueryInterface(), AviMuxIn_MemInputPin_Receive(), AviMuxIn_MemInputPin_ReceiveCanBlock(), AviMuxIn_MemInputPin_ReceiveMultiple(), and AviMuxIn_MemInputPin_Release().

◆ AviMuxIn_from_IPin()

static AviMuxIn* AviMuxIn_from_IPin ( IPin iface)
inlinestatic

Definition at line 1721 of file avimux.c.

1722 {
1723  BasePin *bp = CONTAINING_RECORD(iface, BasePin, IPin_iface);
1725  return CONTAINING_RECORD(bip, AviMuxIn, pin);
1726 }
Definition: regsvr.c:103
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by AviMuxIn_BeginFlush(), AviMuxIn_Connect(), AviMuxIn_ConnectedTo(), AviMuxIn_ConnectionMediaType(), AviMuxIn_Disconnect(), AviMuxIn_EndFlush(), AviMuxIn_EndOfStream(), AviMuxIn_EnumMediaTypes(), AviMuxIn_NewSegment(), AviMuxIn_QueryAccept(), AviMuxIn_QueryDirection(), AviMuxIn_QueryId(), AviMuxIn_QueryInterface(), AviMuxIn_QueryInternalConnections(), AviMuxIn_QueryPinInfo(), and AviMuxIn_ReceiveConnection().

◆ AviMuxIn_from_IPropertyBag()

static AviMuxIn* AviMuxIn_from_IPropertyBag ( IPropertyBag iface)
inlinestatic

Definition at line 2201 of file avimux.c.

2202 {
2203  return CONTAINING_RECORD(iface, AviMuxIn, IPropertyBag_iface);
2204 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by AviMuxIn_PropertyBag_AddRef(), AviMuxIn_PropertyBag_QueryInterface(), AviMuxIn_PropertyBag_Read(), AviMuxIn_PropertyBag_Release(), and AviMuxIn_PropertyBag_Write().

◆ AviMuxIn_from_IQualityControl()

static AviMuxIn* AviMuxIn_from_IQualityControl ( IQualityControl iface)
inlinestatic

Definition at line 2255 of file avimux.c.

2256 {
2257  return CONTAINING_RECORD(iface, AviMuxIn, IQualityControl_iface);
2258 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by AviMuxIn_QualityControl_AddRef(), AviMuxIn_QualityControl_Notify(), AviMuxIn_QualityControl_QueryInterface(), AviMuxIn_QualityControl_Release(), and AviMuxIn_QualityControl_SetSink().

◆ 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 }
#define S_FALSE
Definition: winerror.h:2357

◆ 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);
2076  AviMux *This = impl_from_in_IPin(&avimuxin->pin.pin.IPin_iface);
2077  return IBaseFilter_AddRef(&This->filter.IBaseFilter_iface);
2078 }
static AviMux * impl_from_in_IPin(IPin *iface)
Definition: avimux.c:1713
IPin IPin_iface
Definition: strmbase.h:35
Definition: avimux.c:96
BasePin pin
Definition: strmbase.h:90
BaseInputPin pin
Definition: avimux.c:59
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);
2091  AviMux *This = impl_from_in_IPin(&avimuxin->pin.pin.IPin_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 }
static AviMux * impl_from_in_IPin(IPin *iface)
Definition: avimux.c:1713
IPin IPin_iface
Definition: strmbase.h:35
Definition: avimux.c:96
BasePin pin
Definition: strmbase.h:90
#define debugstr_w
Definition: kernel32.h:32
BaseInputPin pin
Definition: avimux.c:59
#define TRACE(s)
Definition: solgame.cpp:4
static AviMuxIn * AviMuxIn_from_IMemInputPin(IMemInputPin *iface)
Definition: avimux.c:2060
IMemAllocator * pAllocator
Definition: strmbase.h:93
#define S_OK
Definition: intsafe.h:51
PIN_INFO pinInfo
Definition: strmbase.h:38
#define E_POINTER
Definition: winerror.h:2365

◆ 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);
2131  AviMux *This = impl_from_in_IPin(&avimuxin->pin.pin.IPin_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 }
static AviMux * impl_from_in_IPin(IPin *iface)
Definition: avimux.c:1713
IPin IPin_iface
Definition: strmbase.h:35
Definition: avimux.c:96
BasePin pin
Definition: strmbase.h:90
#define debugstr_w
Definition: kernel32.h:32
BaseInputPin pin
Definition: avimux.c:59
#define TRACE(s)
Definition: solgame.cpp:4
static AviMuxIn * AviMuxIn_from_IMemInputPin(IMemInputPin *iface)
Definition: avimux.c:2060
#define S_OK
Definition: intsafe.h:51
PIN_INFO pinInfo
Definition: strmbase.h:38
#define E_POINTER
Definition: winerror.h:2365

◆ 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);
2107  AviMux *This = impl_from_in_IPin(&avimuxin->pin.pin.IPin_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 }
HRESULT hr
Definition: shlfolder.c:183
static AviMux * impl_from_in_IPin(IPin *iface)
Definition: avimux.c:1713
IPin IPin_iface
Definition: strmbase.h:35
Definition: avimux.c:96
BasePin pin
Definition: strmbase.h:90
#define debugstr_w
Definition: kernel32.h:32
BaseInputPin pin
Definition: avimux.c:59
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
static AviMuxIn * AviMuxIn_from_IMemInputPin(IMemInputPin *iface)
Definition: avimux.c:2060
IMemAllocator * pAllocator
Definition: strmbase.h:93
PIN_INFO pinInfo
Definition: strmbase.h:38
static const WCHAR props[]
Definition: wbemdisp.c:288
#define E_POINTER
Definition: winerror.h:2365
#define memset(x, y, z)
Definition: compat.h:39

◆ 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 }
REFIID riid
Definition: precomp.h:44
IPin IPin_iface
Definition: strmbase.h:35
REFIID LPVOID * ppv
Definition: atlbase.h:39
BasePin pin
Definition: strmbase.h:90
BaseInputPin pin
Definition: avimux.c:59
static AviMuxIn * AviMuxIn_from_IMemInputPin(IMemInputPin *iface)
Definition: avimux.c:2060

◆ 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);
2147  AviMux *This = impl_from_in_IPin(&avimuxin->pin.pin.IPin_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
static AviMux * impl_from_in_IPin(IPin *iface)
Definition: avimux.c:1713
IPin IPin_iface
Definition: strmbase.h:35
Definition: avimux.c:96
BasePin pin
Definition: strmbase.h:90
#define debugstr_w
Definition: kernel32.h:32
BaseInputPin pin
Definition: avimux.c:59
#define TRACE(s)
Definition: solgame.cpp:4
static AviMuxIn * AviMuxIn_from_IMemInputPin(IMemInputPin *iface)
Definition: avimux.c:2060
PIN_INFO pinInfo
Definition: strmbase.h:38

◆ 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);
2177  AviMux *This = impl_from_in_IPin(&avimuxin->pin.pin.IPin_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 }
HRESULT hr
Definition: shlfolder.c:183
static AviMux * impl_from_in_IPin(IPin *iface)
Definition: avimux.c:1713
IPin IPin_iface
Definition: strmbase.h:35
Definition: avimux.c:96
BasePin pin
Definition: strmbase.h:90
#define debugstr_w
Definition: kernel32.h:32
#define S_FALSE
Definition: winerror.h:2357
BaseInputPin pin
Definition: avimux.c:59
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
static AviMuxIn * AviMuxIn_from_IMemInputPin(IMemInputPin *iface)
Definition: avimux.c:2060
#define S_OK
Definition: intsafe.h:51
PIN_INFO pinInfo
Definition: strmbase.h:38

◆ 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);
2158  AviMux *This = impl_from_in_IPin(&avimuxin->pin.pin.IPin_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 }
const struct BaseInputPinFuncTable * pFuncsTable
Definition: strmbase.h:97
HRESULT hr
Definition: shlfolder.c:183
static AviMux * impl_from_in_IPin(IPin *iface)
Definition: avimux.c:1713
IPin IPin_iface
Definition: strmbase.h:35
Definition: avimux.c:96
BasePin pin
Definition: strmbase.h:90
#define debugstr_w
Definition: kernel32.h:32
BaseInputPin pin
Definition: avimux.c:59
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
static AviMuxIn * AviMuxIn_from_IMemInputPin(IMemInputPin *iface)
Definition: avimux.c:2060
#define S_OK
Definition: intsafe.h:51
PIN_INFO pinInfo
Definition: strmbase.h:38

◆ 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);
2083  AviMux *This = impl_from_in_IPin(&avimuxin->pin.pin.IPin_iface);
2084  return IBaseFilter_Release(&This->filter.IBaseFilter_iface);
2085 }
static AviMux * impl_from_in_IPin(IPin *iface)
Definition: avimux.c:1713
IPin IPin_iface
Definition: strmbase.h:35
Definition: avimux.c:96
BasePin pin
Definition: strmbase.h:90
BaseInputPin pin
Definition: avimux.c:59
static AviMuxIn * AviMuxIn_from_IMemInputPin(IMemInputPin *iface)
Definition: avimux.c:2060

◆ 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 }
static AviMux * impl_from_in_IPin(IPin *iface)
Definition: avimux.c:1713
Definition: avimux.c:96
BasePin pin
Definition: strmbase.h:90
#define debugstr_w
Definition: kernel32.h:32
BaseInputPin pin
Definition: avimux.c:59
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT WINAPI BasePinImpl_NewSegment(IPin *iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
Definition: pin.c:338
static AviMuxIn * AviMuxIn_from_IPin(IPin *iface)
Definition: avimux.c:1721
PIN_INFO pinInfo
Definition: strmbase.h:38
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:49

◆ 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);
2216  AviMux *This = impl_from_in_IPin(&avimuxin->pin.pin.IPin_iface);
2217  return IBaseFilter_AddRef(&This->filter.IBaseFilter_iface);
2218 }
static AviMux * impl_from_in_IPin(IPin *iface)
Definition: avimux.c:1713
IPin IPin_iface
Definition: strmbase.h:35
Definition: avimux.c:96
BasePin pin
Definition: strmbase.h:90
BaseInputPin pin
Definition: avimux.c:59
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 }
REFIID riid
Definition: precomp.h:44
IPin IPin_iface
Definition: strmbase.h:35
REFIID LPVOID * ppv
Definition: atlbase.h:39
BasePin pin
Definition: strmbase.h:90
BaseInputPin pin
Definition: avimux.c:59
static AviMuxIn * AviMuxIn_from_IPropertyBag(IPropertyBag *iface)
Definition: avimux.c:2201

◆ 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);
2231  AviMux *This = impl_from_in_IPin(&avimuxin->pin.pin.IPin_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 }
static AviMux * impl_from_in_IPin(IPin *iface)
Definition: avimux.c:1713
IPin IPin_iface
Definition: strmbase.h:35
Definition: avimux.c:96
BasePin pin
Definition: strmbase.h:90
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
BaseInputPin pin
Definition: avimux.c:59
static AviMuxIn * AviMuxIn_from_IPropertyBag(IPropertyBag *iface)
Definition: avimux.c:2201
#define E_NOTIMPL
Definition: ddrawi.h:99
PIN_INFO pinInfo
Definition: strmbase.h:38

◆ 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);
2223  AviMux *This = impl_from_in_IPin(&avimuxin->pin.pin.IPin_iface);
2224  return IBaseFilter_Release(&This->filter.IBaseFilter_iface);
2225 }
static AviMux * impl_from_in_IPin(IPin *iface)
Definition: avimux.c:1713
IPin IPin_iface
Definition: strmbase.h:35
Definition: avimux.c:96
BasePin pin
Definition: strmbase.h:90
BaseInputPin pin
Definition: avimux.c:59
static AviMuxIn * AviMuxIn_from_IPropertyBag(IPropertyBag *iface)
Definition: avimux.c:2201

◆ 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);
2241  AviMux *This = impl_from_in_IPin(&avimuxin->pin.pin.IPin_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 }
static AviMux * impl_from_in_IPin(IPin *iface)
Definition: avimux.c:1713
IPin IPin_iface
Definition: strmbase.h:35
Definition: avimux.c:96
BasePin pin
Definition: strmbase.h:90
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
BaseInputPin pin
Definition: avimux.c:59
static AviMuxIn * AviMuxIn_from_IPropertyBag(IPropertyBag *iface)
Definition: avimux.c:2201
#define E_NOTIMPL
Definition: ddrawi.h:99
PIN_INFO pinInfo
Definition: strmbase.h:38

◆ 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);
2270  AviMux *This = impl_from_in_IPin(&avimuxin->pin.pin.IPin_iface);
2271  return IBaseFilter_AddRef(&This->filter.IBaseFilter_iface);
2272 }
static AviMux * impl_from_in_IPin(IPin *iface)
Definition: avimux.c:1713
IPin IPin_iface
Definition: strmbase.h:35
Definition: avimux.c:96
BasePin pin
Definition: strmbase.h:90
BaseInputPin pin
Definition: avimux.c:59
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);
2285  AviMux *This = impl_from_in_IPin(&avimuxin->pin.pin.IPin_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 }
static AviMux * impl_from_in_IPin(IPin *iface)
Definition: avimux.c:1713
IPin IPin_iface
Definition: strmbase.h:35
Definition: avimux.c:96
BasePin pin
Definition: strmbase.h:90
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
BaseInputPin pin
Definition: avimux.c:59
GLdouble GLdouble GLdouble GLdouble q
Definition: gl.h:2063
#define E_NOTIMPL
Definition: ddrawi.h:99
PIN_INFO pinInfo
Definition: strmbase.h:38
static AviMuxIn * AviMuxIn_from_IQualityControl(IQualityControl *iface)
Definition: avimux.c:2255
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:49

◆ 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 }
REFIID riid
Definition: precomp.h:44
IPin IPin_iface
Definition: strmbase.h:35
REFIID LPVOID * ppv
Definition: atlbase.h:39
BasePin pin
Definition: strmbase.h:90
BaseInputPin pin
Definition: avimux.c:59
static AviMuxIn * AviMuxIn_from_IQualityControl(IQualityControl *iface)
Definition: avimux.c:2255

◆ 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);
2277  AviMux *This = impl_from_in_IPin(&avimuxin->pin.pin.IPin_iface);
2278  return IBaseFilter_Release(&This->filter.IBaseFilter_iface);
2279 }
static AviMux * impl_from_in_IPin(IPin *iface)
Definition: avimux.c:1713
IPin IPin_iface
Definition: strmbase.h:35
Definition: avimux.c:96
BasePin pin
Definition: strmbase.h:90
BaseInputPin pin
Definition: avimux.c:59
static AviMuxIn * AviMuxIn_from_IQualityControl(IQualityControl *iface)
Definition: avimux.c:2255

◆ 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);
2297  AviMux *This = impl_from_in_IPin(&avimuxin->pin.pin.IPin_iface);
2298  FIXME("(%p:%s)->(%p)\n", This, debugstr_w(avimuxin->pin.pin.pinInfo.achName), piqc);
2299  return E_NOTIMPL;
2300 }
static AviMux * impl_from_in_IPin(IPin *iface)
Definition: avimux.c:1713
IPin IPin_iface
Definition: strmbase.h:35
Definition: avimux.c:96
BasePin pin
Definition: strmbase.h:90
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
BaseInputPin pin
Definition: avimux.c:59
#define E_NOTIMPL
Definition: ddrawi.h:99
PIN_INFO pinInfo
Definition: strmbase.h:38
static AviMuxIn * AviMuxIn_from_IQualityControl(IQualityControl *iface)
Definition: avimux.c:2255

◆ 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 }
static AviMux * impl_from_in_IPin(IPin *iface)
Definition: avimux.c:1713
Definition: avimux.c:96
BasePin pin
Definition: strmbase.h:90
#define debugstr_w
Definition: kernel32.h:32
HRESULT WINAPI BasePinImpl_QueryAccept(IPin *iface, const AM_MEDIA_TYPE *pmt)
Definition: pin.c:311
BaseInputPin pin
Definition: avimux.c:59
void dump_AM_MEDIA_TYPE(const AM_MEDIA_TYPE *pmt)
Definition: enummedia.c:38
#define TRACE(s)
Definition: solgame.cpp:4
static AviMuxIn * AviMuxIn_from_IPin(IPin *iface)
Definition: avimux.c:1721
PIN_INFO pinInfo
Definition: strmbase.h:38

◆ 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 }
static AviMux * impl_from_in_IPin(IPin *iface)
Definition: avimux.c:1713
Definition: avimux.c:96
BasePin pin
Definition: strmbase.h:90
#define debugstr_w
Definition: kernel32.h:32
HRESULT WINAPI BasePinImpl_QueryDirection(IPin *iface, PIN_DIRECTION *pPinDir)
Definition: pin.c:285
BaseInputPin pin
Definition: avimux.c:59
#define TRACE(s)
Definition: solgame.cpp:4
static AviMuxIn * AviMuxIn_from_IPin(IPin *iface)
Definition: avimux.c:1721
PIN_INFO pinInfo
Definition: strmbase.h:38

◆ 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 }
static AviMux * impl_from_in_IPin(IPin *iface)
Definition: avimux.c:1713
Definition: avimux.c:96
BasePin pin
Definition: strmbase.h:90
DWORD Id
#define debugstr_w
Definition: kernel32.h:32
BaseInputPin pin
Definition: avimux.c:59
#define TRACE(s)
Definition: solgame.cpp:4
static AviMuxIn * AviMuxIn_from_IPin(IPin *iface)
Definition: avimux.c:1721
HRESULT WINAPI BasePinImpl_QueryId(IPin *iface, LPWSTR *Id)
Definition: pin.c:296
PIN_INFO pinInfo
Definition: strmbase.h:38

◆ 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),
1734  debugstr_guid(riid), ppv);
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 }
IMemInputPin IMemInputPin_iface
Definition: strmbase.h:92
#define E_NOINTERFACE
Definition: winerror.h:2364
IAMStreamControl IAMStreamControl_iface
Definition: avimux.c:60
REFIID riid
Definition: precomp.h:44
static AviMux * impl_from_in_IPin(IPin *iface)
Definition: avimux.c:1713
IPin IPin_iface
Definition: strmbase.h:35
REFIID LPVOID * ppv
Definition: atlbase.h:39
Definition: avimux.c:96
BasePin pin
Definition: strmbase.h:90
IPropertyBag IPropertyBag_iface
Definition: avimux.c:61
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
smooth NULL
Definition: ftsmooth.c:416
const GUID IID_IPropertyBag
BaseInputPin pin
Definition: avimux.c:59
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
static AviMuxIn * AviMuxIn_from_IPin(IPin *iface)
Definition: avimux.c:1721
#define S_OK
Definition: intsafe.h:51
PIN_INFO pinInfo
Definition: strmbase.h:38
IQualityControl IQualityControl_iface
Definition: avimux.c:62
const GUID IID_IPin
Definition: pincontrol.cpp:15
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ 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 }
static AviMux * impl_from_in_IPin(IPin *iface)
Definition: avimux.c:1713
Definition: avimux.c:96
BasePin pin
Definition: strmbase.h:90
#define debugstr_w
Definition: kernel32.h:32
BaseInputPin pin
Definition: avimux.c:59
#define TRACE(s)
Definition: solgame.cpp:4
static AviMuxIn * AviMuxIn_from_IPin(IPin *iface)
Definition: avimux.c:1721
HRESULT WINAPI BasePinImpl_QueryInternalConnections(IPin *iface, IPin **apPin, ULONG *cPin)
Definition: pin.c:329
PIN_INFO pinInfo
Definition: strmbase.h:38

◆ 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 }
static AviMux * impl_from_in_IPin(IPin *iface)
Definition: avimux.c:1713
Definition: avimux.c:96
BasePin pin
Definition: strmbase.h:90
#define debugstr_w
Definition: kernel32.h:32
BaseInputPin pin
Definition: avimux.c:59
#define TRACE(s)
Definition: solgame.cpp:4
static AviMuxIn * AviMuxIn_from_IPin(IPin *iface)
Definition: avimux.c:1721
HRESULT WINAPI BasePinImpl_QueryPinInfo(IPin *iface, PIN_INFO *pInfo)
Definition: pin.c:273
PIN_INFO pinInfo
Definition: strmbase.h:38

◆ AviMuxIn_Receive()

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

Definition at line 1600 of file avimux.c.

1601 {
1602  AviMuxIn *avimuxin = CONTAINING_RECORD(base, AviMuxIn, pin);
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;
1609  DWORD max_size, size;
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 }
#define VFW_E_START_TIME_AFTER_END
Definition: vfwmsgs.h:79
HRESULT hr
Definition: shlfolder.c:183
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define TRUE
Definition: types.h:120
REFERENCE_TIME stop
Definition: avimux.c:65
DWORD dwSuggestedBufferSize
Definition: aviriff.h:65
Definition: avimux.c:96
AVISTREAMHEADER strh
Definition: avimux.c:70
BasePin pin
Definition: strmbase.h:90
DWORD dwSuggestedBufferSize
Definition: aviriff.h:112
Definition: regsvr.c:103
#define FALSE
Definition: types.h:117
#define debugstr_w
Definition: kernel32.h:32
static INT max_size
Definition: history.c:51
static const char mbstate_t *static wchar_t const char mbstate_t *static const wchar_t int *static double
Definition: string.c:80
smooth NULL
Definition: ftsmooth.c:416
BaseInputPin pin
Definition: avimux.c:59
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
IMemAllocator * samples_allocator
Definition: avimux.c:93
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
LONGLONG REFERENCE_TIME
Definition: dmusicks.h:9
LONG HRESULT
Definition: typedefs.h:79
unsigned long DWORD
Definition: ntddk_ex.h:95
struct _riffchunk RIFFCHUNK
GLbitfield flags
Definition: glext.h:7161
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
unsigned char BYTE
Definition: xxhash.c:193
#define S_OK
Definition: intsafe.h:51
#define ALIGN(x)
Definition: avimux.c:40
GLuint start
Definition: gl.h:1545
REFERENCE_TIME start
Definition: avimux.c:112
static AviMux * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: avimux.c:156
AVIMAINHEADER avih
Definition: avimux.c:113
static const WCHAR props[]
Definition: wbemdisp.c:288
static HRESULT queue_sample(AviMux *avimux, AviMuxIn *avimuxin, IMediaSample *sample)
Definition: avimux.c:429
REFERENCE_TIME stop
Definition: avimux.c:112
#define memset(x, y, z)
Definition: compat.h:39
#define SUCCEEDED(hr)
Definition: intsafe.h:49
AM_MEDIA_TYPE mtCurrent
Definition: strmbase.h:40

◆ 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)) {
1821  BasePinImpl_Disconnect(iface);
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 }
#define ckidSTREAMFORMAT
Definition: aviriff.h:125
HRESULT hr
Definition: shlfolder.c:183
REFERENCE_TIME avg_time_per_frame
Definition: avimux.c:64
static HRESULT create_input_pin(AviMux *)
Definition: avimux.c:2310
static AviMux * impl_from_in_IPin(IPin *iface)
Definition: avimux.c:1713
REFERENCE_TIME stop
Definition: avimux.c:65
Definition: avimux.c:96
AVISTREAMHEADER strh
Definition: avimux.c:70
#define ckidSTREAMHEADER
Definition: aviriff.h:88
BasePin pin
Definition: strmbase.h:90
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
DWORD biCompression
Definition: amvideo.idl:35
HRESULT WINAPI BasePinImpl_Disconnect(IPin *iface)
Definition: pin.c:197
REFERENCE_TIME AvgTimePerFrame
Definition: amvideo.idl:187
BITMAPINFOHEADER bmiHeader
Definition: amvideo.idl:189
BaseInputPin pin
Definition: avimux.c:59
#define debugstr_guid
Definition: kernel32.h:35
#define FCC(ch0, ch1, ch2, ch3)
Definition: aviriff.h:38
FOURCC fccType
Definition: aviriff.h:102
void dump_AM_MEDIA_TYPE(const AM_MEDIA_TYPE *pmt)
Definition: enummedia.c:38
IMemAllocator * samples_allocator
Definition: avimux.c:93
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
LONG HRESULT
Definition: typedefs.h:79
static AviMuxIn * AviMuxIn_from_IPin(IPin *iface)
Definition: avimux.c:1721
DWORD biSizeImage
Definition: amvideo.idl:36
FOURCC fccHandler
Definition: aviriff.h:103
struct AviMuxIn::@256 * strf
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define streamtypeVIDEO
Definition: aviriff.h:92
#define ALIGN(x)
Definition: avimux.c:40
#define E_NOTIMPL
Definition: ddrawi.h:99
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
PIN_INFO pinInfo
Definition: strmbase.h:38
HRESULT WINAPI BaseInputPinImpl_ReceiveConnection(IPin *iface, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
Definition: pin.c:889
#define E_POINTER
Definition: winerror.h:2365
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:426
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define SUCCEEDED(hr)
Definition: intsafe.h:49

◆ 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 }
static AviMux * impl_from_in_IPin(IPin *iface)
Definition: avimux.c:1713
Definition: avimux.c:96

◆ 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 }
Definition: avimux.c:96
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)
1245  return VFW_E_INVALID_DIRECTION;
1246 
1247  return BaseOutputPinImpl_AttemptConnection(base, pReceivePin, pmt);
1248 }
HRESULT hr
Definition: shlfolder.c:183
unsigned int dir
Definition: maze.c:112
void dump_AM_MEDIA_TYPE(const AM_MEDIA_TYPE *pmt)
Definition: enummedia.c:38
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
#define S_OK
Definition: intsafe.h:51
HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(BasePin *This, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
Definition: pin.c:712
enum _PinDirection PIN_DIRECTION
#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 }
Definition: avimux.c:96
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT WINAPI BaseOutputPinImpl_BeginFlush(IPin *iface)
Definition: pin.c:536
static AviMux * impl_from_out_IPin(IPin *iface)
Definition: avimux.c:1320

◆ 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 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ 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 hr
Definition: shlfolder.c:183
Definition: avimux.c:96
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
void dump_AM_MEDIA_TYPE(const AM_MEDIA_TYPE *pmt)
Definition: enummedia.c:38
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
static AviMux * impl_from_out_IPin(IPin *iface)
Definition: avimux.c:1320
HRESULT WINAPI BaseOutputPinImpl_Connect(IPin *iface, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
Definition: pin.c:405
#define S_OK
Definition: intsafe.h:51
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 }
Definition: avimux.c:96
HRESULT WINAPI BasePinImpl_ConnectedTo(IPin *iface, IPin **ppPin)
Definition: pin.c:222
#define TRACE(s)
Definition: solgame.cpp:4
static AviMux * impl_from_out_IPin(IPin *iface)
Definition: avimux.c:1320

◆ 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 }
Definition: avimux.c:96
#define TRACE(s)
Definition: solgame.cpp:4
static AviMux * impl_from_out_IPin(IPin *iface)
Definition: avimux.c:1320
HRESULT WINAPI BasePinImpl_ConnectionMediaType(IPin *iface, AM_MEDIA_TYPE *pmt)
Definition: pin.c:248

◆ 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 hr
Definition: shlfolder.c:183
#define TRUE
Definition: types.h:120
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
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 }
HRESULT hr
Definition: shlfolder.c:183
Definition: avimux.c:96
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
static AviMux * impl_from_out_IPin(IPin *iface)
Definition: avimux.c:1320
#define S_OK
Definition: intsafe.h:51
HRESULT WINAPI BaseOutputPinImpl_Disconnect(IPin *iface)
Definition: pin.c:497

◆ 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 }
Definition: avimux.c:96
HRESULT WINAPI BaseOutputPinImpl_EndFlush(IPin *iface)
Definition: pin.c:545
#define TRACE(s)
Definition: solgame.cpp:4
static AviMux * impl_from_out_IPin(IPin *iface)
Definition: avimux.c:1320

◆ 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 }
Definition: avimux.c:96
HRESULT WINAPI BaseOutputPinImpl_EndOfStream(IPin *iface)
Definition: pin.c:527
#define TRACE(s)
Definition: solgame.cpp:4
static AviMux * impl_from_out_IPin(IPin *iface)
Definition: avimux.c:1320

◆ 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 }
Definition: avimux.c:96
HRESULT WINAPI BasePinImpl_EnumMediaTypes(IPin *iface, IEnumMediaTypes **ppEnum)
Definition: pin.c:318
#define TRACE(s)
Definition: solgame.cpp:4
static AviMux * impl_from_out_IPin(IPin *iface)
Definition: avimux.c:1320

◆ 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 VFW_S_NO_MORE_ITEMS
Definition: vfwmsgs.h:19
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define GUID_NULL
Definition: ks.h:106
#define S_OK
Definition: intsafe.h:51

◆ 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 }
Definition: avimux.c:96
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT WINAPI BasePinImpl_NewSegment(IPin *iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
Definition: pin.c:338
static AviMux * impl_from_out_IPin(IPin *iface)
Definition: avimux.c:1320
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:49

◆ 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 }
Definition: avimux.c:96
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 }
Definition: avimux.c:96
#define FIXME(fmt,...)
Definition: debug.h:111
static AviMux * impl_from_out_IQualityControl(IQualityControl *iface)
Definition: avimux.c:1520
GLdouble GLdouble GLdouble GLdouble q
Definition: gl.h:2063
#define E_NOTIMPL
Definition: ddrawi.h:99
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:49

◆ 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 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
Definition: avimux.c:96
static AviMux * impl_from_out_IQualityControl(IQualityControl *iface)
Definition: avimux.c:1520

◆ 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 }
Definition: avimux.c:96
static AviMux * impl_from_out_IQualityControl(IQualityControl *iface)
Definition: avimux.c:1520

◆ 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 }
Definition: avimux.c:96
#define FIXME(fmt,...)
Definition: debug.h:111
static AviMux * impl_from_out_IQualityControl(IQualityControl *iface)
Definition: avimux.c:1520
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ 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 }
Definition: avimux.c:96
HRESULT WINAPI BasePinImpl_QueryAccept(IPin *iface, const AM_MEDIA_TYPE *pmt)
Definition: pin.c:311
void dump_AM_MEDIA_TYPE(const AM_MEDIA_TYPE *pmt)
Definition: enummedia.c:38
#define TRACE(s)
Definition: solgame.cpp:4
static AviMux * impl_from_out_IPin(IPin *iface)
Definition: avimux.c:1320

◆ 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 }
Definition: avimux.c:96
HRESULT WINAPI BasePinImpl_QueryDirection(IPin *iface, PIN_DIRECTION *pPinDir)
Definition: pin.c:285
#define TRACE(s)
Definition: solgame.cpp:4
static AviMux * impl_from_out_IPin(IPin *iface)
Definition: avimux.c:1320

◆ 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 }
Definition: avimux.c:96
DWORD Id
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT WINAPI BasePinImpl_QueryId(IPin *iface, LPWSTR *Id)
Definition: pin.c:296
static AviMux * impl_from_out_IPin(IPin *iface)
Definition: avimux.c:1320

◆ 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 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
Definition: avimux.c:96
#define FIXME(fmt,...)
Definition: debug.h:111
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
static AviMux * impl_from_out_IPin(IPin *iface)
Definition: avimux.c:1320
#define S_OK
Definition: intsafe.h:51
const GUID IID_IPin
Definition: pincontrol.cpp:15
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ 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 }
Definition: avimux.c:96
#define FIXME(fmt,...)
Definition: debug.h:111
static AviMux * impl_from_out_IPin(IPin *iface)
Definition: avimux.c:1320
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ 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 }
Definition: avimux.c:96
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT WINAPI BasePinImpl_QueryPinInfo(IPin *iface, PIN_INFO *pInfo)
Definition: pin.c:273
static AviMux * impl_from_out_IPin(IPin *iface)
Definition: avimux.c:1320

◆ 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 }
Definition: avimux.c:96
void dump_AM_MEDIA_TYPE(const AM_MEDIA_TYPE *pmt)
Definition: enummedia.c:38
#define TRACE(s)
Definition: solgame.cpp:4
static AviMux * impl_from_out_IPin(IPin *iface)
Definition: avimux.c:1320
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 }
Definition: avimux.c:96
static AviMux * impl_from_out_IPin(IPin *iface)
Definition: avimux.c:1320

◆ 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
Definition: avimux.c:96

◆ 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 }
static AviMux * impl_from_IConfigAviMux(IConfigAviMux *iface)
Definition: avimux.c:798
Definition: avimux.c:96
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ 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 }
static AviMux * impl_from_IConfigAviMux(IConfigAviMux *iface)
Definition: avimux.c:798
Definition: avimux.c:96
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ 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 }
static AviMux * impl_from_IConfigAviMux(IConfigAviMux *iface)
Definition: avimux.c:798
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
Definition: avimux.c:96

◆ 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 }
static AviMux * impl_from_IConfigAviMux(IConfigAviMux *iface)
Definition: avimux.c:798
Definition: avimux.c:96

◆ 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 }
static AviMux * impl_from_IConfigAviMux(IConfigAviMux *iface)
Definition: avimux.c:798
Definition: avimux.c:96
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ 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 }
static AviMux * impl_from_IConfigAviMux(IConfigAviMux *iface)
Definition: avimux.c:798
Definition: avimux.c:96
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ 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 }
Definition: avimux.c:96
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 }
Definition: avimux.c:96
static AviMux * impl_from_IConfigInterleaving(IConfigInterleaving *iface)
Definition: avimux.c:862
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ 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 }
Definition: avimux.c:96
static AviMux * impl_from_IConfigInterleaving(IConfigInterleaving *iface)
Definition: avimux.c:862
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ 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 }
Definition: avimux.c:96
static AviMux * impl_from_IConfigInterleaving(IConfigInterleaving *iface)
Definition: avimux.c:862
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:51

◆ 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 }
HRESULT hr
Definition: shlfolder.c:183
Definition: avimux.c:96
static AviMux * impl_from_IConfigInterleaving(IConfigInterleaving *iface)
Definition: avimux.c:862
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
GLenum mode
Definition: glext.h:6217
#define S_OK
Definition: intsafe.h:51

◆ 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 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
Definition: avimux.c:96
static AviMux * impl_from_IConfigInterleaving(IConfigInterleaving *iface)
Definition: avimux.c:862

◆ 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 }
Definition: avimux.c:96
static AviMux * impl_from_IConfigInterleaving(IConfigInterleaving *iface)
Definition: avimux.c:862

◆ 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;
2329  avimux->in[avimux->input_pin_no]->pin.IMemInputPin_iface.lpVtbl = &AviMuxIn_MemInputPinVtbl;
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 }
int input_pin_no
Definition: avimux.c:109
IMemInputPin IMemInputPin_iface
Definition: strmbase.h:92
static const IMemInputPinVtbl AviMuxIn_MemInputPinVtbl
Definition: avimux.c:2189
HRESULT hr
Definition: shlfolder.c:183
IAMStreamControl IAMStreamControl_iface
Definition: avimux.c:60
IPin IPin_iface
Definition: strmbase.h:35
static const IPinVtbl AviMuxIn_PinVtbl
Definition: avimux.c:1975
AVISTREAMHEADER strh
Definition: avimux.c:70
BYTE indx_data[FIELD_OFFSET(AVISUPERINDEX, aIndex[AVISUPERINDEX_ENTRIES])]
Definition: avimux.c:80
static const IPropertyBagVtbl AviMuxIn_PropertyBagVtbl
Definition: avimux.c:2247
BasePin pin
Definition: strmbase.h:90
#define E_FAIL
Definition: ddrawi.h:102
static const IQualityControlVtbl AviMuxIn_QualityControlVtbl
Definition: avimux.c:2302
struct _test_info info[]
Definition: SetCursorPos.c:19
IPropertyBag IPropertyBag_iface
Definition: avimux.c:61
static const IAMStreamControlVtbl AviMuxIn_AMStreamControlVtbl
Definition: avimux.c:2051
IMediaSample * samples_head
Definition: avimux.c:92
smooth NULL
Definition: ftsmooth.c:416
AVISTDINDEX * ix
Definition: avimux.c:85
ULONG WINAPI BaseInputPinImpl_Release(IPin *iface)
Definition: pin.c:868
BaseInputPin pin
Definition: avimux.c:59
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
static const BaseInputPinFuncTable AviMuxIn_BaseInputFuncTable
Definition: avimux.c:1703
IMemAllocator * samples_allocator
Definition: avimux.c:93
AVISUPERINDEX * indx
Definition: avimux.c:76
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:79
BYTE ix_data[FIELD_OFFSET(AVISTDINDEX, aIndex[AVISTDINDEX_ENTRIES])]
Definition: avimux.c:89
LONGLONG stream_time
Definition: avimux.c:67
BaseFilter filter
Definition: avimux.c:97
AviMuxIn * in[MAX_PIN_NO-1]
Definition: avimux.c:110
IBaseFilter IBaseFilter_iface
Definition: strmbase.h:163
#define MAX_PIN_NO
Definition: avimux.c:37
struct AviMuxIn::@256 * strf
IMemAllocator * pAllocator
Definition: strmbase.h:93
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
CRITICAL_SECTION csFilter
Definition: strmbase.h:165
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
#define S_OK
Definition: intsafe.h:51
Definition: axcore.idl:91
IQualityControl IQualityControl_iface
Definition: avimux.c:62
Definition: name.c:38
#define memset(x, y, z)
Definition: compat.h:39

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 }
int input_pin_no
Definition: avimux.c:109
AviMuxOut * out
Definition: avimux.c:108
HRESULT hr
Definition: shlfolder.c:183