DebugTraceUtil


@UnstableApi
class DebugTraceUtil


A debugging tracing utility. Debug logging is disabled at compile time by default.

Summary

Nested types

@Documented
@Retention(value = RetentionPolicy.SOURCE)
@StringDef(value = )
@Target(value = TYPE_USE)
annotation DebugTraceUtil.Component

Components logged by logEvent.

@Documented
@Retention(value = RetentionPolicy.SOURCE)
@StringDef(value = )
@Target(value = TYPE_USE)
annotation DebugTraceUtil.Event

Events logged by logEvent.

Constants

const String!
COMPONENT_ASSET_LOADER = "AssetLoader"
const String!
COMPONENT_AUDIO_DECODER = "AudioDecoder"
const String!
COMPONENT_AUDIO_ENCODER = "AudioEncoder"
const String!
COMPONENT_AUDIO_GRAPH = "AudioGraph"
const String!
COMPONENT_AUDIO_MIXER = "AudioMixer"
const String!
COMPONENT_BITMAP_TEXTURE_MANAGER = "BitmapTextureManager"
const String!
COMPONENT_COMPOSITOR = "Compositor"
const String!
COMPONENT_EXTERNAL_TEXTURE_MANAGER = "ExternalTextureManager"
const String!
COMPONENT_MUXER = "Muxer"
const String!
COMPONENT_TEX_ID_TEXTURE_MANAGER = "TexIdTextureManager"
const String!
const String!
COMPONENT_VIDEO_DECODER = "VideoDecoder"
const String!
COMPONENT_VIDEO_ENCODER = "VideoEncoder"
const String!
EVENT_ACCEPTED_INPUT = "AcceptedInput"
const String!
EVENT_CAN_WRITE_SAMPLE = "CanWriteSample"
const String!
EVENT_INPUT_ENDED = "InputEnded"
const String!
EVENT_INPUT_FORMAT = "InputFormat"
const String!
EVENT_OUTPUT_ENDED = "OutputEnded"
const String!
EVENT_OUTPUT_FORMAT = "OutputFormat"
const String!
EVENT_OUTPUT_TEXTURE_RENDERED = "OutputTextureRendered"
const String!
EVENT_PRODUCED_OUTPUT = "ProducedOutput"
const String!
EVENT_QUEUE_BITMAP = "QueueBitmap"
const String!
EVENT_QUEUE_FRAME = "QueueFrame"
const String!
EVENT_QUEUE_TEXTURE = "QueueTexture"
const String!
EVENT_RECEIVE_END_OF_ALL_INPUT = "ReceiveEndOfAllInput"
const String!
EVENT_RECEIVE_EOS = "ReceiveEOS"
const String!
EVENT_REGISTER_NEW_INPUT_STREAM = "RegisterNewInputStream"
const String!
EVENT_RENDERED_TO_OUTPUT_SURFACE = "RenderedToOutputSurface"
const String!
EVENT_SIGNAL_ENDED = "SignalEnded"
const String!
EVENT_SIGNAL_EOS = "SignalEOS"
const String!
EVENT_SURFACE_TEXTURE_INPUT = "SurfaceTextureInput"
const String!
EVENT_SURFACE_TEXTURE_TRANSFORM_FIX = "SurfaceTextureTransformFix"

Public constructors

Public functions

synchronized java-static Unit
dumpTsv(writer: Writer!)

Dumps all the logged events to the Writer as tab separated values (tsv).

synchronized java-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 java-static Unit
logCodecEvent(
    isDecoder: Boolean,
    isVideo: Boolean,
    @DebugTraceUtil.Event eventName: @DebugTraceUtil.Event String!,
    presentationTimeUs: Long,
    extraFormat: String!,
    extraArgs: Array<Any!>!
)

Logs an Event for a codec, if debug logging is enabled.

synchronized java-static Unit
logEvent(
    @DebugTraceUtil.Component component: @DebugTraceUtil.Component String!,
    @DebugTraceUtil.Event event: @DebugTraceUtil.Event String!,
    presentationTimeUs: Long
)

