OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef MEDIA_BASE_CONTAINER_NAMES_H_ | |
6 #define MEDIA_BASE_CONTAINER_NAMES_H_ | |
7 | |
8 #include "base/basictypes.h" | |
9 #include "media/base/media_export.h" | |
10 | |
11 namespace container_names { | |
xhwang
2013/05/06 23:51:27
How about put container_names namespace within med
jrummell
2013/05/16 23:48:01
Done.
| |
12 | |
13 // This is the complete set of possible input formats specified in the | |
14 // FFmpeg code. Not all of these are enabled in FFmpeg. | |
15 // This list must be kept in sync with the enum definition "FFmpegContainers" | |
16 // in tools/metrics/histograms/histograms.xml. | |
17 enum FFmpegContainerName { | |
18 CONTAINER_UNKNOWN, // unavailable | |
19 CONTAINER_4XM, // 4X Technologies | |
20 CONTAINER_AAC, // raw ADTS AAC (Advanced Audio Coding) | |
21 CONTAINER_AC3, // raw AC-3 | |
22 CONTAINER_EAC3, // raw E-AC-3 | |
23 CONTAINER_ACT, // ACT Voice file format | |
24 CONTAINER_ADX, // CRI ADX | |
25 CONTAINER_AEA, // MD STUDIO audio | |
26 CONTAINER_AFC, // AFC | |
27 CONTAINER_AIFF, // Audio IFF | |
28 CONTAINER_AMR, // 3GPP AMR | |
29 CONTAINER_ANM, // Deluxe Paint Animation | |
30 CONTAINER_APC, // CRYO APC | |
31 CONTAINER_APE, // Monkey's Audio | |
32 CONTAINER_AQTITLE, // AQTitle subtitles | |
33 CONTAINER_ASF, // ASF (Advanced / Active Streaming Format) | |
34 CONTAINER_ASS, // SSA (SubStation Alpha) subtitle | |
35 CONTAINER_AST, // AST (Audio Stream) | |
36 CONTAINER_AU, // Sun AU | |
37 CONTAINER_AVI, // AVI (Audio Video Interleaved) | |
38 CONTAINER_AVISYNTH, // AVISynth | |
39 CONTAINER_AVR, // AVR (Audio Visual Research) | |
40 CONTAINER_AVS, // AVS | |
41 CONTAINER_BETHSOFTVID, // Bethesda Softworks VID | |
42 CONTAINER_BFI, // Brute Force & Ignorance | |
43 CONTAINER_BINK, // Bink | |
44 CONTAINER_BIN, // Binary text | |
45 CONTAINER_XBIN, // eXtended BINary text (XBIN) | |
46 CONTAINER_ADF, // Artworx Data Format | |
47 CONTAINER_IDF, // iCE Draw File | |
48 CONTAINER_BIT, // G.729 BIT file format | |
49 CONTAINER_BMV, // Discworld II BMV | |
50 CONTAINER_BRSTM, // BRSTM (Binary Revolution Stream) | |
51 CONTAINER_C93, // Interplay C93 | |
52 CONTAINER_CAF, // Apple CAF (Core Audio Format) | |
53 CONTAINER_CDG, // CD Graphics | |
54 CONTAINER_CDXL, // Commodore CDXL video | |
55 CONTAINER_CONCAT, // Virtual concatenation script | |
56 CONTAINER_DAUD, // D-Cinema audio | |
57 CONTAINER_DFA, // Chronomaster DFA | |
58 CONTAINER_DSICIN, // Delphine Software International CIN | |
59 CONTAINER_DTS, // raw DTS | |
60 CONTAINER_DTSHD, // raw DTS-HD | |
61 CONTAINER_DV, // DV (Digital Video) | |
62 CONTAINER_DXA, // DXA | |
63 CONTAINER_EA_CDATA, // Electronic Arts cdata | |
64 CONTAINER_EA, // Electronic Arts Multimedia | |
65 CONTAINER_EPAF, // Ensoniq Paris Audio File | |
66 CONTAINER_FFM, // FFM (FFserver live feed) | |
67 CONTAINER_FFMETADATA, // FFmpeg metadata in text | |
68 CONTAINER_FILMSTRIP, // Adobe Filmstrip | |
69 CONTAINER_FLAC, // raw FLAC | |
70 CONTAINER_FLIC, // FLI/FLC/FLX animation | |
71 CONTAINER_FLV, // FLV (Flash Video) | |
72 CONTAINER_FRM, // Megalux Frame | |
73 CONTAINER_G722, // raw G.722 | |
74 CONTAINER_G723_1, // G.723.1 | |
75 CONTAINER_G729, // G.729 raw format demuxer | |
76 CONTAINER_GIF, // CompuServe Graphics Interchange Format (GIF) | |
77 CONTAINER_GSM, // raw GSM | |
78 CONTAINER_GXF, // GXF (General eXchange Format) | |
79 CONTAINER_HLS, // Apple HTTP Live Streaming | |
80 CONTAINER_ICO, // Microsoft Windows ICO | |
81 CONTAINER_IDCIN, // id Cinematic | |
82 CONTAINER_ROQ, // id RoQ | |
83 CONTAINER_IFF, // IFF (Interchange File Format) | |
84 CONTAINER_ILBC, // iLBC storage | |
85 CONTAINER_IMAGE2, // image2 sequence | |
86 CONTAINER_IMAGE2PIPE, // piped image2 sequence | |
87 CONTAINER_INGENIENT, // raw Ingenient MJPEG | |
88 CONTAINER_IPMOVIE, // Interplay MVE | |
89 CONTAINER_IRCAM, // Berkeley/IRCAM/CARL Sound Format | |
90 CONTAINER_ISS, // Funcom ISS | |
91 CONTAINER_IV8, // IndigoVision 8000 video | |
92 CONTAINER_IVF, // On2 IVF | |
93 CONTAINER_JACOSUB, // JACOsub subtitle format | |
94 CONTAINER_JV, // Bitmap Brothers JV | |
95 CONTAINER_LIBMODPLUG, // ModPlug demuxer | |
96 CONTAINER_LIBNUT, // NUT format | |
97 CONTAINER_LMLM4, // raw lmlm4 | |
98 CONTAINER_LOAS, // LOAS AudioSyncStream | |
99 CONTAINER_LVF, // LVF | |
100 CONTAINER_LXF, // VR native stream (LXF) | |
101 CONTAINER_WEBM, // Matroska / WebM | |
102 CONTAINER_MGSTS, // Metal Gear Solid: The Twin Snakes | |
103 CONTAINER_MICRODVD, // MicroDVD subtitle format | |
104 CONTAINER_MM, // American Laser Games MM | |
105 CONTAINER_MMF, // Yamaha SMAF | |
106 CONTAINER_MOV, // QuickTime / MOV | |
107 CONTAINER_MP3, // MP2/3 (MPEG audio layer 2/3) | |
108 CONTAINER_MPC8, // Musepack SV8 | |
109 CONTAINER_MPC, // Musepack | |
110 CONTAINER_MPEG, // MPEG-PS (MPEG-2 Program Stream) | |
111 CONTAINER_VOBSUB, // VobSub subtitle format | |
112 CONTAINER_MPEGTS, // MPEG-TS (MPEG-2 Transport Stream) | |
113 CONTAINER_MPEGTSRAW, // raw MPEG-TS (MPEG-2 Transport Stream) | |
114 CONTAINER_MPL2, // MPL2 subtitles | |
115 CONTAINER_MPSUB, // MPlayer subtitles | |
116 CONTAINER_MSNWCTCP, // MSN TCP Webcam stream | |
117 CONTAINER_MTV, // MTV | |
118 CONTAINER_MV, // Silicon Graphics Movie | |
119 CONTAINER_MVI, // Motion Pixels MVI | |
120 CONTAINER_MXF, // MXF (Material eXchange Format) | |
121 CONTAINER_MXG, // MxPEG clip | |
122 CONTAINER_NC, // NC camera feed | |
123 CONTAINER_NISTSPHERE, // NIST SPeech HEader REsources | |
124 CONTAINER_NSV, // Nullsoft Streaming Video | |
125 CONTAINER_NUT, // NUT | |
126 CONTAINER_NUV, // NuppelVideo | |
127 CONTAINER_OGG, // Ogg | |
128 CONTAINER_OMA, // Sony OpenMG audio | |
129 CONTAINER_PAF, // Amazing Studio Packed Animation File | |
130 CONTAINER_F64BE, // PCM 64-bit floating-point big-endian | |
131 CONTAINER_F64LE, // PCM 64-bit floating-point little-endian | |
132 CONTAINER_F32BE, // PCM 32-bit floating-point big-endian | |
133 CONTAINER_F32LE, // PCM 32-bit floating-point little-endian | |
134 CONTAINER_S32BE, // PCM signed 32-bit big-endian | |
135 CONTAINER_S32LE, // PCM signed 32-bit little-endian | |
136 CONTAINER_S24BE, // PCM signed 24-bit big-endian | |
137 CONTAINER_S24LE, // PCM signed 24-bit little-endian | |
138 CONTAINER_S16BE, // PCM signed 16-bit big-endian | |
139 CONTAINER_S16LE, // PCM signed 16-bit little-endian | |
140 CONTAINER_S8, // PCM signed 8-bit | |
141 CONTAINER_U32BE, // PCM unsigned 32-bit big-endian | |
142 CONTAINER_U32LE, // PCM unsigned 32-bit little-endian | |
143 CONTAINER_U24BE, // PCM unsigned 24-bit big-endian | |
144 CONTAINER_U24LE, // PCM unsigned 24-bit little-endian | |
145 CONTAINER_U16BE, // PCM unsigned 16-bit big-endian | |
146 CONTAINER_U16LE, // PCM unsigned 16-bit little-endian | |
147 CONTAINER_U8, // PCM unsigned 8-bit | |
148 CONTAINER_ALAW, // PCM A-law | |
149 CONTAINER_MULAW, // PCM mu-law | |
150 CONTAINER_PJS, // PJS (Phoenix Japanimation Society) subtitles | |
151 CONTAINER_PMP, // Playstation Portable PMP | |
152 CONTAINER_PSXSTR, // Sony Playstation STR | |
153 CONTAINER_PVA, // TechnoTrend PVA | |
154 CONTAINER_PVF, // PVF (Portable Voice Format) | |
155 CONTAINER_QCP, // QCP | |
156 CONTAINER_R3D, // REDCODE R3D | |
157 CONTAINER_LATM, // raw LOAS/LATM | |
158 CONTAINER_MLP, // raw MLP | |
159 CONTAINER_TRUEHD, // raw TrueHD | |
160 CONTAINER_SHN, // raw Shorten | |
161 CONTAINER_RAWVIDEO, // raw video | |
162 CONTAINER_REALTEXT, // RealText subtitle format | |
163 CONTAINER_RL2, // RL2 | |
164 CONTAINER_RM, // RealMedia | |
165 CONTAINER_RDT, // RDT demuxer | |
166 CONTAINER_RPL, // RPL / ARMovie | |
167 CONTAINER_RSO, // Lego Mindstorms RSO | |
168 CONTAINER_SDP, // SDP | |
169 CONTAINER_RTP, // RTP input | |
170 CONTAINER_RTSP, // RTSP input | |
171 CONTAINER_SAMI, // SAMI subtitle format | |
172 CONTAINER_SAP, // SAP input | |
173 CONTAINER_SBG, // SBaGen binaural beats script | |
174 CONTAINER_FILM_CPK, // Sega FILM / CPK | |
175 CONTAINER_VMD, // Sierra VMD | |
176 CONTAINER_SIFF, // Beam Software SIFF | |
177 CONTAINER_SMK, // Smacker | |
178 CONTAINER_SMJPEG, // Loki SDL MJPEG | |
179 CONTAINER_SMUSH, // LucasArts Smush | |
180 CONTAINER_SOL, // Sierra SOL | |
181 CONTAINER_SOX, // SoX native | |
182 CONTAINER_SPDIF, // IEC 61937 (compressed data in S/PDIF) | |
183 CONTAINER_SRT, // SubRip subtitle | |
184 CONTAINER_SUBVIEWER1, // SubViewer v1 subtitle format | |
185 CONTAINER_SUBVIEWER, // SubViewer subtitle format | |
186 CONTAINER_SWF, // SWF (ShockWave Flash) | |
187 CONTAINER_TAK, // raw TAK | |
188 CONTAINER_TEDCAPTIONS, // TED Talks captions | |
189 CONTAINER_THP, // THP | |
190 CONTAINER_TIERTEXSEQ, // Tiertex Limited SEQ | |
191 CONTAINER_TMV, // 8088flex TMV | |
192 CONTAINER_TTA, // TTA (True Audio) | |
193 CONTAINER_TTY, // Tele-typewriter | |
194 CONTAINER_TXD, // Renderware TeXture Dictionary | |
195 CONTAINER_VC1TEST, // VC-1 test bitstream | |
196 CONTAINER_VIVO, // Vivo | |
197 CONTAINER_VOC, // Creative Voice | |
198 CONTAINER_VPLAYER, // VPlayer subtitles | |
199 CONTAINER_VQF, // NTT TwinVQ | |
200 CONTAINER_WAV, // WAV / WAVE (Waveform Audio) | |
201 CONTAINER_W64, // Sony Wave64 | |
202 CONTAINER_WC3MOVIE, // Wing Commander III movie | |
203 CONTAINER_WEBVTT, // WebVTT subtitle | |
204 CONTAINER_WSAUD, // Westwood Studios audio | |
205 CONTAINER_WSVQA, // Westwood Studios VQA | |
206 CONTAINER_WTV, // Windows Television (WTV) | |
207 CONTAINER_WV, // WavPack | |
208 CONTAINER_XA, // Maxis XA | |
209 CONTAINER_XMV, // Microsoft XMV | |
210 CONTAINER_XWMA, // Microsoft xWMA | |
211 CONTAINER_YOP, // Psygnosis YOP | |
212 CONTAINER_YUV4MPEGPIPE, // YUV4MPEG pipe | |
213 CONTAINER_MJPEG, // raw MJPEG video | |
214 CONTAINER_VC1, // raw VC-1 | |
215 CONTAINER_M4V, // raw MPEG-4 video | |
216 CONTAINER_H264, // raw H.264 video | |
217 CONTAINER_H261, // raw H.261 | |
218 CONTAINER_H263, // raw H.263 | |
219 CONTAINER_DIRAC, // raw Dirac | |
220 CONTAINER_DNXHD, // raw DNxHD (SMPTE VC-3) | |
221 CONTAINER_MPEGVIDEO, // raw MPEG video | |
222 CONTAINER_CAVSVIDEO, // raw Chinese AVS (Audio Video Standard) | |
223 CONTAINER_ALSA, // ALSA audio input | |
224 CONTAINER_BKTR, // video grab | |
225 CONTAINER_DSHOW, // DirectShow capture | |
226 CONTAINER_DV1394, // DV1394 A/V grab | |
227 CONTAINER_FBDEV, // Linux framebuffer | |
228 CONTAINER_IEC61883, // libiec61883 (new DV1394) A/V input device | |
229 CONTAINER_JACK, // JACK Audio Connection Kit | |
230 CONTAINER_LAVFI, // Libavfilter virtual input device | |
231 CONTAINER_LIBCDIO, // CD grabbing | |
232 CONTAINER_LIBDC1394, // dc1394 v.1/v.2 A/V grab | |
233 CONTAINER_OPENAL, // OpenAL audio capture device | |
234 CONTAINER_OSS, // OSS (Open Sound System) capture | |
235 CONTAINER_PULSE, // Pulse audio input | |
236 CONTAINER_SNDIO, // sndio audio capture | |
237 CONTAINER_V4L2, // Video4Linux2 device grab | |
238 CONTAINER_V4L, // Video4Linux device grab | |
239 CONTAINER_VFWCAP, // VfW video capture | |
240 CONTAINER_X11GRAB, // X11grab | |
241 CONTAINER_MAX // Must be last | |
242 }; | |
243 | |
244 // Mapping of a ID to name. | |
245 struct ContainerNameMapping { | |
246 FFmpegContainerName id; | |
247 const char* name; | |
248 }; | |
249 | |
250 // Log the container based on the name returned by FFmpeg. | |
251 void LogContainer(const char* container_name); | |
252 | |
253 // Log the container by examining the first part of the stream. | |
254 void LogContainer(const uint8_t* buffer, size_t buffer_size); | |
255 | |
256 // Mapping from the strings returned by FFmpeg to container ID. | |
257 const ContainerNameMapping ContainerNameMappingItem(int index); | |
258 | |
259 // Returns the number of elements in ContainerNameMapping. | |
260 const int ContainerNameMappingSize(); | |
261 | |
262 // Determine the container type | |
263 FFmpegContainerName LookupContainer(const char* container_name); | |
264 FFmpegContainerName DetermineContainer(const uint8_t* buffer, | |
265 size_t buffer_size); | |
266 } // namespace container_names | |
267 | |
268 #endif // MEDIA_BASE_CONTAINER_NAMES_H_ | |
OLD | NEW |