DebugTraceUtil
@UnstableApi
public final class DebugTraceUtil
A debugging tracing utility. Debug logging is disabled at compile time by default.
Summary
Nested types |
|---|
@DocumentedComponents logged by logEvent. |
@DocumentedEvents logged by logEvent. |
Constants |
|
|---|---|
static final String |
COMPONENT_ASSET_LOADER = "AssetLoader" |
static final String |
COMPONENT_AUDIO_DECODER = "AudioDecoder" |
static final String |
COMPONENT_AUDIO_ENCODER = "AudioEncoder" |
static final String |
COMPONENT_AUDIO_GRAPH = "AudioGraph" |
static final String |
COMPONENT_AUDIO_MIXER = "AudioMixer" |
static final String |
COMPONENT_BITMAP_TEXTURE_MANAGER = "BitmapTextureManager" |
static final String |
COMPONENT_COMPOSITION_PLAYER = "CompositionPlayer" |
static final String |
COMPONENT_COMPOSITOR = "Compositor" |
static final String |
COMPONENT_EXTERNAL_TEXTURE_MANAGER = "ExternalTextureManager" |
static final String |
COMPONENT_MUXER = "Muxer" |
static final String |
COMPONENT_TEX_ID_TEXTURE_MANAGER = "TexIdTextureManager" |
static final String |
COMPONENT_TRANSFORMER_INTERNAL = "TransformerInternal" |
static final String |
COMPONENT_VFP = "VideoFrameProcessor" |
static final String |
COMPONENT_VIDEO_DECODER = "VideoDecoder" |
static final String |
COMPONENT_VIDEO_ENCODER = "VideoEncoder" |
static final String |
EVENT_ACCEPTED_INPUT = "AcceptedInput" |
static final String |
EVENT_CAN_WRITE_SAMPLE = "CanWriteSample" |
static final String |
EVENT_INPUT_ENDED = "InputEnded" |
static final String |
EVENT_INPUT_FORMAT = "InputFormat" |
static final String |
EVENT_OUTPUT_ENDED = "OutputEnded" |
static final String |
EVENT_OUTPUT_FORMAT = "OutputFormat" |
static final String |
EVENT_OUTPUT_TEXTURE_RENDERED = "OutputTextureRendered" |
static final String |
EVENT_PRODUCED_OUTPUT = "ProducedOutput" |
static final String |
EVENT_QUEUE_BITMAP = "QueueBitmap" |
static final String |
EVENT_QUEUE_FRAME = "QueueFrame" |
static final String |
EVENT_QUEUE_TEXTURE = "QueueTexture" |
static final String |
EVENT_RECEIVE_END_OF_ALL_INPUT = "ReceiveEndOfAllInput" |
static final String |
EVENT_RECEIVE_EOS = "ReceiveEOS" |
static final String |
EVENT_REGISTER_NEW_INPUT_STREAM = "RegisterNewInputStream" |
static final String |
EVENT_RELEASE = "Release" |
static final String |
EVENT_RENDERED_TO_OUTPUT_SURFACE = "RenderedToOutputSurface" |
static final String |
EVENT_SEEK_TO = "SeekTo" |
static final String |
EVENT_SET_COMPOSITION = "SetComposition" |
static final String |
EVENT_SET_VIDEO_OUTPUT = "SetVideoOutput" |
static final String |
EVENT_SIGNAL_ENDED = "SignalEnded" |
static final String |
EVENT_SIGNAL_EOS = "SignalEOS" |
static final String |
EVENT_START = "Start" |
static final String |
EVENT_SURFACE_TEXTURE_INPUT = "SurfaceTextureInput" |
static final String |
EVENT_SURFACE_TEXTURE_TRANSFORM_FIX = "SurfaceTextureTransformFix" |
Public fields |
|
|---|---|
static boolean |
Whether to store tracing events for debug logging. |
Public constructors |
|---|
Public methods |
|
|---|---|
synchronized static void |
Dumps all the logged events to the |
synchronized static String |
Generate a summary of the logged events, containing the total number of times an event happened and the detailed log of a window of the oldest and newest events. |
synchronized static void |
logCodecEvent(Logs an |
synchronized static void |
logEvent(Logs a new event, if debug logging is enabled. |
synchronized static void |
logEvent( |
synchronized static void |
logEvent(Logs a new event, if debug logging is enabled. |
synchronized static void |
reset() |
Constants
COMPONENT_BITMAP_TEXTURE_MANAGER
public static final String COMPONENT_BITMAP_TEXTURE_MANAGER = "BitmapTextureManager"
COMPONENT_COMPOSITION_PLAYER
public static final String COMPONENT_COMPOSITION_PLAYER = "CompositionPlayer"
COMPONENT_EXTERNAL_TEXTURE_MANAGER
public static final String COMPONENT_EXTERNAL_TEXTURE_MANAGER = "ExternalTextureManager"
COMPONENT_TEX_ID_TEXTURE_MANAGER
public static final String COMPONENT_TEX_ID_TEXTURE_MANAGER = "TexIdTextureManager"
COMPONENT_TRANSFORMER_INTERNAL
public static final String COMPONENT_TRANSFORMER_INTERNAL = "TransformerInternal"
EVENT_OUTPUT_TEXTURE_RENDERED
public static final String EVENT_OUTPUT_TEXTURE_RENDERED = "OutputTextureRendered"
EVENT_RECEIVE_END_OF_ALL_INPUT
public static final String EVENT_RECEIVE_END_OF_ALL_INPUT = "ReceiveEndOfAllInput"
EVENT_REGISTER_NEW_INPUT_STREAM
public static final String EVENT_REGISTER_NEW_INPUT_STREAM = "RegisterNewInputStream"
EVENT_RENDERED_TO_OUTPUT_SURFACE
public static final String EVENT_RENDERED_TO_OUTPUT_SURFACE = "RenderedToOutputSurface"
EVENT_SURFACE_TEXTURE_INPUT
public static final String EVENT_SURFACE_TEXTURE_INPUT = "SurfaceTextureInput"
EVENT_SURFACE_TEXTURE_TRANSFORM_FIX
public static final String EVENT_SURFACE_TEXTURE_TRANSFORM_FIX = "SurfaceTextureTransformFix"
Public fields
enableTracing
public static boolean enableTracing
Whether to store tracing events for debug logging. Should be set to true for testing and debugging purposes only.
Public constructors
Public methods
dumpTsv
synchronized public static void dumpTsv(Writer writer)
Dumps all the logged events to the Writer as tab separated values (tsv).
| Throws | |
|---|---|
java.io.IOException |
generateTraceSummary
synchronized public static String generateTraceSummary()
Generate a summary of the logged events, containing the total number of times an event happened and the detailed log of a window of the oldest and newest events.
logCodecEvent
synchronized public static void logCodecEvent(
boolean isDecoder,
boolean isVideo,
@DebugTraceUtil.Event @DebugTraceUtil.Event String eventName,
long presentationTimeUs,
String extraFormat,
Object[] extraArgs
)
Logs an Event for a codec, if debug logging is enabled.
| Parameters | |
|---|---|
boolean isDecoder |
Whether the codec is a decoder. |
boolean isVideo |
Whether the codec is for video. |
@DebugTraceUtil.Event @DebugTraceUtil.Event String eventName |
The |
long presentationTimeUs |
The current presentation time of the media. Use |
String extraFormat |
Format string for optional extra information. See |
Object[] extraArgs |
Arguments for optional extra information. |
logEvent
synchronized public static void logEvent(
@DebugTraceUtil.Component @DebugTraceUtil.Component String component,
@DebugTraceUtil.Event @DebugTraceUtil.Event String event,
long presentationTimeUs
)
Logs a new event, if debug logging is enabled.
| Parameters | |
|---|---|
@DebugTraceUtil.Component @DebugTraceUtil.Component String component |
The |
@DebugTraceUtil.Event @DebugTraceUtil.Event String event |
The |
long presentationTimeUs |
The current presentation time of the media. Use |
logEvent
synchronized public static void logEvent(
@DebugTraceUtil.Component @DebugTraceUtil.Component String component,
@DebugTraceUtil.Event @DebugTraceUtil.Event String event,
long presentationTimeUs,
JSONObject jsonObject
)
logEvent
synchronized public static void logEvent(
@DebugTraceUtil.Component @DebugTraceUtil.Component String component,
@DebugTraceUtil.Event @DebugTraceUtil.Event String event,
long presentationTimeUs,
String extraFormat,
Object[] extraArgs
)
Logs a new event, if debug logging is enabled.
| Parameters | |
|---|---|
@DebugTraceUtil.Component @DebugTraceUtil.Component String component |
The |
@DebugTraceUtil.Event @DebugTraceUtil.Event String event |
The |
long presentationTimeUs |
The current presentation time of the media. Use |
String extraFormat |
Format string for optional extra information. See |
Object[] extraArgs |
Arguments for optional extra information. |