senc

package
v1.6.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2024 License: OSL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Box

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 ]
}

func (*Box) Append added in v1.6.3

func (b *Box) Append(buf []byte) ([]byte, error)

func (*Box) Read

func (b *Box) Read(buf []byte) error

type Sample

type Sample struct {
	InitializationVector uint64
	SubsampleCount       uint16
	Subsample            []Subsample
	// contains filtered or unexported fields
}

func (*Sample) Append added in v1.6.3

func (s *Sample) Append(buf []byte) ([]byte, error)

func (*Sample) Decode added in v1.6.3

func (s *Sample) Decode(buf []byte) (int, error)

func (*Sample) DecryptCenc

func (s *Sample) DecryptCenc(text, key []byte) error

github.com/Eyevinn/mp4ff/blob/v0.40.2/mp4/crypto.go#L101

type Subsample

type Subsample struct {
	BytesOfClearData     uint16
	BytesOfProtectedData uint32
}

func (Subsample) Append added in v1.6.3

func (s Subsample) Append(buf []byte) ([]byte, error)

func (*Subsample) Decode added in v1.6.3

func (s *Subsample) Decode(buf []byte) (int, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL