Documentation ¶
Overview ¶
Code generated by XSLT from DASH-MPD.xml. DO NOT EDIT. Package mpd is an autogenerated implementation of the DASH-schema.
Index ¶
- Constants
- Variables
- type AdaptationSet
- type BaseURL
- type ConditionalUint
- type ContentComponent
- type Descriptor
- type Duration
- func (d Duration) Add(dur time.Duration) Duration
- func (d Duration) AddToTime(t time.Time) time.Time
- func (d Duration) Duration() (time.Duration, error)
- func (d Duration) MarshalXMLAttr(name xml.Name) (xml.Attr, error)
- func (d Duration) Scale(dur time.Duration) Duration
- func (d *Duration) UnmarshalXMLAttr(attr xml.Attr) error
- func (d Duration) XMLString() string
- type Event
- type EventStream
- type FrameRate
- type MPD
- type Metrics
- type MultipleSegmentBase
- type Period
- type Presentation
- type ProgramInformation
- type Range
- type Ratio
- type Representation
- type RepresentationBase
- type SAP
- type SegmentBase
- type SegmentList
- type SegmentTemplate
- type SegmentTimeline
- type SegmentURL
- type StringNoWhitespace
- type StringVector
- type SubRepresentation
- type Subset
- type UIntVector
- type URL
- type VideoScan
Constants ¶
const ( Day = 24 * time.Hour Hour = time.Hour Minute = time.Minute Second = time.Second Millisecond = time.Millisecond Microsecond = time.Microsecond Nanosecond = time.Nanosecond )
A copy of various time.Duration constants.
Variables ¶
var FrameRate_Validate = regexp.MustCompile(`[0-9]*[0-9](/[0-9]*[0-9])?`)
var Presentation_Valid = map[string]bool{ "static": true, "dynamic": true, }
var Ratio_Validate = regexp.MustCompile(`[0-9]*:[0-9]*`)
var StringNoWhitespace_Validate = regexp.MustCompile(`[^\r\n\t \p{Z}]*`)
Functions ¶
This section is empty.
Types ¶
type AdaptationSet ¶
type AdaptationSet struct { *RepresentationBase Accessibility []*Descriptor `xml:"Accessibility,omitempty"` Role []*Descriptor `xml:"Role,omitempty"` Rating []*Descriptor `xml:"Rating,omitempty"` Viewpoint []*Descriptor `xml:"Viewpoint,omitempty"` ContentComponent []*ContentComponent `xml:"ContentComponent,omitempty"` BaseURL []*BaseURL `xml:"BaseURL,omitempty"` SegmentBase *SegmentBase `xml:"SegmentBase,omitempty"` SegmentList *SegmentList `xml:"SegmentList,omitempty"` SegmentTemplate *SegmentTemplate `xml:"SegmentTemplate,omitempty"` Representation []*Representation `xml:"Representation,omitempty"` Id uint `xml:"id,attr,omitempty"` Group uint `xml:"group,attr,omitempty"` Lang string `xml:"lang,attr,omitempty"` ContentType string `xml:"contentType,attr,omitempty"` Par Ratio `xml:"par,attr,omitempty"` MinBandwidth uint `xml:"minBandwidth,attr,omitempty"` MaxBandwidth uint `xml:"maxBandwidth,attr,omitempty"` MinWidth uint `xml:"minWidth,attr,omitempty"` MaxWidth uint `xml:"maxWidth,attr,omitempty"` MinHeight uint `xml:"minHeight,attr,omitempty"` MaxHeight uint `xml:"maxHeight,attr,omitempty"` MinFrameRate FrameRate `xml:"minFrameRate,attr,omitempty"` MaxFrameRate FrameRate `xml:"maxFrameRate,attr,omitempty"` SegmentAlignment ConditionalUint `xml:"segmentAlignment,attr,omitempty"` // default: false SubsegmentAlignment ConditionalUint `xml:"subsegmentAlignment,attr,omitempty"` // default: false SubsegmentStartsWithSAP SAP `xml:"subsegmentStartsWithSAP,attr,omitempty"` // default: 0 BitstreamSwitching bool `xml:"bitstreamSwitching,attr,omitempty"` }
type BaseURL ¶
type BaseURL struct { CDATA string `xml:",chardata"` ServiceLocation string `xml:"serviceLocation,attr,omitempty"` ByteRange string `xml:"byteRange,attr,omitempty"` AvailabilityTimeOffset float64 `xml:"availabilityTimeOffset,attr,omitempty"` AvailabilityTimeComplete bool `xml:"availabilityTimeComplete,attr,omitempty"` }
type ConditionalUint ¶
type ConditionalUint string // union {
type ContentComponent ¶
type ContentComponent struct { Accessibility []*Descriptor `xml:"Accessibility,omitempty"` Role []*Descriptor `xml:"Role,omitempty"` Rating []*Descriptor `xml:"Rating,omitempty"` Viewpoint []*Descriptor `xml:"Viewpoint,omitempty"` Id uint `xml:"id,attr,omitempty"` Lang string `xml:"lang,attr,omitempty"` ContentType string `xml:"contentType,attr,omitempty"` Par Ratio `xml:"par,attr,omitempty"` }
type Descriptor ¶
type Duration ¶
type Duration struct {
// contains filtered or unexported fields
}
Duration naively implements the xsd:duration format defined by https://www.w3.org/TR/2004/REC-xmlschema-2-20041028/datatypes.html#duration N.B.: It is not intended to serve as a general xsd:duration as it does not implement the month side of xsd:duration.
func NewDuration ¶
NewDuration returns an mpd.Duration corresponding to the length in months and time.Duration.
It returns an error if the sign of two arguments are different.
func (Duration) AddToTime ¶
AddToTime returns the given time.Time plus the given mpd.Duration value..
func (Duration) Duration ¶
Duration returns the mpd.Duration value as a time.Duration.
If Duration contains a non-zero value for the month side of the xsd:duration, then this function will return an error noting that the value is out of range..
func (Duration) MarshalXMLAttr ¶
MarshalXMLAttr implements xml.MarshalerAttr.
func (*Duration) UnmarshalXMLAttr ¶
UnmarshalXMLAttr implements xml.UnmarshalerAttr.
type EventStream ¶
type MPD ¶
type MPD struct { ProgramInformation []*ProgramInformation `xml:"ProgramInformation,omitempty"` BaseURL []*BaseURL `xml:"BaseURL,omitempty"` Location []string `xml:"Location,omitempty"` Period []*Period `xml:"Period"` Metrics []*Metrics `xml:"Metrics,omitempty"` EssentialProperty []*Descriptor `xml:"EssentialProperty,omitempty"` SupplementalProperty []*Descriptor `xml:"SupplementalProperty,omitempty"` UTCTiming []*Descriptor `xml:"UTCTiming,omitempty"` Id string `xml:"id,attr,omitempty"` Profiles string `xml:"profiles,attr"` Type Presentation `xml:"type,attr,omitempty"` // default: static AvailabilityStartTime time.Time `xml:"availabilityStartTime,attr,omitempty"` AvailabilityEndTime time.Time `xml:"availabilityEndTime,attr,omitempty"` PublishTime time.Time `xml:"publishTime,attr,omitempty"` MediaPresentationDuration Duration `xml:"mediaPresentationDuration,attr,omitempty"` MinimumUpdatePeriod Duration `xml:"minimumUpdatePeriod,attr,omitempty"` MinBufferTime Duration `xml:"minBufferTime,attr"` TimeShiftBufferDepth Duration `xml:"timeShiftBufferDepth,attr,omitempty"` SuggestedPresentationDelay Duration `xml:"suggestedPresentationDelay,attr,omitempty"` MaxSegmentDuration Duration `xml:"maxSegmentDuration,attr,omitempty"` MaxSubsegmentDuration Duration `xml:"maxSubsegmentDuration,attr,omitempty"` }
type Metrics ¶
type Metrics struct { Reporting []*Descriptor `xml:"Reporting"` Range []*Range `xml:"Range,omitempty"` Metrics string `xml:"metrics,attr"` }
type MultipleSegmentBase ¶
type MultipleSegmentBase struct { *SegmentBase SegmentTimeline *SegmentTimeline `xml:"SegmentTimeline,omitempty"` BitstreamSwitching *URL `xml:"BitstreamSwitching,omitempty"` Duration uint `xml:"duration,attr,omitempty"` StartNumber uint `xml:"startNumber,attr,omitempty"` }
type Period ¶
type Period struct { BaseURL []*BaseURL `xml:"BaseURL,omitempty"` SegmentBase *SegmentBase `xml:"SegmentBase,omitempty"` SegmentList *SegmentList `xml:"SegmentList,omitempty"` SegmentTemplate *SegmentTemplate `xml:"SegmentTemplate,omitempty"` AssetIdentifier *Descriptor `xml:"AssetIdentifier,omitempty"` EventStream []*EventStream `xml:"EventStream,omitempty"` AdaptationSet []*AdaptationSet `xml:"AdaptationSet,omitempty"` Subset []*Subset `xml:"Subset,omitempty"` SupplementalProperty []*Descriptor `xml:"SupplementalProperty,omitempty"` Id string `xml:"id,attr,omitempty"` Start Duration `xml:"start,attr,omitempty"` Duration Duration `xml:"duration,attr,omitempty"` BitstreamSwitching bool `xml:"bitstreamSwitching,attr,omitempty"` // default: false }
type Presentation ¶
type Presentation string
type ProgramInformation ¶
type Representation ¶
type Representation struct { *RepresentationBase BaseURL []*BaseURL `xml:"BaseURL,omitempty"` SubRepresentation []*SubRepresentation `xml:"SubRepresentation,omitempty"` SegmentBase *SegmentBase `xml:"SegmentBase,omitempty"` SegmentList *SegmentList `xml:"SegmentList,omitempty"` SegmentTemplate *SegmentTemplate `xml:"SegmentTemplate,omitempty"` Id StringNoWhitespace `xml:"id,attr"` Bandwidth uint `xml:"bandwidth,attr"` QualityRanking uint `xml:"qualityRanking,attr,omitempty"` DependencyId StringVector `xml:"dependencyId,attr,omitempty"` MediaStreamStructureId StringVector `xml:"mediaStreamStructureId,attr,omitempty"` }
type RepresentationBase ¶
type RepresentationBase struct { FramePacking []*Descriptor `xml:"FramePacking,omitempty"` AudioChannelConfiguration []*Descriptor `xml:"AudioChannelConfiguration,omitempty"` ContentProtection []*Descriptor `xml:"ContentProtection,omitempty"` EssentialProperty []*Descriptor `xml:"EssentialProperty,omitempty"` SupplementalProperty []*Descriptor `xml:"SupplementalProperty,omitempty"` InbandEventStream []*EventStream `xml:"InbandEventStream,omitempty"` Profiles string `xml:"profiles,attr,omitempty"` Width uint `xml:"width,attr,omitempty"` Height uint `xml:"height,attr,omitempty"` Sar Ratio `xml:"sar,attr,omitempty"` FrameRate FrameRate `xml:"frameRate,attr,omitempty"` AudioSamplingRate string `xml:"audioSamplingRate,attr,omitempty"` MimeType string `xml:"mimeType,attr,omitempty"` SegmentProfiles string `xml:"segmentProfiles,attr,omitempty"` Codecs string `xml:"codecs,attr,omitempty"` MaximumSAPPeriod float64 `xml:"maximumSAPPeriod,attr,omitempty"` StartWithSAP SAP `xml:"startWithSAP,attr,omitempty"` MaxPlayoutRate float64 `xml:"maxPlayoutRate,attr,omitempty"` CodingDependency bool `xml:"codingDependency,attr,omitempty"` ScanType VideoScan `xml:"scanType,attr,omitempty"` }
type SegmentBase ¶
type SegmentBase struct { Initialization *URL `xml:"Initialization,omitempty"` RepresentationIndex *URL `xml:"RepresentationIndex,omitempty"` Timescale uint `xml:"timescale,attr,omitempty"` PresentationTimeOffset uint64 `xml:"presentationTimeOffset,attr,omitempty"` IndexRange string `xml:"indexRange,attr,omitempty"` IndexRangeExact bool `xml:"indexRangeExact,attr,omitempty"` // default: false AvailabilityTimeOffset float64 `xml:"availabilityTimeOffset,attr,omitempty"` AvailabilityTimeComplete bool `xml:"availabilityTimeComplete,attr,omitempty"` }
type SegmentList ¶
type SegmentList struct { *MultipleSegmentBase SegmentURL []*SegmentURL `xml:"SegmentURL,omitempty"` }
type SegmentTemplate ¶
type SegmentTemplate struct { *MultipleSegmentBase Media string `xml:"media,attr,omitempty"` Index string `xml:"index,attr,omitempty"` Initialization string `xml:"initialization,attr,omitempty"` BitstreamSwitching string `xml:"bitstreamSwitching,attr,omitempty"` }
type SegmentTimeline ¶
type SegmentURL ¶
type StringNoWhitespace ¶
type StringNoWhitespace string
type StringVector ¶
type StringVector []string
type SubRepresentation ¶
type SubRepresentation struct { *RepresentationBase Level uint `xml:"level,attr,omitempty"` DependencyLevel UIntVector `xml:"dependencyLevel,attr,omitempty"` Bandwidth uint `xml:"bandwidth,attr,omitempty"` ContentComponent StringVector `xml:"contentComponent,attr,omitempty"` }
type Subset ¶
type Subset struct { Contains UIntVector `xml:"contains,attr"` Id string `xml:"id,attr,omitempty"` }
type UIntVector ¶
type UIntVector []uint