Logs a new event, if debug logging is enabled.

synchronized java-static Unit
logEvent(
    @DebugTraceUtil.Component component: @DebugTraceUtil.Component String!,
    @DebugTraceUtil.Event event: @DebugTraceUtil.Event String!,
    presentationTimeUs: Long,
    extraFormat: String!,
    extraArgs: Array<Any!>!
)

Logs a new event, if debug logging is enabled.

synchronized java-static Unit

Public properties

java-static Boolean

Whether to store tracing events for debug logging.

Constants

COMPONENT_ASSET_LOADER

const val COMPONENT_ASSET_LOADER = "AssetLoader": String!

COMPONENT_AUDIO_DECODER

const val COMPONENT_AUDIO_DECODER = "AudioDecoder": String!

COMPONENT_AUDIO_ENCODER

const val COMPONENT_AUDIO_ENCODER = "AudioEncoder": String!

COMPONENT_AUDIO_GRAPH

const val COMPONENT_AUDIO_GRAPH = "AudioGraph": String!

COMPONENT_AUDIO_MIXER

const val COMPONENT_AUDIO_MIXER = "AudioMixer": String!

COMPONENT_BITMAP_TEXTURE_MANAGER

const val COMPONENT_BITMAP_TEXTURE_MANAGER = "BitmapTextureManager": String!

COMPONENT_COMPOSITOR

const val COMPONENT_COMPOSITOR = "Compositor": String!

COMPONENT_EXTERNAL_TEXTURE_MANAGER

const val COMPONENT_EXTERNAL_TEXTURE_MANAGER = "ExternalTextureManager": String!

COMPONENT_MUXER

const val COMPONENT_MUXER = "Muxer": String!

COMPONENT_TEX_ID_TEXTURE_MANAGER

const val COMPONENT_TEX_ID_TEXTURE_MANAGER = "TexIdTextureManager": String!

COMPONENT_VFP

const val COMPONENT_VFP = "VFP": String!

COMPONENT_VIDEO_DECODER

const val COMPONENT_VIDEO_DECODER = "VideoDecoder": String!

COMPONENT_VIDEO_ENCODER

const val COMPONENT_VIDEO_ENCODER = "VideoEncoder": String!

EVENT_ACCEPTED_INPUT

const val EVENT_ACCEPTED_INPUT = "AcceptedInput": String!

EVENT_CAN_WRITE_SAMPLE

const val EVENT_CAN_WRITE_SAMPLE = "CanWriteSample": String!

EVENT_INPUT_ENDED

const val EVENT_INPUT_ENDED = "InputEnded": String!

EVENT_INPUT_FORMAT

const val EVENT_INPUT_FORMAT = "InputFormat": String!

EVENT_OUTPUT_ENDED

const val EVENT_OUTPUT_ENDED = "OutputEnded": String!

EVENT_OUTPUT_FORMAT

const val EVENT_OUTPUT_FORMAT = "OutputFormat": String!

EVENT_OUTPUT_TEXTURE_RENDERED

const val EVENT_OUTPUT_TEXTURE_RENDERED = "OutputTextureRendered": String!

EVENT_PRODUCED_OUTPUT

const val EVENT_PRODUCED_OUTPUT = "ProducedOutput": String!

EVENT_QUEUE_BITMAP

const val EVENT_QUEUE_BITMAP = "QueueBitmap": String!

EVENT_QUEUE_FRAME

const val EVENT_QUEUE_FRAME = "QueueFrame": String!

EVENT_QUEUE_TEXTURE

const val EVENT_QUEUE_TEXTURE = "QueueTexture": String!

EVENT_RECEIVE_END_OF_ALL_INPUT

const val EVENT_RECEIVE_END_OF_ALL_INPUT = "ReceiveEndOfAllInput": String!

EVENT_RECEIVE_EOS

