StreamPlaybackObserver
interface StreamPlaybackObserver
Optional, synchronous observations of decoded media before playback scheduling.
Install through Stream.playbackObserver. Callbacks run on codec threads and may overlap. Implementations must be thread-safe, return promptly and never perform blocking I/O. Observations describe decoder output, not rendered frames, audible output or A/V synchronization.
Functions
Link copied to clipboard
abstract fun onAudioBuffer(pcm: ByteBuffer, presentationTimeUs: Long, sampleRate: Int?, channelCount: Int?, encoding: Int?)
Observes decoded PCM before it is queued for audio playback.
Link copied to clipboard
Observes one decoded video buffer before it is queued for playback.