diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-10-24 01:42:57 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-10-24 01:42:57 +0000 |
commit | bd09e8a7df91c6e2c506a3c2d7b2805da75a91e4 (patch) | |
tree | fad87c793fa595e4433deefc43a7d8682075506b /libavformat/raw.c | |
parent | da396bf84e53ee5bd46c69df6511cd5cbfb73e7a (diff) | |
download | ffmpeg-bd09e8a7df91c6e2c506a3c2d7b2805da75a91e4.tar.gz |
raw dnxhd de/muxer
Originally committed as revision 15674 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/raw.c')
-rw-r--r-- | libavformat/raw.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/libavformat/raw.c b/libavformat/raw.c index 6c6ea27ddf..f2a886c5ab 100644 --- a/libavformat/raw.c +++ b/libavformat/raw.c @@ -505,6 +505,17 @@ static int dirac_probe(AVProbeData *p) } #endif +#ifdef CONFIG_DNXHD_DEMUXER +static int dnxhd_probe(AVProbeData *p) +{ + static const uint8_t header[] = {0x00,0x00,0x02,0x80,0x01}; + if (!memcmp(p->buf, header, 5)) + return AVPROBE_SCORE_MAX; + else + return 0; +} +#endif + #if defined(CONFIG_AC3_DEMUXER) || defined(CONFIG_EAC3_DEMUXER) static int ac3_eac3_probe(AVProbeData *p, enum CodecID expected_codec_id) { @@ -640,6 +651,34 @@ AVOutputFormat dirac_muxer = { }; #endif +#ifdef CONFIG_DNXHD_DEMUXER +AVInputFormat dnxhd_demuxer = { + "dnxhd", + NULL_IF_CONFIG_SMALL("raw DNxHD (SMPTE VC-3)"), + 0, + dnxhd_probe, + video_read_header, + raw_read_partial_packet, + .flags= AVFMT_GENERIC_INDEX, + .value = CODEC_ID_DNXHD, +}; +#endif + +#ifdef CONFIG_DNXHD_MUXER +AVOutputFormat dnxhd_muxer = { + "dnxhd", + NULL_IF_CONFIG_SMALL("raw DNxHD (SMPTE VC-3)"), + NULL, + "dnxhd", + 0, + CODEC_ID_NONE, + CODEC_ID_DNXHD, + NULL, + raw_write_packet, + .flags= AVFMT_NOTIMESTAMPS, +}; +#endif + #ifdef CONFIG_DTS_DEMUXER AVInputFormat dts_demuxer = { "dts", |