dash

package
v1.17.7 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: OSL-3.0 Imports: 6 Imported by: 6

README

Documentation

Index

Constants

View Source
const ModeLine = "{{ $first := true }}" +
	"{{ range $period := .Period }}" +
	"{{ range $adaptation := .AdaptationSet }}" +
	"{{ range .Representation }}" +
	"{{ if $first }}" +
	"{{ $first = false }}" +
	"{{ else }}" +
	"\n" +
	"{{ end }}" +
	"{{ with .Width }}" +
	"width = {{ . }}\n" +
	"{{ end }}" +
	"{{ with .Height }}" +
	"height = {{ . }}\n" +
	"{{ end }}" +
	"bandwidth = {{ .Bandwidth }}\n" +
	"{{ with .Codecs }}" +
	"codecs = {{ . }}\n" +
	"{{ end }}" +
	"{{ with $adaptation.Codecs }}" +
	"codecs = {{ . }}\n" +
	"{{ end }}" +
	"{{ with .MimeType }}" +
	"type = {{ . }}\n" +
	"{{ else }}" +
	"type = {{ $adaptation.MimeType }}\n" +
	"{{ end }}" +
	"{{ with $adaptation.Role }}" +
	"role = {{ .Value }}\n" +
	"{{ end }}" +
	"{{ with $adaptation.Lang }}" +
	"lang = {{ . }}\n" +
	"{{ end }}" +
	"id = {{ .ID }}\n" +
	"{{ with $period.ID }}" +
	"period = {{ . }}\n" +
	"{{ end }}" +
	"{{ end }}" +
	"{{ end }}" +
	"{{ end }}"

Variables

This section is empty.

Functions

This section is empty.

Types

type AdaptationSet added in v1.15.2

type AdaptationSet struct {
	// this might be under Representation
	Codecs string `xml:"codecs,attr"`
	// this might be under Representation
	ContentProtection []ContentProtection
	// this might not exist
	Lang string `xml:"lang,attr"`
	// this might be under Representation
	MimeType       string `xml:"mimeType,attr"`
	Representation []Representation
	// this might not exist
	Role *struct {
		Value string `xml:"value,attr"`
	}
	// this might not exist, or might be under Representation
	SegmentTemplate *SegmentTemplate
}

type ContentProtection added in v1.15.2

type ContentProtection struct {
	SchemeIdUri string `xml:"schemeIdUri,attr"`
	// this might not exist
	Default_KID string `xml:"default_KID,attr"`
	// this might not exist
	PSSH string `xml:"pssh"`
}

type MPD added in v1.16.0

type MPD struct {
	Period []Period
}

media presentation description wikipedia.org/wiki/Dynamic_Adaptive_Streaming_over_HTTP

func (MPD) Contains added in v1.17.4

func (m MPD) Contains(f func(Pointer) bool) bool

func (MPD) Visit added in v1.17.4

func (m MPD) Visit(f func(Pointer))

godocs.io/flag#Visit

type Period added in v1.16.5

type Period struct {
	AdaptationSet []AdaptationSet
	ID            string `xml:"id,attr"`
}

type Pointer added in v1.16.5

type Pointer struct {
	AdaptationSet  *AdaptationSet
	Period         *Period
	Representation *Representation
}

func (Pointer) Codecs added in v1.16.5

func (p Pointer) Codecs() string

func (Pointer) Default_KID added in v1.16.8

func (p Pointer) Default_KID() ([]byte, error)

func (Pointer) Ext added in v1.16.5

func (p Pointer) Ext() (string, bool)

func (Pointer) Initialization added in v1.16.5

func (p Pointer) Initialization() (string, bool)

func (Pointer) Media added in v1.16.5

func (p Pointer) Media() []string

return a slice so we can measure progress

func (Pointer) MimeType added in v1.16.5

func (p Pointer) MimeType() string

func (Pointer) PSSH added in v1.16.5

func (p Pointer) PSSH() ([]byte, error)

type Range added in v1.16.2

type Range string

func (Range) Scan added in v1.16.2

func (r Range) Scan() (int, int, error)

type Representation added in v1.12.4

type Representation struct {
	Bandwidth int    `xml:"bandwidth,attr"`
	ID        string `xml:"id,attr"`
	// this might not exist
	BaseURL string
	// this might be under AdaptationSet
	Codecs string `xml:"codecs,attr"`
	// this might be under AdaptationSet
	ContentProtection []ContentProtection
	// this might not exist
	Height int `xml:"height,attr"`
	// this might be under AdaptationSet
	MimeType string `xml:"mimeType,attr"`
	// this might not exist
	SegmentBase *struct {
		Initialization struct {
			Range Range `xml:"range,attr"`
		}
		IndexRange Range `xml:"indexRange,attr"`
	}
	// this might not exist, or might be under AdaptationSet
	SegmentTemplate *SegmentTemplate
	// this might not exist
	Width int `xml:"width,attr"`
}

type SegmentTemplate added in v1.15.2

type SegmentTemplate struct {
	Media           string `xml:"media,attr"`
	SegmentTimeline struct {
		S []struct {
			// duration
			D int `xml:"d,attr"`
			// repeat. this may not exist
			R int `xml:"r,attr"`
		}
	}
	StartNumber int `xml:"startNumber,attr"`
	// this may not exist
	Initialization string `xml:"initialization,attr"`
}

Jump to

Keyboard shortcuts

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