DemuxPolicy

data class DemuxPolicy(val probe: ProbeDepth = ProbeDepth.Default, val corruptPackets: CorruptPackets = CorruptPackets.Keep, val generateTimestamps: Boolean = false, val lowLatency: Boolean = false, val skipInitialBytes: Long = 0, val maxBitrate: Long? = null, val maxVideoHeight: Int? = null, val variant: Int? = null, val program: Int? = null, val fit: VariantFit? = null)

Typed settings for opening a container. The backend applies every field, or refuses the open with a typed error. It never ignores one. Each default is the backend's own default, so DemuxPolicy() changes nothing.

Constructors

Link copied to clipboard
constructor(probe: ProbeDepth = ProbeDepth.Default, corruptPackets: CorruptPackets = CorruptPackets.Keep, generateTimestamps: Boolean = false, lowLatency: Boolean = false, skipInitialBytes: Long = 0, maxBitrate: Long? = null, maxVideoHeight: Int? = null, variant: Int? = null, program: Int? = null, fit: VariantFit? = null)

Properties

Link copied to clipboard

What to do with a damaged packet.

Link copied to clipboard

What the picture is drawn into, which the player's own choice of variant follows (#447): HDR over SDR when the output shows HDR, and no variant larger than the smallest one that fills the drawn area without being scaled up. maxBitrate and maxVideoHeight still apply on top. Null, the default, has the player fill it at each open, and at each step up, from the renderer it draws into; with no renderer there is no cap and SDR is preferred. Set it to choose for the player, for example to plan for full screen before the view grows. VariantFit() keeps no cap and prefers SDR.

Link copied to clipboard

Rebuilds missing presentation timestamps from the decode order, for a file whose muxer wrote none.

Link copied to clipboard

Drops the packets read while probing instead of keeping them for playback, and does not wait to reorder network packets. For a live source only: on a file, playback can start after the true beginning.

Link copied to clipboard

The highest bitrate, in bits per second, of the variant that an adaptive stream plays, or null for no limit. An HLS master playlist offers the same media as several variants, and the backend plays the variant with the highest bitrate within this limit and maxVideoHeight. When no variant fits, it plays the one with the lowest bitrate. The player's own step up to a higher variant never passes this limit either. Media with one variant has no choice to make, so the limit does not apply to it.

Link copied to clipboard

The tallest picture, in pixels, of the variant that an adaptive stream plays, or null for no limit. It works with maxBitrate, and a variant that does not state its size passes.

Link copied to clipboard

How far to read before playback starts.

Link copied to clipboard
val program: Int?

The MediaProgram.number of the channel to play from a multiplex, or null to play the first one with a picture. The player then picks the picture, the sound and the subtitles from that channel's tracks only. A number the media does not have is ignored, and the choice is made as for null. KitePlayer.selectProgram sets it on the item that plays (#505).

Link copied to clipboard

Bytes to skip before probing, for a file with junk in front of its header.

Link copied to clipboard
val variant: Int?

The StreamVariant.index of the variant to play, or null to choose one by maxBitrate and maxVideoHeight. An index that the master playlist does not have is ignored, and the choice is made as for null. KitePlayer.selectVariant sets it on the item that plays. With null, the player also steps down and up by itself as the network allows; a set index stays.