aboutsummaryrefslogtreecommitdiff
path: root/libavformat/avio.h
diff options
context:
space:
mode:
authorAndrey Utkin2014-07-23 16:12:38 +0300
committerMichael Niedermayer2014-07-23 18:42:41 +0200
commit8a4c0866dc7d718b5ee3f0af60d4317cd133d83f (patch)
treecde11a6076754e2c00e5dce8b6139684e89e3b9c /libavformat/avio.h
parent01b236b70438527946b0dd79894c0105bc668c91 (diff)
avio: Introduce avio_read_to_bprint(avioctx, bp, max_size)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/avio.h')
-rw-r--r--libavformat/avio.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/libavformat/avio.h b/libavformat/avio.h
index 4004b6fda9..9b168433aa 100644
--- a/libavformat/avio.h
+++ b/libavformat/avio.h
@@ -31,6 +31,7 @@
#include "libavutil/common.h"
#include "libavutil/dict.h"
#include "libavutil/log.h"
+#include "libavutil/bprint.h"
#include "libavformat/version.h"
@@ -500,4 +501,12 @@ int avio_pause(AVIOContext *h, int pause);
int64_t avio_seek_time(AVIOContext *h, int stream_index,
int64_t timestamp, int flags);
+/**
+ * Read contents of h into print buffer, up to max_size bytes, or up to EOF.
+ *
+ * @return 0 for success (max_size bytes read or EOF reached), negative error
+ * code otherwise
+ */
+int avio_read_to_bprint(AVIOContext *h, AVBPrint *pb, size_t max_size);
+
#endif /* AVFORMAT_AVIO_H */