Documentation
¶
Overview ¶
Package mpd parses, manipulates and builds MPEG-DASH (ISO/IEC 23009-1 5th edition) manifests.
Index ¶
- Variables
- type AdaptationSet
- type AudioChannelConfiguration
- type AudioSamplingRate
- type BaseURL
- type Codecs
- type ContentComponent
- type ContentEncoding
- type ContentPopularityRate
- type ContentProtection
- type ContentType
- type Descriptor
- type Event
- type EventStream
- type ExtendedBandwidth
- type FCS
- type FailoverContent
- type FourCC
- type FrameRate
- type InitializationSet
- type Label
- type Latency
- type LeapSecondInformation
- type ListOf4CC
- type ListOfProfiles
- type MIMEType
- type MPD
- type Metrics
- type ModelPair
- type MultipleSegmentBase
- type Namespace
- type OperatingBandwidth
- type OperatingBandwidthMediaType
- type OperatingQuality
- type OperatingQualityMediaType
- type PR
- type PatchLocation
- type Period
- type PlaybackRate
- type Preselection
- type PreselectionOrder
- type PresentationType
- type ProducerReferenceTime
- type ProducerReferenceTimeType
- type Profile
- type ProgramInformation
- type RFC6838ContentType
- type RandomAccess
- type RandomAccessType
- type Range
- type Ratio
- type Representation
- type RepresentationBase
- type Resync
- type S
- type SAPType
- type SCTE35Signal
- type SchemeIDURI
- type SegmentBase
- type SegmentList
- type SegmentTemplate
- type SegmentTimeline
- type SegmentURL
- type Selection
- type SelectionInfo
- type ServiceDescription
- type SingleRFC7233Range
- type Source
- type StringVector
- type SubRepresentation
- type Subset
- type Switching
- type SwitchingType
- type Tag
- type UIntPairsWithID
- type UIntVWithID
- type UIntVector
- type URL
- type VideoScan
- type XLinkActuate
- type XLinkShow
- type XLinkType
Examples ¶
Constants ¶
This section is empty.
Variables ¶
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"` XLinkHref string `xml:"http://www.w3.org/1999/xlink xlink:href,attr,omitempty"` // XLinkActuate defaults to OnRequestXLinkActuate. XLinkActuate XLinkActuate `xml:"http://www.w3.org/1999/xlink xlink:actuate,attr,omitempty"` // XLinkType must be SimpleXLinkType. XLinkType XLinkType `xml:"http://www.w3.org/1999/xlink xlink:type,attr,omitempty"` // XLinkShow must be EmbedXLinkShow. XLinkShow XLinkShow `xml:"http://www.w3.org/1999/xlink xlink:show,attr,omitempty"` ID uint `xml:"id,attr,omitempty"` Group uint `xml:"group,attr,omitempty"` Lang string `xml:"lang,attr,omitempty"` ContentType ContentType `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 defaults to `false`. SegmentAlignment bool `xml:"segmentAlignment,attr,omitempty"` // SubsegmentAlignment defaults to `false`. SubsegmentAlignment bool `xml:"subsegmentAlignment,attr,omitempty"` // SubsegmentStartsWithSAP defaults to `0`. SubsegmentStartsWithSAP uint `xml:"subsegmentStartsWithSAP,attr,omitempty"` BitstreamSwitching bool `xml:"bitstreamSwitching,attr,omitempty"` InitializationSetRef UIntVector `xml:"initializationSetRef,attr,omitempty"` InitializationPrincipal string `xml:"initializationPrincipal,attr,omitempty"` }
type AudioChannelConfiguration ¶
type AudioChannelConfiguration string
const DASH2011AudioChannelConfiguration AudioChannelConfiguration = "urn:mpeg:dash:23003:3:audio_channel_configuration:2011"
type AudioSamplingRate ¶
type AudioSamplingRate UIntVector
type BaseURL ¶
type BaseURL struct { Value 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"` TimeShiftBufferDepth string `xml:"timeShiftBufferDepth,attr,omitempty"` // RangeAccess defaults to `false`. RangeAccess bool `xml:"rangeAccess,attr,omitempty"` }
type ContentComponent ¶
type ContentComponent struct { Items []string `xml:",any"` Accessibility []Descriptor `xml:"Accessibility,omitempty"` Role []Descriptor `xml:"Role,omitempty"` Rating []Descriptor `xml:"Rating,omitempty"` Viewpoint []Descriptor `xml:"Viewpoint,omitempty"` Lang string `xml:"lang,attr,omitempty"` ContentType RFC6838ContentType `xml:"contentType,attr,omitempty"` PAR Ratio `xml:"par,attr,omitempty"` Tag Tag `xml:"tag,attr,omitempty"` }
type ContentEncoding ¶
type ContentEncoding string
const Base64ContentEncoding ContentEncoding = "base64"
type ContentPopularityRate ¶
type ContentProtection ¶
type ContentProtection struct { Descriptor MSPro []string `xml:"urn:microsoft:playready mspr:pro,omitempty"` CENCPSSH []string `xml:"urn:mpeg:cenc:2013 cenc:pssh,omitempty"` CENCDefaultKID string `xml:"urn:mpeg:cenc:2013 cenc:default_KID,attr,omitempty"` Robustness string `xml:"robustness,attr,omitempty"` RefID string `xml:"refId,attr,omitempty"` Ref string `xml:"ref,attr,omitempty"` }
type ContentType ¶
type ContentType string
const ( AudioContentType ContentType = "audio" VideoContentType ContentType = "video" SubtitlesContentType ContentType = "text" )
type Descriptor ¶
type Descriptor struct { Items []string `xml:",any"` SchemeIDURI SchemeIDURI `xml:"schemeIdUri,attr,omitempty"` Value string `xml:"value,attr,omitempty"` }
type Event ¶
type Event struct { Items []string `xml:",any"` Value string `xml:",chardata"` SelectionInfo []SelectionInfo `xml:"SelectionInfo,omitempty"` SCTE35Signal []SCTE35Signal `xml:"urn:scte:scte35:2014:xml+bin Signal,omitempty"` ID string `xml:"id,attr,omitempty"` ContentEncoding ContentEncoding `xml:"contentEncoding,attr,omitempty"` // PresentationTime defaults to `0`. PresentationTime uint64 `xml:"presentationTime,attr,omitempty"` Duration uint64 `xml:"duration,attr,omitempty"` MessageData string `xml:"messageData,attr,omitempty"` }
type EventStream ¶
type EventStream struct { Items []string `xml:",any"` Event []Event `xml:"Event,omitempty"` XLinkHref string `xml:"http://www.w3.org/1999/xlink xlink:href,attr,omitempty"` // XLinkActuate defaults to OnRequestXLinkActuate. XLinkActuate XLinkActuate `xml:"http://www.w3.org/1999/xlink xlink:actuate,attr,omitempty"` // XLinkType must be SimpleXLinkType. XLinkType XLinkType `xml:"http://www.w3.org/1999/xlink xlink:type,attr,omitempty"` // XLinkShow must be EmbedXLinkShow. XLinkShow XLinkShow `xml:"http://www.w3.org/1999/xlink xlink:show,attr,omitempty"` SchemeIdURI SchemeIDURI `xml:"schemeIdUri,attr"` Value string `xml:"value,attr,omitempty"` Timescale uint `xml:"timescale,attr,omitempty"` // PresentationTimeOffset defaults to `0`. PresentationTimeOffset uint `xml:"presentationTimeOffset,attr,omitempty"` }
type ExtendedBandwidth ¶
type FailoverContent ¶
type InitializationSet ¶
type InitializationSet struct { RepresentationBase Accessibility []Descriptor `xml:"Accessibility,omitempty"` Role []Descriptor `xml:"Role,omitempty"` Rating []Descriptor `xml:"Rating,omitempty"` Viewpoint []Descriptor `xml:"Viewpoint,omitempty"` XLinkHref string `xml:"http://www.w3.org/1999/xlink xlink:href,attr,omitempty"` // XLinkActuate defaults to OnRequestXLinkActuate. XLinkActuate XLinkActuate `xml:"http://www.w3.org/1999/xlink xlink:actuate,attr,omitempty"` // XLinkType must be SimpleXLinkType. XLinkType XLinkType `xml:"http://www.w3.org/1999/xlink xlink:type,attr,omitempty"` ID uint `xml:"id,attr"` // InAllPeriods defaults to `true`. InAllPeriods bool `xml:"inAllPeriods,attr,omitempty"` ContentType RFC6838ContentType `xml:"contentType,attr,omitempty"` PAR Ratio `xml:"par,attr,omitempty"` MaxWidth uint `xml:"maxWidth,attr,omitempty"` MaxHeight uint `xml:"maxHeight,attr,omitempty"` MaxFrameRate FrameRate `xml:"maxFrameRate,attr,omitempty"` Initialization string `xml:"initialization,attr,omitempty"` }
type Label ¶
type Latency ¶
type LeapSecondInformation ¶
type LeapSecondInformation struct { Items []string `xml:",any"` AvailabilityStartLeapOffset int `xml:"availabilityStartLeapOffset,attr,omitempty"` NextAvailabilityStartLeapOffset int `xml:"nextAvailabilityStartLeapOffset,attr,omitempty"` NextLeapChangeTime string `xml:"nextLeapChangeTime,attr,omitempty"` }
type MPD ¶
type MPD struct { Items []string `xml:",any"` ProgramInformation []ProgramInformation `xml:"ProgramInformation,omitempty"` BaseURL []BaseURL `xml:"BaseURL,omitempty"` Location []string `xml:"Location,omitempty"` PatchLocation []PatchLocation `xml:"PatchLocation,omitempty"` ServiceDescription []ServiceDescription `xml:"ServiceDescription,omitempty"` InitializationSet []InitializationSet `xml:"InitializationSet,omitempty"` InitializationGroup []UIntVWithID `xml:"InitializationGroup,omitempty"` InitializationPresentation []UIntVWithID `xml:"InitializationPresentation,omitempty"` ContentProtection []ContentProtection `xml:"ContentProtection,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"` LeapSecondInformation *LeapSecondInformation `xml:"LeapSecondInformation,omitempty"` XMLNS Namespace `xml:"xmlns,attr,omitempty"` Profiles Profile `xml:"profiles,attr"` // Type defaults to StaticPresentationType. Type PresentationType `xml:"type,attr,omitempty"` AvailabilityStartTime string `xml:"availabilityStartTime,attr,omitempty"` AvailabilityEndTime string `xml:"availabilityEndTime,attr,omitempty"` PublishTime string `xml:"publishTime,attr,omitempty"` MediaPresentationDuration string `xml:"mediaPresentationDuration,attr,omitempty"` MinimumUpdatePeriod string `xml:"minimumUpdatePeriod,attr,omitempty"` MinBufferTime string `xml:"minBufferTime,attr"` TimeShiftBufferDepth string `xml:"timeShiftBufferDepth,attr,omitempty"` SuggestedPresentationDelay string `xml:"suggestedPresentationDelay,attr,omitempty"` MaxSegmentDuration string `xml:"maxSegmentDuration,attr,omitempty"` MaxSubsegmentDuration string `xml:"maxSubsegmentDuration,attr,omitempty"` }
func New ¶
func New() *MPD
New creates a new instance of MPD and sets the XML namespace to MPD2011Namespace.
Example ¶
example := mpd.New() example.MinBufferTime = "PT2S" example.Period = []mpd.Period{{ID: "period-0"}}
Output:
func Read ¶
func Read(reader io.ReadCloser) (*MPD, error)
Read creates a new instance of MPD and reads the content from an io.ReadCloser.
Example ¶
example, err := mpd.Read(exampleReader) if err != nil { log.Fatalf("%v", err) } fmt.Printf("%s", example.Type)
Output: static
func (*MPD) Bytes ¶
Bytes marshals the MPD to an XML document with indentations.
Example ¶
example := mpd.New() example.Profiles = mpd.OnDemand2011Profile example.Type = mpd.StaticPresentationType example.MinBufferTime = "PT2S" example.Period = []mpd.Period{{ID: "period-0"}} exampleBytes, err := example.Bytes() if err != nil { log.Fatalf("%v", err) } fmt.Printf("%s", exampleBytes)
Output: <?xml version="1.0" encoding="UTF-8"?> <MPD xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:isoff-on-demand:2011" type="static" minBufferTime="PT2S"> <Period id="period-0"></Period> </MPD>
type Metrics ¶
type Metrics struct { Items []string `xml:",any"` Reporting []Descriptor `xml:"Reporting"` Range []Range `xml:"Range,omitempty"` Metrics string `xml:"metrics,attr"` }
type ModelPair ¶
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"` EndNumber uint `xml:"endNumber,attr,omitempty"` }
type Namespace ¶
type Namespace string
const MPD2011Namespace Namespace = "urn:mpeg:dash:schema:mpd:2011"
type OperatingBandwidth ¶
type OperatingBandwidth struct { // MediaType defaults to AllMediaType. MediaType OperatingBandwidthMediaType `xml:"mediaType,attr,omitempty"` Min uint `xml:"min,attr,omitempty"` Max uint `xml:"max,attr,omitempty"` Target uint `xml:"target,attr,omitempty"` }
type OperatingBandwidthMediaType ¶
type OperatingBandwidthMediaType string
const ( VideoOperatingBandwidthMediaType OperatingBandwidthMediaType = "video" AudioOperatingBandwidthMediaType OperatingBandwidthMediaType = "audio" AnyOperatingBandwidthMediaType OperatingBandwidthMediaType = "any" AllOperatingBandwidthMediaType OperatingBandwidthMediaType = "all" )
type OperatingQuality ¶
type OperatingQuality struct { // MediaType defaults to AnyMediaType. MediaType OperatingQualityMediaType `xml:"mediaType,attr,omitempty"` Min uint `xml:"min,attr,omitempty"` Max uint `xml:"max,attr,omitempty"` Target uint `xml:"target,attr,omitempty"` Type string `xml:"type,attr,omitempty"` MaxDifference uint `xml:"maxDifference,attr,omitempty"` }
type OperatingQualityMediaType ¶
type OperatingQualityMediaType string
const ( VideoOperatingQualityMediaType OperatingQualityMediaType = "video" AudioOperatingQualityMediaType OperatingQualityMediaType = "audio" AnyOperatingQualityMediaType OperatingQualityMediaType = "any" )
type PR ¶
type PatchLocation ¶
type Period ¶
type Period struct { Items []string `xml:",any"` 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"` ServiceDescription []ServiceDescription `xml:"ServiceDescription,omitempty"` ContentProtection []ContentProtection `xml:"ContentProtection,omitempty"` AdaptationSet []AdaptationSet `xml:"AdaptationSet,omitempty"` Subset []Subset `xml:"Subset,omitempty"` SupplementalProperty []Descriptor `xml:"SupplementalProperty,omitempty"` EmptyAdaptationSet []AdaptationSet `xml:"EmptyAdaptationSet,omitempty"` GroupLabel []Label `xml:"GroupLabel,omitempty"` Preselection []Preselection `xml:"Preselection,omitempty"` XLinkHref string `xml:"http://www.w3.org/1999/xlink xlink:href,attr,omitempty"` // XLinkActuate defaults to OnRequestXLinkActuate. XLinkActuate XLinkActuate `xml:"http://www.w3.org/1999/xlink xlink:actuate,attr,omitempty"` // XLinkType must be SimpleXLinkType. XLinkType XLinkType `xml:"http://www.w3.org/1999/xlink xlink:type,attr,omitempty"` // XLinkShow must be EmbedXLinkShow. XLinkShow XLinkShow `xml:"http://www.w3.org/1999/xlink xlink:show,attr,omitempty"` ID string `xml:"id,attr,omitempty"` Actuate string `xml:"actuate,attr,omitempty"` Start string `xml:"start,attr,omitempty"` Duration string `xml:"duration,attr,omitempty"` // BitstreamSwitching defaults to `false`. BitstreamSwitching bool `xml:"bitstreamSwitching,attr,omitempty"` }
type PlaybackRate ¶
type Preselection ¶
type Preselection struct { RepresentationBase Accessibility []Descriptor `xml:"Accessibility,omitempty"` Role []Descriptor `xml:"Role,omitempty"` Rating []Descriptor `xml:"Rating,omitempty"` Viewpoint []Descriptor `xml:"Viewpoint,omitempty"` // ID defaults to `1`. ID string `xml:"id,attr,omitempty"` PreselectionComponents StringVector `xml:"preselectionComponents,attr"` Lang string `xml:"lang,attr,omitempty"` // Order defaults to UndefinedPreselectionOrder. Order PreselectionOrder `xml:"order,attr,omitempty"` }
type PreselectionOrder ¶
type PreselectionOrder string
const ( UndefinedPreselectionOrder PreselectionOrder = "undefined" TimeOrderedPreselectionOrder PreselectionOrder = "time-ordered" FullyOrdered PreselectionOrder = "fully-ordered" )
type PresentationType ¶
type PresentationType string
const ( StaticPresentationType PresentationType = "static" DynamicPresentationType PresentationType = "dynamic" )
type ProducerReferenceTime ¶
type ProducerReferenceTime struct { Items []string `xml:",any"` UTCTiming *Descriptor `xml:"UTCTiming,omitempty"` ID uint `xml:"id,attr"` // Inband defaults to `false`. Inband bool `xml:"inband,attr,omitempty"` // Type defaults to EncoderProducerReferenceTimeType. Type ProducerReferenceTimeType `xml:"type,attr,omitempty"` ApplicationScheme string `xml:"applicationScheme,attr,omitempty"` WallClockTime string `xml:"wallClockTime,attr"` PresentationTime uint64 `xml:"presentationTime,attr"` }
type ProducerReferenceTimeType ¶
type ProducerReferenceTimeType string
const ( EncoderProducerReferenceTimeType ProducerReferenceTimeType = "encoder" CapturedProducerReferenceTimeType ProducerReferenceTimeType = "captured" ApplicationProducerReferenceTimeType ProducerReferenceTimeType = "application" )
type ProgramInformation ¶
type RFC6838ContentType ¶
type RFC6838ContentType string
const ( TextRFC6838ContentType RFC6838ContentType = "text" ImageRFC6838ContentType RFC6838ContentType = "image" AudioRFC6838ContentType RFC6838ContentType = "audio" VideoRFC6838ContentType RFC6838ContentType = "video" ApplicationRFC6838ContentType RFC6838ContentType = "application" FontRFC6838ContentType RFC6838ContentType = "font" )
type RandomAccess ¶
type RandomAccess struct { Interval uint `xml:"interval,attr"` // Type defaults to ClosedRandomAccessType. Type RandomAccessType `xml:"type,attr,omitempty"` MinBufferTime string `xml:"minBufferTime,attr,omitempty"` Bandwidth uint `xml:"bandwidth,attr,omitempty"` }
type RandomAccessType ¶
type RandomAccessType string
const ( ClosedRandomAccessType RandomAccessType = "closed" OpenRandomAccessType RandomAccessType = "open" GradualRandomAccessType RandomAccessType = "gradual" )
type Range ¶
type Representation ¶
type Representation struct { RepresentationBase BaseURL []BaseURL `xml:"BaseURL,omitempty"` ExtendedBandwidth []ExtendedBandwidth `xml:"ExtendedBandwidth,omitempty"` SubRepresentation []SubRepresentation `xml:"SubRepresentation,omitempty"` SegmentBase *SegmentBase `xml:"SegmentBase,omitempty"` SegmentList *SegmentList `xml:"SegmentList,omitempty"` SegmentTemplate *SegmentTemplate `xml:"SegmentTemplate,omitempty"` Bandwidth uint `xml:"bandwidth,attr"` ID string `xml:"id,attr,omitempty"` QualityRanking uint `xml:"qualityRanking,attr,omitempty"` DependencyId StringVector `xml:"dependencyId,attr,omitempty"` AssociationId StringVector `xml:"associationId,attr,omitempty"` AssociationType ListOf4CC `xml:"associationType,attr,omitempty"` MediaStreamStructureId StringVector `xml:"mediaStreamStructureId,attr,omitempty"` }
type RepresentationBase ¶
type RepresentationBase struct { Items []string `xml:",any"` FramePacking []Descriptor `xml:"FramePacking,omitempty"` AudioChannelConfiguration []*Descriptor `xml:"AudioChannelConfiguration,omitempty"` ContentProtection []ContentProtection `xml:"ContentProtection,omitempty"` OutputProtection *Descriptor `xml:"OutputProtection,omitempty"` EssentialProperty []Descriptor `xml:"EssentialProperty,omitempty"` SupplementalProperty []Descriptor `xml:"SupplementalProperty,omitempty"` InbandEventStream []EventStream `xml:"InbandEventStream,omitempty"` Switching []Switching `xml:"Switching,omitempty"` RandomAccess []RandomAccess `xml:"RandomAccess,omitempty"` GroupLabel []Label `xml:"GroupLabel,omitempty"` Label []Label `xml:"Label,omitempty"` ProducerReferenceTime []ProducerReferenceTime `xml:"ProducerReferenceTime,omitempty"` ContentPopularityRate []ContentPopularityRate `xml:"ContentPopularityRate,omitempty"` Resync []Resync `xml:"Resync,omitempty"` Profiles ListOfProfiles `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 *AudioSamplingRate `xml:"audioSamplingRate,attr,omitempty"` MIMEType MIMEType `xml:"mimeType,attr,omitempty"` SegmentProfiles *ListOf4CC `xml:"segmentProfiles,attr,omitempty"` Codecs Codecs `xml:"codecs,attr,omitempty"` ContainerProfiles *ListOf4CC `xml:"containerProfiles,attr,omitempty"` MaximumSAPPeriod float64 `xml:"maximumSAPPeriod,attr,omitempty"` StartWithSAP uint `xml:"startWithSAP,attr,omitempty"` MaxPlayoutRate float64 `xml:"maxPlayoutRate,attr,omitempty"` CodingDependency bool `xml:"codingDependency,attr,omitempty"` ScanType VideoScan `xml:"scanType,attr,omitempty"` // SelectionPriority defaults to `1`. SelectionPriority uint `xml:"selectionPriority,attr,omitempty"` Tag Tag `xml:"tag,attr,omitempty"` }
type Resync ¶
type Resync struct { // Type defaults to `0`. Type SAPType `xml:"type,attr,omitempty"` DT float32 `xml:"dT,attr,omitempty"` DIMax float32 `xml:"dImax,attr,omitempty"` // DIMin defaults to `0`. DIMin float32 `xml:"dImin,attr,omitempty"` // Marker defaults to `false`. Marker bool `xml:"marker,attr,omitempty"` }
type S ¶
type SCTE35Signal ¶
type SchemeIDURI ¶
type SchemeIDURI string
const ( AudioChannelConfiguration2011SchemeIDURI SchemeIDURI = "urn:mpeg:dash:23003:3:audio_channel_configuration:2011" MP4Protection2011SchemeIDURI SchemeIDURI = "urn:mpeg:dash:mp4protection:2011" FairPlaySchemeIDURI SchemeIDURI = "urn:uuid:94ce86fb-07ff-4f43-adb8-93d2fa968ca2" PlayReadySchemeIDURI SchemeIDURI = "urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95" WidevineSchemeIDURI SchemeIDURI = "urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed" )
type SegmentBase ¶
type SegmentBase struct { Items []string `xml:",any"` Initialization *URL `xml:"Initialization,omitempty"` RepresentationIndex *URL `xml:"RepresentationIndex,omitempty"` FailoverContent *FailoverContent `xml:"FailoverContent,omitempty"` Timescale uint `xml:"timescale,attr,omitempty"` EPTDelta int `xml:"eptDelta,attr,omitempty"` PDDelta int `xml:"pdDelta,attr,omitempty"` PresentationTimeOffset uint64 `xml:"presentationTimeOffset,attr,omitempty"` PresentationDuration uint64 `xml:"presentationDuration,attr,omitempty"` // IndexRange defaults to `false`. IndexRange SingleRFC7233Range `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 { MultipleSegmentBase Items []string `xml:",any"` SegmentURL []SegmentURL `xml:"SegmentURL,omitempty"` XLinkHref string `xml:"http://www.w3.org/1999/xlink xlink:href,attr,omitempty"` // XLinkActuate defaults to OnRequestXLinkActuate. XLinkActuate XLinkActuate `xml:"http://www.w3.org/1999/xlink xlink:actuate,attr,omitempty"` // XLinkType must be SimpleXLinkType. XLinkType XLinkType `xml:"http://www.w3.org/1999/xlink xlink:type,attr,omitempty"` // XLinkShow must be EmbedXLinkShow. XLinkShow XLinkShow `xml:"http://www.w3.org/1999/xlink xlink:show,attr,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 SegmentURL ¶
type SegmentURL struct { Items []string `xml:",any"` Media string `xml:"media,attr,omitempty"` MediaRange SingleRFC7233Range `xml:"mediaRange,attr,omitempty"` Index string `xml:"index,attr,omitempty"` IndexRange SingleRFC7233Range `xml:"indexRange,attr,omitempty"` }
type Selection ¶
type Selection struct { DataEncoding ContentEncoding `xml:"dataEncoding,attr,omitempty"` Parameter string `xml:"parameter,attr"` Data string `xml:"data,attr"` }
type SelectionInfo ¶
type ServiceDescription ¶
type ServiceDescription struct { Items []string `xml:",any"` Scope []Descriptor `xml:"Scope,omitempty"` Latency []Latency `xml:"Latency,omitempty"` PlaybackRate []PlaybackRate `xml:"PlaybackRate,omitempty"` OperatingQuality []OperatingQuality `xml:"OperatingQuality,omitempty"` OperatingBandwidth []OperatingBandwidth `xml:"OperatingBandwidth,omitempty"` ID uint `xml:"id,attr,omitempty"` }
type SingleRFC7233Range ¶
type SingleRFC7233Range string
SingleRFC7233Range must match the pattern `([0-9]*)(\-([0-9]*))?`.
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 Switching ¶
type Switching struct { Interval uint `xml:"interval,attr"` // Type defaults to MediaSwitchingType. Type SwitchingType `xml:"type,attr,omitempty"` }
type SwitchingType ¶
type SwitchingType string
const ( MediaSwitchingType SwitchingType = "media" BitstreamSwitchingType SwitchingType = "bitstream" )
type UIntPairsWithID ¶
type UIntPairsWithID struct { UIntVector Type string `xml:"type,attr,omitempty"` }
type UIntVWithID ¶
type UIntVWithID struct { UIntVector ID uint `xml:"id,attr"` Profiles ListOfProfiles `xml:"profiles,attr,omitempty"` ContentType RFC6838ContentType `xml:"contentType,attr,omitempty"` }
type URL ¶
type URL struct { Items []string `xml:",any"` SourceURL string `xml:"sourceURL,attr,omitempty"` Range SingleRFC7233Range `xml:"range,attr,omitempty"` }
Directories
¶
Path | Synopsis |
---|---|
third_party
|
|
encoding/xml
Package xml implements a simple XML 1.0 parser that understands XML namespaces.
|
Package xml implements a simple XML 1.0 parser that understands XML namespaces. |
Click to show internal directories.
Click to hide internal directories.