libdts support by (Benjamin Zores <ben at geexbox dot org>)

Originally committed as revision 3310 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer
2004-07-14 01:32:14 +00:00
parent eb507b21c4
commit 23c9925329
14 changed files with 635 additions and 6 deletions

View File

@@ -184,6 +184,23 @@ static int ac3_read_header(AVFormatContext *s,
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 @@ AVOutputFormat ac3_oformat = {
};
#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 @@ int raw_init(void)
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);