Documentation
¶
Overview ¶
Package mpd implements parsing and generating of MPEG-DASH Media Presentation Description (MPD) files.
Index ¶
- type AdaptationSet
- type BaseURL
- type ConditionalUint
- type ContentComponent
- type ContentProtection
- type Descriptor
- type Event
- type EventStream
- type Label
- type MPD
- type MarlinContentId
- type MarlinContentIds
- type Metrics
- type Period
- type Pro
- type ProgramInformation
- type Pssh
- type Range
- type Representation
- type SegmentBase
- type SegmentList
- type SegmentTemplate
- type SegmentTimeline
- type SegmentTimelineS
- type SegmentURL
- type SubRepresentation
- type Subset
- type UrlType
- type UtcTiming
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdaptationSet ¶
type AdaptationSet struct { ID *string `xml:"id,attr,omitempty"` ContentType *string `xml:"contentType,attr,omitempty"` MimeType *string `xml:"mimeType,attr,omitempty"` SegmentAlignment *string `xml:"segmentAlignment,attr,omitempty"` Href *string `xml:"href,attr,omitempty"` Actuate *string `xml:"actuate,attr,omitempty"` Group *int64 `xml:"group,attr,omitempty"` Lang *string `xml:"lang,attr,omitempty"` Par *string `xml:"par,attr,omitempty"` MinBandwidth *int64 `xml:"minBandwidth,attr,omitempty"` MaxBandwidth *int64 `xml:"maxBandwidth,attr,omitempty"` MinWidth *int64 `xml:"minWidth,attr,omitempty"` MaxWidth *int64 `xml:"maxWidth,attr,omitempty"` MinHeight *int64 `xml:"minHeight,attr,omitempty"` MaxHeight *int64 `xml:"maxHeight,attr,omitempty"` MinFrameRate *string `xml:"minFrameRate,attr,omitempty"` MaxFrameRate *string `xml:"maxFrameRate,attr,omitempty"` Labels []*Label `xml:"Label,omitempty"` FramePackings []*Descriptor `xml:"FramePacking,omitempty"` AudioChannelConfigurations []*Descriptor `xml:"AudioChannelConfiguration,omitempty"` ContentProtections []*ContentProtection `xml:"ContentProtection,omitempty"` EssentialProperties []*Descriptor `xml:"EssentialProperty,omitempty"` SupplementalProperties []*Descriptor `xml:"SupplementalProperty,omitempty"` InbandEventStreams []*EventStream `xml:"InbandEventStream,omitempty"` Accessibilities []*Descriptor `xml:"Accessibility,omitempty"` Roles []*Descriptor `xml:"Role,omitempty"` Ratings []*Descriptor `xml:"Rating,omitempty"` Viewpoints []*Descriptor `xml:"Viewpoint,omitempty"` ContentComponents []*ContentComponent `xml:"ContentComponent,omitempty"` BaseURLs []*BaseURL `xml:"BaseURL,omitempty"` SegmentBase *SegmentBase `xml:"SegmentBase,omitempty"` SegmentList *SegmentList `xml:"SegmentList,omitempty"` SegmentTemplate *SegmentTemplate `xml:"SegmentTemplate,omitempty"` Representations []*Representation `xml:"Representation,omitempty"` SubsegmentAlignment *string `xml:"subsegmentAlignment,attr,omitempty"` SubsegmentStartsWithSAP *int64 `xml:"subsegmentStartsWithSAP,attr,omitempty"` BitstreamSwitching *bool `xml:"bitstreamSwitching,attr,omitempty"` Profiles *string `xml:"profiles,attr"` Width *uint64 `xml:"width,attr"` Height *uint64 `xml:"height,attr"` // Sample Aspect Ratio: aspect ratio of one pixel (typically 1:1) SAR *string `xml:"sar,attr"` FrameRate *string `xml:"frameRate,attr"` AudioSamplingRate *string `xml:"audioSamplingRate,attr"` SegmentProfiles *string `xml:"segmentProfiles,attr"` Codecs *string `xml:"codecs,attr"` MaximumSapPeriod *float64 `xml:"maximumSAPPeriod,attr"` StartWithSap *uint64 `xml:"startWithSAP,attr"` MaxPlayoutRate *float64 `xml:"maxPlayoutRate,attr"` CodingDependency *bool `xml:"codingDependency,attr"` ScanType *string `xml:"scanType,attr"` }
AdaptationSet represents XSD's AdaptationSetType.
type BaseURL ¶
type BaseURL struct { Value string `xml:",chardata"` ServiceLocation *string `xml:"serviceLocation,attr"` ByteRange *string `xml:"byteRange,attr"` AvailabilityTimeOffset *uint64 `xml:"availabilityTimeOffset,attr"` AvailabilityTimeComplete *bool `xml:"availabilityTimeComplete,attr"` }
BaseURL represents XSD's BaseURLType.
type ConditionalUint ¶
type ConditionalUint struct {
// contains filtered or unexported fields
}
ConditionalUint (ConditionalUintType) defined in XSD as a union of unsignedInt and boolean.
func (ConditionalUint) MarshalXMLAttr ¶
MarshalXMLAttr encodes ConditionalUint.
func (*ConditionalUint) UnmarshalXMLAttr ¶
func (c *ConditionalUint) UnmarshalXMLAttr(attr xml.Attr) error
UnmarshalXMLAttr decodes ConditionalUint.
type ContentComponent ¶
type ContentComponent struct { Accessibilities []*Descriptor `xml:"Accessibility,omitempty"` Roles []*Descriptor `xml:"Role,omitempty"` Ratings []*Descriptor `xml:"Rating,omitempty"` Viewpoints []*Descriptor `xml:"Viewpoint,omitempty"` ID *int64 `xml:"id,attr,omitempty"` Lang *string `xml:"lang,attr,omitempty"` ContentType *string `xml:"contentType,attr,omitempty"` Par *string `xml:"par,attr,omitempty"` }
ContentComponent represents XSD's ContentComponentType.
type ContentProtection ¶
type ContentProtection struct { SchemeIDURI *string `xml:"schemeIdUri,attr"` Value *string `xml:"value,attr"` Cenc *string `xml:"cenc,attr"` CencPSSH *string `xml:"cenc:pssh,attr"` CencDefaultKID *string `xml:"cenc:default_KID,attr"` DefaultKID *string `xml:"default_KID,attr"` CencPsshBody *string `xml:"cenc:pssh,omitempty"` PsshBody *Pssh `xml:"pssh,omitempty"` Pro *Pro `xml:"pro,omitempty"` MsprPro *string `xml:"mspr:pro,omitempty"` MarlinContentIds []*MarlinContentIds `xml:"MarlinContentIds,omitempty"` MasMarlinContentIds []*MarlinContentIds `xml:"mas:MarlinContentIds,omitempty"` }
type Descriptor ¶
type Descriptor struct { SchemeIDURI *string `xml:"schemeIdUri,attr"` Value *string `xml:"value,attr"` }
Descriptor represents XSD's DescriptorType.
type EventStream ¶
type MPD ¶
type MPD struct { XMLNS *string `xml:"xmlns,attr"` XMLNSXSI *string `xml:"xmlns:xsi,attr"` Ns2 *string `xml:"ns2,attr"` Xsi *string `xml:"xsi,attr"` XsiSchemaLocation *string `xml:"xsi:schemaLocation,attr"` SchemaLocation *string `xml:"schemaLocation,attr"` Type *string `xml:"type,attr"` MinimumUpdatePeriod *string `xml:"minimumUpdatePeriod,attr"` AvailabilityStartTime *string `xml:"availabilityStartTime,attr"` AvailabilityEndTime *string `xml:"availabilityEndTime,attr"` MediaPresentationDuration *string `xml:"mediaPresentationDuration,attr"` MinBufferTime *string `xml:"minBufferTime,attr"` SuggestedPresentationDelay *string `xml:"suggestedPresentationDelay,attr"` TimeShiftBufferDepth *string `xml:"timeShiftBufferDepth,attr"` PublishTime *string `xml:"publishTime,attr"` Profiles *string `xml:"profiles,attr"` Id *string `xml:"id,attr"` MaxSegmentDuration *string `xml:"maxSegmentDuration,attr"` MaxSubsegmentDuration *string `xml:"maxSubsegmentDuration,attr"` BaseURL []*BaseURL `xml:"BaseURL,omitempty"` Period []*Period `xml:"Period,omitempty"` ProgramInformations []*ProgramInformation `xml:"ProgramInformation,omitempty"` Locations []*string `xml:"Location,omitempty"` Metrics []*Metrics `xml:"Metrics,omitempty"` EssentialProperties []*Descriptor `xml:"EssentialProperty,omitempty"` SupplementalProperties []*Descriptor `xml:"SupplementalProperty,omitempty"` UtcTimings []*UtcTiming `xml:"UTCTiming,omitempty"` XmlnsCenc *string `xml:"xmlns:cenc,attr"` Cenc *string `xml:"cenc,attr"` Mspr *string `xml:"mspr,attr"` XmlnsMspr *string `xml:"xmlns:mspr,attr"` Mas *string `xml:"mas,attr"` XmlnsMas *string `xml:"xmlns:mas,attr"` }
MPD represents root XML element.
type MarlinContentId ¶ added in v0.1.4
type MarlinContentId struct {
Value string `xml:",chardata"`
}
type MarlinContentIds ¶ added in v0.1.4
type MarlinContentIds struct { MarlinContentId *MarlinContentId `xml:"MarlinContentId,omitempty"` MasMarlinContentId *MarlinContentId `xml:"mas:MarlinContentId,omitempty"` }
type Metrics ¶
type Metrics struct { Reportings []*Descriptor `xml:"Reporting,omitempty"` Ranges []*Range `xml:"Range,omitempty"` Metrics string `xml:"metrics,attr"` }
type Period ¶
type Period struct { ID *string `xml:"id,attr"` Start *string `xml:"start,attr"` Duration *string `xml:"duration,attr"` Href *string `xml:"href,attr"` Actuate *string `xml:"actuate,attr"` BitStreamSwitching *bool `xml:"bitstreamSwitching,attr"` Label *string `xml:"label,attr"` BitmovinCustomXml *string `xml:"bitmovinCustomXml,attr"` AdaptationSets []*AdaptationSet `xml:"AdaptationSet,omitempty"` 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"` EventStreams []*EventStream `xml:"EventStream,omitempty"` Subsets []*Subset `xml:"Subset,omitempty"` SupplementalProperties []*Descriptor `xml:"SupplementalProperty,omitempty"` }
Period represents XSD's PeriodType.
type ProgramInformation ¶
type Representation ¶
type Representation struct { ID *string `xml:"id,attr"` Bandwidth *uint64 `xml:"bandwidth,attr"` Width *uint64 `xml:"width,attr"` Height *uint64 `xml:"height,attr"` Codecs *string `xml:"codecs,attr"` FramePackings []*Descriptor `xml:"framePacking,omitempty"` AudioChannelConfigurations []*Descriptor `xml:"AudioChannelConfiguration,omitempty"` InbandEventStreams []*EventStream `xml:"InbandEventStream,omitempty"` BaseURL []*BaseURL `xml:"BaseURL,omitempty"` SubRepresentations []*SubRepresentation `xml:"SubRepresentation,omitempty"` SegmentBase *SegmentBase `xml:"SegmentBase,omitempty"` EssentialProperties []*Descriptor `xml:"EssentialProperty,omitempty"` SupplementalProperties []*Descriptor `xml:"SupplementalProperty,omitempty"` SegmentList *SegmentList `xml:"SegmentList,omitempty"` ContentProtections []*ContentProtection `xml:"ContentProtection,omitempty"` SegmentTemplate *SegmentTemplate `xml:"SegmentTemplate,omitempty"` FrameRate *string `xml:"frameRate,attr"` AudioSamplingRate *string `xml:"audioSamplingRate,attr"` SAR *string `xml:"sar,attr"` ScanType *string `xml:"scanType,attr"` QualityRanking *uint64 `xml:"qualityRanking,attr"` DependencyId *string `xml:"dependencyId,attr"` MediaStreamStructureId *string `xml:"mediaStreamStructureId,attr"` Profiles *string `xml:"profiles,attr"` MimeType *string `xml:"mimeType,attr"` SegmentProfiles *string `xml:"segmentProfiles,attr"` MaximumSapPeriod *float64 `xml:"maximumSAPPeriod,attr"` StartWithSap *uint64 `xml:"startWithSAP,attr"` MaxPlayoutRate *float64 `xml:"maxPlayoutRate,attr"` CodingDependency *bool `xml:"codingDependency,attr"` }
Representation represents XSD's RepresentationType.
type SegmentBase ¶
type SegmentBase struct { Initialization *UrlType `xml:"Initialization,omitempty"` RepresentationIndex *UrlType `xml:"RepresentationIndex,omitempty"` Timescale *uint64 `xml:"timescale,attr,omitempty"` PresentationTimeOffset *uint64 `xml:"presentationTimeOffset,attr,omitempty"` IndexRange *string `xml:"indexRange,attr,omitempty"` IndexRangeExact *bool `xml:"indexRangeExact,attr,omitempty"` AvailabilityTimeOffset *float64 `xml:"availabilityTimeOffset,attr,omitempty"` AvailabilityTimeComplete *bool `xml:"availabilityTimeComplete,attr,omitempty"` }
type SegmentList ¶
type SegmentList struct { SegmentBase SegmentURLs []*SegmentURL `xml:"SegmentURL,omitempty"` Href *string `xml:"href,attr"` Actuate *string `xml:"actuate,attr"` }
type SegmentTemplate ¶
type SegmentTemplate struct { Duration *uint64 `xml:"duration,attr"` Timescale *uint64 `xml:"timescale,attr"` Media *string `xml:"media,attr"` Initialization *string `xml:"initialization,attr"` StartNumber *uint64 `xml:"startNumber,attr"` PresentationTimeOffset *uint64 `xml:"presentationTimeOffset,attr"` SegmentTimeline *SegmentTimeline `xml:"SegmentTimeline,omitempty"` }
SegmentTemplate represents XSD's SegmentTemplateType.
type SegmentTimeline ¶
type SegmentTimeline struct {
S []*SegmentTimelineS `xml:"S"`
}
SegmentTimeline represents XSD's SegmentTimelineType.
type SegmentTimelineS ¶
type SegmentTimelineS struct { T *uint64 `xml:"t,attr"` D uint64 `xml:"d,attr"` R *int64 `xml:"r,attr"` }
SegmentTimelineS represents XSD's SegmentTimelineType's inner S elements.