summaryrefslogtreecommitdiff
path: root/libavutil
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-04-20 02:48:19 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-04-20 02:48:19 +0200
commit8e8219e0f0725116809cdd1c17c868cb08da0dec (patch)
treeeccf6f91c9ff4d49aaa71727640934cec80fcfa0 /libavutil
parent93db2708d3b0bcc1f1d87d23ae8adbedd8ea6660 (diff)
parentc253340ae6f74ffd8798bbd476e46d1b33a2d56e (diff)
Merge commit 'c253340ae6f74ffd8798bbd476e46d1b33a2d56e'
* commit 'c253340ae6f74ffd8798bbd476e46d1b33a2d56e': log: Introduce a more verbose debug level Conflicts: doc/APIchanges doc/fftools-common-opts.texi libavutil/log.c libavutil/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/log.c7
-rw-r--r--libavutil/log.h9
-rw-r--r--libavutil/version.h7
3 files changed, 19 insertions, 4 deletions
diff --git a/libavutil/log.c b/libavutil/log.c
index 2091316957..b256d07624 100644
--- a/libavutil/log.c
+++ b/libavutil/log.c
@@ -50,6 +50,7 @@ static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
static int av_log_level = AV_LOG_INFO;
static int flags;
+#define NB_LEVELS 8
#if defined(_WIN32) && !defined(__MINGW32CE__) && HAVE_SETCONSOLETEXTATTRIBUTE
#include <windows.h>
static const uint8_t color[16 + AV_CLASS_CATEGORY_NB] = {
@@ -60,6 +61,7 @@ static const uint8_t color[16 + AV_CLASS_CATEGORY_NB] = {
[AV_LOG_INFO /8] = 7,
[AV_LOG_VERBOSE/8] = 10,
[AV_LOG_DEBUG /8] = 10,
+ [AV_LOG_TRACE /8] = 8,
[16+AV_CLASS_CATEGORY_NA ] = 7,
[16+AV_CLASS_CATEGORY_INPUT ] = 13,
[16+AV_CLASS_CATEGORY_OUTPUT ] = 5,
@@ -91,6 +93,7 @@ static const uint32_t color[16 + AV_CLASS_CATEGORY_NB] = {
[AV_LOG_INFO /8] = 253 << 8 | 0x09,
[AV_LOG_VERBOSE/8] = 40 << 8 | 0x02,
[AV_LOG_DEBUG /8] = 34 << 8 | 0x02,
+ [AV_LOG_TRACE /8] = 34 << 8 | 0x07,
[16+AV_CLASS_CATEGORY_NA ] = 250 << 8 | 0x09,
[16+AV_CLASS_CATEGORY_INPUT ] = 219 << 8 | 0x15,
[16+AV_CLASS_CATEGORY_OUTPUT ] = 201 << 8 | 0x05,
@@ -328,9 +331,9 @@ void av_log_default_callback(void* ptr, int level, const char* fmt, va_list vl)
sanitize(part[1].str);
colored_fputs(type[1], 0, part[1].str);
sanitize(part[2].str);
- colored_fputs(av_clip(level >> 3, 0, 6), tint >> 8, part[2].str);
+ colored_fputs(av_clip(level >> 3, 0, NB_LEVELS - 1), tint >> 8, part[2].str);
sanitize(part[3].str);
- colored_fputs(av_clip(level >> 3, 0, 6), tint >> 8, part[3].str);
+ colored_fputs(av_clip(level >> 3, 0, NB_LEVELS - 1), tint >> 8, part[3].str);
end:
av_bprint_finalize(part+3, NULL);
#if HAVE_PTHREADS
diff --git a/libavutil/log.h b/libavutil/log.h
index 993a4f5bed..51bc0a7b26 100644
--- a/libavutil/log.h
+++ b/libavutil/log.h
@@ -24,6 +24,7 @@
#include <stdarg.h>
#include "avutil.h"
#include "attributes.h"
+#include "version.h"
typedef enum {
AV_CLASS_CATEGORY_NA = 0,
@@ -198,6 +199,11 @@ typedef struct AVClass {
#define AV_LOG_MAX_OFFSET (AV_LOG_DEBUG - AV_LOG_QUIET)
/**
+ * Extremely verbose debugging, useful for libav* development.
+ */
+#define AV_LOG_TRACE 56
+
+/**
* @}
*/
@@ -311,8 +317,10 @@ AVClassCategory av_default_get_category(void *ptr);
void av_log_format_line(void *ptr, int level, const char *fmt, va_list vl,
char *line, int line_size, int *print_prefix);
+#if FF_API_DLOG
/**
* av_dlog macros
+ * @deprecated unused
* Useful to print debug messages that shouldn't get compiled in normally.
*/
@@ -321,6 +329,7 @@ void av_log_format_line(void *ptr, int level, const char *fmt, va_list vl,
#else
# define av_dlog(pctx, ...) do { if (0) av_log(pctx, AV_LOG_DEBUG, __VA_ARGS__); } while (0)
#endif
+#endif /* FF_API_DLOG */
/**
* Skip repeated messages, this requires the user app to use av_log() instead of
diff --git a/libavutil/version.h b/libavutil/version.h
index a3d95d8c57..ec3f586ead 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -56,8 +56,8 @@
*/
#define LIBAVUTIL_VERSION_MAJOR 54
-#define LIBAVUTIL_VERSION_MINOR 22
-#define LIBAVUTIL_VERSION_MICRO 101
+#define LIBAVUTIL_VERSION_MINOR 23
+#define LIBAVUTIL_VERSION_MICRO 100
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
LIBAVUTIL_VERSION_MINOR, \
@@ -119,6 +119,9 @@
#ifndef FF_API_OPT_TYPE_METADATA
#define FF_API_OPT_TYPE_METADATA (LIBAVUTIL_VERSION_MAJOR < 55)
#endif
+#ifndef FF_API_DLOG
+#define FF_API_DLOG (LIBAVUTIL_VERSION_MAJOR < 55)
+#endif
#ifndef FF_CONST_AVUTIL55
#if LIBAVUTIL_VERSION_MAJOR >= 55