MediaLink

class MediaLink(val stream: Stream) : Running, CoroutineScope, Choreographer.FrameCallback

Schedules decoded audio and video for synchronized playback.

Constructors

Link copied to clipboard
constructor(stream: Stream)

Properties

Link copied to clipboard

The playback audio track. Replacing it releases the existing track; setting it to null switches to clock synchronization. Track replacement preserves elapsed playback time.

Link copied to clipboard
Link copied to clipboard
open override val isRunning: AtomicBoolean

Indicates whether the receiver is running.

Link copied to clipboard

Whether the audio playback track is paused. Setting this has no effect if no track exists.

Link copied to clipboard

The stream whose codec output buffers are queued and released.

Functions

Link copied to clipboard
open override fun doFrame(frameTimeNanos: Long)
Link copied to clipboard
fun queueAudio(buffer: MediaBuffer)

Queues the audio data asynchronously for playback.

Link copied to clipboard
fun queueVideo(buffer: MediaBuffer)

Queues the video data asynchronously for playback.

Link copied to clipboard
open override fun startRunning()

Tells the receiver to start running.

Link copied to clipboard
open override fun stopRunning()

Tells the receiver to stop running.