DASH Media Packaging SDK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
container_names.h
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 <stdint.h>
9 
10 #include <string>
11 
12 namespace edash_packager {
13 namespace media {
14 
17 enum MediaContainerName {
18  CONTAINER_UNKNOWN, // Unknown
19  CONTAINER_AAC, // AAC (Advanced Audio Coding)
20  CONTAINER_AC3, // AC-3
21  CONTAINER_AIFF, // AIFF (Audio Interchange File Format)
22  CONTAINER_AMR, // AMR (Adaptive Multi-Rate Audio)
23  CONTAINER_APE, // APE (Monkey's Audio)
24  CONTAINER_ASF, // ASF (Advanced / Active Streaming Format)
25  CONTAINER_ASS, // SSA (SubStation Alpha) subtitle
26  CONTAINER_AVI, // AVI (Audio Video Interleaved)
27  CONTAINER_BINK, // Bink
28  CONTAINER_CAF, // CAF (Apple Core Audio Format)
29  CONTAINER_DTS, // DTS
30  CONTAINER_DTSHD, // DTS-HD
31  CONTAINER_DV, // DV (Digital Video)
32  CONTAINER_DXA, // DXA
33  CONTAINER_EAC3, // Enhanced AC-3
34  CONTAINER_FLAC, // FLAC (Free Lossless Audio Codec)
35  CONTAINER_FLV, // FLV (Flash Video)
36  CONTAINER_GSM, // GSM (Global System for Mobile Audio)
37  CONTAINER_H261, // H.261
38  CONTAINER_H263, // H.263
39  CONTAINER_H264, // H.264
40  CONTAINER_HLS, // HLS (Apple HTTP Live Streaming PlayList)
41  CONTAINER_IRCAM, // Berkeley/IRCAM/CARL Sound Format
42  CONTAINER_MJPEG, // MJPEG video
43  CONTAINER_MOV, // QuickTime / MOV / MPEG4
44  CONTAINER_MP3, // MP3 (MPEG audio layer 2/3)
45  CONTAINER_MPEG2PS, // MPEG-2 Program Stream
46  CONTAINER_MPEG2TS, // MPEG-2 Transport Stream
47  CONTAINER_MPEG4BS, // MPEG-4 Bitstream
48  CONTAINER_OGG, // Ogg
49  CONTAINER_RM, // RM (RealMedia)
50  CONTAINER_SRT, // SRT (SubRip subtitle)
51  CONTAINER_SWF, // SWF (ShockWave Flash)
52  CONTAINER_TTML, // TTML file.
53  CONTAINER_VC1, // VC-1
54  CONTAINER_WAV, // WAV / WAVE (Waveform Audio)
55  CONTAINER_WEBM, // Matroska / WebM
56  CONTAINER_WEBVTT, // WebVTT file.
57  CONTAINER_WTV, // WTV (Windows Television)
58  CONTAINER_MAX // Must be last
59 };
60 
62 MediaContainerName DetermineContainer(const uint8_t* buffer, int buffer_size);
63 
66 MediaContainerName DetermineContainerFromFormatName(
67  const std::string& format_name);
68 
71 MediaContainerName DetermineContainerFromFileName(const std::string& file_name);
72 
73 } // namespace media
74 } // namespace edash_packager
75 
76 #endif // MEDIA_BASE_CONTAINER_NAMES_H_