import "41.neocities.org/sofia/senc"
type Box struct { BoxHeader sofia.BoxHeader FullBoxHeader sofia.FullBoxHeader SampleCount uint32 Sample []Sample }
ISO/IEC 23001-7
if the version of the SampleEncryptionBox is 0 and the flag senc_use_subsamples is set, UseSubSampleEncryption is set to 1
aligned(8) class SampleEncryptionBox extends FullBox( 'senc', version, flags ) { unsigned int(32) sample_count; { unsigned int(Per_Sample_IV_Size*8) InitializationVector; if (UseSubSampleEncryption) { unsigned int(16) subsample_count; { unsigned int(16) BytesOfClearData; unsigned int(32) BytesOfProtectedData; } [subsample_count ] } }[ sample_count ] }
type Sample struct { InitializationVector [8]uint8 SubsampleCount uint16 Subsample []Subsample // contains filtered or unexported fields }
github.com/Eyevinn/mp4ff/blob/v0.40.2/mp4/crypto.go#L101