00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef FORMATNAMES_H_
00026 #define FORMATNAMES_H_
00027
00028 #include <string>
00029 #include <uuids.h>
00030
00031 void GetVideoFormatName(const GUID* guid, std::string& FormatName)
00032 {
00033
00034
00035
00036 if (*guid==MEDIASUBTYPE_ARGB1555) {
00037 FormatName="RGB 555 with alpha channel";
00038 return;
00039 }
00040 if (*guid==MEDIASUBTYPE_ARGB4444) {
00041 FormatName="16-bit RGB with alpha channel; 4 bits per channel";
00042 return;
00043 }
00044 if (*guid==MEDIASUBTYPE_ARGB32) {
00045 FormatName="RGB 32 with alpha channel";
00046 return;
00047 }
00048 if (*guid==MEDIASUBTYPE_A2R10G10B10) {
00049 FormatName
00050 ="32-bit RGB with alpha channel; 10 bits per RGB channel plus 2 bits for alpha";
00051 return;
00052 }
00053 if (*guid==MEDIASUBTYPE_A2B10G10R10) {
00054 FormatName
00055 ="32-bit RGB with alpha channel; 10 bits per RGB channel plus 2 bits for alpha";
00056 return;
00057 }
00058 if (*guid==MEDIASUBTYPE_RGB1) {
00059 FormatName="RGB, 1 bit per pixel (bpp), palettized";
00060 return;
00061 }
00062 if (*guid==MEDIASUBTYPE_RGB4) {
00063 FormatName="RGB, 4 bpp, palettized";
00064 return;
00065 }
00066 if (*guid==MEDIASUBTYPE_RGB8) {
00067 FormatName="RGB, 8 bpp";
00068 return;
00069 }
00070 if (*guid==MEDIASUBTYPE_RGB555) {
00071 FormatName="RGB 555, 16 bpp";
00072 return;
00073 }
00074 if (*guid==MEDIASUBTYPE_RGB565) {
00075 FormatName="RGB 565, 16 bpp";
00076 return;
00077 }
00078 if (*guid==MEDIASUBTYPE_RGB24) {
00079 FormatName="RGB, 24 bpp";
00080 return;
00081 }
00082 if (*guid==MEDIASUBTYPE_RGB32) {
00083 FormatName="RGB, 32 bpp";
00084 return;
00085 }
00086
00087
00088 if (*guid==MEDIASUBTYPE_dvsl) {
00089 FormatName="DV, 12.5 Mbps SD-DVCR 525-60 or SD-DVCR 625-50";
00090 return;
00091 }
00092 if (*guid==MEDIASUBTYPE_dvsd) {
00093 FormatName="DV, 25 Mbps SDL-DVCR 525-60 or SDL-DVCR 625-50";
00094 return;
00095 }
00096 if (*guid==MEDIASUBTYPE_dvhd) {
00097 FormatName="DV, 50 Mbps HD-DVCR 1125-60 or HD-DVCR 1250-50";
00098 return;
00099 }
00100 if (*guid==MEDIASUBTYPE_dv25) {
00101 FormatName="DV, 25 Mbps DVCPRO 25 (525-60 or 625-50)";
00102 return;
00103 }
00104 if (*guid==MEDIASUBTYPE_dv50) {
00105 FormatName="DV, 50 Mbps DVCPRO 50 (525-60 or 625-50)";
00106 return;
00107 }
00108 if (*guid==MEDIASUBTYPE_dvh1) {
00109 FormatName="DV, 100 Mbps DVCPRO 100 (1080/60i, 1080/50i, or 720/60P)";
00110 return;
00111 }
00112
00113
00114 if (*guid==MEDIASUBTYPE_AYUV) {
00115 FormatName="4:4:4 YUV formats";
00116 return;
00117 }
00118 if (*guid==MEDIASUBTYPE_UYVY) {
00119 FormatName="UYVY (packed 4:2:2)";
00120 return;
00121 }
00122 if (*guid==MEDIASUBTYPE_Y411) {
00123 FormatName="Y411 (packed 4:1:1)";
00124 return;
00125 }
00126 if (*guid==MEDIASUBTYPE_Y41P) {
00127 FormatName="Y41P (packed 4:1:1)";
00128 return;
00129 }
00130 if (*guid==MEDIASUBTYPE_Y211) {
00131 FormatName="Y211";
00132 return;
00133 }
00134 if (*guid==MEDIASUBTYPE_YUY2) {
00135 FormatName="YUYV (packed 4:2:2)";
00136 return;
00137 }
00138 if (*guid==MEDIASUBTYPE_YVYU) {
00139 FormatName="YVYU (packed 4:2:2)";
00140 return;
00141 }
00142 if (*guid==MEDIASUBTYPE_YUYV) {
00143 FormatName="YUYV (packed 4:2:2)(Used by Canopus; FOURCC 'YUYV')";
00144 return;
00145 }
00146 if (*guid==MEDIASUBTYPE_IF09) {
00147 FormatName="Indeo YVU9";
00148 return;
00149 }
00150 if (*guid==MEDIASUBTYPE_IYUV) {
00151 FormatName="IYUV";
00152 return;
00153 }
00154
00155
00156
00157
00158
00159
00160 if (*guid==MEDIASUBTYPE_YV12) {
00161 FormatName="YV12";
00162 return;
00163 }
00164 if (*guid==MEDIASUBTYPE_YVU9) {
00165 FormatName="YVU9";
00166 return;
00167 }
00168
00169
00170 if (*guid==MEDIASUBTYPE_CFCC) {
00171 FormatName="MJPG format produced by some cards. (FOURCC 'CFCC')";
00172 return;
00173 }
00174 if (*guid==MEDIASUBTYPE_CLJR) {
00175 FormatName="Cirrus Logic CLJR format. (FOURCC 'CLJR')";
00176 return;
00177 }
00178 if (*guid==MEDIASUBTYPE_CPLA) {
00179 FormatName="Cinepak UYVY format. (FOURCC 'CPLA')";
00180 return;
00181 }
00182 if (*guid==MEDIASUBTYPE_CLPL) {
00183 FormatName
00184 ="A YUV format supported by some Cirrus Logic drivers. (FOURCC 'CLPL')";
00185 return;
00186 }
00187 if (*guid==MEDIASUBTYPE_IJPG) {
00188 FormatName="Intergraph JPEG format. (FOURCC 'IJPG')";
00189 return;
00190 }
00191 if (*guid==MEDIASUBTYPE_MDVF) {
00192 FormatName="A DV encoding format. (FOURCC 'MDVF')";
00193 return;
00194 }
00195 if (*guid==MEDIASUBTYPE_MJPG) {
00196 FormatName="Motion JPEG (MJPG) compressed video. (FOURCC 'MJPG')";
00197 return;
00198 }
00199 if (*guid==MEDIASUBTYPE_MPEG1Packet) {
00200 FormatName="MPEG1 Video Packet";
00201 return;
00202 }
00203 if (*guid==MEDIASUBTYPE_MPEG1Payload) {
00204 FormatName="MPEG1 Video Payload";
00205 return;
00206 }
00207 if (*guid==MEDIASUBTYPE_Overlay) {
00208 FormatName="Video delivered using hardware overlay";
00209 return;
00210 }
00211 if (*guid==MEDIASUBTYPE_Plum) {
00212 FormatName="Plum MJPG format. (FOURCC 'Plum')";
00213 return;
00214 }
00215 if (*guid==MEDIASUBTYPE_QTJpeg) {
00216 FormatName="QuickTime JPEG compressed data";
00217 return;
00218 }
00219 if (*guid==MEDIASUBTYPE_QTMovie) {
00220 FormatName="AppleŽ QuickTimeŽ compression";
00221 return;
00222 }
00223 if (*guid==MEDIASUBTYPE_QTRle) {
00224 FormatName="QuickTime RLE compressed data";
00225 return;
00226 }
00227 if (*guid==MEDIASUBTYPE_QTRpza) {
00228 FormatName="QuickTime RPZA compressed data";
00229 return;
00230 }
00231 if (*guid==MEDIASUBTYPE_QTSmc) {
00232 FormatName="QuickTime SMC compressed data";
00233 return;
00234 }
00235 if (*guid==MEDIASUBTYPE_TVMJ) {
00236 FormatName="TrueVision MJPG format. (FOURCC 'TVMJ')";
00237 return;
00238 }
00239 if (*guid==MEDIASUBTYPE_VPVBI) {
00240 FormatName="Video port vertical blanking interval (VBI) data";
00241 return;
00242 }
00243 if (*guid==MEDIASUBTYPE_VPVideo) {
00244 FormatName="Video port video data";
00245 return;
00246 }
00247 if (*guid==MEDIASUBTYPE_WAKE) {
00248 FormatName="MJPG format produced by some cards. (FOURCC 'WAKE')";
00249 return;
00250 }
00251
00252 if (*guid==MEDIASUBTYPE_MPEG1Video) {
00253 FormatName="MPEG1 Video";
00254 return;
00255 }
00256 if (*guid==MEDIASUBTYPE_MPEG2_VIDEO) {
00257 FormatName="MPEG2 Video";
00258 return;
00259 }
00260
00261 FormatName="Unknown format type!";
00262 return;
00263 }
00264
00265 void GetVideoStandardName(ULONG VideoStandard,
00266 std::list<avcap::VideoStandard*>& VidStandard)
00267 {
00268
00269
00270 if (VideoStandard & AnalogVideo_None) {
00271 avcap::VideoStandard *vidSt=new avcap::VideoStandard("Digital sensor", 0);
00272 VidStandard.push_back(vidSt);
00273 }
00274 if (VideoStandard & AnalogVideo_NTSC_M) {
00275 avcap::VideoStandard *vidSt=new avcap::VideoStandard("NTSC (M) standard, 7.5 IRE black", 0x1);
00276 VidStandard.push_back(vidSt);
00277 }
00278 if (VideoStandard & AnalogVideo_NTSC_M_J) {
00279 avcap::VideoStandard *vidSt=new avcap::VideoStandard("NTSC (M) standard, 0 IRE black (Japan)", 0x2);
00280 VidStandard.push_back(vidSt);
00281 }
00282 if (VideoStandard & AnalogVideo_NTSC_433) {
00283 avcap::VideoStandard *vidSt=new avcap::VideoStandard("NTSC-433", 0x4);
00284 VidStandard.push_back(vidSt);
00285 }
00286 if (VideoStandard & AnalogVideo_PAL_B) {
00287 avcap::VideoStandard *vidSt=new avcap::VideoStandard("PAL-B standard", 0x10);
00288 VidStandard.push_back(vidSt);
00289 }
00290 if (VideoStandard & AnalogVideo_PAL_D) {
00291 avcap::VideoStandard *vidSt=new avcap::VideoStandard("PAL (D) standard", 0x20);
00292 VidStandard.push_back(vidSt);
00293 }
00294 if (VideoStandard & AnalogVideo_PAL_G) {
00295 avcap::VideoStandard *vidSt=new avcap::VideoStandard("PAL (G) standard", 0x40);
00296 VidStandard.push_back(vidSt);
00297 }
00298 if (VideoStandard & AnalogVideo_PAL_H) {
00299 avcap::VideoStandard *vidSt=new avcap::VideoStandard("PAL (H) standard", 0x80);
00300 VidStandard.push_back(vidSt);
00301 }
00302 if (VideoStandard & AnalogVideo_PAL_I) {
00303 avcap::VideoStandard *vidSt=new avcap::VideoStandard("PAL (I) standard", 0x100);
00304 VidStandard.push_back(vidSt);
00305 }
00306 if (VideoStandard & AnalogVideo_PAL_M) {
00307 avcap::VideoStandard *vidSt=new avcap::VideoStandard("PAL (M) standard", 0x200);
00308 VidStandard.push_back(vidSt);
00309 }
00310 if (VideoStandard & AnalogVideo_PAL_N) {
00311 avcap::VideoStandard *vidSt=new avcap::VideoStandard("PAL (N) standard", 0x400);
00312 VidStandard.push_back(vidSt);
00313 }
00314 if (VideoStandard & AnalogVideo_PAL_60) {
00315 avcap::VideoStandard *vidSt=new avcap::VideoStandard("PAL-60 standard", 0x800);
00316 VidStandard.push_back(vidSt);
00317 }
00318 if (VideoStandard & AnalogVideo_SECAM_B) {
00319 avcap::VideoStandard *vidSt=new avcap::VideoStandard("SECAM (B) standard", 0x1000);
00320 VidStandard.push_back(vidSt);
00321 }
00322 if (VideoStandard & AnalogVideo_SECAM_D) {
00323 avcap::VideoStandard *vidSt=new avcap::VideoStandard("SECAM (D) standard", 0x2000);
00324 VidStandard.push_back(vidSt);
00325 }
00326 if (VideoStandard & AnalogVideo_SECAM_G) {
00327 avcap::VideoStandard *vidSt=new avcap::VideoStandard("SECAM (G) standard", 0x4000);
00328 VidStandard.push_back(vidSt);
00329 }
00330 if (VideoStandard & AnalogVideo_SECAM_H) {
00331 avcap::VideoStandard *vidSt=new avcap::VideoStandard("SECAM (H) standard", 0x8000);
00332 VidStandard.push_back(vidSt);
00333 }
00334 if (VideoStandard & AnalogVideo_SECAM_K) {
00335 avcap::VideoStandard *vidSt=new avcap::VideoStandard("SECAM (K) standard", 0x10000);
00336 VidStandard.push_back(vidSt);
00337 }
00338 if (VideoStandard & AnalogVideo_SECAM_K1) {
00339 avcap::VideoStandard *vidSt=new avcap::VideoStandard("SECAM (K1) standard", 0x20000);
00340 VidStandard.push_back(vidSt);
00341 }
00342 if (VideoStandard & AnalogVideo_SECAM_L) {
00343 avcap::VideoStandard *vidSt=new avcap::VideoStandard("SECAM (L) standard", 0x40000);
00344 VidStandard.push_back(vidSt);
00345 }
00346 if (VideoStandard & AnalogVideo_SECAM_L1) {
00347 avcap::VideoStandard *vidSt=new avcap::VideoStandard("SECAM (L1) standard", 0x80000);
00348 VidStandard.push_back(vidSt);
00349 }
00350 if (VideoStandard & AnalogVideo_PAL_N_COMBO) {
00351 avcap::VideoStandard *vidSt=new avcap::VideoStandard("Combination (N) PAL standard (Argentina)", 0x100000);
00352 VidStandard.push_back(vidSt);
00353 }
00354 }
00355
00356 #endif // FORMATNAMES_H_