[FFmpeg-cvslog] avio: cosmetics, move AVIOContext to start of the file.

Anton Khirnov git at videolan.org
Mon Apr 11 04:12:08 CEST 2011


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Sat Apr  9 08:44:14 2011 +0200| [fafa7290f1bf7f91cc5afe6c5cc65808bacb5c42] | committer: Anton Khirnov

avio: cosmetics, move AVIOContext to start of the file.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fafa7290f1bf7f91cc5afe6c5cc65808bacb5c42
---

 libavformat/avio.h |   77 ++++++++++++++++++++++++++-------------------------
 1 files changed, 39 insertions(+), 38 deletions(-)

diff --git a/libavformat/avio.h b/libavformat/avio.h
index 6dfed4a..5a354b2 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;
 



More information about the ffmpeg-cvslog mailing list