summaryrefslogtreecommitdiff
path: root/libavformat/avio.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-04-09 08:44:14 +0200
committerAnton Khirnov <anton@khirnov.net>2011-04-10 07:41:56 +0200
commitfafa7290f1bf7f91cc5afe6c5cc65808bacb5c42 (patch)
treeff6bc7fb9573651d78d6f94930a6bbcc5ae6bbef /libavformat/avio.h
parent6084ee5dc50aff488b611ad19ae1a6e72aa7ca39 (diff)
avio: cosmetics, move AVIOContext to start of the file.
Diffstat (limited to 'libavformat/avio.h')
-rw-r--r--libavformat/avio.h77
1 files changed, 39 insertions, 38 deletions
diff --git a/libavformat/avio.h b/libavformat/avio.h
index 6dfed4a35d..5a354b2381 100644
--- a/libavformat/avio.h
+++ b/libavformat/avio.h
@@ -32,6 +32,45 @@
#include "libavformat/version.h"
+
+#define AVIO_SEEKABLE_NORMAL 0x0001 /**< Seeking works like for a local file */
+
+/**
+ * Bytestream IO Context.
+ * New fields can be added to the end with minor version bumps.
+ * Removal, reordering and changes to existing fields require a major
+ * version bump.
+ * sizeof(AVIOContext) must not be used outside libav*.
+ */
+typedef struct {
+ unsigned char *buffer;
+ int buffer_size;
+ unsigned char *buf_ptr, *buf_end;
+ void *opaque;
+ 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);
+ int64_t pos; /**< position in the file of the current buffer */
+ int must_flush; /**< true if the next seek should flush */
+ int eof_reached; /**< true if eof reached */
+ int write_flag; /**< true if open for writing */
+#if FF_API_OLD_AVIO
+ attribute_deprecated int is_streamed;
+#endif
+ int max_packet_size;
+ unsigned long checksum;
+ unsigned char *checksum_ptr;
+ unsigned long (*update_checksum)(unsigned long checksum, const uint8_t *buf, unsigned int size);
+ int error; ///< contains the error code or 0 if no error happened
+ int (*read_pause)(void *opaque, int pause);
+ int64_t (*read_seek)(void *opaque, int stream_index,
+ int64_t timestamp, int flags);
+ /**
+ * A combination of AVIO_SEEKABLE_ flags or 0 when the stream is not seekable.
+ */
+ int seekable;
+} AVIOContext;
+
/* unbuffered I/O */
#if FF_API_OLD_AVIO
@@ -197,48 +236,10 @@ attribute_deprecated int av_register_protocol(URLProtocol *protocol);
attribute_deprecated int av_register_protocol2(URLProtocol *protocol, int size);
#endif
-#define AVIO_SEEKABLE_NORMAL 0x0001 /**< Seeking works like for a local file */
-
/**
* @}
*/
-/**
- * Bytestream IO Context.
- * New fields can be added to the end with minor version bumps.
- * Removal, reordering and changes to existing fields require a major
- * version bump.
- * sizeof(AVIOContext) must not be used outside libav*.
- */
-typedef struct {
- unsigned char *buffer;
- int buffer_size;
- unsigned char *buf_ptr, *buf_end;
- void *opaque;
- 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);
- int64_t pos; /**< position in the file of the current buffer */
- int must_flush; /**< true if the next seek should flush */
- int eof_reached; /**< true if eof reached */
- int write_flag; /**< true if open for writing */
-#if FF_API_OLD_AVIO
- attribute_deprecated int is_streamed;
-#endif
- int max_packet_size;
- unsigned long checksum;
- unsigned char *checksum_ptr;
- unsigned long (*update_checksum)(unsigned long checksum, const uint8_t *buf, unsigned int size);
- int error; ///< contains the error code or 0 if no error happened
- int (*read_pause)(void *opaque, int pause);
- int64_t (*read_seek)(void *opaque, int stream_index,
- int64_t timestamp, int flags);
- /**
- * A combination of AVIO_SEEKABLE_ flags or 0 when the stream is not seekable.
- */
- int seekable;
-} AVIOContext;
-
#if FF_API_OLD_AVIO
typedef attribute_deprecated AVIOContext ByteIOContext;