Commit 512ccca0 authored by Xiaohan Wang's avatar Xiaohan Wang Committed by Commit Bot

media: Add documentation about logging

Change-Id: Idda24d4e408e257fe1da332e7869b0b708f80a7f
Reviewed-on: https://chromium-review.googlesource.com/1056209
Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558102}
parent 6d4429f1
......@@ -151,3 +151,24 @@ issues, it's helpful to review the internal logs at chrome://media-internals.
The internals page contains information about active
`media::WebMediaPlayerImpl`, `media::AudioInputController`,
`media::AudioOutputController`, and `media::AudioOutputStream` instances.
# Logging
Media playback typically involves multiple threads, in many cases even multiple
processes. Media operations are often asynchronous running in a sandbox. These
make attaching a debugger (e.g. GDB) sometimes less efficient than other
mechanisms like logging.
In media we use DVLOG() a lot. It makes filename-based filtering super easy.
Within one file, not all logs are created equal. To make log filtering
more convenient, use appropriate log levels. Here are some general
recommendations:
* DVLOG(1): Once per playback events or other important events, e.g.
construction/destruction, initialization, playback start/end, suspend/resume,
any error conditions.
* DVLOG(2): Recurring events per playback, e.g. seek/reset/flush, config change.
* DVLOG(3): Frequent events, e.g. demuxer read, audio/video buffer decrypt or
decode, audio/video frame rendering.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment