meta

package
v0.0.0-...-dec19c8 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package meta contains playback metadata definition and static MPD generator.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Codec

type Codec struct {
	Profile    string
	SampleRate uint16
}

Codec holds generic codec info of audio or video track.

func NewCodecFromSTSD

func NewCodecFromSTSD(stsd *mp4ff.StsdBox) (*Codec, error)

NewCodecFromSTSD retrieves codec info from track's STSD box in the format suited for DASH MPD schema.

type Meta

type Meta struct {
	Tracks   []Track
	Duration time.Duration
}

Meta is a generic media file structure.

func (*Meta) ScanText

func (mt *Meta) ScanText(t pgtype.Text) error

func (*Meta) StaticMPD

func (mt *Meta) StaticMPD(baseURL string) ([]byte, error)

StaticMPD generates media presentation description (MPD) corresponding to current state of Meta. Based on https://github.com/Eyevinn/dash-mpd/blob/main/examples/newmpd_test.go Refs: ISO/IEC 23009-1 4.3 DASH data model overview.

func (*Meta) TextValue

func (mt *Meta) TextValue() (pgtype.Text, error)

type SegmentConfig

type SegmentConfig struct {
	Init        string
	StartNumber uint
	Duration    uint64
	Timescale   uint32
}

SegmentConfig holds segment related info of segmented media file.

type Track

type Track struct {
	Codec     *Codec
	Segment   *SegmentConfig
	Name      string
	MimeType  string
	Bandwidth uint32
}

Track is a media file video or audio track.

Jump to

Keyboard shortcuts

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