正在显示
3 个修改的文件
包含
195 行增加
和
5 行删除
trunk/doc/ts-audio-video-analysis.txt
0 → 100644
1 | +AUDIO 0x0F ISO/IEC 13818-7 Audio with ADTS transport syntax | ||
2 | +110x xxxx ISO/IEC 13818-3 or ISO/IEC 11172-3 or ISO/IEC 13818-7 or ISO/IEC 14496-3 audio stream number x xxxx | ||
3 | +(gdb) p /x pkt.payload[0].pmt[0].at(1)[0] | ||
4 | +$55 = {stream_type = 0xf, elementary_PID = 0x101} | ||
5 | +======================================================================== | ||
6 | +(gdb) x /584xb msg->packet_data | ||
7 | +TS(AAC-ADTS) header, 7bytes | ||
8 | +0x60a320: 0xff 0xf1 0x5c 0x80 0x23 0xdf 0xfc | ||
9 | +FLV(AAC) header, 2bytes | ||
10 | +0xaf 0x01 | ||
11 | +TS(AAC-ADTS) RAW data, | ||
12 | +0x21 0x1a 0xcb 0xfe 0xfc 0xff 0xff 0xff 0x98 | ||
13 | +0x60a330: 0xb1 0x52 0xd8 0x88 0x43 0x28 0xc4 0xcb | ||
14 | +0x60a338: 0x95 0x2c 0x9a 0x09 0x5c 0x00 0x9c 0xfb | ||
15 | +0x60a340: 0x50 0xb9 0x3d 0xa8 0x96 0x02 0x47 0x68 | ||
16 | +0x60a348: 0xfb 0xb3 0x1c 0x26 0x2e 0xdb 0xac 0x8a | ||
17 | +0x60a350: 0xec 0x81 0x65 0xae 0x56 0x45 0x65 0x40 | ||
18 | +0x60a358: 0xcb 0x8f 0xa5 0x6a 0xe8 0x18 0x05 0x90 | ||
19 | +0x60a360: 0x8e 0x24 0xb7 0x55 0x72 0x0a 0x6d 0x07 | ||
20 | +0x60a368: 0x9b 0xa5 0xca 0xd2 0xc8 0x6d 0x0f 0xd2 | ||
21 | +0x60a370: 0x42 0xf0 0x83 0x1d 0x24 0x60 0xba 0x89 | ||
22 | +0x60a378: 0x57 0x3f 0x70 0x0f 0xc7 0x18 0xbc 0xc6 | ||
23 | +0x60a380: 0x0a 0xf2 0x2f 0x75 0x46 0x94 0x0b 0x81 | ||
24 | +0x60a388: 0x24 0x2e 0xfa 0x9d 0xa1 0x50 0x17 0x04 | ||
25 | +0x60a390: 0x50 0x0b 0xde 0x86 0xe5 0x80 0x0a 0x68 | ||
26 | +0x60a398: 0x56 0x30 0x1d 0xbf 0xf5 0x56 0x87 0xab | ||
27 | +0x60a3a0: 0x0f 0x30 0x8c 0x01 0x2b 0x3d 0x56 0xa6 | ||
28 | +0x60a3a8: 0xc7 0xe5 0xe1 0x83 0x76 0x8a 0xd4 0x7e | ||
29 | +0x60a3b0: 0xc0 0x04 0xad 0x31 0x0c 0xe1 0x3b 0x80 | ||
30 | +0x60a3b8: 0x41 0x0d 0x00 0xb6 0x88 0xb0 0xe3 0x62 | ||
31 | +0x60a3c0: 0xda 0xf3 0xb2 0x58 0x12 0x1c 0x9a 0x5e | ||
32 | +0x60a3c8: 0x4f 0x9c 0x63 0x5c 0xc1 0x99 0xc2 0x5e | ||
33 | +0x60a3d0: 0xc6 0x82 0x5e 0x95 0x9d 0x80 0x91 0x57 | ||
34 | +0x60a3d8: 0x66 0x22 0xaf 0x60 0x68 0xcc 0x9d 0x40 | ||
35 | +0x60a3e0: 0x16 0xc0 0x6c 0xee 0x69 0xae 0xda 0x3f | ||
36 | +0x60a3e8: 0x1e 0xe6 0x2e 0x55 0xbc 0xf8 0x60 0xda | ||
37 | +0x60a3f0: 0x5f 0x0a 0x08 0x6e 0xbb 0x82 0x48 0x53 | ||
38 | +0x60a3f8: 0x46 0x29 0x10 0xb2 0x99 0x50 0x69 0xe2 | ||
39 | +0x60a400: 0x74 0xa9 0xf1 0x2e 0xce 0x40 0x0c 0x70 | ||
40 | +0x60a408: 0xce 0x92 0x17 0x5c 0x02 0xc0 0x6d 0x19 | ||
41 | +0x60a410: 0xc0 0x17 0x58 0xb2 0x16 0xb9 0x2c 0x55 | ||
42 | +0x60a418: 0xc0 0xe2 0xbe 0x75 0xe4 0x8e 0xb9 0xd5 | ||
43 | +0x60a420: 0x24 0x12 0x5c 0x53 0x1c 0xa5 0xb5 0x78 | ||
44 | +0x60a428: 0x05 0x1a 0x74 0x85 0xd5 0x00 0x6d 0x00 | ||
45 | +0x60a430: 0x20 0xc0 0x00 0x34 0x80 0x00 0x00 0x00 | ||
46 | +0x60a438: 0x00 0x00 0x00 0x00 0x00 0x70 | ||
47 | +======================================================================== | ||
48 | +TS(AAC-ADTS) header, 7bytes | ||
49 | +0xff 0xf1 0x5c 0x80 0x25 0x5f 0xfc | ||
50 | +FLV(AAC) header, 2bytes | ||
51 | +0xaf 0x01 | ||
52 | +TS(AAC-ADTS) RAW data, | ||
53 | +0x21 0x1a 0xcf | ||
54 | +0x60a448: 0x77 0xff 0xff 0x7f 0xff 0x98 0xa6 0xb1 | ||
55 | +0x60a450: 0x85 0x0a 0x11 0x70 0x05 0xbd 0x0b 0xbb | ||
56 | +0x60a458: 0x88 0x80 0x59 0x19 0xa4 0x89 0x0d 0x68 | ||
57 | +0x60a460: 0xb9 0x01 0xb2 0x4d 0x7d 0xd7 0x18 0xe5 | ||
58 | +0x60a468: 0x77 0x1e 0x4b 0x5b 0xa1 0xa9 0xd5 0x2a | ||
59 | +0x60a470: 0x12 0x76 0xcb 0x35 0xb8 0x27 0xf1 0xab | ||
60 | +0x60a478: 0xf0 0xf8 0xb7 0xe5 0xcf 0x49 0xaa 0x15 | ||
61 | +0x60a480: 0x53 0x9a 0xdf 0x6d 0x9c 0x76 0xe4 0xcb | ||
62 | +0x60a488: 0x2d 0x83 0x88 0x31 0x8d 0x06 0x03 0xb4 | ||
63 | +0x60a490: 0xc5 0x68 0xf3 0xa9 0x70 0x8d 0x63 0x96 | ||
64 | +0x60a498: 0x02 0xa3 0xf5 0xf6 0x69 0x44 0xa4 0x3e | ||
65 | +0x60a4a0: 0x1d 0x27 0x68 0x6c 0x37 0x58 0x46 0xe5 | ||
66 | +0x60a4a8: 0xc5 0x26 0x21 0x1a 0x2f 0xee 0xa4 0x71 | ||
67 | +0x60a4b0: 0x02 0x29 0x44 0x16 0x96 0x7e 0x4b 0x16 | ||
68 | +0x60a4b8: 0x76 0x47 0x55 0x8c 0x44 0x28 0xbc 0x42 | ||
69 | +0x60a4c0: 0x1f 0xab 0x54 0x5d 0xf6 0xba 0xc3 0x73 | ||
70 | +0x60a4c8: 0x69 0x99 0xa5 0x72 0x12 0xce 0x8c 0xd7 | ||
71 | +0x60a4d0: 0xdf 0xae 0x3e 0xfa 0x13 0x14 0x96 0x31 | ||
72 | +0x60a4d8: 0x20 0xca 0x2e 0x00 0x95 0x5c 0x44 0x84 | ||
73 | +0x60a4e0: 0x89 0x05 0xaf 0x4a 0xcb 0xab 0x40 0xd7 | ||
74 | +0x60a4e8: 0x9a 0x25 0x80 0xc7 0x67 0x6e 0x87 0x9e | ||
75 | +0x60a4f0: 0xe5 0x74 0xb7 0xc3 0x40 0xc3 0x27 0x83 | ||
76 | +0x60a4f8: 0x3a 0x1d 0xc4 0x6c 0xef 0xa2 0x2f 0xd0 | ||
77 | +0x60a500: 0xc4 0xf0 0x2e 0xaa 0x85 0xb0 0x82 0xc3 | ||
78 | +0x60a508: 0x48 0x64 0x39 0x32 0x57 0x7a 0x45 0x6a | ||
79 | +0x60a510: 0x58 0xc6 0x82 0x40 0xaa 0x02 0xa3 0xea | ||
80 | +0x60a518: 0xdd 0xbb 0x58 0x3d 0x54 0x8d 0x2a 0xd5 | ||
81 | +0x60a520: 0x66 0xc8 0xc1 0x7b 0x89 0x83 0x06 0xe0 | ||
82 | +0x60a528: 0xaf 0x3d 0x56 0x00 0x4b 0x40 0x06 0x4c | ||
83 | +0x60a530: 0xb1 0x25 0x74 0xcb 0x0e 0x5a 0x9b 0x70 | ||
84 | +0x60a538: 0xaa 0x9d 0x68 0x8d 0xaf 0x0e 0xf1 0xe7 | ||
85 | +0x60a540: 0x6e 0x6b 0x4f 0xc4 0x60 0x48 0x88 0x97 | ||
86 | +0x60a548: 0x3f 0xc6 0x47 0xe7 0xf3 0xdb 0xb3 0x8e | ||
87 | +0x60a550: 0x36 0xad 0x21 0x55 0x40 0x49 0x40 0x08 | ||
88 | +0x60a558: 0x0c 0x00 0x00 0x0d 0x60 0x00 0x00 0x00 | ||
89 | +0x60a560: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x1c | ||
90 | + | ||
91 | + | ||
92 | + | ||
93 | +VIDEO 0x15-0x7F ITU-T Rec. H.222.0 | ISO/IEC 13818-1 Reserved | ||
94 | +1110 xxxx ITU-T Rec. H.262 | ISO/IEC 13818-2 or ISO/IEC 11172-2 or ISO/IEC 14496-2 video stream number xxxx | ||
95 | +(gdb) p /x pkt.payload[0].pmt[0].at(0)[0] | ||
96 | +$54 = {stream_type = 0x1b, elementary_PID = 0x100} | ||
97 | +======================================================================== | ||
98 | +(gdb) p msg[0] | ||
99 | +$6 = {_vptr.TSMessage = 0x407b70, pid = 256, type = TSPidTypeVideo, stream_type = TSStreamTypeVideoH264, | ||
100 | + PES_packet_length = 35808, stream_id = 224 '\340', packet_start_code_prefix = 1, packet_header_size = 13, | ||
101 | + parsed_packet_size = 35795, packet_data_size = 35795, packet_data = 0x60b300 ""} | ||
102 | +(gdb) x /356xb msg->packet_data | ||
103 | +======================================================================== | ||
104 | +TS(H264) header | ||
105 | +0x00 0x00 0x00 0x01 | ||
106 | +0x09 0xf0 | ||
107 | +0x00 0x00 0x00 0x01 | ||
108 | +======================================================================== | ||
109 | +FLV(H264) header | ||
110 | +0x00 0x00 0x00 0x00 0x01 0x64 0x00 0x28 | ||
111 | +0xff 0xe1 0x00 0x1e | ||
112 | +======================================================================== | ||
113 | +H264 Sequence header [section 0] | ||
114 | +0x67 0x64 0x00 0x28 0xac 0xd1 | ||
115 | +0x60b310: 0xc0 0x50 0x05 0xbb 0xff 0x00 0x2d 0x00 | ||
116 | +0x60b318: 0x22 0x10 0x00 0x00 0x03 0x00 0x10 0x00 | ||
117 | +0x60b320: 0x00 0x03 0x03 0x08 0xf1 0x83 0x11 0xe0 | ||
118 | +======================================================================== | ||
119 | +TS(H264) header | ||
120 | +0x00 0x00 0x00 0x01 | ||
121 | +======================================================================== | ||
122 | +H264 Sequence header [section 1] | ||
123 | +0x68 0xe9 0xab 0x2c 0x8b | ||
124 | +======================================================================== | ||
125 | + | ||
126 | +TS(H264) header, xbytes | ||
127 | +0x00 0x00 0x01 | ||
128 | +======================================================================== | ||
129 | +FLV(H264) header, xbytes | ||
130 | +0x01 0x00 0x00 0x2a 0x00 0x00 0x00 0x02 | ||
131 | +0x09 0xf0 0x00 0x00 0x00 0x1e | ||
132 | +H264 Sequence header [section 0] | ||
133 | +0x67 0x64 0x00 0x28 0xac 0xd1 | ||
134 | +0xc0 0x50 0x05 0xbb 0xff 0x00 0x2d 0x00 | ||
135 | +0x22 0x10 0x00 0x00 0x03 0x00 0x10 0x00 | ||
136 | +0x00 0x03 0x03 0x08 0xf1 0x83 0x11 0xe0 | ||
137 | +FLV header? | ||
138 | +0x00 0x00 0x00 0x05 | ||
139 | +H264 Sequence header [section 1] | ||
140 | +0x68 0xe9 0xab 0x2c 0x8b | ||
141 | +FLV header? | ||
142 | +0x00 0x00 0x8b 0x9f | ||
143 | +======================================================================== | ||
144 | +0x65 0x88 0x84 0x00 | ||
145 | +0x60b338: 0x42 0xbf 0x4e 0x19 0x2a 0x00 0x0b 0xa7 | ||
146 | +0x60b340: 0xeb 0x07 0xb7 0xfc 0xc2 0x24 0x8d 0xfa | ||
147 | +0x60b348: 0xc0 0xaf 0x2a 0x76 0x53 0xc4 0x2d 0x80 | ||
148 | +0x60b350: 0x8f 0xc8 0xba 0x2e 0x2b 0xb7 0x18 0x9f | ||
149 | +0x60b358: 0xba 0x47 0x10 0x8b 0xc7 0x93 0x92 0x89 | ||
150 | +0x60b360: 0x00 0x2d 0xdf 0x3b 0xcb 0x51 0xfe 0x27 | ||
151 | +0x60b368: 0x13 0xe3 0x29 0x48 0x71 0xf7 0x70 0x07 | ||
152 | +0x60b370: 0xf4 0x5c 0xb4 0xf0 0xbd 0x65 0x76 0xa1 | ||
153 | +0x60b378: 0x4e 0x96 0xd7 0x2c 0x66 0xdf 0xc3 0x9e | ||
154 | +0x60b380: 0xad 0x23 0x4b 0xc3 0xe1 0xf8 0xb4 0x59 | ||
155 | +0x60b388: 0x24 0x59 0xf3 0x7b 0x8e 0xb0 0xa6 0x95 | ||
156 | +0x60b390: 0xdf 0x4b 0x05 0x90 0xbd 0x87 0x87 0x99 | ||
157 | +0x60b398: 0xd5 0xc1 0xb6 0x9f 0x89 0xff 0x2f 0x7d | ||
158 | +0x60b3a0: 0xc6 0xac 0x0c 0x8f 0x00 0x07 0x28 0xac | ||
159 | +0x60b3a8: 0x09 0xf7 0x87 0xc7 0xc8 0xb6 0x19 0xc3 | ||
160 | +0x60b3b0: 0xda 0x3b 0x3d 0x9d 0x00 0x5f 0xc7 0xe6 | ||
161 | +0x60b3b8: 0x39 0xc5 0xc4 0x58 0x76 0xac 0xaa 0x16 | ||
162 | +0x60b3c0: 0xb7 0x05 0x5d 0xe4 0xe7 0x9d 0xda 0x97 | ||
163 | +0x60b3c8: 0x1c 0x3c 0xeb 0x66 0xf1 0xd9 0xa8 0x6e | ||
164 | +0x60b3d0: 0xae 0xdf 0xbd 0xa9 0x36 0xc9 0x86 0x88 | ||
165 | +0x60b3d8: 0x54 0x4b 0xb8 0xcc 0xe7 0xa6 0x60 0x40 | ||
166 | +0x60b3e0: 0x52 0xd9 0x32 0xf4 0xf0 0x2c 0x4f 0xf5 | ||
167 | +0x60b3e8: 0xc0 0xce 0x74 0x61 0x4a 0xc8 0x65 0x6e | ||
168 | +0x60b3f0: 0x92 0x8f 0xc8 0x63 0xd2 0xca 0xcc 0xe1 | ||
169 | +0x60b3f8: 0x65 0xa6 0x3b 0x6b 0xfd 0x7b 0x66 0x2a | ||
170 | +0x60b400: 0x0a 0xea 0x86 0x93 0xce 0x90 0xe7 0x9b | ||
171 | +0x60b408: 0x75 0x92 0x0d 0x6f 0xfa 0xa2 0xac 0x26 | ||
172 | +0x60b410: 0xae 0xb1 0xc3 0x4c 0xab 0x92 0xc6 0xae | ||
173 | +0x60b418: 0x7a 0xcf 0xfa 0x0c 0xe7 0xc4 0x00 0x62 | ||
174 | +0x60b420: 0xc3 0xc8 0x49 0xbd 0x5e 0xb0 0xd3 0x4f | ||
175 | +0x60b428: 0xb2 0x60 0xf4 0x53 0xe8 0xba 0xa0 0xf3 | ||
176 | +0x60b430: 0xe5 0xb4 0xf4 0xb1 0x15 0x9d 0x28 0x4f | ||
177 | +0x60b438: 0x7f 0xc9 0x0a 0x50 0x90 0x4a 0xc3 0x19 | ||
178 | +0x60b440: 0xeb 0x50 0xee 0xde 0xe4 0x7d 0xed 0x69 | ||
179 | +0x60b448: 0x37 0x50 0x5d 0x0f 0x26 0x8b 0x96 0x57 | ||
180 | +0x60b450: 0x3e 0x5c 0x5f 0x68 0xbf 0xb8 0xb0 0xcb | ||
181 | +0x60b458: 0x90 0x9c 0xb2 0x18 0x23 0x1f 0x62 0xa5 | ||
182 | +0x60b460: 0x6f 0x37 0x9f 0x3a |
@@ -48,11 +48,6 @@ SECTION 2 ¨C TECHNICAL ELEMENTS | @@ -48,11 +48,6 @@ SECTION 2 ¨C TECHNICAL ELEMENTS | ||
48 | 2.4.4.6 Conditional access Table | 48 | 2.4.4.6 Conditional access Table |
49 | 2.5 Program Stream bitstream requirements | 49 | 2.5 Program Stream bitstream requirements |
50 | 2.6 Program and program element descriptors | 50 | 2.6 Program and program element descriptors |
51 | - 2.6.2 Video stream descriptor | ||
52 | - 2.6.4 Audio stream descriptor | ||
53 | - 2.6.34 IBP descriptor | ||
54 | - 2.6.37 Semantic definition of fields in MPEG-4 video descriptor | ||
55 | - 2.6.38 MPEG-4 audio descriptor | ||
56 | 2.7 Restrictions on the multiplexed stream semantics | 51 | 2.7 Restrictions on the multiplexed stream semantics |
57 | Annex A ¨C CRC Decoder Model | 52 | Annex A ¨C CRC Decoder Model |
58 | */ | 53 | */ |
@@ -1641,6 +1636,14 @@ int TSHeader::demux(TSContext* ctx, TSPacket* pkt, u_int8_t* start, u_int8_t* la | @@ -1641,6 +1636,14 @@ int TSHeader::demux(TSContext* ctx, TSPacket* pkt, u_int8_t* start, u_int8_t* la | ||
1641 | } | 1636 | } |
1642 | 1637 | ||
1643 | /** | 1638 | /** |
1639 | +* Annex B Byte stream format | ||
1640 | +*/ | ||
1641 | +class TSH264Codec | ||
1642 | +{ | ||
1643 | +public: | ||
1644 | +}; | ||
1645 | + | ||
1646 | +/** | ||
1644 | * 6.2 Audio Data Transport Stream, ADTS | 1647 | * 6.2 Audio Data Transport Stream, ADTS |
1645 | */ | 1648 | */ |
1646 | class TSAacAdts | 1649 | class TSAacAdts |
@@ -393,6 +393,11 @@ public: | @@ -393,6 +393,11 @@ public: | ||
393 | 393 | ||
394 | /** | 394 | /** |
395 | * the decoded message payload. | 395 | * the decoded message payload. |
396 | +* @remark we seperate the packet from message, | ||
397 | +* for the packet focus on logic and domain data, | ||
398 | +* the message bind to the protocol and focus on protocol, such as header. | ||
399 | +* we can merge the message and packet, using OOAD hierachy, packet extends from message, | ||
400 | +* it's better for me to use components -- the message use the packet as payload. | ||
396 | */ | 401 | */ |
397 | class SrsPacket | 402 | class SrsPacket |
398 | { | 403 | { |
-
请 注册 或 登录 后发表评论