diff options
author | Anton Khirnov <anton@khirnov.net> | 2011-02-21 16:43:01 +0100 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2011-02-21 11:23:22 -0500 |
commit | b7effd4e8338f6ed5bda630ad7ed0809bf458648 (patch) | |
tree | 53c878f6dd48c313a9bcde1855c2b4e009822c9e /libavformat/riff.c | |
parent | f8bed30d8b176fa030f6737765338bb4a2bcabc9 (diff) | |
download | ffmpeg-b7effd4e8338f6ed5bda630ad7ed0809bf458648.tar.gz |
avio: avio_ prefixes for get_* functions
In the name of consistency:
get_byte -> avio_r8
get_<type> -> avio_r<type>
get_buffer -> avio_read
get_partial_buffer will be made private later
get_strz is left out becase I want to change it later to return
something useful.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavformat/riff.c')
-rw-r--r-- | libavformat/riff.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/libavformat/riff.c b/libavformat/riff.c index 9f7d949dce..7111487f8c 100644 --- a/libavformat/riff.c +++ b/libavformat/riff.c @@ -481,25 +481,25 @@ void ff_get_wav_header(AVIOContext *pb, AVCodecContext *codec, int size) { int id; - id = get_le16(pb); + id = avio_rl16(pb); codec->codec_type = AVMEDIA_TYPE_AUDIO; codec->codec_tag = id; - codec->channels = get_le16(pb); - codec->sample_rate = get_le32(pb); - codec->bit_rate = get_le32(pb) * 8; - codec->block_align = get_le16(pb); + codec->channels = avio_rl16(pb); + codec->sample_rate = avio_rl32(pb); + codec->bit_rate = avio_rl32(pb) * 8; + codec->block_align = avio_rl16(pb); if (size == 14) { /* We're dealing with plain vanilla WAVEFORMAT */ codec->bits_per_coded_sample = 8; }else - codec->bits_per_coded_sample = get_le16(pb); + codec->bits_per_coded_sample = avio_rl16(pb); if (size >= 18) { /* We're obviously dealing with WAVEFORMATEX */ - int cbSize = get_le16(pb); /* cbSize */ + int cbSize = avio_rl16(pb); /* cbSize */ size -= 18; cbSize = FFMIN(size, cbSize); if (cbSize >= 22 && id == 0xfffe) { /* WAVEFORMATEXTENSIBLE */ - codec->bits_per_coded_sample = get_le16(pb); - codec->channel_layout = get_le32(pb); /* dwChannelMask */ - id = get_le32(pb); /* 4 first bytes of GUID */ + codec->bits_per_coded_sample = avio_rl16(pb); + codec->channel_layout = avio_rl32(pb); /* dwChannelMask */ + id = avio_rl32(pb); /* 4 first bytes of GUID */ url_fskip(pb, 12); /* skip end of GUID */ cbSize -= 22; size -= 22; @@ -507,7 +507,7 @@ void ff_get_wav_header(AVIOContext *pb, AVCodecContext *codec, int size) codec->extradata_size = cbSize; if (cbSize > 0) { codec->extradata = av_mallocz(codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE); - get_buffer(pb, codec->extradata, codec->extradata_size); + avio_read(pb, codec->extradata, codec->extradata_size); size -= cbSize; } @@ -547,17 +547,17 @@ enum CodecID ff_wav_codec_get_id(unsigned int tag, int bps) int ff_get_bmp_header(AVIOContext *pb, AVStream *st) { int tag1; - get_le32(pb); /* size */ - st->codec->width = get_le32(pb); - st->codec->height = (int32_t)get_le32(pb); - get_le16(pb); /* planes */ - st->codec->bits_per_coded_sample= get_le16(pb); /* depth */ - tag1 = get_le32(pb); - get_le32(pb); /* ImageSize */ - get_le32(pb); /* XPelsPerMeter */ - get_le32(pb); /* YPelsPerMeter */ - get_le32(pb); /* ClrUsed */ - get_le32(pb); /* ClrImportant */ + avio_rl32(pb); /* size */ + st->codec->width = avio_rl32(pb); + st->codec->height = (int32_t)avio_rl32(pb); + avio_rl16(pb); /* planes */ + st->codec->bits_per_coded_sample= avio_rl16(pb); /* depth */ + tag1 = avio_rl32(pb); + avio_rl32(pb); /* ImageSize */ + avio_rl32(pb); /* XPelsPerMeter */ + avio_rl32(pb); /* YPelsPerMeter */ + avio_rl32(pb); /* ClrUsed */ + avio_rl32(pb); /* ClrImportant */ return tag1; } #endif // CONFIG_DEMUXERS |