00001
00034 #pragma once
00035
00036
00037 #include <DirectShow/CustomBaseFilter.h>
00038
00039
00040
00041
00042 static const GUID CLSID_YUV420toRGBColorConverter =
00043 { 0xff539cf3, 0xcb7a, 0x4121, { 0x92, 0xc2, 0x5a, 0x3e, 0xb8, 0xe7, 0xfe, 0x5e } };
00044
00045
00046
00047 class YUV420toRGBConverter;
00048
00049 class YUV420toRGBFilter : public CCustomBaseFilter
00050 {
00051 public:
00053 YUV420toRGBFilter();
00055 ~YUV420toRGBFilter();
00056
00058 static CUnknown * WINAPI CreateInstance(LPUNKNOWN pUnk, HRESULT *pHr);
00059
00063 HRESULT SetMediaType(PIN_DIRECTION direction, const CMediaType *pmt);
00064
00072 HRESULT GetMediaType(int iPosition, CMediaType *pMediaType);
00073
00075
00081 HRESULT DecideBufferSize(IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *pProp);
00082
00087 HRESULT CheckTransform(const CMediaType *mtIn, const CMediaType *mtOut);
00088
00090 virtual void InitialiseInputTypes();
00091
00093 virtual void initParameters(){;}
00094 protected:
00095
00096
00097 private:
00103 DWORD ApplyTransform(BYTE* pBufferIn, BYTE* pBufferOut);
00104
00106 YUV420toRGBConverter* m_pConverter;
00107
00108 int m_nSizeUV;
00109 };