dash

package module
v1.22.6 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: OSL-3.0 Imports: 8 Imported by: 0

README

DASH

ISO/IEC 23009-1:2019
ISO/IEC 23009-1:2022

contact

email
srpen6@gmail.com
Discord
srpen6
https://discord.com/invite/WWq6rFb8Rf

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdaptationSet

type AdaptationSet struct {
	Codecs         *string `xml:"codecs,attr"`
	Height         *int64  `xml:"height,attr"`
	Lang           *string `xml:"lang,attr"`
	MimeType       *string `xml:"mimeType,attr"`
	Representation []*Representation
	Role           *struct {
		Value string `xml:"value,attr"`
	}
	SegmentTemplate *SegmentTemplate
	Width           *int64 `xml:"width,attr"`
	// contains filtered or unexported fields
}

func (AdaptationSet) GetPeriod added in v1.22.6

func (a AdaptationSet) GetPeriod() *Period

type MPD added in v1.22.6

type MPD struct {
	BaseUrl                   *URL   `xml:"BaseURL"`
	MediaPresentationDuration string `xml:"mediaPresentationDuration,attr"`
	Period                    []*Period
}

func (*MPD) Unmarshal added in v1.22.6

func (m *MPD) Unmarshal(data []byte) error

type Period added in v1.22.6

type Period struct {
	AdaptationSet []*AdaptationSet
	Duration      *string `xml:"duration,attr"`
	// contains filtered or unexported fields
}

func (Period) GetMpd added in v1.22.6

func (p Period) GetMpd() *MPD

func (Period) Seconds added in v1.22.6

func (p Period) Seconds() (float64, error)

filter out ads, for example: hulu.com/watch/5add1b6c-04f2-4038-a925-35db3007d662

type Range added in v1.22.6

type Range struct {
	Start uint64
	End   uint64
}

SegmentIndexBox uses: unsigned int(32) subsegment_duration; but range values can exceed 32 bits

func (Range) MarshalText added in v1.22.6

func (r Range) MarshalText() ([]byte, error)

func (*Range) UnmarshalText added in v1.22.6

func (r *Range) UnmarshalText(text []byte) error

type Representation

type Representation struct {
	Bandwidth       int64   `xml:"bandwidth,attr"`
	BaseUrl         *string `xml:"BaseURL"`
	Codecs          *string `xml:"codecs,attr"`
	Height          *int64  `xml:"height,attr"`
	ID              string  `xml:"id,attr"`
	MimeType        *string `xml:"mimeType,attr"`
	SegmentBase     *SegmentBase
	SegmentTemplate *SegmentTemplate
	Width           *int64 `xml:"width,attr"`
	// contains filtered or unexported fields
}

func (Representation) Ext

func (r Representation) Ext() (string, bool)

func (Representation) GetAdaptationSet added in v1.22.6

func (r Representation) GetAdaptationSet() *AdaptationSet

func (Representation) GetSegmentTemplate added in v1.22.6

func (r Representation) GetSegmentTemplate() (*SegmentTemplate, bool)

func (Representation) String

func (r Representation) String() string

type SegmentBase added in v1.22.6

type SegmentBase struct {
	IndexRange     Range `xml:"indexRange,attr"`
	Initialization struct {
		Range Range `xml:"range,attr"`
	}
}

type SegmentTemplate

type SegmentTemplate struct {
	Duration        *float64 `xml:"duration,attr"`
	Initialization  *string  `xml:"initialization,attr"`
	Media           string   `xml:"media,attr"`
	SegmentTimeline *struct {
		S []struct {
			D int  `xml:"d,attr"` // duration
			R *int `xml:"r,attr"` // repeat
		}
	}
	Timescale              *float64 `xml:"timescale,attr"`
	StartNumber            *int     `xml:"startNumber,attr"`
	PresentationTimeOffset int      `xml:"presentationTimeOffset,attr"`
}

func (SegmentTemplate) GetInitialization added in v1.22.6

func (s SegmentTemplate) GetInitialization(r *Representation) (string, bool)

func (SegmentTemplate) GetMedia added in v1.22.6

func (s SegmentTemplate) GetMedia(r *Representation) ([]string, error)

type URL added in v1.22.6

type URL struct {
	URL *url.URL
}

func (*URL) UnmarshalText added in v1.22.6

func (u *URL) UnmarshalText(text []byte) error

Jump to

Keyboard shortcuts

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