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
845 { "info" , AV_LOG_INFO },845 { "info" , AV_LOG_INFO },
846 { "verbose", AV_LOG_VERBOSE },846 { "verbose", AV_LOG_VERBOSE },
847 { "debug" , AV_LOG_DEBUG },847 { "debug" , AV_LOG_DEBUG },
848 { "trace" , AV_LOG_TRACE },
848 };849 };
849 char *tail;850 char *tail;
850 int level;851 int level;
doc/APIchanges+3−0
@@ -15,6 +15,9 @@ libavutil: 2014-08-09 · 14 unmodified lines
15 15
16API changes, most recent first:16API changes, most recent first:
17 17
182015-xx-xx - xxxxxxx - lavu 54.12.0
19 Add AV_LOG_TRACE for extremely verbose debugging.
20
182015-xx-xx - xxxxxxx - lavf 56.29.100 - avio.h212015-xx-xx - xxxxxxx - lavf 56.29.100 - avio.h
19 Add AVIODirEntryType.AVIO_ENTRY_SERVER.22 Add AVIODirEntryType.AVIO_ENTRY_SERVER.
20 Add AVIODirEntryType.AVIO_ENTRY_SHARE.23 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
190Same as @code{info}, except more verbose.190Same as @code{info}, except more verbose.
191@item debug, 48191@item debug, 48
192Show everything, including debugging information.192Show everything, including debugging information.
193@item trace, 56
193@end table194@end table
194 195
195By default the program logs to stderr, if coloring is supported by the196By 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
50static int av_log_level = AV_LOG_INFO;50static int av_log_level = AV_LOG_INFO;
51static int flags;51static int flags;
52 52
53#define NB_LEVELS 8
53#if defined(_WIN32) && !defined(__MINGW32CE__) && HAVE_SETCONSOLETEXTATTRIBUTE54#if defined(_WIN32) && !defined(__MINGW32CE__) && HAVE_SETCONSOLETEXTATTRIBUTE
54#include <windows.h>55#include <windows.h>
55static const uint8_t color[16 + AV_CLASS_CATEGORY_NB] = {56static 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
60 [AV_LOG_INFO /8] = 7,61 [AV_LOG_INFO /8] = 7,
61 [AV_LOG_VERBOSE/8] = 10,62 [AV_LOG_VERBOSE/8] = 10,
62 [AV_LOG_DEBUG /8] = 10,63 [AV_LOG_DEBUG /8] = 10,
64 [AV_LOG_TRACE /8] = 8,
63 [16+AV_CLASS_CATEGORY_NA ] = 7,65 [16+AV_CLASS_CATEGORY_NA ] = 7,
64 [16+AV_CLASS_CATEGORY_INPUT ] = 13,66 [16+AV_CLASS_CATEGORY_INPUT ] = 13,
65 [16+AV_CLASS_CATEGORY_OUTPUT ] = 5,67 [16+AV_CLASS_CATEGORY_OUTPUT ] = 5,
@@ -91,6 +93,7 @@ static const uint32_t color[16 + AV_CLASS_CATEGORY_NB] = { · 25 unmodified lines
91 [AV_LOG_INFO /8] = 253 << 8 | 0x09,93 [AV_LOG_INFO /8] = 253 << 8 | 0x09,
92 [AV_LOG_VERBOSE/8] = 40 << 8 | 0x02,94 [AV_LOG_VERBOSE/8] = 40 << 8 | 0x02,
93 [AV_LOG_DEBUG /8] = 34 << 8 | 0x02,95 [AV_LOG_DEBUG /8] = 34 << 8 | 0x02,
96 [AV_LOG_TRACE /8] = 34 << 8 | 0x07,
94 [16+AV_CLASS_CATEGORY_NA ] = 250 << 8 | 0x09,97 [16+AV_CLASS_CATEGORY_NA ] = 250 << 8 | 0x09,
95 [16+AV_CLASS_CATEGORY_INPUT ] = 219 << 8 | 0x15,98 [16+AV_CLASS_CATEGORY_INPUT ] = 219 << 8 | 0x15,
96 [16+AV_CLASS_CATEGORY_OUTPUT ] = 201 << 8 | 0x05,99 [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
328 sanitize(part[1].str);331 sanitize(part[1].str);
329 colored_fputs(type[1], 0, part[1].str);332 colored_fputs(type[1], 0, part[1].str);
330 sanitize(part[2].str);333 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);
332 sanitize(part[3].str);335 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);
334end:337end:
335 av_bprint_finalize(part+3, NULL);338 av_bprint_finalize(part+3, NULL);
336#if HAVE_PTHREADS339#if HAVE_PTHREADS
libavutil/log.h+9−0
@@ -24,6 +24,7 @@ · 23 unmodified lines
24#include <stdarg.h>24#include <stdarg.h>
25#include "avutil.h"25#include "avutil.h"
26#include "attributes.h"26#include "attributes.h"
27#include "version.h"
27 28
28typedef enum {29typedef enum {
29 AV_CLASS_CATEGORY_NA = 0,30 AV_CLASS_CATEGORY_NA = 0,
@@ -197,6 +198,11 @@ typedef struct AVClass { · 167 unmodified lines
197 198
198#define AV_LOG_MAX_OFFSET (AV_LOG_DEBUG - AV_LOG_QUIET)199#define AV_LOG_MAX_OFFSET (AV_LOG_DEBUG - AV_LOG_QUIET)
199 200
201/**
202 * Extremely verbose debugging, useful for libav* development.
203 */
204#define AV_LOG_TRACE 56
205
200/**206/**
201 * @}207 * @}
202 */208 */
@@ -311,8 +317,10 @@ AVClassCategory av_default_get_category(void *ptr); · 108 unmodified lines
311void av_log_format_line(void *ptr, int level, const char *fmt, va_list vl,317void av_log_format_line(void *ptr, int level, const char *fmt, va_list vl,
312 char *line, int line_size, int *print_prefix);318 char *line, int line_size, int *print_prefix);
313 319
320#if FF_API_DLOG
314/**321/**
315 * av_dlog macros322 * av_dlog macros
323 * @deprecated unused
316 * Useful to print debug messages that shouldn't get compiled in normally.324 * Useful to print debug messages that shouldn't get compiled in normally.
317 */325 */
318 326
@@ -321,6 +329,7 @@ void av_log_format_line(void *ptr, int level, const char *fmt, va_list vl, · 2 unmodified lines
321#else329#else
322# define av_dlog(pctx, ...) do { if (0) av_log(pctx, AV_LOG_DEBUG, __VA_ARGS__); } while (0)330# define av_dlog(pctx, ...) do { if (0) av_log(pctx, AV_LOG_DEBUG, __VA_ARGS__); } while (0)
323#endif331#endif
332#endif /* FF_API_DLOG */
324 333
325/**334/**
326 * Skip repeated messages, this requires the user app to use av_log() instead of335 * 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
56 */56 */
57 57
58#define LIBAVUTIL_VERSION_MAJOR 5458#define LIBAVUTIL_VERSION_MAJOR 54
59#define LIBAVUTIL_VERSION_MINOR 2259#define LIBAVUTIL_VERSION_MINOR 23
60#define LIBAVUTIL_VERSION_MICRO 10160#define LIBAVUTIL_VERSION_MICRO 100
61 61
62#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \62#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
63 LIBAVUTIL_VERSION_MINOR, \63 LIBAVUTIL_VERSION_MINOR, \
@@ -119,6 +119,9 @@ · 55 unmodified lines
119#ifndef FF_API_OPT_TYPE_METADATA119#ifndef FF_API_OPT_TYPE_METADATA
120#define FF_API_OPT_TYPE_METADATA (LIBAVUTIL_VERSION_MAJOR < 55)120#define FF_API_OPT_TYPE_METADATA (LIBAVUTIL_VERSION_MAJOR < 55)
121#endif121#endif
122#ifndef FF_API_DLOG
123#define FF_API_DLOG (LIBAVUTIL_VERSION_MAJOR < 55)
124#endif
122 125
123#ifndef FF_CONST_AVUTIL55126#ifndef FF_CONST_AVUTIL55
124#if LIBAVUTIL_VERSION_MAJOR >= 55127#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