RGBtoYUV420Filter.h

Go to the documentation of this file.
00001 
00034 #pragma once
00035 
00036 // Meraka includes
00037 #include <DirectShow/CustomBaseFilter.h>
00038 
00039 // GUID
00040 
00041 // {BB0980EB-97F6-439a-847E-B94C2F5EFCD7}
00042 static const GUID CLSID_RGBtoYUV420ColorConverter = 
00043 { 0xbb0980eb, 0x97f6, 0x439a, { 0x84, 0x7e, 0xb9, 0x4c, 0x2f, 0x5e, 0xfc, 0xd7 } };
00044 
00045 // Forward declarations
00046 class RGBtoYUV420Converter;
00047 
00048 class RGBtoYUV420Filter : public CCustomBaseFilter
00049 {
00050 public:
00052         RGBtoYUV420Filter();
00054         ~RGBtoYUV420Filter();
00055 
00057         static CUnknown * WINAPI CreateInstance(LPUNKNOWN pUnk, HRESULT *pHr); 
00058 
00062         HRESULT SetMediaType(PIN_DIRECTION direction, const CMediaType *pmt);
00063 
00071         HRESULT GetMediaType(int iPosition, CMediaType *pMediaType);
00072 
00074 
00080         HRESULT DecideBufferSize(IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *pProp);
00081 
00086         HRESULT CheckTransform(const CMediaType *mtIn, const CMediaType *mtOut);
00087 
00089         virtual void InitialiseInputTypes();
00090 
00092         virtual void initParameters(){;}
00093 protected:
00094         
00095 
00096 private:
00102         DWORD ApplyTransform(BYTE* pBufferIn, BYTE* pBufferOut);
00103 
00105         RGBtoYUV420Converter* m_pConverter;
00106         // Size of YUV image
00107         int m_nSizeYUV;
00108 };

Generated on Fri Mar 13 14:12:38 2009 for RTVC by  doxygen 1.5.3