]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/avio_internal.h
avutil/frame: Remove deprecated getters and setters
[ffmpeg] / libavformat / avio_internal.h
index 04c1ad5157bf188c7c9c92219d649c168daf4f5d..fe87f2a28874550691868ea6e58c4b0d42907ec9 100644 (file)
@@ -86,12 +86,23 @@ int ffio_read_size(AVIOContext *s, unsigned char *buf, int size);
 /** @warning must be called before any I/O */
 int ffio_set_buf_size(AVIOContext *s, int buf_size);
 
+/**
+ * Reallocate a given buffer for AVIOContext.
+ *
+ * @param s the AVIOContext to realloc.
+ * @param buf_size required new buffer size.
+ * @return 0 on success, a negative AVERROR on failure.
+ */
+int ffio_realloc_buf(AVIOContext *s, int buf_size);
+
 /**
  * Ensures that the requested seekback buffer size will be available
  *
  * Will ensure that when reading sequentially up to buf_size, seeking
  * within the current pos and pos+buf_size is possible.
- * Once the stream position moves outside this window this guarantee is lost.
+ * Once the stream position moves outside this window or another
+ * ffio_ensure_seekback call requests a buffer outside this window this
+ * guarantee is lost.
  */
 int ffio_ensure_seekback(AVIOContext *s, int64_t buf_size);
 
@@ -162,6 +173,13 @@ int ffio_open_whitelist(AVIOContext **s, const char *url, int flags,
  */
 int ffio_close_null_buf(AVIOContext *s);
 
+/**
+ * Reset a dynamic buffer.
+ *
+ * Resets everything, but keeps the allocated buffer for later use.
+ */
+void ffio_reset_dyn_buf(AVIOContext *s);
+
 /**
  * Free a dynamic buffer.
  *