QTDec.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 <afxtempl.h>
00025 #include "..\..\..\..\include\qt\qt.h"
00026 
00027 //
00028 // CQTDec
00029 //
00030 
00031 // {2D261619-3822-4856-A422-DC77BF0FB947}
00032 DEFINE_GUID(CLSID_QTDec, 
00033 0x2d261619, 0x3822, 0x4856, 0xa4, 0x22, 0xdc, 0x77, 0xbf, 0xf, 0xb9, 0x47);
00034 
00035 class CQTDec : public CTransformFilter
00036 {
00037         bool m_fQtInitialized;
00038         CArray<CMediaType> m_mts;
00039 
00040         QT::GWorldPtr m_pImageGWorld;
00041         QT::GWorldPtr MakeGWorld();
00042         void FreeGWorld(QT::GWorldPtr& pImageGWorld);
00043 
00044         QT::ComponentInstance m_cinst;
00045         QT::CodecCapabilities m_ccap;
00046         QT::CodecDecompressParams m_cdpar;      
00047         QT::ImageDescriptionHandle m_hImageDesc;
00048         bool InitComponent();
00049 
00050 public:
00051         CQTDec(LPUNKNOWN lpunk, HRESULT* phr);
00052         virtual ~CQTDec();
00053 
00054 #ifdef REGISTER_FILTER
00055     static CUnknown* WINAPI CreateInstance(LPUNKNOWN lpunk, HRESULT* phr);
00056 #endif
00057 
00058     HRESULT BreakConnect(PIN_DIRECTION dir);
00059         HRESULT CompleteConnect(PIN_DIRECTION dir, IPin* pReceivePin);
00060 
00061         HRESULT Transform(IMediaSample* pIn, IMediaSample* pOut);
00062         HRESULT CheckInputType(const CMediaType* mtIn);
00063         HRESULT CheckTransform(const CMediaType* mtIn, const CMediaType* mtOut);
00064         HRESULT DecideBufferSize(IMemAllocator* pAllocator, ALLOCATOR_PROPERTIES* pProperties);
00065         HRESULT GetMediaType(int iPosition, CMediaType* pMediaType);
00066 };

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