MCPcopy Create free account
hub / github.com/axiomatic-systems/Bento4 / MakePsshBoxV1

Function MakePsshBoxV1

Source/Python/utils/mp4utils.py:772–778  ·  view source on GitHub ↗
(system_id, kids, payload)

Source from the content-addressed store, hash-verified

770 return struct.pack('>I', pssh_size)+b'pssh'+struct.pack('>I',0)+system_id+struct.pack('>I', len(payload))+payload
771
772def MakePsshBoxV1(system_id, kids, payload):
773 pssh_size = 12+16+4+(16*len(kids))+4+len(payload)
774 pssh = struct.pack('>I', pssh_size)+b'pssh'+struct.pack('>I',0x01000000)+system_id+struct.pack('>I', len(kids))
775 for kid in kids:
776 pssh += bytes.fromhex(kid)
777 pssh += struct.pack('>I', len(payload))+payload
778 return pssh
779
780def GetEncryptionKey(options, spec):
781 if options.debug:

Callers 1

AddContentProtectionFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected