1+ <?php
2+
3+ /**
4+ * MIT License
5+ *
6+ * Copyright (c) 2018 Samuel CHEMLA
7+ *
8+ * Permission is hereby granted, free of charge, to any person obtaining a copy
9+ * of this software and associated documentation files (the "Software"), to deal
10+ * in the Software without restriction, including without limitation the rights
11+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12+ * copies of the Software, and to permit persons to whom the Software is
13+ * furnished to do so, subject to the following conditions:
14+ *
15+ * The above copyright notice and this permission notice shall be included in all
16+ * copies or substantial portions of the Software.
17+ *
18+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24+ * SOFTWARE.
25+ */
26+
27+ namespace PhpBg \DvbPsi \Descriptors \Values ;
28+
29+ use MyCLabs \Enum \Enum ;
30+ use PhpBg \DvbPsi \Exception ;
31+
32+ /**
33+ * Class EsType
34+ * @see https://en.wikipedia.org/wiki/Program-specific_information#Elementary_stream_types
35+ */
36+ class EsType
37+ {
38+ const ES_TYPES = [
39+ 1 =>'ISO/IEC 11172-2 (MPEG-1 video)in a packetized stream ' ,
40+ 2 =>'ITU-T Rec. H.262 and ISO/IEC 13818-2 (MPEG-2 higher rate interlaced video) in a packetized stream ' ,
41+ 3 =>'ISO/IEC 11172-3 (MPEG-1 audio) in a packetized stream ' ,
42+ 4 =>'ISO/IEC 13818-3 (MPEG-2 halved sample rate audio) in a packetized stream ' ,
43+ 5 =>'ITU-T Rec. H.222 and ISO/IEC 13818-1 (MPEG-2 tabled data) privately defined ' ,
44+ 6 =>'ITU-T Rec. H.222 and ISO/IEC 13818-1 (MPEG-2 packetized data) privately defined (i.e., DVB subtitles/VBI and AC-3) ' ,
45+ 7 =>'ISO/IEC 13522 (MHEG) in a packetized stream ' ,
46+ 8 =>'ITU-T Rec. H.222 and ISO/IEC 13818-1 DSM CC in a packetized stream ' ,
47+ 9 =>'ITU-T Rec. H.222 and ISO/IEC 13818-1/11172-1 auxiliary data in a packetized stream ' ,
48+ 10 =>'ISO/IEC 13818-6 DSM CC multiprotocol encapsulation ' ,
49+ 11 =>'ISO/IEC 13818-6 DSM CC U-N messages ' ,
50+ 12 =>'ISO/IEC 13818-6 DSM CC stream descriptors ' ,
51+ 13 =>'ISO/IEC 13818-6 DSM CC tabled data ' ,
52+ 14 =>'ISO/IEC 13818-1 auxiliary data in a packetized stream ' ,
53+ 15 =>'ISO/IEC 13818-7 ADTS AAC (MPEG-2 lower bit-rate audio) in a packetized stream ' ,
54+ 16 =>'ISO/IEC 14496-2 (MPEG-4 H.263 based video) in a packetized stream ' ,
55+ 17 =>'ISO/IEC 14496-3 (MPEG-4 LOAS multi-format framed audio) in a packetized stream ' ,
56+ 18 =>'ISO/IEC 14496-1 (MPEG-4 FlexMux) in a packetized stream ' ,
57+ 19 =>'ISO/IEC 14496-1 (MPEG-4 FlexMux) in ISO/IEC 14496 tables ' ,
58+ 20 =>'ISO/IEC 13818-6 DSM CC synchronized download protocol ' ,
59+ 21 =>'Packetized metadata ' ,
60+ 22 =>'Sectioned metadata ' ,
61+ 23 =>'ISO/IEC 13818-6 DSM CC Data Carousel metadata ' ,
62+ 24 =>'ISO/IEC 13818-6 DSM CC Object Carousel metadata ' ,
63+ 25 =>'ISO/IEC 13818-6 Synchronized Download Protocol metadata ' ,
64+ 26 =>'ISO/IEC 13818-11 IPMP ' ,
65+ 27 =>'ITU-T Rec. H.264 and ISO/IEC 14496-10 (lower bit-rate video) in a packetized stream ' ,
66+ 28 =>'ISO/IEC 14496-3 (MPEG-4 raw audio) in a packetized stream ' ,
67+ 29 =>'ISO/IEC 14496-17 (MPEG-4 text) in a packetized stream ' ,
68+ 30 =>'ISO/IEC 23002-3 (MPEG-4 auxiliary video) in a packetized stream ' ,
69+ 31 =>'ISO/IEC 14496-10 SVC (MPEG-4 AVC sub-bitstream) in a packetized stream ' ,
70+ 32 =>'ISO/IEC 14496-10 MVC (MPEG-4 AVC sub-bitstream) in a packetized stream ' ,
71+ 33 =>'ITU-T Rec. T.800 and ISO/IEC 15444 (JPEG 2000 video) in a packetized stream ' ,
72+ 36 =>'ITU-T Rec. H.265 and ISO/IEC 23008-2 (Ultra HD video) in a packetized stream ' ,
73+ 66 =>'Chinese Video Standard in a packetized stream ' ,
74+ 127 =>'ISO/IEC 13818-11 IPMP (DRM) in a packetized stream ' ,
75+ 128 =>'ITU-T Rec. H.262 and ISO/IEC 13818-2 with DES-64-CBC encryption for DigiCipher II or PCM audio for Blu-ray in a packetized stream ' ,
76+ 129 =>'Dolby Digital (AC-3) up to six channel audio for ATSC and Blu-ray in a packetized stream ' ,
77+ 130 =>'SCTE subtitle or DTS 6 channel audio for Blu-ray in a packetized stream ' ,
78+ 131 =>'Dolby TrueHD lossless audio for Blu-ray in a packetized stream ' ,
79+ 132 =>'Dolby Digital Plus (enhanced AC-3) up to 16 channel audio for Blu-ray in a packetized stream ' ,
80+ 133 =>'DTS 8 channel audio for Blu-ray in a packetized stream ' ,
81+ 134 =>'SCTE-35[5] digital program insertion cue message or DTS 8 channel lossless audio for Blu-ray in a packetized stream ' ,
82+ 135 =>'Dolby Digital Plus (enhanced AC-3) up to 16 channel audio for ATSC in a packetized stream ' ,
83+ 144 =>'Blu-ray Presentation Graphic Stream (subtitling) in a packetized stream ' ,
84+ 145 =>'ATSC DSM CC Network Resources table ' ,
85+ 192 =>'DigiCipher II text in a packetized stream ' ,
86+ 193 =>'Dolby Digital (AC-3) up to six channel audio with AES-128-CBC data encryption in a packetized stream ' ,
87+ 194 =>'ATSC DSM CC synchronous data or Dolby Digital Plus up to 16 channel audio with AES-128-CBC data encryption in a packetized stream ' ,
88+ 207 =>'ISO/IEC 13818-7 ADTS AAC with AES-128-CBC frame encryption in a packetized stream ' ,
89+ 209 =>'BBC Dirac (Ultra HD video) in a packetized stream ' ,
90+ 210 =>'Audio Video Standard AVS2 (Ultra HD video) in a packetized stream ' ,
91+ 211 =>'Audio Video Standard AVS3 Audio in a packetized stream ' ,
92+ 212 =>'Audio Video Standard AVS3 Video (Ultra HD video) in a packetized stream ' ,
93+ 219 =>'ITU-T Rec. H.264 and ISO/IEC 14496-10 with AES-128-CBC slice encryption in a packetized stream ' ,
94+ 234 =>'Microsoft Windows Media Video 9 (lower bit-rate video) in a packetized stream ' ,
95+ ];
96+
97+ public static function desc ($ type ) {
98+ return self ::ES_TYPES [$ type ]??'Unknown ' ;
99+ }
100+ }
0 commit comments