diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2008-05-02 14:52:39 +0000 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2008-05-02 14:52:39 +0000 |
commit | 17ac9f1c38cb831ffc9938d92afe63e5f687bfc3 (patch) | |
tree | 6bc55decc6c0041a9b0a37e75011d929bbef45df | |
parent | 8a0684f4c4a0d4375907807034ad2fc27953f5d6 (diff) | |
download | ffmpeg-17ac9f1c38cb831ffc9938d92afe63e5f687bfc3.tar.gz |
Import Dirac demuxer/muxer from SoC branch; written by Marco Gerards,
patch extracted by Anuradha Suraparaju anuradhaAtrdDoTbbcDoTcoDoTuk.
Originally committed as revision 13031 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rwxr-xr-x | configure | 1 | ||||
-rw-r--r-- | libavformat/allformats.c | 1 | ||||
-rw-r--r-- | libavformat/raw.c | 36 |
3 files changed, 38 insertions, 0 deletions
@@ -844,6 +844,7 @@ audio_beos_muxer_deps="audio_beos" audio_beos_muxer_extralibs="-lmedia -lbe" avisynth_demuxer_deps="avisynth" bktr_demuxer_deps_any="dev_bktr_ioctl_bt848_h machine_ioctl_bt848_h dev_video_bktr_ioctl_bt848_h dev_ic_bt8xx_h" +dirac_demuxer_deps="dirac_parser" dv1394_demuxer_deps="dv1394 dv_demuxer" libdc1394_demuxer_deps="libdc1394" libnut_demuxer_deps="libnut" diff --git a/libavformat/allformats.c b/libavformat/allformats.c index babcf24482..1dcfa7acf8 100644 --- a/libavformat/allformats.c +++ b/libavformat/allformats.c @@ -69,6 +69,7 @@ void av_register_all(void) REGISTER_DEMUXER (C93, c93); REGISTER_MUXER (CRC, crc); REGISTER_DEMUXER (DAUD, daud); + REGISTER_MUXDEMUX (DIRAC, dirac); REGISTER_DEMUXER (DSICIN, dsicin); REGISTER_MUXDEMUX (DTS, dts); REGISTER_MUXDEMUX (DV, dv); diff --git a/libavformat/raw.c b/libavformat/raw.c index ac44b845ab..10eeda0830 100644 --- a/libavformat/raw.c +++ b/libavformat/raw.c @@ -254,6 +254,7 @@ static int video_read_header(AVFormatContext *s, av_set_pts_info(st, 64, ap->time_base.num, ap->time_base.den); } else if ( st->codec->codec_id == CODEC_ID_MJPEG || st->codec->codec_id == CODEC_ID_MPEG4 || + st->codec->codec_id == CODEC_ID_DIRAC || st->codec->codec_id == CODEC_ID_H264) { av_set_pts_info(st, 64, 1, 25); } @@ -346,6 +347,14 @@ static int h261_probe(AVProbeData *p) return 0; } +static int dirac_probe(AVProbeData *p) +{ + if (AV_RL32(p->buf) == MKTAG('B', 'B', 'C', 'D')) + return AVPROBE_SCORE_MAX; + else + return 0; +} + static int ac3_probe(AVProbeData *p) { int max_frames, first_frames = 0, frames; @@ -470,6 +479,33 @@ AVOutputFormat dts_muxer = { #endif //CONFIG_MUXERS +AVInputFormat dirac_demuxer = { + "dirac", + "raw dirac", + 0, + dirac_probe, + video_read_header, + raw_read_partial_packet, + raw_read_close, + .flags= AVFMT_GENERIC_INDEX, + .value = CODEC_ID_DIRAC, +}; + +#ifdef CONFIG_MUXERS +AVOutputFormat dirac_muxer = { + "dirac", + "raw dirac", + NULL, + "drc", + 0, + 0, + CODEC_ID_DIRAC, + NULL, + raw_write_packet, + .flags= AVFMT_NOTIMESTAMPS, +}; +#endif + AVInputFormat dts_demuxer = { "dts", "raw dts", |