iso

package
v1.9.10 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Ftyp                        = "ftyp"
	Moov                        = "moov"
	MoovMvhd                    = "mvhd"
	MoovTrak                    = "trak"
	MoovTrakTkhd                = "tkhd"
	MoovTrakMdia                = "mdia"
	MoovTrakMdiaMdhd            = "mdhd"
	MoovTrakMdiaHdlr            = "hdlr"
	MoovTrakMdiaMinf            = "minf"
	MoovTrakMdiaMinfVmhd        = "vmhd"
	MoovTrakMdiaMinfSmhd        = "smhd"
	MoovTrakMdiaMinfDinf        = "dinf"
	MoovTrakMdiaMinfDinfDref    = "dref"
	MoovTrakMdiaMinfDinfDrefUrl = "url "
	MoovTrakMdiaMinfStbl        = "stbl"
	MoovTrakMdiaMinfStblStsd    = "stsd"
	MoovTrakMdiaMinfStblStts    = "stts"
	MoovTrakMdiaMinfStblStsc    = "stsc"
	MoovTrakMdiaMinfStblStsz    = "stsz"
	MoovTrakMdiaMinfStblStco    = "stco"
	MoovMvex                    = "mvex"
	MoovMvexTrex                = "trex"
	Moof                        = "moof"
	MoofMfhd                    = "mfhd"
	MoofTraf                    = "traf"
	MoofTrafTfhd                = "tfhd"
	MoofTrafTfdt                = "tfdt"
	MoofTrafTrun                = "trun"
	Mdat                        = "mdat"
)
View Source
const (
	SampleVideoIFrame    = sampleDependsOn2
	SampleVideoNonIFrame = sampleDependsOn1 | sampleIsNonSync
	SampleAudio          = sampleDependsOn2 //sampleIsNonSync
)
View Source
const (
	TfhdDefaultSampleDuration = 0x000008
	TfhdDefaultSampleSize     = 0x000010
	TfhdDefaultSampleFlags    = 0x000020
	TfhdDefaultBaseIsMoof     = 0x020000
)
View Source
const (
	TrunDataOffset       = 0x000001
	TrunFirstSampleFlags = 0x000004
	TrunSampleDuration   = 0x0000100
	TrunSampleSize       = 0x0000200
	TrunSampleFlags      = 0x0000400
	TrunSampleCTS        = 0x0000800
)

Variables

This section is empty.

Functions

func DecodeAtom added in v1.9.10

func DecodeAtom(b []byte) (any, error)

func DecodeAtoms added in v1.7.0

func DecodeAtoms(b []byte) (atoms []any, err error)

Types

type Atom added in v1.7.0

type Atom struct {
	Name string
	Data []byte
}

type AtomAudio added in v1.9.10

type AtomAudio struct {
	Name       string
	Channels   uint16
	SampleRate uint32
	Config     []byte
}

type AtomMdat added in v1.9.10

type AtomMdat struct {
	Data []byte
}

type AtomMdhd added in v1.9.10

type AtomMdhd struct {
	TimeScale uint32
}

type AtomMfhd added in v1.9.10

type AtomMfhd struct {
	Sequence uint32
}

type AtomTfdt added in v1.9.10

type AtomTfdt struct {
	DecodeTime uint64
}

type AtomTfhd added in v1.9.10

type AtomTfhd struct {
	TrackID        uint32
	SampleDuration uint32
	SampleSize     uint32
	SampleFlags    uint32
}

type AtomTkhd added in v1.9.10

type AtomTkhd struct {
	TrackID uint32
}

type AtomTrun added in v1.9.10

type AtomTrun struct {
	DataOffset       uint32
	FirstSampleFlags uint32
	SamplesDuration  []uint32
	SamplesSize      []uint32
	SamplesFlags     []uint32
	SamplesCTS       []uint32
}

type AtomVideo added in v1.9.10

type AtomVideo struct {
	Name   string
	Config []byte
}

type Movie

type Movie struct {
	// contains filtered or unexported fields
}

func NewMovie

func NewMovie(size int) *Movie

func (*Movie) Bytes

func (m *Movie) Bytes() []byte

func (*Movie) EndAtom

func (m *Movie) EndAtom()

func (*Movie) Skip

func (m *Movie) Skip(n int)

func (*Movie) StartAtom

func (m *Movie) StartAtom(name string)

func (*Movie) Write

func (m *Movie) Write(b []byte)

func (*Movie) WriteAudio

func (m *Movie) WriteAudio(codec string, channels uint16, sampleRate uint32, conf []byte)

func (*Movie) WriteAudioMediaInfo

func (m *Movie) WriteAudioMediaInfo()

func (*Movie) WriteAudioTrack

func (m *Movie) WriteAudioTrack(id uint32, codec string, timescale uint32, channels uint16, conf []byte)

func (*Movie) WriteBytes

func (m *Movie) WriteBytes(b ...byte)

func (*Movie) WriteData

func (m *Movie) WriteData(b []byte)

func (*Movie) WriteDataInfo

func (m *Movie) WriteDataInfo()

func (*Movie) WriteEsdsAAC

func (m *Movie) WriteEsdsAAC(conf []byte)

func (*Movie) WriteEsdsMP3

func (m *Movie) WriteEsdsMP3()

func (*Movie) WriteFileType

func (m *Movie) WriteFileType()

func (*Movie) WriteFloat16

func (m *Movie) WriteFloat16(f float64)

func (*Movie) WriteFloat32

func (m *Movie) WriteFloat32(f float64)

func (*Movie) WriteMatrix

func (m *Movie) WriteMatrix()

func (*Movie) WriteMediaHandler

func (m *Movie) WriteMediaHandler(s, name string)

func (*Movie) WriteMediaHeader

func (m *Movie) WriteMediaHeader(timescale uint32)

func (*Movie) WriteMovieFragment

func (m *Movie) WriteMovieFragment(seq, tid, duration, size, flags uint32, dts uint64, cts uint32)

func (*Movie) WriteMovieHeader

func (m *Movie) WriteMovieHeader()

func (*Movie) WriteOpus added in v1.7.0

func (m *Movie) WriteOpus(channels uint16, sampleRate uint32)

func (*Movie) WriteSampleTable

func (m *Movie) WriteSampleTable(writeSampleDesc func())

func (*Movie) WriteString

func (m *Movie) WriteString(s string)

func (*Movie) WriteTrackExtend

func (m *Movie) WriteTrackExtend(id uint32)

func (*Movie) WriteTrackHeader

func (m *Movie) WriteTrackHeader(id uint32, width, height uint16)

func (*Movie) WriteUint16

func (m *Movie) WriteUint16(v uint16)

func (*Movie) WriteUint24

func (m *Movie) WriteUint24(v uint32)

func (*Movie) WriteUint32

func (m *Movie) WriteUint32(v uint32)

func (*Movie) WriteUint64

func (m *Movie) WriteUint64(v uint64)

func (*Movie) WriteVideo

func (m *Movie) WriteVideo(codec string, width, height uint16, conf []byte)

func (*Movie) WriteVideoMediaInfo

func (m *Movie) WriteVideoMediaInfo()

func (*Movie) WriteVideoTrack

func (m *Movie) WriteVideoTrack(id uint32, codec string, timescale uint32, width, height uint16, conf []byte)

Jump to

Keyboard shortcuts

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