comparison raw.c @ 473:e0a66a870b7f libavformat

h261 decoder by (Maarten Daniels <maarten.daniels at student dot luc dot ac dot be>)
author michael
date Sun, 30 May 2004 20:37:15 +0000
parents 60f897e8dd2d
children 0fdc96c2f2fe
comparison
equal deleted inserted replaced
472:fd31daf8df85 473:e0a66a870b7f
257 return 50; 257 return 50;
258 } 258 }
259 return 0; 259 return 0;
260 } 260 }
261 261
262 static int h261_probe(AVProbeData *p)
263 {
264 int code;
265 const uint8_t *d;
266
267 if (p->buf_size < 6)
268 return 0;
269 d = p->buf;
270 code = (d[0] << 12) | (d[1] << 4) | (d[2] >> 4);
271 if (code == 0x10) {
272 return 50;
273 }
274 return 0;
275 }
276
262 AVInputFormat ac3_iformat = { 277 AVInputFormat ac3_iformat = {
263 "ac3", 278 "ac3",
264 "raw ac3", 279 "raw ac3",
265 0, 280 0,
266 NULL, 281 NULL,
282 raw_write_header, 297 raw_write_header,
283 raw_write_packet, 298 raw_write_packet,
284 raw_write_trailer, 299 raw_write_trailer,
285 }; 300 };
286 #endif //CONFIG_ENCODERS 301 #endif //CONFIG_ENCODERS
302
303 AVInputFormat h261_iformat = {
304 "h261",
305 "raw h261",
306 0,
307 h261_probe,
308 video_read_header,
309 raw_read_partial_packet,
310 raw_read_close,
311 .extensions = "h261",
312 .value = CODEC_ID_H261,
313 };
287 314
288 AVInputFormat h263_iformat = { 315 AVInputFormat h263_iformat = {
289 "h263", 316 "h263",
290 "raw h263", 317 "raw h263",
291 0, 318 0,
583 610
584 int raw_init(void) 611 int raw_init(void)
585 { 612 {
586 av_register_input_format(&ac3_iformat); 613 av_register_input_format(&ac3_iformat);
587 av_register_output_format(&ac3_oformat); 614 av_register_output_format(&ac3_oformat);
615
616 av_register_input_format(&h261_iformat);
588 617
589 av_register_input_format(&h263_iformat); 618 av_register_input_format(&h263_iformat);
590 av_register_output_format(&h263_oformat); 619 av_register_output_format(&h263_oformat);
591 620
592 av_register_input_format(&m4v_iformat); 621 av_register_input_format(&m4v_iformat);