DiracSplitter.h

00001 /* 
00002  *      Copyright (C) 2003-2005 Gabest
00003  *      http://www.gabest.org
00004  *
00005  *  This Program is free software; you can redistribute it and/or modify
00006  *  it under the terms of the GNU General Public License as published by
00007  *  the Free Software Foundation; either version 2, or (at your option)
00008  *  any later version.
00009  *   
00010  *  This Program is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00013  *  GNU General Public License for more details.
00014  *   
00015  *  You should have received a copy of the GNU General Public License
00016  *  along with GNU Make; see the file COPYING.  If not, write to
00017  *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 
00018  *  http://www.gnu.org/copyleft/gpl.html
00019  *
00020  */
00021 
00022 #pragma once
00023 
00024 #include "..\BaseSplitter\BaseSplitter.h"
00025 #include "DiracSplitterFile.h"
00026 
00027 [uuid("5899CFB9-948F-4869-A999-5544ECB38BA5")]
00028 class CDiracSplitterFilter : public CBaseSplitterFilter
00029 {
00030 protected:
00031         CAutoPtr<CDiracSplitterFile> m_pFile;
00032         HRESULT CreateOutputs(IAsyncReader* pAsyncReader);
00033 
00034         bool DemuxInit();
00035         void DemuxSeek(REFERENCE_TIME rt);
00036         bool DemuxLoop();
00037 
00038 public:
00039         CDiracSplitterFilter(LPUNKNOWN pUnk, HRESULT* phr);
00040 
00041         DECLARE_IUNKNOWN
00042     STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void** ppv);
00043 };
00044 
00045 [uuid("09E7F58E-71A1-419D-B0A0-E524AE1454A9")]
00046 class CDiracSourceFilter : public CDiracSplitterFilter
00047 {
00048 public:
00049         CDiracSourceFilter(LPUNKNOWN pUnk, HRESULT* phr);
00050 };
00051 
00052 [uuid("F78CF248-180E-4713-B107-B13F7B5C31E1")]
00053 class CDiracVideoDecoder : public CTransformFilter
00054 {
00055     void* m_decoder; // dirac_decoder_t*
00056         void InitDecoder(), FreeDecoder();
00057         BYTE* m_pYUV[4];
00058         bool m_fDropFrames;
00059         REFERENCE_TIME m_tStart, m_rtAvgTimePerFrame;
00060 
00061         HRESULT Deliver(IMediaSample* pIn, REFERENCE_TIME rtStart, REFERENCE_TIME rtStop);
00062         void Copy(BYTE* pOut);
00063 
00064 public:
00065         CDiracVideoDecoder(LPUNKNOWN lpunk, HRESULT* phr);
00066         virtual ~CDiracVideoDecoder();
00067 
00068         HRESULT Receive(IMediaSample* pIn);
00069         HRESULT CheckInputType(const CMediaType* mtIn);
00070         HRESULT CheckTransform(const CMediaType* mtIn, const CMediaType* mtOut);
00071         HRESULT DecideBufferSize(IMemAllocator* pAllocator, ALLOCATOR_PROPERTIES* pProperties);
00072         HRESULT GetMediaType(int iPosition, CMediaType* pMediaType);
00073 
00074         HRESULT StartStreaming();
00075         HRESULT StopStreaming();
00076 
00077     HRESULT NewSegment(REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate);
00078 
00079         HRESULT AlterQuality(Quality q);
00080 };

Generated on Tue Dec 13 14:47:11 2005 for guliverkli by  doxygen 1.4.5