sofia

package module
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: 3 Imported by: 0

README

sofia

And, in the dream, I knew that he was, going on ahead. He was fixin' to make a fire somewhere out there in all that dark and cold. And I knew that whenever I got there, he'd be there. And then I woke up.

No Country for Old Men (2007)

ISOBMFF

library for reading and writing MP4

prior art

  1. https://github.com/mozilla/mp4parse-rust/issues/415
  2. https://github.com/Eyevinn/mp4ff/issues/311
  3. https://github.com/alfg/mp4-rust/issues/132
  4. https://github.com/yapingcat/gomedia/issues/115
  5. https://github.com/alfg/mp4/issues/27
  6. https://github.com/abema/go-mp4/issues/13
  7. https://github.com/garden4hu/fmp4parser-go/issues/4
  8. https://github.com/eswarantg/mp4box/issues/3
  9. https://github.com/miquels/mp4/issues/2

progress

  • 1 enca
  • 2 encv
  • 3 frma
  • 4 mdat
  • 5 mdia
  • 6 minf
  • 7 moof
  • 8 moov
  • 9 pssh
  • 10 schi
  • 11 senc
  • 12 sidx
  • 13 sinf
  • 14 stbl
  • 15 stsd
  • 16 tenc
  • 17 tfhd
  • 18 traf
  • 19 trak
  • 20 trun

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Appender added in v1.6.3

type Appender interface {
	Append([]byte) ([]byte, error)
}

type Box

type Box struct {
	BoxHeader BoxHeader
	Payload   []byte
}

ISO/IEC 14496-12

aligned(8) class Box (
   unsigned int(32) boxtype,
   optional unsigned int(8)[16] extended_type
) {
   BoxHeader(boxtype, extended_type);
   // the remaining bytes are the BoxPayload
}

func (*Box) Append added in v1.6.3

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

func (*Box) Read added in v1.6.0

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

type BoxHeader

type BoxHeader struct {
	Size     uint32
	Type     Type
	UserType Uuid
}

ISO/IEC 14496-12

aligned(8) class BoxHeader (
   unsigned int(32) boxtype,
   optional unsigned int(8)[16] extended_type
) {
   unsigned int(32) size;
   unsigned int(32) type = boxtype;
   if (size==1) {
      unsigned int(64) largesize;
   } else if (size==0) {
      // box extends to end of file
   }
   if (boxtype=='uuid') {
      unsigned int(8)[16] usertype = extended_type;
   }
}

func (*BoxHeader) Append added in v1.6.3

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

func (*BoxHeader) Decode

func (b *BoxHeader) Decode(buf []byte) (int, error)

func (*BoxHeader) GetSize added in v1.6.0

func (b *BoxHeader) GetSize() int

type Decoder added in v1.6.3

type Decoder interface {
	Decode([]byte) (int, error)
}

type Error added in v1.6.0

type Error struct {
	Container BoxHeader
	Box       BoxHeader
}

func (*Error) Error added in v1.6.0

func (e *Error) Error() string

type FullBoxHeader

type FullBoxHeader struct {
	Version uint8
	Flags   [3]byte
}

ISO/IEC 14496-12

aligned(8) class FullBoxHeader(unsigned int(8) v, bit(24) f) {
   unsigned int(8) version = v;
   bit(24) flags = f;
}

func (*FullBoxHeader) Append added in v1.6.3

func (f *FullBoxHeader) Append(buf []byte) ([]byte, error)

func (*FullBoxHeader) Decode

func (f *FullBoxHeader) Decode(buf []byte) (int, error)

func (*FullBoxHeader) GetFlags added in v1.2.3

func (f *FullBoxHeader) GetFlags() uint32

type Reader added in v1.6.3

type Reader interface {
	Read([]byte) error
}

type SampleEntry

type SampleEntry struct {
	BoxHeader          BoxHeader
	Reserved           [6]uint8
	DataReferenceIndex uint16
}

ISO/IEC 14496-12

aligned(8) abstract class SampleEntry(
   unsigned int(32) format
) extends Box(format) {
   const unsigned int(8)[6] reserved = 0;
   unsigned int(16) data_reference_index;
}

func (*SampleEntry) Append added in v1.6.3

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

func (*SampleEntry) Decode added in v1.1.0

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

type Type added in v1.2.7

type Type [4]uint8

func (Type) String added in v1.2.7

func (t Type) String() string

type Uuid added in v1.6.2

type Uuid [16]uint8

func (Uuid) String added in v1.6.2

func (u Uuid) String() string

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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