comparison raw.c @ 6439:4053f191ae61 libavformat

move dnxhd demuxer to its own file
author aurel
date Sun, 29 Aug 2010 21:51:47 +0000
parents 2facedc9f9d7
children 8beba113f242
comparison
equal deleted inserted replaced
6438:2facedc9f9d7 6439:4053f191ae61
239 239
240 return 0; 240 return 0;
241 } 241 }
242 #endif 242 #endif
243 243
244 #if CONFIG_DNXHD_DEMUXER
245 static int dnxhd_probe(AVProbeData *p)
246 {
247 static const uint8_t header[] = {0x00,0x00,0x02,0x80,0x01};
248 int w, h, compression_id;
249 if (p->buf_size < 0x2c)
250 return 0;
251 if (memcmp(p->buf, header, 5))
252 return 0;
253 h = AV_RB16(p->buf + 0x18);
254 w = AV_RB16(p->buf + 0x1a);
255 if (!w || !h)
256 return 0;
257 compression_id = AV_RB32(p->buf + 0x28);
258 if (compression_id < 1237 || compression_id > 1253)
259 return 0;
260 return AVPROBE_SCORE_MAX;
261 }
262 #endif
263
264 #if CONFIG_AC3_DEMUXER || CONFIG_EAC3_DEMUXER 244 #if CONFIG_AC3_DEMUXER || CONFIG_EAC3_DEMUXER
265 static int ac3_eac3_probe(AVProbeData *p, enum CodecID expected_codec_id) 245 static int ac3_eac3_probe(AVProbeData *p, enum CodecID expected_codec_id)
266 { 246 {
267 int max_frames, first_frames = 0, frames; 247 int max_frames, first_frames = 0, frames;
268 uint8_t *buf, *buf2, *end; 248 uint8_t *buf, *buf2, *end;
361 ff_raw_write_packet, 341 ff_raw_write_packet,
362 .flags= AVFMT_NOTIMESTAMPS, 342 .flags= AVFMT_NOTIMESTAMPS,
363 }; 343 };
364 #endif 344 #endif
365 345
366 #if CONFIG_DNXHD_DEMUXER
367 AVInputFormat dnxhd_demuxer = {
368 "dnxhd",
369 NULL_IF_CONFIG_SMALL("raw DNxHD (SMPTE VC-3)"),
370 0,
371 dnxhd_probe,
372 ff_raw_video_read_header,
373 ff_raw_read_partial_packet,
374 .flags= AVFMT_GENERIC_INDEX,
375 .value = CODEC_ID_DNXHD,
376 };
377 #endif
378
379 #if CONFIG_DNXHD_MUXER 346 #if CONFIG_DNXHD_MUXER
380 AVOutputFormat dnxhd_muxer = { 347 AVOutputFormat dnxhd_muxer = {
381 "dnxhd", 348 "dnxhd",
382 NULL_IF_CONFIG_SMALL("raw DNxHD (SMPTE VC-3)"), 349 NULL_IF_CONFIG_SMALL("raw DNxHD (SMPTE VC-3)"),
383 NULL, 350 NULL,