*/
/**
- * @file bethsoftvid.c
+ * @file libavformat/bethsoftvid.c
* @brief Bethesda Softworks VID (.vid) file demuxer
* @author Nicholas Tung [ntung (at. ntung com] (2007-03)
* @sa http://wiki.multimedia.cx/index.php?title=Bethsoft_VID
* @sa http://www.svatopluk.com/andux/docs/dfvid.html
*/
+#include "libavutil/intreadwrite.h"
#include "avformat.h"
-#include "bethsoftvideo.h"
+#include "libavcodec/bethsoftvideo.h"
typedef struct BVID_DemuxContext
{
stream->codec->codec_id = CODEC_ID_PCM_U8;
stream->codec->channels = 1;
stream->codec->sample_rate = 11025;
- stream->codec->bits_per_sample = 8;
- stream->codec->bit_rate = stream->codec->channels * stream->codec->sample_rate * stream->codec->bits_per_sample;
+ stream->codec->bits_per_coded_sample = 8;
+ stream->codec->bit_rate = stream->codec->channels * stream->codec->sample_rate * stream->codec->bits_per_coded_sample;
return 0;
}
get_le16(pb);
// soundblaster DAC used for sample rate, as on specification page (link above)
s->streams[1]->codec->sample_rate = 1000000 / (256 - get_byte(pb));
- s->streams[1]->codec->bit_rate = s->streams[1]->codec->channels * s->streams[1]->codec->sample_rate * s->streams[1]->codec->bits_per_sample;
+ s->streams[1]->codec->bit_rate = s->streams[1]->codec->channels * s->streams[1]->codec->sample_rate * s->streams[1]->codec->bits_per_coded_sample;
case AUDIO_BLOCK:
audio_length = get_le16(pb);
ret_value = av_get_packet(pb, pkt, audio_length);
pkt->stream_index = 1;
- return (ret_value != audio_length ? AVERROR(EIO) : ret_value);
+ return ret_value != audio_length ? AVERROR(EIO) : ret_value;
case VIDEO_P_FRAME:
case VIDEO_YOFF_P_FRAME:
AVInputFormat bethsoftvid_demuxer = {
"bethsoftvid",
- "Bethesda Softworks 'Daggerfall' VID format",
+ NULL_IF_CONFIG_SMALL("Bethesda Softworks VID format"),
sizeof(BVID_DemuxContext),
vid_probe,
vid_read_header,