2 * Copyright (C) 2007 Sebastien Moutte <sebastien@moutte.net>
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
21 #ifndef _DSHOWDECWRAPPER_FAKESRC_H_
22 #define _DSHOWDECWRAPPER_FAKESRC_H_
25 #include "gstdshowutil.h"
27 class FakeOutputPin : public CBaseOutputPin
32 CMediaType m_MediaType;
33 unsigned int m_SampleSize;
37 FakeOutputPin (CBaseFilter *pFilter, CCritSec *sec);
40 virtual HRESULT CheckMediaType(const CMediaType *pmt);
41 HRESULT GetMediaType(int iPosition, CMediaType *pMediaType);
42 virtual HRESULT DecideBufferSize (IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *ppropInputRequest);
43 STDMETHOD (SetMediaType) (AM_MEDIA_TYPE *pmt);
44 STDMETHOD (PushBuffer) (byte *buffer, __int64 start, __int64 stop, unsigned int size, bool discont);
46 STDMETHOD (SetSampleSize) (unsigned int size);
49 class FakeSrc : public CBaseFilter
53 FakeOutputPin *m_pOutputPin;
59 virtual int GetPinCount();
60 virtual CBasePin *GetPin(int n);
62 FakeOutputPin *GetOutputPin();
65 #endif // _DSHOWDECWRAPPER_FAKESRC_H_