fmp4

package
v0.0.0-...-0619cdb Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2022 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

This section is empty.

Types

type Init

type Init struct {
	Tracks []*InitTrack
}

Init is a FMP4 initialization file.

func (*Init) Marshal

func (i *Init) Marshal() ([]byte, 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
	Track     gortsplib.Track
}

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() ([]byte, 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