Documentation
¶
Overview ¶
Package clientreg is the data-driven client capability engine. One ordered registry matches every client. Roles share that matcher: policy (Dolby Vision profiles, subtitles, family), playback (codecs and limits for clients that send no profile), patch (narrow hardware facts) and quirk (a named flag, including a wire-protocol quirk). Owner overrides apply to the matched policy or playback id. Runtime declarations are applied by callers after this package returns.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OverrideApplies ¶
func OverrideApplies(o core.ClientCapabilityOverride, recordIDs []string, id Identity) bool
OverrideApplies reports whether o edits the record ids for this client. An id matches the playback record or the policy record. Product, platform, device and version narrow it further. An override with no id and no matcher matches nothing.
Types ¶
type Identity ¶
type Identity struct {
Product, Platform, Device, Model, Version string
}
Identity is the client a match rule sees.
type Match ¶
type Match struct {
All []Match `json:"all,omitempty"`
Any []Match `json:"any,omitempty"`
None []Match `json:"none,omitempty"`
Field string `json:"field,omitempty"`
Op string `json:"op,omitempty"`
Value string `json:"value,omitempty"`
}
Match is one rule. A leaf compares Field. All, Any and None combine rules. An empty match matches every client and is the registry's fallback.
type Result ¶
type Result struct {
ID string
Family string
Notes string
Video []string
Audio []string
Containers []string
Subtitles []string
DolbyVisionProfiles []int
MaxHeight int
MaxBitrateKbps int
HDR10 bool
DolbyVision bool
// HeightLocked is set when an owner override chose the height.
HeightLocked bool
}
Result is one resolved registry record after presets, patches and overrides.
func Definitions ¶
Definitions returns the embedded records for the owner console.
func Playback ¶
func Playback(id Identity, overrides []core.ClientCapabilityOverride) Result
Playback is the codec and limit set for a client that did not send its own profile, plus hardware patches and matching owner overrides. policyID is the policy record for the same client so a device override edits both layers.