]> git.sesse.net Git - ffmpeg/blobdiff - libavutil/log.h
Merge remote-tracking branch 'qatar/master'
[ffmpeg] / libavutil / log.h
index b8683302a2d424ffdcf532cc4b16340b9d3c01c2..26c806f64416a8dc2e4db3dd9f5870f308fd3573 100644 (file)
@@ -124,6 +124,8 @@ typedef struct AVClass {
  */
 #define AV_LOG_DEBUG    48
 
+#define AV_LOG_MAX_OFFSET (AV_LOG_DEBUG - AV_LOG_QUIET)
+
 /**
  * Send the specified message to the log if the level is less than or equal
  * to the current av_log_level. By default, all logging messages are sent to
@@ -147,6 +149,16 @@ void av_log_set_callback(void (*)(void*, int, const char*, va_list));
 void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl);
 const char* av_default_item_name(void* ctx);
 
+/**
+ * Format a line of log the same way as the default callback.
+ * @param line          buffer to receive the formated line
+ * @param line_size     size of the buffer
+ * @param print_prefix  used to store whether the prefix must be printed;
+ *                      must point to a persistent integer initially set to 1
+ */
+void av_log_format_line(void *ptr, int level, const char *fmt, va_list vl,
+                        char *line, int line_size, int *print_prefix);
+
 /**
  * av_dlog macros
  * Useful to print debug messages that shouldn't get compiled in normally.