transform.h 1.88 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
/*
 * Transform Filter declarations
 *
 * Copyright 2005 Christian Costa
 *
 * 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
18
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 20
 */

21 22
#include "control_private.h"

23 24
typedef struct TransformFilterImpl TransformFilterImpl;

Christian Costa's avatar
Christian Costa committed
25
typedef struct TransformFuncsTable {
26 27 28 29 30 31
    HRESULT (*pfnProcessBegin) (TransformFilterImpl *This);
    HRESULT (*pfnProcessSampleData) (InputPin *pin, IMediaSample *pSample);
    HRESULT (*pfnProcessEnd) (TransformFilterImpl *This);
    HRESULT (*pfnQueryConnect) (TransformFilterImpl *This, const AM_MEDIA_TYPE * pmt);
    HRESULT (*pfnConnectInput) (InputPin *pin, const AM_MEDIA_TYPE * pmt);
    HRESULT (*pfnCleanup) (InputPin *pin);
Christian Costa's avatar
Christian Costa committed
32
} TransformFuncsTable;
33 34 35 36 37

struct TransformFilterImpl
{
    const IBaseFilterVtbl * lpVtbl;

38
    LONG refCount;
39 40 41 42 43 44
    CRITICAL_SECTION csFilter;
    FILTER_STATE state;
    REFERENCE_TIME rtStreamStart;
    IReferenceClock * pClock;
    FILTER_INFO filterInfo;
    CLSID clsid;
45
    struct MediaSeekingImpl mediaSeeking;
46

47 48
    IPin **ppPins;
    ULONG npins;
49
    AM_MEDIA_TYPE pmt;
50

51
    const TransformFuncsTable * pFuncsTable;
52 53
};

54
HRESULT TransformFilter_Create(TransformFilterImpl*, const CLSID*, const TransformFuncsTable* pFuncsTable, CHANGEPROC stop, CHANGEPROC current, CHANGEPROC rate);