diff options
author | Anton Khirnov <anton@khirnov.net> | 2011-02-21 16:43:01 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-02-22 02:44:37 +0100 |
commit | e63a362857d9807b23e65872598d782fa53bb6af (patch) | |
tree | 7a21287e54bfbd2ec9c45bcb5a22e441e4992f2b /libavformat/avio.h | |
parent | 6a786b15c34765ec00be3cd808dafbb041fd5881 (diff) | |
download | ffmpeg-e63a362857d9807b23e65872598d782fa53bb6af.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>
(cherry picked from commit b7effd4e8338f6ed5bda630ad7ed0809bf458648)
Diffstat (limited to 'libavformat/avio.h')
-rw-r--r-- | libavformat/avio.h | 39 |
1 files changed, 29 insertions, 10 deletions
diff --git a/libavformat/avio.h b/libavformat/avio.h index 4fb701696e..fa71d20d59 100644 --- a/libavformat/avio.h +++ b/libavformat/avio.h @@ -378,6 +378,25 @@ attribute_deprecated AVIOContext *av_alloc_put_byte( int (*read_packet)(void *opaque, uint8_t *buf, int buf_size), int (*write_packet)(void *opaque, uint8_t *buf, int buf_size), int64_t (*seek)(void *opaque, int64_t offset, int whence)); + +/** + * @defgroup old_avio_funcs Old put_/get_*() functions + * @deprecated use the avio_ -prefixed functions instead. + * @{ + */ +attribute_deprecated int get_buffer(AVIOContext *s, unsigned char *buf, int size); +attribute_deprecated int get_byte(AVIOContext *s); +attribute_deprecated unsigned int get_le16(AVIOContext *s); +attribute_deprecated unsigned int get_le24(AVIOContext *s); +attribute_deprecated unsigned int get_le32(AVIOContext *s); +attribute_deprecated uint64_t get_le64(AVIOContext *s); +attribute_deprecated unsigned int get_be16(AVIOContext *s); +attribute_deprecated unsigned int get_be24(AVIOContext *s); +attribute_deprecated unsigned int get_be32(AVIOContext *s); +attribute_deprecated uint64_t get_be64(AVIOContext *s); +/** + * @} + */ #endif AVIOContext *avio_alloc_context( @@ -477,7 +496,7 @@ void put_flush_packet(AVIOContext *s); * Read size bytes from AVIOContext into buf. * @return number of bytes read or AVERROR */ -int get_buffer(AVIOContext *s, unsigned char *buf, int size); +int avio_read(AVIOContext *s, unsigned char *buf, int size); /** * Read size bytes from AVIOContext into buf. @@ -489,11 +508,11 @@ int get_partial_buffer(AVIOContext *s, unsigned char *buf, int size); /** @note return 0 if EOF, so you cannot use it if EOF handling is necessary */ -int get_byte(AVIOContext *s); -unsigned int get_le24(AVIOContext *s); -unsigned int get_le32(AVIOContext *s); -uint64_t get_le64(AVIOContext *s); -unsigned int get_le16(AVIOContext *s); +int avio_r8 (AVIOContext *s); +unsigned int avio_rl16(AVIOContext *s); +unsigned int avio_rl24(AVIOContext *s); +unsigned int avio_rl32(AVIOContext *s); +uint64_t avio_rl64(AVIOContext *s); /** * Read a UTF-16 string from pb and convert it to UTF-8. @@ -505,10 +524,10 @@ int avio_get_str16le(AVIOContext *pb, int maxlen, char *buf, int buflen); int avio_get_str16be(AVIOContext *pb, int maxlen, char *buf, int buflen); char *get_strz(AVIOContext *s, char *buf, int maxlen); -unsigned int get_be16(AVIOContext *s); -unsigned int get_be24(AVIOContext *s); -unsigned int get_be32(AVIOContext *s); -uint64_t get_be64(AVIOContext *s); +unsigned int avio_rb16(AVIOContext *s); +unsigned int avio_rb24(AVIOContext *s); +unsigned int avio_rb32(AVIOContext *s); +uint64_t avio_rb64(AVIOContext *s); uint64_t ff_get_v(AVIOContext *bc); |