VariantFit

data class VariantFit(val drawnWidth: Int? = null, val drawnHeight: Int? = null, val showsHdr: Boolean = false)

What an adaptive stream's picture is drawn into, which the player's choice of variant follows. See DemuxPolicy.fit.

Constructors

Link copied to clipboard
constructor(drawnWidth: Int? = null, drawnHeight: Int? = null, showsHdr: Boolean = false)

Properties

Link copied to clipboard

How tall the area the picture is drawn into is, in physical pixels, or null for no cap.

Link copied to clipboard

How wide the area the picture is drawn into is, in physical pixels, or null for no cap.

Link copied to clipboard

True when the output shows HDR as HDR, so an HDR variant is preferred over an SDR one.

Functions

Link copied to clipboard

The most pixels a variant may have under this fit, among variants of sizes, or null for no cap. Each size is fitted into the drawn area at its own shape, as the picture is shown, and the cap is the smallest size that is not scaled up to fill it, so the picture is never enlarged and nothing much larger than the screen is fetched. A 1920 by 1080 area of a 720p, 1440p and 2160p ladder caps at 1440p, a landscape picture in a portrait phone's 1080 by 2400 area is capped by the width, and an area larger than every size caps nothing. Null as well when either side of the area is unknown. The source's first choice and the player's later steps both read it.