/**
* RL2 file demuxer
- * @file rl2.c
+ * @file
* @author Sascha Sommer (saschasommer@freenet.de)
* For more information regarding the RL2 file format, visit:
* http://wiki.multimedia.cx/index.php?title=RL2
* optional background_frame
*/
+#include "libavutil/intreadwrite.h"
#include "avformat.h"
#define EXTRADATA1_SIZE (6 + 256 * 3) ///< video base, clr, palette
#define RLV3_TAG MKBETAG('R', 'L', 'V', '3')
typedef struct Rl2DemuxContext {
- unsigned int index_pos[2]; ///< indices in the sample tables
+ unsigned int index_pos[2]; ///< indexes in the sample tables
} Rl2DemuxContext;
int ret = 0;
url_fskip(pb,4); /* skip FORM tag */
- back_size = get_le32(pb); /** get size of the background frame */
+ back_size = get_le32(pb); /**< get size of the background frame */
signature = get_be32(pb);
data_size = get_be32(pb);
frame_count = get_le32(pb);
if(!st)
return AVERROR(ENOMEM);
- st->codec->codec_type = CODEC_TYPE_VIDEO;
+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->codec->codec_id = CODEC_ID_RL2;
st->codec->codec_tag = 0; /* no fourcc */
st->codec->width = 320;
st = av_new_stream(s, 0);
if (!st)
return AVERROR(ENOMEM);
- st->codec->codec_type = CODEC_TYPE_AUDIO;
+ st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
st->codec->codec_id = CODEC_ID_PCM_U8;
st->codec->codec_tag = 1;
st->codec->channels = channels;
- st->codec->bits_per_sample = 8;
+ st->codec->bits_per_coded_sample = 8;
st->codec->sample_rate = rate;
st->codec->bit_rate = st->codec->channels * st->codec->sample_rate *
- st->codec->bits_per_sample;
+ st->codec->bits_per_coded_sample;
st->codec->block_align = st->codec->channels *
- st->codec->bits_per_sample / 8;
+ st->codec->bits_per_coded_sample / 8;
av_set_pts_info(st,32,1,rate);
}
AVInputFormat rl2_demuxer = {
"rl2",
- "rl2 format",
+ NULL_IF_CONFIG_SMALL("RL2 format"),
sizeof(Rl2DemuxContext),
rl2_probe,
rl2_read_header,