refactor(api): move the server CDM licence cap into one module that measures tracks by the -q rule

This commit is contained in:
imSp4rky
2026-11-29 09:16:18 -07:00
parent 6fc2d84bd7
commit 8e67081e11
13 changed files with 318 additions and 168 deletions
+4 -2
View File
@@ -215,8 +215,10 @@ server-identity flag, keeps the server CDM.
Set it to a height in pixels for every service, or to a map of service tag to height with an
optional `default` entry. A service the map does not name or sets to `null` gets the `default`, and
with no `default` it has no limit. The server compares the limit with the lowest `-q` that selects
the track: the track height, or the 16:9 height from the width when that is lower. The server reads
the remote client's `-q` when the remote session starts:
the track, by the rule of `dl -q`: the track height, the 16:9 height from the width, or the standard
resolution of a padded or cropped encode (the nearest standard height within 10%). Thus the server
never refuses a track that `-q` at the limit selects: a padded `2048x1088` track passes a `1080`
limit. The server reads the remote client's `-q` when the remote session starts:
- With no `-q`, or a `-q` at or below the limit, the server CDM licenses the remote session. The server
refuses a live licence for a video track taller than the limit, and the client licenses that