Module algorithms

Source
Expand description

Algorithms as defined in the “Media Capture and Streams” spec.

Structs§

ClosestToIdealPolicy
A tie-breaking policy that picks the settings item that’s closest to the specified ideal settings.
FirstPolicy
A naïve tie-breaking policy that just picks the first settings item it encounters.
SettingFitnessDistanceError
An error indicating a rejected fitness distance computation, likely caused by a mismatched yet required constraint.
SettingsFitnessDistanceError
A list of media track properties and their corresponding fitness distance errors.

Enums§

DeviceInformationExposureMode
A mode indicating whether device information may be exposed.
SelectSettingsError
An error type indicating a failure of the SelectSettings algorithm.
SettingFitnessDistanceErrorKind
The kind of the error (e.g. missing value, mismatching value, …).

Traits§

FitnessDistance
The function used to compute the “fitness distance” of a setting value of a MediaStreamTrack object.
TieBreakingPolicy
A tie-breaking policy used for selecting a single preferred candidate from a set list of equally optimal setting candidates.

Functions§

select_settings_candidates
This function implements steps 1-5 of the SelectSettings algorithm as defined by the W3C spec: https://www.w3.org/TR/mediacapture-streams/#dfn-selectsettings