Mercurial > libavformat.hg
diff raw.c @ 496:112057e05179 libavformat
libdts support by (Benjamin Zores <ben at geexbox dot org>)
author | michael |
---|---|
date | Wed, 14 Jul 2004 01:32:14 +0000 |
parents | f4e9e55f703c |
children | 558a093b04db |
line wrap: on
line diff
--- a/raw.c Wed Jul 14 00:10:06 2004 +0000 +++ b/raw.c Wed Jul 14 01:32:14 2004 +0000 @@ -184,6 +184,23 @@ return 0; } +/* dts read */ +static int dts_read_header(AVFormatContext *s, + AVFormatParameters *ap) +{ + AVStream *st; + + st = av_new_stream(s, 0); + if (!st) + return AVERROR_NOMEM; + + st->codec.codec_type = CODEC_TYPE_AUDIO; + st->codec.codec_id = CODEC_ID_DTS; + st->need_parsing = 1; + /* the parameters will be extracted from the compressed bitstream */ + return 0; +} + /* mpeg1/h263 input */ static int video_read_header(AVFormatContext *s, AVFormatParameters *ap) @@ -300,6 +317,17 @@ }; #endif //CONFIG_ENCODERS +AVInputFormat dts_iformat = { + "dts", + "raw dts", + 0, + NULL, + dts_read_header, + raw_read_partial_packet, + raw_read_close, + .extensions = "dts", +}; + AVInputFormat h261_iformat = { "h261", "raw h261", @@ -613,6 +641,8 @@ av_register_input_format(&ac3_iformat); av_register_output_format(&ac3_oformat); + av_register_input_format(&dts_iformat); + av_register_input_format(&h261_iformat); av_register_input_format(&h263_iformat);