const val EVENT_RECEIVE_EOS = "ReceiveEOS": String!

EVENT_REGISTER_NEW_INPUT_STREAM

const val EVENT_REGISTER_NEW_INPUT_STREAM = "RegisterNewInputStream": String!

EVENT_RENDERED_TO_OUTPUT_SURFACE

const val EVENT_RENDERED_TO_OUTPUT_SURFACE = "RenderedToOutputSurface": String!

EVENT_SIGNAL_ENDED

const val EVENT_SIGNAL_ENDED = "SignalEnded": String!

EVENT_SIGNAL_EOS

const val EVENT_SIGNAL_EOS = "SignalEOS": String!

EVENT_SURFACE_TEXTURE_INPUT

const val EVENT_SURFACE_TEXTURE_INPUT = "SurfaceTextureInput": String!

EVENT_SURFACE_TEXTURE_TRANSFORM_FIX

const val EVENT_SURFACE_TEXTURE_TRANSFORM_FIX = "SurfaceTextureTransformFix": String!

Public constructors

DebugTraceUtil

DebugTraceUtil()

Public functions

dumpTsv

synchronized java-static fun dumpTsv(writer: Writer!): Unit

Dumps all the logged events to the Writer as tab separated values (tsv).

generateTraceSummary

synchronized java-static fun generateTraceSummary(): 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.

logCodecEvent

synchronized java-static fun logCodecEvent(
    isDecoder: Boolean,
    isVideo: Boolean,
    @DebugTraceUtil.Event eventName: @DebugTraceUtil.Event String!,
    presentationTimeUs: Long,
    extraFormat: String!,
    extraArgs: Array<Any!>!
): Unit

Logs an Event for a codec, if debug logging is enabled.

Parameters
isDecoder: Boolean

Whether the codec is a decoder.

isVideo: Boolean

Whether the codec is for video.

@DebugTraceUtil.Event eventName: @DebugTraceUtil.Event String!

The Event to log.

presentationTimeUs: Long

The current presentation time of the media. Use TIME_UNSET if unknown, TIME_END_OF_SOURCE if EOS.

extraFormat: String!

Format string for optional extra information. See formatInvariant.

extraArgs: Array<Any!>!

Arguments for optional extra information.

logEvent

synchronized java-static fun logEvent(
    @DebugTraceUtil.Component component: @DebugTraceUtil.Component String!,
    @DebugTraceUtil.Event event: @DebugTraceUtil.Event String!,
    presentationTimeUs: Long
): Unit

Logs a new event, if debug logging is enabled.

Parameters
@DebugTraceUtil.Component component: @DebugTraceUtil.Component String!

The Component to log.

@DebugTraceUtil.Event event: @DebugTraceUtil.Event String!

The Event to log.

presentationTimeUs: Long

The current presentation time of the media. Use TIME_UNSET if unknown, TIME_END_OF_SOURCE if EOS.

logEvent

synchronized java-static fun logEvent(
    @DebugTraceUtil.Component component: @DebugTraceUtil.Component String!,
    @DebugTraceUtil.Event event: @DebugTraceUtil.Event String!,
    presentationTimeUs: Long,
    extraFormat: String!,
    extraArgs: Array<Any!>!
): Unit

Logs a new event, if debug logging is enabled.

Parameters
@DebugTraceUtil.Component component: @DebugTraceUtil.Component String!

The Component to log.

@DebugTraceUtil.Event event: @DebugTraceUtil.Event String!

The Event to log.

presentationTimeUs: Long

The current presentation time of the media. Use TIME_UNSET if unknown, TIME_END_OF_SOURCE if EOS.

extraFormat: String!

Format string for optional extra information. See formatInvariant.

extraArgs: Array<Any!>!

Arguments for optional extra information.

reset

synchronized java-static fun reset(): Unit

Public properties

enableTracing

java-static val enableTracingBoolean

Whether to store tracing events for debug logging. Should be set to true for testing and debugging purposes only.