Expand description
System-specific pssh payload decoding.
The data blob inside a Protection System Specific Header box (ISO
23001-7) is opaque at the ISO-BMFF level; its format is defined by each
DRM system. This module decodes the two formats seen in practice:
- Widevine: a small protobuf (
WidevinePsshDatain Google’s schema). - PlayReady: a PlayReady Object — little-endian length-prefixed
records carrying a UTF-16LE
WRMHEADERXML document.
It also parses raw pssh box bytes outside a file context
(parse_pssh_boxes), the form carried by DASH cenc:pssh manifest
elements and pasted around in logs and tickets.
Structs§
- Play
Ready Pssh Data - Decoded PlayReady pssh payload (PlayReady Object + WRMHEADER).
- Widevine
Pssh Data - Decoded Widevine pssh payload (the
WidevinePsshDataprotobuf).
Constants§
Functions§
- parse_
playready_ pssh_ data - Parses a bare PlayReady pssh payload (a PlayReady Object). Returns
Nonefor anything that doesn’t carry a readable WRMHEADER record. - parse_
pssh_ boxes - Parses one or more concatenated raw
psshboxes — the form carried by DASHcenc:psshmanifest elements. Fails on anything that isn’t a well-formed pssh box, so callers can use it as a format probe. - parse_
widevine_ pssh_ data - Parses a bare Widevine pssh payload. Returns
Nonefor anything that doesn’t decode cleanly as the Widevine protobuf, so it can double as a “is this Widevine data?” probe. - pssh_
from_ raw_ widevine - Wraps a bare Widevine payload (protobuf without box framing, as found in
packager logs) in a synthetic
PsshData. ReturnsNonewhen the bytes don’t decode as Widevine.