RecordingCapable

A PlayerMediaSource that can copy the packets it reads into a file while it plays.

Optional. The engine looks for it on the source, and a source without it makes io.github.yuroyami.kiteplayer.KitePlayer.startRecording throw.

The engine calls these members from its own thread while another thread reads packets, so an implementation guards its recording state itself. The engine ends a recording before it seeks or retires the session, so an implementation never has to put a jump into a file.

Properties

Link copied to clipboard
abstract val recordingPath: String?

The file a recording is being written to now, or null when no recording runs.

Functions

Link copied to clipboard
abstract fun startRecording(path: String)

Starts copying the packets of the streams this source reads into a Matroska file at path, with no re-encode.

Link copied to clipboard
abstract fun stopRecording()

Stops the recording and finishes the file. Does nothing when no recording runs. Closing the source does the same.