mirror of https://github.com/mpv-player/mpv
avifile sync. seems to some bugs fixed...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3131 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
82adc24b1f
commit
9c1529ed2a
|
@ -76,7 +76,7 @@ void DS_Filter_Destroy(DS_Filter* This)
|
|||
if (This->m_pOurOutput)
|
||||
This->m_pOurOutput->vt->Release((IUnknown*)This->m_pOurOutput);
|
||||
if (This->m_pParentFilter)
|
||||
This->m_pSrcFilter->vt->Release((IUnknown*)This->m_pParentFilter);
|
||||
This->m_pParentFilter->vt->Release((IUnknown*)This->m_pParentFilter);
|
||||
if (This->m_pSrcFilter)
|
||||
This->m_pSrcFilter->vt->Release((IUnknown*)This->m_pSrcFilter);
|
||||
|
||||
|
|
|
@ -15,13 +15,13 @@ typedef struct _MemAllocator MemAllocator;
|
|||
struct _MemAllocator
|
||||
{
|
||||
IMemAllocator_vt* vt;
|
||||
DECLARE_IUNKNOWN();
|
||||
ALLOCATOR_PROPERTIES props;
|
||||
avm_list_t* used_list;
|
||||
avm_list_t* free_list;
|
||||
char* new_pointer;
|
||||
CMediaSample* modified_sample;
|
||||
GUID interfaces[2];
|
||||
DECLARE_IUNKNOWN();
|
||||
|
||||
void ( *SetPointer )(MemAllocator* This, char* pointer);
|
||||
void ( *ResetPointer )(MemAllocator* This);
|
||||
|
|
|
@ -8,12 +8,12 @@ typedef struct _CMediaSample CMediaSample;
|
|||
struct _CMediaSample
|
||||
{
|
||||
IMediaSample_vt* vt;
|
||||
DECLARE_IUNKNOWN();
|
||||
IMemAllocator* all;
|
||||
int size;
|
||||
int actual_size;
|
||||
char* block;
|
||||
char* own_block;
|
||||
int refcount;
|
||||
int isPreroll;
|
||||
int isSyncPoint;
|
||||
AM_MEDIA_TYPE media_type;
|
||||
|
|
|
@ -26,8 +26,8 @@ typedef struct
|
|||
|
||||
static long STDCALL CEnumPins_Next(IEnumPins* This,
|
||||
/* [in] */ unsigned long cMediaTypes,
|
||||
/* [size_is][out] */ IPin **ppMediaTypes,
|
||||
/* [out] */ unsigned long *pcFetched)
|
||||
/* [size_is][out] */ IPin** ppMediaTypes,
|
||||
/* [out] */ unsigned long* pcFetched)
|
||||
{
|
||||
CEnumPins* pin = (CEnumPins*)This;
|
||||
|
||||
|
@ -127,9 +127,9 @@ static CEnumPins* CEnumPinsCreate(IPin* p, IPin* pp)
|
|||
* InputPin
|
||||
***********/
|
||||
|
||||
static long STDCALL CInputPin_Connect(IPin * This,
|
||||
/* [in] */ IPin *pReceivePin,
|
||||
/* [in] */ AM_MEDIA_TYPE *pmt)
|
||||
static long STDCALL CInputPin_Connect(IPin* This,
|
||||
/* [in] */ IPin* pReceivePin,
|
||||
/* [in] */ AM_MEDIA_TYPE* pmt)
|
||||
{
|
||||
Debug unimplemented("CInputPin_Connect", This);
|
||||
return E_NOTIMPL;
|
||||
|
@ -199,21 +199,21 @@ static long STDCALL CInputPin_QueryId(IPin* This,
|
|||
}
|
||||
|
||||
static long STDCALL CInputPin_QueryAccept(IPin* This,
|
||||
/* [in] */ const AM_MEDIA_TYPE *pmt)
|
||||
/* [in] */ const AM_MEDIA_TYPE* pmt)
|
||||
{
|
||||
Debug unimplemented("CInputPin_QueryAccept", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static long STDCALL CInputPin_EnumMediaTypes(IPin* This,
|
||||
/* [out] */ IEnumMediaTypes **ppEnum)
|
||||
/* [out] */ IEnumMediaTypes** ppEnum)
|
||||
{
|
||||
Debug unimplemented("CInputPin_EnumMediaTypes", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static long STDCALL CInputPin_QueryInternalConnections(IPin* This,
|
||||
/* [out] */ IPin **apPin,
|
||||
/* [out] */ IPin** apPin,
|
||||
/* [out][in] */ unsigned long *nPin)
|
||||
{
|
||||
Debug unimplemented("CInputPin_QueryInternalConnections", This);
|
||||
|
@ -234,13 +234,13 @@ static long STDCALL CInputPin_BeginFlush(IPin * This)
|
|||
}
|
||||
|
||||
|
||||
static long STDCALL CInputPin_EndFlush(IPin * This)
|
||||
static long STDCALL CInputPin_EndFlush(IPin* This)
|
||||
{
|
||||
Debug unimplemented("CInputPin_EndFlush", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static long STDCALL CInputPin_NewSegment(IPin * This,
|
||||
static long STDCALL CInputPin_NewSegment(IPin* This,
|
||||
/* [in] */ REFERENCE_TIME tStart,
|
||||
/* [in] */ REFERENCE_TIME tStop,
|
||||
/* [in] */ double dRate)
|
||||
|
@ -360,7 +360,7 @@ static long STDCALL CBaseFilter_FindPin(IBaseFilter* This,
|
|||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static long STDCALL CBaseFilter_QueryFilterInfo(IBaseFilter * This,
|
||||
static long STDCALL CBaseFilter_QueryFilterInfo(IBaseFilter* This,
|
||||
// /* [out] */ FILTER_INFO *pInfo)
|
||||
void* pInfo)
|
||||
{
|
||||
|
@ -368,16 +368,16 @@ static long STDCALL CBaseFilter_QueryFilterInfo(IBaseFilter * This,
|
|||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static long STDCALL CBaseFilter_JoinFilterGraph(IBaseFilter * This,
|
||||
/* [in] */ IFilterGraph *pGraph,
|
||||
static long STDCALL CBaseFilter_JoinFilterGraph(IBaseFilter* This,
|
||||
/* [in] */ IFilterGraph* pGraph,
|
||||
/* [string][in] */ const unsigned short* pName)
|
||||
{
|
||||
Debug unimplemented("CBaseFilter_JoinFilterGraph", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static long STDCALL CBaseFilter_QueryVendorInfo(IBaseFilter * This,
|
||||
/* [string][out] */ unsigned short* *pVendorInfo)
|
||||
static long STDCALL CBaseFilter_QueryVendorInfo(IBaseFilter* This,
|
||||
/* [string][out] */ unsigned short** pVendorInfo)
|
||||
{
|
||||
Debug unimplemented("CBaseFilter_QueryVendorInfo", This);
|
||||
return E_NOTIMPL;
|
||||
|
@ -443,26 +443,26 @@ CBaseFilter* CBaseFilterCreate(const AM_MEDIA_TYPE* type, CBaseFilter2* parent)
|
|||
**************/
|
||||
|
||||
|
||||
static long STDCALL CBaseFilter2_GetClassID(IBaseFilter * This,
|
||||
/* [out] */ CLSID *pClassID)
|
||||
static long STDCALL CBaseFilter2_GetClassID(IBaseFilter* This,
|
||||
/* [out] */ CLSID* pClassID)
|
||||
{
|
||||
Debug unimplemented("CBaseFilter2_GetClassID", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static long STDCALL CBaseFilter2_Stop(IBaseFilter * This)
|
||||
static long STDCALL CBaseFilter2_Stop(IBaseFilter* This)
|
||||
{
|
||||
Debug unimplemented("CBaseFilter2_Stop", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static long STDCALL CBaseFilter2_Pause(IBaseFilter * This)
|
||||
static long STDCALL CBaseFilter2_Pause(IBaseFilter* This)
|
||||
{
|
||||
Debug unimplemented("CBaseFilter2_Pause", This);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static long STDCALL CBaseFilter2_Run(IBaseFilter * This, REFERENCE_TIME tStart)
|
||||
static long STDCALL CBaseFilter2_Run(IBaseFilter* This, REFERENCE_TIME tStart)
|
||||
{
|
||||
Debug unimplemented("CBaseFilter2_Run", This);
|
||||
return E_NOTIMPL;
|
||||
|
@ -540,6 +540,7 @@ static IPin* CBaseFilter2_GetPin(CBaseFilter2* This)
|
|||
|
||||
static void CBaseFilter2_Destroy(CBaseFilter2* This)
|
||||
{
|
||||
Debug printf("CBaseFilter2_Destroy(%p) called\n", This);
|
||||
This->pin->vt->Release((IUnknown*) This->pin);
|
||||
free(This->vt);
|
||||
free(This);
|
||||
|
@ -607,7 +608,7 @@ static long STDCALL CRemotePin_ConnectedTo(IPin* This, /* [out] */ IPin** pPin)
|
|||
}
|
||||
|
||||
static long STDCALL CRemotePin_QueryDirection(IPin* This,
|
||||
/* [out] */ PIN_DIRECTION *pPinDir)
|
||||
/* [out] */ PIN_DIRECTION* pPinDir)
|
||||
{
|
||||
Debug printf("CRemotePin_QueryDirection(%p) called\n", This);
|
||||
if (!pPinDir)
|
||||
|
@ -668,12 +669,12 @@ CRemotePin* CRemotePinCreate(CBaseFilter* pt, IPin* rpin)
|
|||
|
||||
|
||||
/*************
|
||||
* CRemotePin
|
||||
* CRemotePin2
|
||||
*************/
|
||||
|
||||
|
||||
static long STDCALL CRemotePin2_QueryPinInfo(IPin * This,
|
||||
/* [out] */ PIN_INFO *pInfo)
|
||||
static long STDCALL CRemotePin2_QueryPinInfo(IPin* This,
|
||||
/* [out] */ PIN_INFO* pInfo)
|
||||
{
|
||||
CBaseFilter2* lparent=((CRemotePin2*)This)->parent;
|
||||
Debug printf("CRemotePin2_QueryPinInfo(%p) called\n", This);
|
||||
|
@ -684,6 +685,7 @@ static long STDCALL CRemotePin2_QueryPinInfo(IPin * This,
|
|||
return 0;
|
||||
}
|
||||
|
||||
// FIXME - not being released!
|
||||
static void CRemotePin2_Destroy(CRemotePin2* This)
|
||||
{
|
||||
Debug printf("CRemotePin2_Destroy(%p) called\n", This);
|
||||
|
|
|
@ -7,9 +7,9 @@ typedef struct _CBaseFilter2 CBaseFilter2;
|
|||
struct _CBaseFilter2
|
||||
{
|
||||
IBaseFilter_vt* vt;
|
||||
DECLARE_IUNKNOWN();
|
||||
IPin* pin;
|
||||
GUID interfaces[5];
|
||||
DECLARE_IUNKNOWN();
|
||||
|
||||
IPin* ( *GetPin )(CBaseFilter2* This);
|
||||
};
|
||||
|
@ -21,10 +21,10 @@ typedef struct _CBaseFilter CBaseFilter;
|
|||
struct _CBaseFilter
|
||||
{
|
||||
IBaseFilter_vt* vt;
|
||||
DECLARE_IUNKNOWN(); // has to match CBaseFilter2 - INHERITANCE!!
|
||||
IPin* pin;
|
||||
IPin* unused_pin;
|
||||
GUID interfaces[2];
|
||||
DECLARE_IUNKNOWN();
|
||||
|
||||
IPin* ( *GetPin )(CBaseFilter* This);
|
||||
IPin* ( *GetUnusedPin )(CBaseFilter* This);
|
||||
|
@ -37,10 +37,10 @@ typedef struct _CInputPin CInputPin;
|
|||
struct _CInputPin
|
||||
{
|
||||
IPin_vt* vt;
|
||||
DECLARE_IUNKNOWN();
|
||||
AM_MEDIA_TYPE type;
|
||||
CBaseFilter* parent;
|
||||
GUID interfaces[1];
|
||||
DECLARE_IUNKNOWN();
|
||||
};
|
||||
|
||||
CInputPin* CInputPinCreate(CBaseFilter* parent, const AM_MEDIA_TYPE* vhdr);
|
||||
|
@ -49,10 +49,10 @@ CInputPin* CInputPinCreate(CBaseFilter* parent, const AM_MEDIA_TYPE* vhdr);
|
|||
typedef struct CRemotePin
|
||||
{
|
||||
IPin_vt* vt;
|
||||
CBaseFilter* parent;
|
||||
IPin* remote_pin;
|
||||
GUID interfaces[1];
|
||||
DECLARE_IUNKNOWN();
|
||||
CBaseFilter* parent;
|
||||
GUID interfaces[1];
|
||||
IPin* remote_pin;
|
||||
} CRemotePin;
|
||||
|
||||
CRemotePin* CRemotePinCreate(CBaseFilter* pt, IPin* rpin);
|
||||
|
@ -61,9 +61,9 @@ CRemotePin* CRemotePinCreate(CBaseFilter* pt, IPin* rpin);
|
|||
typedef struct CRemotePin2
|
||||
{
|
||||
IPin_vt* vt;
|
||||
DECLARE_IUNKNOWN();
|
||||
CBaseFilter2* parent;
|
||||
GUID interfaces[1];
|
||||
DECLARE_IUNKNOWN();
|
||||
} CRemotePin2;
|
||||
|
||||
CRemotePin2* CRemotePin2Create(CBaseFilter2* parent);
|
||||
|
|
|
@ -497,6 +497,7 @@ COutputPin* COutputPinCreate(const AM_MEDIA_TYPE* amt)
|
|||
This->mempin->frame_size_pointer = 0;
|
||||
This->mempin->frame_pointer = 0;
|
||||
This->mempin->pAllocator = 0;
|
||||
This->mempin->refcount = 1;
|
||||
This->mempin->parent = This;
|
||||
|
||||
This->SetPointer2 = COutputPin_SetPointer2;
|
||||
|
|
|
@ -11,6 +11,7 @@ typedef struct _COutputMemPin COutputMemPin;
|
|||
struct _COutputMemPin
|
||||
{
|
||||
IMemInputPin_vt* vt;
|
||||
DECLARE_IUNKNOWN();
|
||||
char** frame_pointer;
|
||||
long* frame_size_pointer;
|
||||
MemAllocator* pAllocator;
|
||||
|
@ -20,8 +21,8 @@ struct _COutputMemPin
|
|||
struct _COutputPin
|
||||
{
|
||||
IPin_vt* vt;
|
||||
DECLARE_IUNKNOWN();
|
||||
COutputMemPin* mempin;
|
||||
int refcount;
|
||||
AM_MEDIA_TYPE type;
|
||||
IPin* remote;
|
||||
void ( *SetFramePointer )(COutputPin*, char** z);
|
||||
|
|
Loading…
Reference in New Issue