00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include "StdAfx.h"
00023 #include "NullRenderers.h"
00024 #include "..\..\include\moreuuids.h"
00025 #include "..\..\include\matroska\matroska.h"
00026
00027
00028
00029
00030
00031 HRESULT CNullVideoRenderer::CheckMediaType(const CMediaType* pmt)
00032 {
00033 return pmt->majortype == MEDIATYPE_Video
00034 || pmt->subtype == MEDIASUBTYPE_MPEG2_VIDEO
00035 ? S_OK
00036 : E_FAIL;
00037 }
00038
00039
00040
00041
00042
00043 HRESULT CNullUVideoRenderer::CheckMediaType(const CMediaType* pmt)
00044 {
00045 return pmt->majortype == MEDIATYPE_Video
00046 && (pmt->subtype == MEDIASUBTYPE_YV12
00047 || pmt->subtype == MEDIASUBTYPE_I420
00048 || pmt->subtype == MEDIASUBTYPE_YUYV
00049 || pmt->subtype == MEDIASUBTYPE_IYUV
00050 || pmt->subtype == MEDIASUBTYPE_YVU9
00051 || pmt->subtype == MEDIASUBTYPE_Y411
00052 || pmt->subtype == MEDIASUBTYPE_Y41P
00053 || pmt->subtype == MEDIASUBTYPE_YUY2
00054 || pmt->subtype == MEDIASUBTYPE_YVYU
00055 || pmt->subtype == MEDIASUBTYPE_UYVY
00056 || pmt->subtype == MEDIASUBTYPE_Y211
00057 || pmt->subtype == MEDIASUBTYPE_RGB1
00058 || pmt->subtype == MEDIASUBTYPE_RGB4
00059 || pmt->subtype == MEDIASUBTYPE_RGB8
00060 || pmt->subtype == MEDIASUBTYPE_RGB565
00061 || pmt->subtype == MEDIASUBTYPE_RGB555
00062 || pmt->subtype == MEDIASUBTYPE_RGB24
00063 || pmt->subtype == MEDIASUBTYPE_RGB32
00064 || pmt->subtype == MEDIASUBTYPE_ARGB1555
00065 || pmt->subtype == MEDIASUBTYPE_ARGB4444
00066 || pmt->subtype == MEDIASUBTYPE_ARGB32
00067 || pmt->subtype == MEDIASUBTYPE_A2R10G10B10
00068 || pmt->subtype == MEDIASUBTYPE_A2B10G10R10)
00069 ? S_OK
00070 : E_FAIL;
00071 }
00072
00073
00074
00075
00076
00077 HRESULT CNullAudioRenderer::CheckMediaType(const CMediaType* pmt)
00078 {
00079 return pmt->majortype == MEDIATYPE_Audio
00080 || pmt->majortype == MEDIATYPE_Midi
00081 || pmt->subtype == MEDIASUBTYPE_MPEG2_AUDIO
00082 || pmt->subtype == MEDIASUBTYPE_DOLBY_AC3
00083 || pmt->subtype == MEDIASUBTYPE_DVD_LPCM_AUDIO
00084 || pmt->subtype == MEDIASUBTYPE_DTS
00085 || pmt->subtype == MEDIASUBTYPE_SDDS
00086 || pmt->subtype == MEDIASUBTYPE_MPEG1AudioPayload
00087 || pmt->subtype == MEDIASUBTYPE_MPEG1Audio
00088 || pmt->subtype == MEDIASUBTYPE_MPEG1Audio
00089 ? S_OK
00090 : E_FAIL;
00091 }
00092
00093
00094
00095
00096
00097 HRESULT CNullUAudioRenderer::CheckMediaType(const CMediaType* pmt)
00098 {
00099 return pmt->majortype == MEDIATYPE_Audio
00100 && (pmt->subtype == MEDIASUBTYPE_PCM
00101 || pmt->subtype == MEDIASUBTYPE_IEEE_FLOAT
00102 || pmt->subtype == MEDIASUBTYPE_DRM_Audio
00103 || pmt->subtype == MEDIASUBTYPE_DOLBY_AC3_SPDIF
00104 || pmt->subtype == MEDIASUBTYPE_RAW_SPORT
00105 || pmt->subtype == MEDIASUBTYPE_SPDIF_TAG_241h)
00106 ? S_OK
00107 : E_FAIL;
00108 }
00109
00110
00111
00112
00113
00114 HRESULT CNullTextRenderer::CTextInputPin::CheckMediaType(const CMediaType* pmt)
00115 {
00116 return pmt->majortype == MEDIATYPE_Text
00117 || pmt->majortype == MEDIATYPE_ScriptCommand
00118 || pmt->majortype == MEDIATYPE_Subtitle
00119 || pmt->subtype == MEDIASUBTYPE_DVD_SUBPICTURE
00120 || pmt->subtype == MEDIASUBTYPE_CVD_SUBPICTURE
00121 || pmt->subtype == MEDIASUBTYPE_SVCD_SUBPICTURE
00122 ? S_OK
00123 : E_FAIL;
00124 }
00125
00126 CNullTextRenderer::CNullTextRenderer(LPUNKNOWN pUnk, HRESULT* phr)
00127 : CBaseFilter(NAME("CNullTextRenderer"), pUnk, this, __uuidof(this), phr)
00128 {
00129 m_pInput.Attach(new CTextInputPin(this, this, phr));
00130 }