2010-10-04 16:48:25 +02:00
|
|
|
/*
|
|
|
|
* Header file for Wine's strmbase implementation
|
|
|
|
*
|
|
|
|
* Copyright 2003 Robert Shearman
|
|
|
|
* Copyright 2010 Aric Stewart, CodeWeavers
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
HRESULT WINAPI CopyMediaType(AM_MEDIA_TYPE * pDest, const AM_MEDIA_TYPE *pSrc);
|
|
|
|
void WINAPI FreeMediaType(AM_MEDIA_TYPE * pMediaType);
|
|
|
|
AM_MEDIA_TYPE * WINAPI CreateMediaType(AM_MEDIA_TYPE const * pSrc);
|
|
|
|
void WINAPI DeleteMediaType(AM_MEDIA_TYPE * pMediaType);
|
2010-10-05 21:37:30 +02:00
|
|
|
|
2010-10-05 21:37:42 +02:00
|
|
|
/* Pin functions */
|
|
|
|
|
|
|
|
typedef struct BasePin
|
|
|
|
{
|
|
|
|
const struct IPinVtbl * lpVtbl;
|
|
|
|
LONG refCount;
|
|
|
|
LPCRITICAL_SECTION pCritSec;
|
|
|
|
PIN_INFO pinInfo;
|
|
|
|
IPin * pConnectedTo;
|
|
|
|
AM_MEDIA_TYPE mtCurrent;
|
2010-11-01 13:42:14 +01:00
|
|
|
REFERENCE_TIME tStart;
|
|
|
|
REFERENCE_TIME tStop;
|
|
|
|
double dRate;
|
2010-10-13 18:02:01 +02:00
|
|
|
|
|
|
|
const struct BasePinFuncTable* pFuncsTable;
|
2010-10-05 21:37:42 +02:00
|
|
|
} BasePin;
|
|
|
|
|
2010-10-13 18:02:01 +02:00
|
|
|
typedef HRESULT (WINAPI *BasePin_CheckMediaType)(BasePin *This, const AM_MEDIA_TYPE *pmt);
|
|
|
|
typedef HRESULT (WINAPI *BasePin_AttemptConnection)(BasePin *This, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt);
|
|
|
|
typedef LONG (WINAPI *BasePin_GetMediaTypeVersion)(BasePin *This);
|
|
|
|
typedef HRESULT (WINAPI *BasePin_GetMediaType)(BasePin *This, int iPosition, AM_MEDIA_TYPE *amt);
|
|
|
|
|
|
|
|
typedef struct BasePinFuncTable {
|
|
|
|
/* Required for Input Pins*/
|
|
|
|
BasePin_CheckMediaType pfnCheckMediaType;
|
|
|
|
/* Required for Output Pins*/
|
|
|
|
BasePin_AttemptConnection pfnAttemptConnection;
|
2010-10-13 18:02:08 +02:00
|
|
|
/* Required for BasePinImpl_EnumMediaTypes */
|
|
|
|
BasePin_GetMediaTypeVersion pfnGetMediaTypeVersion;
|
|
|
|
BasePin_GetMediaType pfnGetMediaType;
|
2010-10-13 18:02:01 +02:00
|
|
|
} BasePinFuncTable;
|
|
|
|
|
2010-10-05 21:37:56 +02:00
|
|
|
typedef struct BaseOutputPin
|
|
|
|
{
|
|
|
|
/* inheritance C style! */
|
|
|
|
BasePin pin;
|
|
|
|
IMemInputPin * pMemInputPin;
|
2010-10-13 18:02:01 +02:00
|
|
|
|
|
|
|
const struct BaseOutputPinFuncTable* pFuncsTable;
|
2010-10-05 21:37:56 +02:00
|
|
|
} BaseOutputPin;
|
|
|
|
|
2010-10-13 18:02:01 +02:00
|
|
|
typedef HRESULT (WINAPI *BaseOutputPin_DecideBufferSize)(BaseOutputPin *This, IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *ppropInputRequest);
|
2010-10-13 18:02:14 +02:00
|
|
|
typedef HRESULT (WINAPI *BaseOutputPin_DecideAllocator)(BaseOutputPin *This, IMemInputPin *pPin, IMemAllocator **pAlloc);
|
|
|
|
typedef HRESULT (WINAPI *BaseOutputPin_BreakConnect)(BaseOutputPin * This);
|
2010-10-13 18:02:01 +02:00
|
|
|
|
|
|
|
typedef struct BaseOutputPinFuncTable {
|
2010-10-13 18:02:14 +02:00
|
|
|
/* Required for BaseOutputPinImpl_DecideAllocator */
|
2010-10-13 18:02:01 +02:00
|
|
|
BaseOutputPin_DecideBufferSize pfnDecideBufferSize;
|
2010-10-13 18:02:14 +02:00
|
|
|
/* Required for BaseOutputPinImpl_AttemptConnection */
|
|
|
|
BaseOutputPin_DecideAllocator pfnDecideAllocator;
|
|
|
|
BaseOutputPin_BreakConnect pfnBreakConnect;
|
2010-10-13 18:02:01 +02:00
|
|
|
} BaseOutputPinFuncTable;
|
|
|
|
|
2010-10-05 21:38:11 +02:00
|
|
|
typedef struct BaseInputPin
|
|
|
|
{
|
|
|
|
/* inheritance C style! */
|
|
|
|
BasePin pin;
|
|
|
|
|
|
|
|
const IMemInputPinVtbl * lpVtblMemInput;
|
|
|
|
IMemAllocator * pAllocator;
|
|
|
|
BOOL flushing, end_of_stream;
|
|
|
|
IMemAllocator *preferred_allocator;
|
2010-10-13 18:02:01 +02:00
|
|
|
|
|
|
|
const struct BaseInputPinFuncTable* pFuncsTable;
|
2010-10-05 21:38:11 +02:00
|
|
|
} BaseInputPin;
|
|
|
|
|
2010-10-13 18:02:01 +02:00
|
|
|
typedef HRESULT (WINAPI *BaseInputPin_Receive)(BaseInputPin *This, IMediaSample *pSample);
|
|
|
|
|
|
|
|
typedef struct BaseInputPinFuncTable {
|
|
|
|
/* Optional */
|
|
|
|
BaseInputPin_Receive pfnReceive;
|
|
|
|
} BaseInputPinFuncTable;
|
|
|
|
|
2010-10-05 21:37:42 +02:00
|
|
|
/* Base Pin */
|
2010-10-13 18:02:01 +02:00
|
|
|
HRESULT WINAPI BasePinImpl_GetMediaType(BasePin *This, int iPosition, AM_MEDIA_TYPE *pmt);
|
|
|
|
LONG WINAPI BasePinImpl_GetMediaTypeVersion(BasePin *This);
|
2010-10-05 21:37:42 +02:00
|
|
|
ULONG WINAPI BasePinImpl_AddRef(IPin * iface);
|
|
|
|
HRESULT WINAPI BasePinImpl_Disconnect(IPin * iface);
|
|
|
|
HRESULT WINAPI BasePinImpl_ConnectedTo(IPin * iface, IPin ** ppPin);
|
|
|
|
HRESULT WINAPI BasePinImpl_ConnectionMediaType(IPin * iface, AM_MEDIA_TYPE * pmt);
|
|
|
|
HRESULT WINAPI BasePinImpl_QueryPinInfo(IPin * iface, PIN_INFO * pInfo);
|
|
|
|
HRESULT WINAPI BasePinImpl_QueryDirection(IPin * iface, PIN_DIRECTION * pPinDir);
|
|
|
|
HRESULT WINAPI BasePinImpl_QueryId(IPin * iface, LPWSTR * Id);
|
|
|
|
HRESULT WINAPI BasePinImpl_QueryAccept(IPin * iface, const AM_MEDIA_TYPE * pmt);
|
|
|
|
HRESULT WINAPI BasePinImpl_EnumMediaTypes(IPin * iface, IEnumMediaTypes ** ppEnum);
|
|
|
|
HRESULT WINAPI BasePinImpl_QueryInternalConnections(IPin * iface, IPin ** apPin, ULONG * cPin);
|
2010-11-01 13:42:14 +01:00
|
|
|
HRESULT WINAPI BasePinImpl_NewSegment(IPin * iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate);
|
2010-10-05 21:37:56 +02:00
|
|
|
|
|
|
|
/* Base Output Pin */
|
|
|
|
HRESULT WINAPI BaseOutputPinImpl_QueryInterface(IPin * iface, REFIID riid, LPVOID * ppv);
|
|
|
|
ULONG WINAPI BaseOutputPinImpl_Release(IPin * iface);
|
|
|
|
HRESULT WINAPI BaseOutputPinImpl_Connect(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt);
|
|
|
|
HRESULT WINAPI BaseOutputPinImpl_ReceiveConnection(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt);
|
|
|
|
HRESULT WINAPI BaseOutputPinImpl_Disconnect(IPin * iface);
|
|
|
|
HRESULT WINAPI BaseOutputPinImpl_EndOfStream(IPin * iface);
|
|
|
|
HRESULT WINAPI BaseOutputPinImpl_BeginFlush(IPin * iface);
|
|
|
|
HRESULT WINAPI BaseOutputPinImpl_EndFlush(IPin * iface);
|
|
|
|
|
|
|
|
HRESULT WINAPI BaseOutputPinImpl_GetDeliveryBuffer(BaseOutputPin * This, IMediaSample ** ppSample, REFERENCE_TIME * tStart, REFERENCE_TIME * tStop, DWORD dwFlags);
|
|
|
|
HRESULT WINAPI BaseOutputPinImpl_Deliver(BaseOutputPin * This, IMediaSample * pSample);
|
|
|
|
HRESULT WINAPI BaseOutputPinImpl_BreakConnect(BaseOutputPin * This);
|
|
|
|
HRESULT WINAPI BaseOutputPinImpl_Active(BaseOutputPin * This);
|
|
|
|
HRESULT WINAPI BaseOutputPinImpl_Inactive(BaseOutputPin * This);
|
2010-10-13 17:46:27 +02:00
|
|
|
HRESULT WINAPI BaseOutputPinImpl_InitAllocator(BaseOutputPin *This, IMemAllocator **pMemAlloc);
|
|
|
|
HRESULT WINAPI BaseOutputPinImpl_DecideAllocator(BaseOutputPin *This, IMemInputPin *pPin, IMemAllocator **pAlloc);
|
2010-10-13 18:02:01 +02:00
|
|
|
HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(BasePin *This, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt);
|
2010-10-13 17:46:27 +02:00
|
|
|
|
2010-10-13 18:02:01 +02:00
|
|
|
HRESULT WINAPI BaseOutputPin_Construct(const IPinVtbl *OutputPin_Vtbl, LONG outputpin_size, const PIN_INFO * pPinInfo, const BasePinFuncTable* pBaseFuncsTable, const BaseOutputPinFuncTable* pBaseOutputFuncsTable, LPCRITICAL_SECTION pCritSec, IPin ** ppPin);
|
2010-10-05 21:38:11 +02:00
|
|
|
|
|
|
|
/* Base Input Pin */
|
|
|
|
HRESULT WINAPI BaseInputPinImpl_QueryInterface(IPin * iface, REFIID riid, LPVOID * ppv);
|
|
|
|
ULONG WINAPI BaseInputPinImpl_Release(IPin * iface);
|
|
|
|
HRESULT WINAPI BaseInputPinImpl_Connect(IPin * iface, IPin * pConnector, const AM_MEDIA_TYPE * pmt);
|
|
|
|
HRESULT WINAPI BaseInputPinImpl_ReceiveConnection(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt);
|
|
|
|
HRESULT WINAPI BaseInputPinImpl_QueryAccept(IPin * iface, const AM_MEDIA_TYPE * pmt);
|
|
|
|
HRESULT WINAPI BaseInputPinImpl_EndOfStream(IPin * iface);
|
|
|
|
HRESULT WINAPI BaseInputPinImpl_BeginFlush(IPin * iface);
|
|
|
|
HRESULT WINAPI BaseInputPinImpl_EndFlush(IPin * iface);
|
|
|
|
HRESULT WINAPI BaseInputPinImpl_NewSegment(IPin * iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate);
|
|
|
|
|
2010-10-13 18:02:01 +02:00
|
|
|
HRESULT BaseInputPin_Construct(const IPinVtbl *InputPin_Vtbl, const PIN_INFO * pPinInfo, const BasePinFuncTable* pBaseFuncsTable, const BaseInputPinFuncTable* pBaseInputFuncsTable, LPCRITICAL_SECTION pCritSec, IMemAllocator *, IPin ** ppPin);
|
2010-10-07 21:47:33 +02:00
|
|
|
|
|
|
|
typedef struct BaseFilter
|
|
|
|
{
|
|
|
|
const struct IBaseFilterVtbl *lpVtbl;
|
|
|
|
LONG refCount;
|
|
|
|
CRITICAL_SECTION csFilter;
|
|
|
|
|
|
|
|
FILTER_STATE state;
|
|
|
|
REFERENCE_TIME rtStreamStart;
|
|
|
|
IReferenceClock * pClock;
|
|
|
|
FILTER_INFO filterInfo;
|
|
|
|
CLSID clsid;
|
2010-10-07 21:48:01 +02:00
|
|
|
LONG pinVersion;
|
|
|
|
|
2010-10-13 18:02:01 +02:00
|
|
|
const struct BaseFilterFuncTable* pFuncsTable;
|
|
|
|
} BaseFilter;
|
|
|
|
|
|
|
|
typedef IPin* (WINAPI *BaseFilter_GetPin)(BaseFilter* iface, int iPosition);
|
|
|
|
typedef LONG (WINAPI *BaseFilter_GetPinCount)(BaseFilter* iface);
|
|
|
|
typedef LONG (WINAPI *BaseFilter_GetPinVersion)(BaseFilter* iface);
|
|
|
|
|
|
|
|
typedef struct BaseFilterFuncTable {
|
|
|
|
/* Required */
|
2010-10-07 21:48:01 +02:00
|
|
|
BaseFilter_GetPin pfnGetPin;
|
|
|
|
BaseFilter_GetPinCount pfnGetPinCount;
|
2010-10-13 18:02:01 +02:00
|
|
|
} BaseFilterFuncTable;
|
2010-10-07 21:47:33 +02:00
|
|
|
|
|
|
|
HRESULT WINAPI BaseFilterImpl_QueryInterface(IBaseFilter * iface, REFIID riid, LPVOID * ppv);
|
|
|
|
ULONG WINAPI BaseFilterImpl_AddRef(IBaseFilter * iface);
|
|
|
|
ULONG WINAPI BaseFilterImpl_Release(IBaseFilter * iface);
|
|
|
|
HRESULT WINAPI BaseFilterImpl_GetClassID(IBaseFilter * iface, CLSID * pClsid);
|
|
|
|
HRESULT WINAPI BaseFilterImpl_GetState(IBaseFilter * iface, DWORD dwMilliSecsTimeout, FILTER_STATE *pState );
|
|
|
|
HRESULT WINAPI BaseFilterImpl_SetSyncSource(IBaseFilter * iface, IReferenceClock *pClock);
|
|
|
|
HRESULT WINAPI BaseFilterImpl_GetSyncSource(IBaseFilter * iface, IReferenceClock **ppClock);
|
2010-10-07 21:48:01 +02:00
|
|
|
HRESULT WINAPI BaseFilterImpl_EnumPins(IBaseFilter * iface, IEnumPins **ppEnum);
|
2010-10-07 21:47:33 +02:00
|
|
|
HRESULT WINAPI BaseFilterImpl_QueryFilterInfo(IBaseFilter * iface, FILTER_INFO *pInfo);
|
|
|
|
HRESULT WINAPI BaseFilterImpl_JoinFilterGraph(IBaseFilter * iface, IFilterGraph *pGraph, LPCWSTR pName );
|
|
|
|
HRESULT WINAPI BaseFilterImpl_QueryVendorInfo(IBaseFilter * iface, LPWSTR *pVendorInfo);
|
|
|
|
|
2010-10-13 18:02:01 +02:00
|
|
|
LONG WINAPI BaseFilterImpl_GetPinVersion(BaseFilter* This);
|
|
|
|
VOID WINAPI BaseFilterImpl_IncrementPinVersion(BaseFilter* This);
|
|
|
|
|
|
|
|
HRESULT WINAPI BaseFilter_Init(BaseFilter * This, const IBaseFilterVtbl *Vtbl, const CLSID *pClsid, DWORD_PTR DebugInfo, const BaseFilterFuncTable* pBaseFuncsTable);
|
|
|
|
|
|
|
|
/* Enums */
|
|
|
|
HRESULT WINAPI EnumMediaTypes_Construct(BasePin *iface, BasePin_GetMediaType enumFunc, BasePin_GetMediaTypeVersion versionFunc, IEnumMediaTypes ** ppEnum);
|
2010-10-07 21:48:01 +02:00
|
|
|
|
2010-10-13 18:02:01 +02:00
|
|
|
HRESULT WINAPI EnumPins_Construct(BaseFilter *base, BaseFilter_GetPin receive_pin, BaseFilter_GetPinCount receive_pincount, BaseFilter_GetPinVersion receive_version, IEnumPins ** ppEnum);
|
2010-10-07 21:48:19 +02:00
|
|
|
|
2010-11-05 23:19:10 +01:00
|
|
|
/* Quality Control */
|
|
|
|
typedef struct QualityControlImpl {
|
|
|
|
const IQualityControlVtbl *lpVtbl;
|
|
|
|
IPin *input;
|
|
|
|
IBaseFilter *self;
|
|
|
|
IQualityControl *tonotify;
|
2010-11-09 23:42:49 +01:00
|
|
|
|
|
|
|
/* Render stuff */
|
|
|
|
IReferenceClock *clock;
|
|
|
|
REFERENCE_TIME last_in_time, last_left, avg_duration, avg_pt, avg_render, start, stop;
|
|
|
|
REFERENCE_TIME current_jitter, current_rstart, current_rstop, clockstart;
|
|
|
|
double avg_rate;
|
|
|
|
LONG64 rendered, dropped;
|
|
|
|
BOOL qos_handled, is_dropped;
|
2010-11-05 23:19:10 +01:00
|
|
|
} QualityControlImpl;
|
|
|
|
|
|
|
|
void QualityControlImpl_init(QualityControlImpl *This, IPin *input, IBaseFilter *self);
|
|
|
|
HRESULT WINAPI QualityControlImpl_QueryInterface(IQualityControl *iface, REFIID riid, void **ppv);
|
|
|
|
ULONG WINAPI QualityControlImpl_AddRef(IQualityControl *iface);
|
|
|
|
ULONG WINAPI QualityControlImpl_Release(IQualityControl *iface);
|
|
|
|
HRESULT WINAPI QualityControlImpl_Notify(IQualityControl *iface, IBaseFilter *sender, Quality qm);
|
|
|
|
HRESULT WINAPI QualityControlImpl_SetSink(IQualityControl *iface, IQualityControl *tonotify);
|
|
|
|
|
2010-11-09 23:42:49 +01:00
|
|
|
void QualityControlRender_Start(QualityControlImpl *This, REFERENCE_TIME tStart);
|
|
|
|
void QualityControlRender_SetClock(QualityControlImpl *This, IReferenceClock *clock);
|
|
|
|
HRESULT QualityControlRender_WaitFor(QualityControlImpl *This, IMediaSample *sample, HANDLE ev);
|
|
|
|
void QualityControlRender_DoQOS(QualityControlImpl *priv);
|
|
|
|
void QualityControlRender_BeginRender(QualityControlImpl *This);
|
|
|
|
void QualityControlRender_EndRender(QualityControlImpl *This);
|
|
|
|
|
2010-10-07 21:48:19 +02:00
|
|
|
/* Transform Filter */
|
|
|
|
typedef struct TransformFilter
|
|
|
|
{
|
|
|
|
BaseFilter filter;
|
|
|
|
|
|
|
|
IPin **ppPins;
|
|
|
|
ULONG npins;
|
|
|
|
AM_MEDIA_TYPE pmt;
|
|
|
|
|
|
|
|
const struct TransformFilterFuncTable * pFuncsTable;
|
2010-11-05 23:19:14 +01:00
|
|
|
QualityControlImpl qcimpl;
|
2010-10-07 21:48:19 +02:00
|
|
|
} TransformFilter;
|
|
|
|
|
2010-10-13 17:46:27 +02:00
|
|
|
typedef HRESULT (WINAPI *TransformFilter_DecideBufferSize) (TransformFilter *iface, IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *ppropInputRequest);
|
2010-10-07 21:48:19 +02:00
|
|
|
typedef HRESULT (WINAPI *TransformFilter_StartStreaming) (TransformFilter *iface);
|
|
|
|
typedef HRESULT (WINAPI *TransformFilter_StopStreaming) (TransformFilter *iface);
|
|
|
|
typedef HRESULT (WINAPI *TransformFilter_Receive) (TransformFilter* iface, IMediaSample* pIn);
|
|
|
|
typedef HRESULT (WINAPI *TransformFilter_CompleteConnect) (TransformFilter *iface, PIN_DIRECTION dir, IPin *pPin);
|
|
|
|
typedef HRESULT (WINAPI *TransformFilter_BreakConnect) (TransformFilter *iface, PIN_DIRECTION dir);
|
|
|
|
typedef HRESULT (WINAPI *TransformFilter_SetMediaType) (TransformFilter *iface, PIN_DIRECTION dir, const AM_MEDIA_TYPE *pMediaType);
|
|
|
|
typedef HRESULT (WINAPI *TransformFilter_CheckInputType) (TransformFilter *iface, const AM_MEDIA_TYPE *pMediaType);
|
|
|
|
typedef HRESULT (WINAPI *TransformFilter_EndOfStream) (TransformFilter *iface);
|
|
|
|
typedef HRESULT (WINAPI *TransformFilter_BeginFlush) (TransformFilter *iface);
|
|
|
|
typedef HRESULT (WINAPI *TransformFilter_EndFlush) (TransformFilter *iface);
|
|
|
|
typedef HRESULT (WINAPI *TransformFilter_NewSegment) (TransformFilter *iface,
|
|
|
|
REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate);
|
2010-11-05 23:19:14 +01:00
|
|
|
typedef HRESULT (WINAPI *TransformFilter_Notify) (TransformFilter *iface, IBaseFilter *sender, Quality qm);
|
2010-10-07 21:48:19 +02:00
|
|
|
|
|
|
|
typedef struct TransformFilterFuncTable {
|
2010-10-13 18:02:01 +02:00
|
|
|
/* Required */
|
|
|
|
TransformFilter_DecideBufferSize pfnDecideBufferSize;
|
|
|
|
/* Optional */
|
|
|
|
TransformFilter_StartStreaming pfnStartStreaming;
|
|
|
|
TransformFilter_Receive pfnReceive;
|
|
|
|
TransformFilter_StopStreaming pfnStopStreaming;
|
|
|
|
TransformFilter_CheckInputType pfnCheckInputType;
|
|
|
|
TransformFilter_SetMediaType pfnSetMediaType;
|
|
|
|
TransformFilter_CompleteConnect pfnCompleteConnect;
|
|
|
|
TransformFilter_BreakConnect pfnBreakConnect;
|
|
|
|
TransformFilter_EndOfStream pfnEndOfStream;
|
|
|
|
TransformFilter_BeginFlush pfnBeginFlush;
|
|
|
|
TransformFilter_EndFlush pfnEndFlush;
|
|
|
|
TransformFilter_NewSegment pfnNewSegment;
|
2010-11-05 23:19:14 +01:00
|
|
|
TransformFilter_Notify pfnNotify;
|
2010-10-07 21:48:19 +02:00
|
|
|
} TransformFilterFuncTable;
|
|
|
|
|
|
|
|
HRESULT WINAPI TransformFilterImpl_QueryInterface(IBaseFilter * iface, REFIID riid, LPVOID * ppv);
|
|
|
|
ULONG WINAPI TransformFilterImpl_Release(IBaseFilter * iface);
|
|
|
|
HRESULT WINAPI TransformFilterImpl_Stop(IBaseFilter * iface);
|
|
|
|
HRESULT WINAPI TransformFilterImpl_Pause(IBaseFilter * iface);
|
|
|
|
HRESULT WINAPI TransformFilterImpl_Run(IBaseFilter * iface, REFERENCE_TIME tStart);
|
|
|
|
HRESULT WINAPI TransformFilterImpl_FindPin(IBaseFilter * iface, LPCWSTR Id, IPin **ppPin);
|
|
|
|
|
|
|
|
HRESULT TransformFilter_Construct( const IBaseFilterVtbl *filterVtbl, LONG filter_size, const CLSID* pClsid, const TransformFilterFuncTable* pFuncsTable, IBaseFilter ** ppTransformFilter);
|
2010-10-11 17:15:35 +02:00
|
|
|
|
|
|
|
/* Source Seeking */
|
|
|
|
typedef HRESULT (WINAPI *SourceSeeking_ChangeRate)(IMediaSeeking *iface);
|
|
|
|
typedef HRESULT (WINAPI *SourceSeeking_ChangeStart)(IMediaSeeking *iface);
|
|
|
|
typedef HRESULT (WINAPI *SourceSeeking_ChangeStop)(IMediaSeeking *iface);
|
|
|
|
|
|
|
|
typedef struct SourceSeeking
|
|
|
|
{
|
|
|
|
const IMediaSeekingVtbl * lpVtbl;
|
|
|
|
|
|
|
|
ULONG refCount;
|
|
|
|
SourceSeeking_ChangeStop fnChangeStop;
|
|
|
|
SourceSeeking_ChangeStart fnChangeStart;
|
|
|
|
SourceSeeking_ChangeRate fnChangeRate;
|
|
|
|
DWORD dwCapabilities;
|
|
|
|
double dRate;
|
|
|
|
LONGLONG llCurrent, llStop, llDuration;
|
|
|
|
GUID timeformat;
|
|
|
|
PCRITICAL_SECTION crst;
|
|
|
|
} SourceSeeking;
|
|
|
|
|
|
|
|
HRESULT SourceSeeking_Init(SourceSeeking *pSeeking, const IMediaSeekingVtbl *Vtbl, SourceSeeking_ChangeStop fnChangeStop, SourceSeeking_ChangeStart fnChangeStart, SourceSeeking_ChangeRate fnChangeRate, PCRITICAL_SECTION crit_sect);
|
|
|
|
|
|
|
|
HRESULT WINAPI SourceSeekingImpl_GetCapabilities(IMediaSeeking * iface, DWORD * pCapabilities);
|
|
|
|
HRESULT WINAPI SourceSeekingImpl_CheckCapabilities(IMediaSeeking * iface, DWORD * pCapabilities);
|
|
|
|
HRESULT WINAPI SourceSeekingImpl_IsFormatSupported(IMediaSeeking * iface, const GUID * pFormat);
|
|
|
|
HRESULT WINAPI SourceSeekingImpl_QueryPreferredFormat(IMediaSeeking * iface, GUID * pFormat);
|
|
|
|
HRESULT WINAPI SourceSeekingImpl_GetTimeFormat(IMediaSeeking * iface, GUID * pFormat);
|
|
|
|
HRESULT WINAPI SourceSeekingImpl_IsUsingTimeFormat(IMediaSeeking * iface, const GUID * pFormat);
|
|
|
|
HRESULT WINAPI SourceSeekingImpl_SetTimeFormat(IMediaSeeking * iface, const GUID * pFormat);
|
|
|
|
HRESULT WINAPI SourceSeekingImpl_GetDuration(IMediaSeeking * iface, LONGLONG * pDuration);
|
|
|
|
HRESULT WINAPI SourceSeekingImpl_GetStopPosition(IMediaSeeking * iface, LONGLONG * pStop);
|
|
|
|
HRESULT WINAPI SourceSeekingImpl_GetCurrentPosition(IMediaSeeking * iface, LONGLONG * pCurrent);
|
|
|
|
HRESULT WINAPI SourceSeekingImpl_ConvertTimeFormat(IMediaSeeking * iface, LONGLONG * pTarget, const GUID * pTargetFormat, LONGLONG Source, const GUID * pSourceFormat);
|
|
|
|
HRESULT WINAPI SourceSeekingImpl_SetPositions(IMediaSeeking * iface, LONGLONG * pCurrent, DWORD dwCurrentFlags, LONGLONG * pStop, DWORD dwStopFlags);
|
|
|
|
HRESULT WINAPI SourceSeekingImpl_GetPositions(IMediaSeeking * iface, LONGLONG * pCurrent, LONGLONG * pStop);
|
|
|
|
HRESULT WINAPI SourceSeekingImpl_GetAvailable(IMediaSeeking * iface, LONGLONG * pEarliest, LONGLONG * pLatest);
|
|
|
|
HRESULT WINAPI SourceSeekingImpl_SetRate(IMediaSeeking * iface, double dRate);
|
|
|
|
HRESULT WINAPI SourceSeekingImpl_GetRate(IMediaSeeking * iface, double * dRate);
|
|
|
|
HRESULT WINAPI SourceSeekingImpl_GetPreroll(IMediaSeeking * iface, LONGLONG * pPreroll);
|
2010-10-19 20:23:38 +02:00
|
|
|
|
|
|
|
/* Filter Registration */
|
|
|
|
|
|
|
|
typedef REGPINTYPES AMOVIESETUP_MEDIATYPE;
|
|
|
|
typedef REGFILTERPINS AMOVIESETUP_PIN;
|
|
|
|
|
|
|
|
typedef struct AMOVIESETUP_FILTER {
|
|
|
|
const CLSID *clsid;
|
|
|
|
const WCHAR *name;
|
|
|
|
DWORD merit;
|
|
|
|
UINT pins;
|
|
|
|
const AMOVIESETUP_PIN *pPin;
|
|
|
|
} AMOVIESETUP_FILTER, *LPAMOVIESETUP_FILTER;
|
|
|
|
|
|
|
|
typedef IUnknown *(CALLBACK *LPFNNewCOMObject)(LPUNKNOWN pUnkOuter, HRESULT *phr);
|
|
|
|
typedef void (CALLBACK *LPFNInitRoutine)(BOOL bLoading, const CLSID *rclsid);
|
|
|
|
|
|
|
|
typedef struct tagFactoryTemplate {
|
|
|
|
const WCHAR *m_Name;
|
|
|
|
const CLSID *m_ClsID;
|
|
|
|
LPFNNewCOMObject m_lpfnNew;
|
|
|
|
LPFNInitRoutine m_lpfnInit;
|
|
|
|
const AMOVIESETUP_FILTER *m_pAMovieSetup_Filter;
|
|
|
|
} FactoryTemplate;
|
|
|
|
|
|
|
|
HRESULT WINAPI AMovieDllRegisterServer2(BOOL bRegister);
|
2010-11-03 00:59:04 +01:00
|
|
|
HRESULT WINAPI AMovieSetupRegisterFilter2(const AMOVIESETUP_FILTER *pFilter, IFilterMapper2 *pIFM2, BOOL bRegister);
|
2010-10-19 20:24:03 +02:00
|
|
|
|
|
|
|
/* Dll Functions */
|
|
|
|
BOOL WINAPI STRMBASE_DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv);
|
2010-10-19 20:24:29 +02:00
|
|
|
HRESULT WINAPI STRMBASE_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv);
|
|
|
|
HRESULT WINAPI STRMBASE_DllCanUnloadNow(void);
|