History

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

Michael Niedermayer committed 11 years ago

Commit 8e8219e2 parents 93db270 c2533406 files · +24 −4Browse files

Unified · Split

6 files
  1. cmdutils.c +1 −0
  2. doc/APIchanges +3 −0
  3. doc/fftools-common-opts.texi +1 −0
  4. libavutil/log.c +5 −2
  5. libavutil/log.h +9 −0
  6. libavutil/version.h +5 −2
cmdutils.c+1−0
@@ -845,6 +845,7 @@ int opt_loglevel(void *optctx, const char *opt, const char *arg) · 844 unmodified lines
845845 { "info" , AV_LOG_INFO },
846846 { "verbose", AV_LOG_VERBOSE },
847847 { "debug" , AV_LOG_DEBUG },
848+ { "trace" , AV_LOG_TRACE },
848849 };
849850 char *tail;
850851 int level;
doc/APIchanges+3−0
@@ -15,6 +15,9 @@ libavutil: 2014-08-09 · 14 unmodified lines
1515
1616 API changes, most recent first:
1717
18+2015-xx-xx - xxxxxxx - lavu 54.12.0
19+ Add AV_LOG_TRACE for extremely verbose debugging.
20+
1821 2015-xx-xx - xxxxxxx - lavf 56.29.100 - avio.h
1922 Add AVIODirEntryType.AVIO_ENTRY_SERVER.
2023 Add AVIODirEntryType.AVIO_ENTRY_SHARE.
doc/fftools-common-opts.texi+1−0
@@ -190,6 +190,7 @@ warnings and errors. This is the default value. · 189 unmodified lines
190190 Same as @code{info}, except more verbose.
191191 @item debug, 48
192192 Show everything, including debugging information.
193+@item trace, 56
193194 @end table
194195
195196 By default the program logs to stderr, if coloring is supported by the
libavutil/log.c+5−2
@@ -50,6 +50,7 @@ static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; · 49 unmodified lines
5050 static int av_log_level = AV_LOG_INFO;
5151 static int flags;
5252
53+#define NB_LEVELS 8
5354 #if defined(_WIN32) && !defined(__MINGW32CE__) && HAVE_SETCONSOLETEXTATTRIBUTE
5455 #include <windows.h>
5556 static const uint8_t color[16 + AV_CLASS_CATEGORY_NB] = {
@@ -60,6 +61,7 @@ static const uint8_t color[16 + AV_CLASS_CATEGORY_NB] = { · 4 unmodified lines
6061 [AV_LOG_INFO /8] = 7,
6162 [AV_LOG_VERBOSE/8] = 10,
6263 [AV_LOG_DEBUG /8] = 10,
64+ [AV_LOG_TRACE /8] = 8,
6365 [16+AV_CLASS_CATEGORY_NA ] = 7,
6466 [16+AV_CLASS_CATEGORY_INPUT ] = 13,
6567 [16+AV_CLASS_CATEGORY_OUTPUT ] = 5,
@@ -91,6 +93,7 @@ static const uint32_t color[16 + AV_CLASS_CATEGORY_NB] = { · 25 unmodified lines
9193 [AV_LOG_INFO /8] = 253 << 8 | 0x09,
9294 [AV_LOG_VERBOSE/8] = 40 << 8 | 0x02,
9395 [AV_LOG_DEBUG /8] = 34 << 8 | 0x02,
96+ [AV_LOG_TRACE /8] = 34 << 8 | 0x07,
9497 [16+AV_CLASS_CATEGORY_NA ] = 250 << 8 | 0x09,
9598 [16+AV_CLASS_CATEGORY_INPUT ] = 219 << 8 | 0x15,
9699 [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) · 231 unmodified lines
328331 sanitize(part[1].str);
329332 colored_fputs(type[1], 0, part[1].str);
330333 sanitize(part[2].str);
331− colored_fputs(av_clip(level >> 3, 0, 6), tint >> 8, part[2].str);
334+ colored_fputs(av_clip(level >> 3, 0, NB_LEVELS - 1), tint >> 8, part[2].str);
332335 sanitize(part[3].str);
333− colored_fputs(av_clip(level >> 3, 0, 6), tint >> 8, part[3].str);
336+ colored_fputs(av_clip(level >> 3, 0, NB_LEVELS - 1), tint >> 8, part[3].str);
334337 end:
335338 av_bprint_finalize(part+3, NULL);
336339 #if HAVE_PTHREADS
libavutil/log.h+9−0
@@ -24,6 +24,7 @@ · 23 unmodified lines
2424 #include <stdarg.h>
2525 #include "avutil.h"
2626 #include "attributes.h"
27+#include "version.h"
2728
2829 typedef enum {
2930 AV_CLASS_CATEGORY_NA = 0,
@@ -197,6 +198,11 @@ typedef struct AVClass { · 167 unmodified lines
197198
198199 #define AV_LOG_MAX_OFFSET (AV_LOG_DEBUG - AV_LOG_QUIET)
199200
201+/**
202+ * Extremely verbose debugging, useful for libav* development.
203+ */
204+#define AV_LOG_TRACE 56
205+
200206 /**
201207 * @}
202208 */
@@ -311,8 +317,10 @@ AVClassCategory av_default_get_category(void *ptr); · 108 unmodified lines
311317 void av_log_format_line(void *ptr, int level, const char *fmt, va_list vl,
312318 char *line, int line_size, int *print_prefix);
313319
320+#if FF_API_DLOG
314321 /**
315322 * av_dlog macros
323+ * @deprecated unused
316324 * Useful to print debug messages that shouldn't get compiled in normally.
317325 */
318326
@@ -321,6 +329,7 @@ void av_log_format_line(void *ptr, int level, const char *fmt, va_list vl, · 2 unmodified lines
321329 #else
322330 # define av_dlog(pctx, ...) do { if (0) av_log(pctx, AV_LOG_DEBUG, __VA_ARGS__); } while (0)
323331 #endif
332+#endif /* FF_API_DLOG */
324333
325334 /**
326335 * Skip repeated messages, this requires the user app to use av_log() instead of
libavutil/version.h+5−2
@@ -56,8 +56,8 @@ · 55 unmodified lines
5656 */
5757
5858 #define LIBAVUTIL_VERSION_MAJOR 54
59−#define LIBAVUTIL_VERSION_MINOR 22
60−#define LIBAVUTIL_VERSION_MICRO 101
59+#define LIBAVUTIL_VERSION_MINOR 23
60+#define LIBAVUTIL_VERSION_MICRO 100
6161
6262 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
6363 LIBAVUTIL_VERSION_MINOR, \
@@ -119,6 +119,9 @@ · 55 unmodified lines
119119 #ifndef FF_API_OPT_TYPE_METADATA
120120 #define FF_API_OPT_TYPE_METADATA (LIBAVUTIL_VERSION_MAJOR < 55)
121121 #endif
122+#ifndef FF_API_DLOG
123+#define FF_API_DLOG (LIBAVUTIL_VERSION_MAJOR < 55)
124+#endif
122125
123126 #ifndef FF_CONST_AVUTIL55
124127 #if LIBAVUTIL_VERSION_MAJOR >= 55

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t