]> git.sesse.net Git - ffmpeg/blobdiff - libavutil/bprint.h
lavfi: move definition of avfilter_copy_buf_props() from buffer.c to avcodec.c
[ffmpeg] / libavutil / bprint.h
index c5d750df8bcc4ae7dd6dc8fae0a0775971275bca..60e464e10bd2b045f65856966e256fe75de27996 100644 (file)
@@ -99,6 +99,17 @@ void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max);
 #define AV_BPRINT_SIZE_AUTOMATIC  1
 #define AV_BPRINT_SIZE_COUNT_ONLY 0
 
+/**
+ * Init a print buffer using a pre-existing buffer.
+ *
+ * The buffer will not be reallocated.
+ *
+ * @param buf     buffer structure to init
+ * @param buffer  byte buffer to use for the string data
+ * @param size    size of buffer
+ */
+void av_bprint_init_for_buffer(AVBPrint *buf, char *buffer, unsigned size);
+
 /**
  * Append a formated string to a print buffer.
  */
@@ -109,6 +120,11 @@ void av_bprintf(AVBPrint *buf, const char *fmt, ...) av_printf_format(2, 3);
  */
 void av_bprint_chars(AVBPrint *buf, char c, unsigned n);
 
+/**
+ * Reset the string to "" but keep internal allocated data.
+ */
+void av_bprint_clear(AVBPrint *buf);
+
 /**
  * Test if the print buffer is complete (not truncated).
  *