fmp4

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package fmp4 contains a fMP4 reader and writer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoxTypeDOps

func BoxTypeDOps() gomp4.BoxType

func BoxTypeOpus

func BoxTypeOpus() gomp4.BoxType

Types

type DOps

type DOps struct {
	gomp4.Box
	Version              uint8   `mp4:"0,size=8"`
	OutputChannelCount   uint8   `mp4:"1,size=8"`
	PreSkip              uint16  `mp4:"2,size=16"`
	InputSampleRate      uint32  `mp4:"3,size=32"`
	OutputGain           int16   `mp4:"4,size=16"`
	ChannelMappingFamily uint8   `mp4:"5,size=8"`
	StreamCount          uint8   `mp4:"6,opt=dynamic,size=8"`
	CoupledCount         uint8   `mp4:"7,opt=dynamic,size=8"`
	ChannelMapping       []uint8 `mp4:"8,opt=dynamic,size=8,len=dynamic"`
}

func (DOps) GetFieldLength

func (ops DOps) GetFieldLength(name string, ctx gomp4.Context) uint

func (DOps) GetType

func (DOps) GetType() gomp4.BoxType

func (DOps) IsOptFieldEnabled

func (dops DOps) IsOptFieldEnabled(name string, ctx gomp4.Context) bool

type DOpsChannelMappingTable

type DOpsChannelMappingTable struct{}

type Init

type Init struct {
	Tracks []*InitTrack
}

Init is a FMP4 initialization file.

func (*Init) Marshal

func (i *Init) Marshal(w io.WriteSeeker) error

Marshal encodes a FMP4 initialization file.

func (*Init) Unmarshal

func (i *Init) Unmarshal(byts []byte) error

Unmarshal decodes a FMP4 initialization file.

type InitTrack

type InitTrack struct {
	ID        int
	TimeScale uint32
	Codec     codecs.Codec
}

InitTrack is a track of Init.

type Part

type Part struct {
	Tracks []*PartTrack
}

Part is a FMP4 part file.

func (*Part) Marshal

func (p *Part) Marshal(w io.WriteSeeker) error

Marshal encodes a FMP4 part file.

type PartSample

type PartSample struct {
	Duration        uint32
	PTSOffset       int32
	IsNonSyncSample bool
	Payload         []byte
}

PartSample is a sample of a PartTrack.

type PartTrack

type PartTrack struct {
	ID       int
	BaseTime uint64
	Samples  []*PartSample
	IsVideo  bool // marshal only
}

PartTrack is a track of Part.

type Parts

type Parts []*Part

Parts is a sequence of FMP4 parts.

func (*Parts) Unmarshal

func (ps *Parts) Unmarshal(byts []byte) error

Unmarshal decodes one or more FMP4 parts.

Jump to

Keyboard shortcuts

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