path: root/common
diff options
authorNiklas Haas <>2017-09-28 11:53:57 +0200
committerKevin Mitchell <>2017-12-15 22:28:47 -0800
commitba1943ac00ed20a568270f8930811c1eac08f66a (patch)
treed3cd2e11c7bbb2d6e8c6f4eea08daa9d0d91107c /common
parentd744dca5379c0876cb5adef7ffa41c1bc95e8158 (diff)
msg: reinterpret a bunch of message levels
I've decided that MP_TRACE means “noisy spam per frame”, whereas MP_DBG just means “more verbose debugging messages than MSGL_V”. Basically, MSGL_DBG shouldn't create spam per frame like it currently does, and MSGL_V should make sense to the end-user and provide mostly additional informational output. MP_DBG is basically what I want to make the new default for --log-file, so the cut-off point for MP_DBG is if we probably want to know if for debugging purposes but the user most likely doesn't care about on the terminal. Also, the debug callbacks for libass and ffmpeg got bumped in their verbosity levels slightly, because being external components they're a bit less relevant to mpv debugging, and a bit too over-eager in what they consider to be relevant information. I exclusively used the "try it on my machine and remove messages from MSGL_* until it does what I want it to" approach of refactoring, so YMMV.
Diffstat (limited to 'common')
2 files changed, 3 insertions, 3 deletions
diff --git a/common/av_log.c b/common/av_log.c
index 468e50502e..de600d6693 100644
--- a/common/av_log.c
+++ b/common/av_log.c
@@ -64,9 +64,9 @@ static bool log_print_prefix = true;
static int av_log_level_to_mp_level(int av_level)
if (av_level > AV_LOG_VERBOSE)
- return MSGL_DEBUG;
+ return MSGL_TRACE;
if (av_level > AV_LOG_INFO)
- return MSGL_V;
+ return MSGL_DEBUG;
if (av_level > AV_LOG_WARNING)
return MSGL_V;
if (av_level > AV_LOG_ERROR)
diff --git a/common/encode_lavc.c b/common/encode_lavc.c
index dca8f8b0e7..2d32c56cfc 100644
--- a/common/encode_lavc.c
+++ b/common/encode_lavc.c
@@ -793,7 +793,7 @@ int encode_lavc_write_frame(struct encode_lavc_context *ctx, AVStream *stream,
if (ctx->header_written <= 0)
return -1;
- MP_DBG(ctx,
+ MP_TRACE(ctx,
"write frame: stream %d ptsi %d (%f) dtsi %d (%f) size %d\n",