package dash
import "154.pages.dev/dash"
Index
- type AdaptationSet
- type BaseUrl
- type ContentProtection
- type Duration
- type Mpd
- type Period
- type Pssh
- type Range
-
type Representation
- func Unmarshal(text []byte, base *url.URL) ([]Representation, error)
- func (r Representation) Ext() (string, bool)
- func (r Representation) GetAdaptationSet() *AdaptationSet
- func (r Representation) GetBaseUrl() (*BaseUrl, bool)
- func (r Representation) Initialization() (string, bool)
- func (r Representation) Media() []string
- func (r Representation) String() string
- func (r Representation) Widevine() (Pssh, bool)
- type SegmentBase
- type SegmentTemplate
Types
type AdaptationSet
type AdaptationSet struct { Codecs string `xml:"codecs,attr"` ContentProtection []ContentProtection Height uint64 `xml:"height,attr"` Lang string `xml:"lang,attr"` MaxHeight int `xml:"maxHeight,attr"` MaxWidth int `xml:"maxWidth,attr"` MimeType string `xml:"mimeType,attr"` Representation []Representation Role *struct { Value string `xml:"value,attr"` } SegmentTemplate *SegmentTemplate Width uint64 `xml:"width,attr"` // contains filtered or unexported fields }
func (AdaptationSet) GetPeriod
func (a AdaptationSet) GetPeriod() *Period
type BaseUrl
type BaseUrl struct { Url *url.URL }
func (*BaseUrl) UnmarshalText
func (b *BaseUrl) UnmarshalText(text []byte) error
type ContentProtection
type ContentProtection struct { Pssh Pssh `xml:"pssh"` SchemeIdUri string `xml:"schemeIdUri,attr"` }
type Duration
type Duration struct { Duration time.Duration }
func (*Duration) UnmarshalText
func (d *Duration) UnmarshalText(text []byte) error
type Mpd
type Mpd struct { BaseUrl *BaseUrl `xml:"BaseURL"` MediaPresentationDuration *Duration `xml:"mediaPresentationDuration,attr"` Period []Period }
type Period
type Period struct { AdaptationSet []AdaptationSet BaseUrl *BaseUrl `xml:"BaseURL"` Duration *Duration `xml:"duration,attr"` Id string `xml:"id,attr"` // contains filtered or unexported fields }
type Pssh
type Pssh []byte
func (*Pssh) UnmarshalText
func (p *Pssh) UnmarshalText(src []byte) error
type Range
type Range struct { Start uint64 End uint64 }
SegmentIndexBox uses: unsigned int(32) subsegment_duration; but range values can exceed 32 bits
func (Range) MarshalText
func (r Range) MarshalText() ([]byte, error)
func (*Range) UnmarshalText
func (r *Range) UnmarshalText(text []byte) error
type Representation
type Representation struct { Bandwidth uint64 `xml:"bandwidth,attr"` BaseUrl *BaseUrl `xml:"BaseURL"` Codecs string `xml:"codecs,attr"` ContentProtection []ContentProtection Height uint64 `xml:"height,attr"` Id string `xml:"id,attr"` MimeType string `xml:"mimeType,attr"` SegmentBase *SegmentBase SegmentTemplate *SegmentTemplate Width uint64 `xml:"width,attr"` // contains filtered or unexported fields }
func Unmarshal
func Unmarshal(text []byte, base *url.URL) ([]Representation, error)
func (Representation) Ext
func (r Representation) Ext() (string, bool)
func (Representation) GetAdaptationSet
func (r Representation) GetAdaptationSet() *AdaptationSet
func (Representation) GetBaseUrl
func (r Representation) GetBaseUrl() (*BaseUrl, bool)
func (Representation) Initialization
func (r Representation) Initialization() (string, bool)
func (Representation) Media
func (r Representation) Media() []string
func (Representation) String
func (r Representation) String() string
func (Representation) Widevine
func (r Representation) Widevine() (Pssh, bool)
type SegmentBase
type SegmentBase struct { Initialization struct { Range Range `xml:"range,attr"` } IndexRange Range `xml:"indexRange,attr"` }
type SegmentTemplate
type SegmentTemplate struct { StartNumber uint `xml:"startNumber,attr"` Duration uint64 `xml:"duration,attr"` Initialization string `xml:"initialization,attr"` Media string `xml:"media,attr"` PresentationTimeOffset uint `xml:"presentationTimeOffset,attr"` Timescale uint64 `xml:"timescale,attr"` SegmentTimeline *struct { S []struct { D uint `xml:"d,attr"` // duration R uint `xml:"r,attr"` // repeat } } }