Mercurial > mplayer.hg
comparison DOCS/tech/mpcf.txt @ 9310:b16480522be9
some typos
info_header -> info_packet
adding variable sized reserved_bytes where i forgot it
start/end time in the info_packet
stuffing_packet
author | michael |
---|---|
date | Fri, 07 Feb 2003 09:48:06 +0000 |
parents | ec18ad315bbe |
children | 4b04416ada91 |
comparison
equal
deleted
inserted
replaced
9309:073127ce3644 | 9310:b16480522be9 |
---|---|
70 packet header | 70 packet header |
71 main_startcode f(64) | 71 main_startcode f(64) |
72 version v | 72 version v |
73 stream_count v | 73 stream_count v |
74 file_size v | 74 file_size v |
75 length_in msec v | 75 length_in_msec v |
76 reserved_bytes | 76 reserved_bytes |
77 checksum u(32) | 77 checksum u(32) |
78 | 78 |
79 stream_header: | 79 stream_header: |
80 packet_header | 80 packet_header |
142 index_length v | 142 index_length v |
143 for(i=0; i<index_length; i++){ | 143 for(i=0; i<index_length; i++){ |
144 index_timestamp v | 144 index_timestamp v |
145 index_position v | 145 index_position v |
146 } | 146 } |
147 reserved_bytes | |
147 checksum u(32) | 148 checksum u(32) |
148 | 149 |
149 info_header: (optional) | 150 info_packet: (optional) |
150 packet header | 151 packet header |
151 info_startcode f(64) | 152 info_startcode f(64) |
153 start_time v | |
154 end_time v | |
152 entry_count v | 155 entry_count v |
153 for(i=0; i<entry_count; i++){ | 156 for(i=0; i<entry_count; i++){ |
154 name sz | 157 name sz |
155 value sz | 158 value sz |
156 } | 159 } |
160 reserved_bytes | |
157 checksum u(32) | 161 checksum u(32) |
158 | 162 |
163 stuffing_packet: (optional) | |
164 packet_header | |
165 stuffing_startcode f(64) | |
166 for(i=0; i<forward_ptr - length_of_non_reserved; i++) | |
167 stuffing f(8) | |
159 | 168 |
160 forward_ptr | 169 forward_ptr |
161 backward_ptr | 170 backward_ptr |
162 pointer to the next / previous packet | 171 pointer to the next / previous packet |
163 Note: a frame with 0 bytes means that its skiped | 172 Note: a frame with 0 bytes means that its skiped |
279 | 288 |
280 index_position | 289 index_position |
281 position in bytes of the first byte of the keyframe header, relative | 290 position in bytes of the first byte of the keyframe header, relative |
282 to the last index_position | 291 to the last index_position |
283 | 292 |
293 start_time, stop_time | |
294 the time range in msecs to which the info applies | |
295 Note: can be used to mark chapters | |
296 | |
284 name | 297 name |
285 the name of the info entry, valid names are | 298 the name of the info entry, valid names are |
286 "Author","Description","Copyright","Encoder","Title" | 299 "Author","Description","Copyright","Encoder","Title" |
287 Note: if someone needs some others, please tell us about them, so we can | 300 Note: if someone needs some others, please tell us about them, so we can |
288 add them to the official standard (if they are sane) | 301 add them to the official standard (if they are sane) |
289 | 302 |
290 value | 303 value |
291 | 304 |
292 | 305 stuffing |
306 0xFF | |
293 | 307 |
294 Structure: | 308 Structure: |
295 | 309 |
296 the headers MUST be in exactly the following order (to simplify demuxer design) | 310 the headers MUST be in exactly the following order (to simplify demuxer design) |
297 main header | 311 main header |
305 | 319 |
306 headers may be repated, but if they are then they MUST all be repeated together | 320 headers may be repated, but if they are then they MUST all be repeated together |
307 and repeated headers MUST be identical | 321 and repeated headers MUST be identical |
308 | 322 |
309 headers MUST be repeated every 10sec at least ? FIXME | 323 headers MUST be repeated every 10sec at least ? FIXME |
310 | 324 headers MUST be repeated at least twice (so they exist 3 times in a file) |
311 the info_header can be repeated, it can also contain different names & values | 325 |
312 each time | 326 Index |
313 | 327 the index can be repeated but there MUST be at least one at the end |
314 | 328 |
329 Info packets | |
330 the info_packet can be repeated, it can also contain different names & values | |
331 each time but only if allso the time is different | |
332 Info packets can be used to describe the file or some part of it (chapters) | |
333 | |
334 info packets, SHOULD be placed at the begin of the file at least | |
335 for realtime streaming info packets will normally be transmitted when they apply | |
336 for example, the current song title & artist of the currently shown music video | |
337 | |
338 Stuffing packets | |
339 can be used as a filler, for example to leave some empty space at the begin for | |
340 a copy of the index | |
341 | |
342 Unknown packets | |
343 MUST be ignored by the decoder | |
344 | |
315 Sample code (GPL, & untested) | 345 Sample code (GPL, & untested) |
316 | 346 |
317 typedef BufferContext{ | 347 typedef BufferContext{ |
318 uint8_t *buf; | 348 uint8_t *buf; |
319 uint8_t *buf_ptr; | 349 uint8_t *buf_ptr; |