NullRenderers.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 <atlcoll.h>
00025 
00026 class CNullRenderer : public CBaseRenderer
00027 {
00028 protected:
00029         HRESULT DoRenderSample(IMediaSample* pSample) {return S_OK;}
00030 public:
00031         CNullRenderer(REFCLSID clsid, TCHAR* pName)
00032                 : CBaseRenderer(clsid, pName, NULL, NULL) {}
00033 };
00034 
00035 [uuid("579883A0-4E2D-481F-9436-467AAFAB7DE8")]
00036 class CNullVideoRenderer : public CNullRenderer
00037 {
00038 protected:
00039         HRESULT CheckMediaType(const CMediaType* pmt);
00040 public:
00041         CNullVideoRenderer()
00042                 : CNullRenderer(__uuidof(this), NAME("Null Video Renderer")) {}
00043 };
00044 
00045 [uuid("DD9ED57D-6ABF-42E8-89A2-11D04798DC58")]
00046 class CNullUVideoRenderer : public CNullRenderer
00047 {
00048 protected:
00049         HRESULT CheckMediaType(const CMediaType* pmt);
00050 public:
00051         CNullUVideoRenderer()
00052                 : CNullRenderer(__uuidof(this), NAME("Null Video Renderer (Uncompressed)")) {}
00053 };
00054 
00055 [uuid("0C38BDFD-8C17-4E00-A344-F89397D3E22A")]
00056 class CNullAudioRenderer : public CNullRenderer
00057 {
00058 protected:
00059         HRESULT CheckMediaType(const CMediaType* pmt);
00060 public:
00061         CNullAudioRenderer()
00062                 : CNullRenderer(__uuidof(this), NAME("Null Audio Renderer")) {}
00063 };
00064 
00065 [uuid("64A45125-7343-4772-9DA4-179FAC9D462C")]
00066 class CNullUAudioRenderer : public CNullRenderer
00067 {
00068 protected:
00069         HRESULT CheckMediaType(const CMediaType* pmt);
00070 public:
00071         CNullUAudioRenderer()
00072                 : CNullRenderer(__uuidof(this), NAME("Null Audio Renderer (Uncompressed)")) {}
00073 };
00074 
00075 [uuid("655D7613-C26C-4A25-BBBD-3C9C516122CC")]
00076 class CNullTextRenderer : public CBaseFilter, public CCritSec
00077 {
00078         class CTextInputPin : public CBaseInputPin
00079         {
00080         public:
00081                 CTextInputPin(CBaseFilter* pFilter, CCritSec* pLock, HRESULT* phr) 
00082                         : CBaseInputPin(NAME("CTextInputPin"), pFilter, pLock, phr, L"In") {}
00083             HRESULT CheckMediaType(const CMediaType* pmt);
00084         };
00085         CAutoPtr<CTextInputPin> m_pInput;
00086 public:
00087         CNullTextRenderer(LPUNKNOWN pUnk, HRESULT* phr);
00088         int GetPinCount() {return (int)!!m_pInput;}
00089         CBasePin* GetPin(int n) {return n == 0 ? (CBasePin*)m_pInput : NULL;}
00090 };
00091 

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