Documentation
¶
Index ¶
- Constants
- func AdjustURLPath(refURL url.URL, adjustURL []BaseURLType, relativePath string) (*url.URL, error)
- func GetBoolFromConditionalUintType(v ConditionalUintType) bool
- func GetFrameRate(frameRate string) (float64, error)
- func IsPresentDuration(durationStr string) bool
- func IsPresentTime(val time.Time) bool
- func ParseDuration(durationStr string) (time.Duration, error)
- type ActuateType
- type AdaptationSetType
- type BaseURLType
- type ChunkURL
- type ChunkURLChannel
- type ConditionalUintType
- type ContentComponentType
- type DescriptorType
- type EventStreamType
- type EventType
- type FrameRateType
- type MPDtype
- type MaxBWRepresentationSelector
- type MetricsType
- type MinBWRepresentationSelector
- type MultipleSegmentBaseType
- type PeriodType
- type PresentationType
- type ProgramInformationType
- type RangeType
- type RatioType
- type Reader
- type ReaderContext
- type ReaderFactory
- type RepresentationBaseType
- type RepresentationSelector
- type RepresentationType
- type S
- type SegmentBaseType
- type SegmentListType
- type SegmentTemplateType
- type SegmentTimelineType
- type SegmentURLType
- type StreamSelector
- type StreamSelectorList
- type StringNoWhitespaceType
- type StringVectorType
- type SubRepresentationType
- type SubsetType
- type UIntVectorType
- type URLType
- type VideoScanType
Constants ¶
const ( //MatchResultDontCare - don't care MatchResultDontCare = -1 //MatchResultNotFound - Not found MatchResultNotFound = 0 //MatchResultPartial - found partial MatchResultPartial = 1 //MatchResultFound - found MatchResultFound = 2 )
const ( //LiveProfile - String for Live Profile, Field: MPD@Profiles LiveProfile = "urn:mpeg:dash:profile:isoff-live:2011" //OnDemandProfile - String for OnDemandProfile Profile, Field: MPD@Profiles OnDemandProfile = "urn:mpeg:dash:profile:isoff-ondemand:2011" //RepresentationIDToken - Token part of SegmentTemplate@Media or SegmentTemplate@Index RepresentationIDToken = "$RepresentationID$" //TimeToken - Token part of SegmentTemplate@Media TimeToken = "$Time$" //NumberToken - Token part of SegmentTemplate@Media NumberToken = "$Number$" )
const ( EvtMPDTimelineGapFilled = "MPD_ERR_TIMELINE_GAP" //Filled duration gap EvtMPDTimelineInFuture = "MPD_ERR_TIMELINE_FUTURE" //TimeLine in Future - WC, StartTime EvtMPDTimelineNoLivePointEntries = "MPD_ERR_NO_LIVEPOINT_ENTRIES" //No Entries found EvtMPDPublishTimeOld = "MPD_PUBLISH_TIME_OLD" //Publish time is older than previous EvtMPDNoActivePeriod = "MPD_NO_ACTIVE_PERIOD" //Period active not found EvtMPDNoAdaptAfterFilter = "MPD_NO_ADAPT_AFTER_FILTER" //No AdaptationSets after filter EvtMPDNoRepresentationAfterFilter = "MPD_NO_REPRESENTATION_AFTER_FILTER" //No Representations after filter )
EVENT NAMES
Variables ¶
This section is empty.
Functions ¶
func AdjustURLPath ¶
AdjustURLPath - Adjusts the URL Path to include the pathURL
func GetBoolFromConditionalUintType ¶
func GetBoolFromConditionalUintType(v ConditionalUintType) bool
GetBoolFromConditionalUintType - returns true/false
func GetFrameRate ¶
GetFrameRate - Evaluate Framerate to float
func IsPresentDuration ¶
IsPresentDuration - Checks if Time field is Valid (Non-ZERO)
func IsPresentTime ¶
IsPresentTime - Checks if Time field is Valid (Non-ZERO)
Types ¶
type AdaptationSetType ¶
type AdaptationSetType struct {
Items []string `xml:",any"`
FramePacking []DescriptorType `xml:"urn:mpeg:dash:schema:mpd:2011 FramePacking,omitempty"`
AudioChannelConfiguration []DescriptorType `xml:"urn:mpeg:dash:schema:mpd:2011 AudioChannelConfiguration,omitempty"`
ContentProtection []DescriptorType `xml:"urn:mpeg:dash:schema:mpd:2011 ContentProtection,omitempty"`
EssentialProperty []DescriptorType `xml:"urn:mpeg:dash:schema:mpd:2011 EssentialProperty,omitempty"`
SupplementalProperty []DescriptorType `xml:"urn:mpeg:dash:schema:mpd:2011 SupplementalProperty,omitempty"`
InbandEventStream []EventStreamType `xml:"urn:mpeg:dash:schema:mpd:2011 InbandEventStream,omitempty"`
Accessibility []DescriptorType `xml:"urn:mpeg:dash:schema:mpd:2011 Accessibility,omitempty"`
Role []DescriptorType `xml:"urn:mpeg:dash:schema:mpd:2011 Role,omitempty"`
Rating []DescriptorType `xml:"urn:mpeg:dash:schema:mpd:2011 Rating,omitempty"`
Viewpoint []DescriptorType `xml:"urn:mpeg:dash:schema:mpd:2011 Viewpoint,omitempty"`
ContentComponent []ContentComponentType `xml:"urn:mpeg:dash:schema:mpd:2011 ContentComponent,omitempty"`
BaseURL []BaseURLType `xml:"urn:mpeg:dash:schema:mpd:2011 BaseURL,omitempty"`
SegmentBase SegmentBaseType `xml:"urn:mpeg:dash:schema:mpd:2011 SegmentBase,omitempty"`
SegmentList SegmentListType `xml:"urn:mpeg:dash:schema:mpd:2011 SegmentList,omitempty"`
SegmentTemplate SegmentTemplateType `xml:"urn:mpeg:dash:schema:mpd:2011 SegmentTemplate,omitempty"`
Representation []RepresentationType `xml:"urn:mpeg:dash:schema:mpd:2011 Representation,omitempty"`
Href string `xml:"href,attr,omitempty"`
Actuate ActuateType `xml:"actuate,attr,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 RatioType `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 FrameRateType `xml:"minFrameRate,attr,omitempty"`
MaxFrameRate FrameRateType `xml:"maxFrameRate,attr,omitempty"`
SegmentAlignment ConditionalUintType `xml:"segmentAlignment,attr,omitempty"`
SubsegmentAlignment ConditionalUintType `xml:"subsegmentAlignment,attr,omitempty"`
SubsegmentStartsWithSAP uint `xml:"subsegmentStartsWithSAP,attr,omitempty"`
BitstreamSwitching bool `xml:"bitstreamSwitching,attr,omitempty"`
Profiles string `xml:"profiles,attr,omitempty"`
Width uint `xml:"width,attr,omitempty"`
Height uint `xml:"height,attr,omitempty"`
Sar RatioType `xml:"sar,attr,omitempty"`
FrameRate FrameRateType `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 uint `xml:"startWithSAP,attr,omitempty"`
MaxPlayoutRate float64 `xml:"maxPlayoutRate,attr,omitempty"`
CodingDependency bool `xml:"codingDependency,attr,omitempty"`
ScanType VideoScanType `xml:"scanType,attr,omitempty"`
}
func (*AdaptationSetType) UnmarshalXML ¶
func (t *AdaptationSetType) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type BaseURLType ¶
type BaseURLType 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"`
}
type ChunkURL ¶
type ChunkURL struct {
//ChunkURL - Actual URL
ChunkURL url.URL
//Range - Range Header
Range string
//FetchAt - WallClock Time when URL becomes available
FetchAt time.Time
//Duration - Duration of content available in this URL
Duration time.Duration
}
ChunkURL - URL extracted from MPD for playback
type ConditionalUintType ¶
type ConditionalUintType string
type ContentComponentType ¶
type ContentComponentType struct {
Items []string `xml:",any"`
Accessibility []DescriptorType `xml:"urn:mpeg:dash:schema:mpd:2011 Accessibility,omitempty"`
Role []DescriptorType `xml:"urn:mpeg:dash:schema:mpd:2011 Role,omitempty"`
Rating []DescriptorType `xml:"urn:mpeg:dash:schema:mpd:2011 Rating,omitempty"`
Viewpoint []DescriptorType `xml:"urn:mpeg:dash:schema:mpd:2011 Viewpoint,omitempty"`
Id uint `xml:"id,attr,omitempty"`
Lang string `xml:"lang,attr,omitempty"`
ContentType string `xml:"contentType,attr,omitempty"`
Par RatioType `xml:"par,attr,omitempty"`
}
type DescriptorType ¶
type EventStreamType ¶
type EventStreamType struct {
Items []string `xml:",any"`
Event []EventType `xml:"urn:mpeg:dash:schema:mpd:2011 Event,omitempty"`
Href string `xml:"href,attr,omitempty"`
Actuate ActuateType `xml:"actuate,attr,omitempty"`
SchemeIdUri string `xml:"schemeIdUri,attr"`
Value string `xml:"value,attr,omitempty"`
Timescale uint `xml:"timescale,attr,omitempty"`
}
func (*EventStreamType) UnmarshalXML ¶
func (t *EventStreamType) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type EventType ¶
type EventType struct {
Items []string `xml:",any"`
PresentationTime uint64 `xml:"presentationTime,attr,omitempty"`
Duration uint64 `xml:"duration,attr,omitempty"`
Id uint `xml:"id,attr,omitempty"`
MessageData string `xml:"messageData,attr,omitempty"`
}
func (*EventType) UnmarshalXML ¶
type MPDtype ¶
type MPDtype struct {
Items []string `xml:",any"`
ProgramInformation []ProgramInformationType `xml:"urn:mpeg:dash:schema:mpd:2011 ProgramInformation,omitempty"`
BaseURL []BaseURLType `xml:"urn:mpeg:dash:schema:mpd:2011 BaseURL,omitempty"`
Location []string `xml:"urn:mpeg:dash:schema:mpd:2011 Location,omitempty"`
Period []PeriodType `xml:"urn:mpeg:dash:schema:mpd:2011 Period"`
Metrics []MetricsType `xml:"urn:mpeg:dash:schema:mpd:2011 Metrics,omitempty"`
EssentialProperty []DescriptorType `xml:"urn:mpeg:dash:schema:mpd:2011 EssentialProperty,omitempty"`
SupplementalProperty []DescriptorType `xml:"urn:mpeg:dash:schema:mpd:2011 SupplementalProperty,omitempty"`
UTCTiming []DescriptorType `xml:"urn:mpeg:dash:schema:mpd:2011 UTCTiming,omitempty"`
Id string `xml:"id,attr,omitempty"`
Profiles string `xml:"profiles,attr"`
Type PresentationType `xml:"type,attr,omitempty"`
AvailabilityStartTime time.Time `xml:"availabilityStartTime,attr,omitempty"`
AvailabilityEndTime time.Time `xml:"availabilityEndTime,attr,omitempty"`
PublishTime time.Time `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 ReadMPDFromFile ¶
ReadMPDFromFile - Reads from a File strored into an MPD object returned.
func ReadMPDFromStream ¶
ReadMPDFromStream - Reads from an io.Reader interface into an MPD object returned. r - Must implement the io.Reader interface.
func (*MPDtype) MarshalXML ¶
func (*MPDtype) UnmarshalXML ¶
type MaxBWRepresentationSelector ¶
type MaxBWRepresentationSelector struct {
}
MaxBWRepresentationSelector - Selects the minimum of the available BW
func (MaxBWRepresentationSelector) SelectRepresentation ¶
func (s MaxBWRepresentationSelector) SelectRepresentation(reps []*RepresentationType) *RepresentationType
SelectRepresentation - Selects one of the available representationss
type MetricsType ¶
type MetricsType struct {
Items []string `xml:",any"`
Reporting []DescriptorType `xml:"urn:mpeg:dash:schema:mpd:2011 Reporting"`
Range []RangeType `xml:"urn:mpeg:dash:schema:mpd:2011 Range,omitempty"`
Metrics string `xml:"metrics,attr"`
}
type MinBWRepresentationSelector ¶
type MinBWRepresentationSelector struct {
}
MinBWRepresentationSelector - Selects the minimum of the available BW
func (MinBWRepresentationSelector) SelectRepresentation ¶
func (s MinBWRepresentationSelector) SelectRepresentation(reps []*RepresentationType) *RepresentationType
SelectRepresentation - Selects one of the available representationss
type MultipleSegmentBaseType ¶
type MultipleSegmentBaseType struct {
Items []string `xml:",any"`
Initialization URLType `xml:"urn:mpeg:dash:schema:mpd:2011 Initialization,omitempty"`
RepresentationIndex URLType `xml:"urn:mpeg:dash:schema:mpd:2011 RepresentationIndex,omitempty"`
SegmentTimeline SegmentTimelineType `xml:"urn:mpeg:dash:schema:mpd:2011 SegmentTimeline,omitempty"`
BitstreamSwitching URLType `xml:"urn:mpeg:dash:schema:mpd:2011 BitstreamSwitching,omitempty"`
Duration uint `xml:"duration,attr,omitempty"`
StartNumber uint `xml:"startNumber,attr,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"`
AvailabilityTimeOffset float64 `xml:"availabilityTimeOffset,attr,omitempty"`
AvailabilityTimeComplete bool `xml:"availabilityTimeComplete,attr,omitempty"`
}
func (*MultipleSegmentBaseType) UnmarshalXML ¶
func (t *MultipleSegmentBaseType) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type PeriodType ¶
type PeriodType struct {
Items []string `xml:",any"`
BaseURL []BaseURLType `xml:"urn:mpeg:dash:schema:mpd:2011 BaseURL,omitempty"`
SegmentBase SegmentBaseType `xml:"urn:mpeg:dash:schema:mpd:2011 SegmentBase,omitempty"`
SegmentList SegmentListType `xml:"urn:mpeg:dash:schema:mpd:2011 SegmentList,omitempty"`
SegmentTemplate SegmentTemplateType `xml:"urn:mpeg:dash:schema:mpd:2011 SegmentTemplate,omitempty"`
AssetIdentifier DescriptorType `xml:"urn:mpeg:dash:schema:mpd:2011 AssetIdentifier,omitempty"`
EventStream []EventStreamType `xml:"urn:mpeg:dash:schema:mpd:2011 EventStream,omitempty"`
AdaptationSet []AdaptationSetType `xml:"urn:mpeg:dash:schema:mpd:2011 AdaptationSet,omitempty"`
Subset []SubsetType `xml:"urn:mpeg:dash:schema:mpd:2011 Subset,omitempty"`
SupplementalProperty []DescriptorType `xml:"urn:mpeg:dash:schema:mpd:2011 SupplementalProperty,omitempty"`
Href string `xml:"href,attr,omitempty"`
Actuate ActuateType `xml:"actuate,attr,omitempty"`
Id string `xml:"id,attr,omitempty"`
Start string `xml:"start,attr,omitempty"`
Duration string `xml:"duration,attr,omitempty"`
BitstreamSwitching bool `xml:"bitstreamSwitching,attr,omitempty"`
}
func (*PeriodType) UnmarshalXML ¶
func (t *PeriodType) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type ProgramInformationType ¶
type ProgramInformationType struct {
Items []string `xml:",any"`
Title string `xml:"urn:mpeg:dash:schema:mpd:2011 Title,omitempty"`
Source string `xml:"urn:mpeg:dash:schema:mpd:2011 Source,omitempty"`
Copyright string `xml:"urn:mpeg:dash:schema:mpd:2011 Copyright,omitempty"`
Lang string `xml:"lang,attr,omitempty"`
MoreInformationURL string `xml:"moreInformationURL,attr,omitempty"`
}
type Reader ¶
type Reader interface {
//Update -
// Parameters:
// MPD read
// Return:
// 1: MPD Updated - PublishTime Updated?
// 2: error
Update(*MPDtype) (bool, error)
//MakeDASHReaderContext - Makes Reader Context
// Parameters:
// 1: Context received earlier... if first time pass nil
// 2: StreamSelector for the ContentType to select AdaptationSet
// 3: RepresentationSelector ... selector for Representation
// Return:
// 1: Context for current AdaptationSet,Representation
// 2: error
MakeDASHReaderContext(ReaderContext, StreamSelector, RepresentationSelector) (ReaderContext, error)
//SetStatzAgg - Set StatzAgg for event forwarding
// Parameters;
// StatzAgg
// Return:
// NA
SetStatzAgg(statzAgg statzagg.StatzAgg)
}
Reader - Read any DASH file and get Playback URLs
type ReaderContext ¶
type ReaderContext interface {
//NextURL -
//-- Once end is reached (io.EOF)
//-- MakeDASHReaderContext has to be called again
// Parameters;
// None
// Return:
// 1: Next URL
// 2: error
NextURL() (*ChunkURL, error)
//GetURLs - Get URLs from Current MPD context
//-- Once end of this list is reached
//-- MakeDASHReaderContext has to be called again
// Parameters;
// context for cancellation
// Return:
// 1: Channel of URLs, can be read till closed
// 2: error
NextURLs(context.Context) (<-chan ChunkURL, error)
//GetFramerate - Framerate of content
GetFramerate() float64
//GetContentType - Content Type of content
GetContentType() string
//GetLang - Lang of content
GetLang() string
//GetCodecs - Codecs of content
GetCodecs() string
}
ReaderContext - Unique data for each Reader
type ReaderFactory ¶
type ReaderFactory struct {
//IsLive - Live content?
IsLive bool
//AST - Availablity Start Time - WallClock reference
AST time.Time
//PT - Publish Time - WallClock when MPD wa updated
PT time.Time
//MUP - Minimum Update Period - Polling interval for Manifest update
MUP time.Duration
//MBT - Minimum Buffer Period - Client consideratino for cache level
MBT time.Duration
//MPD - Media Presentation Duration - Presentation Duration
MPD time.Duration
//TSB - Total available duration of content
TSB time.Duration
// contains filtered or unexported fields
}
ReaderFactory - ReaderFactory of DASHReaders
func (*ReaderFactory) GetDASHReader ¶
GetDASHReader - Depending on the MPD contents find the right reader
type RepresentationBaseType ¶
type RepresentationBaseType struct {
Items []string `xml:",any"`
FramePacking []DescriptorType `xml:"urn:mpeg:dash:schema:mpd:2011 FramePacking,omitempty"`
AudioChannelConfiguration []DescriptorType `xml:"urn:mpeg:dash:schema:mpd:2011 AudioChannelConfiguration,omitempty"`
ContentProtection []DescriptorType `xml:"urn:mpeg:dash:schema:mpd:2011 ContentProtection,omitempty"`
EssentialProperty []DescriptorType `xml:"urn:mpeg:dash:schema:mpd:2011 EssentialProperty,omitempty"`
SupplementalProperty []DescriptorType `xml:"urn:mpeg:dash:schema:mpd:2011 SupplementalProperty,omitempty"`
InbandEventStream []EventStreamType `xml:"urn:mpeg:dash:schema:mpd:2011 InbandEventStream,omitempty"`
Profiles string `xml:"profiles,attr,omitempty"`
Width uint `xml:"width,attr,omitempty"`
Height uint `xml:"height,attr,omitempty"`
Sar RatioType `xml:"sar,attr,omitempty"`
FrameRate FrameRateType `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 uint `xml:"startWithSAP,attr,omitempty"`
MaxPlayoutRate float64 `xml:"maxPlayoutRate,attr,omitempty"`
CodingDependency bool `xml:"codingDependency,attr,omitempty"`
ScanType VideoScanType `xml:"scanType,attr,omitempty"`
}
type RepresentationSelector ¶
type RepresentationSelector interface {
SelectRepresentation([]*RepresentationType) *RepresentationType
}
RepresentationSelector - Decides among the list of representations which one to use
type RepresentationType ¶
type RepresentationType struct {
Items []string `xml:",any"`
FramePacking []DescriptorType `xml:"urn:mpeg:dash:schema:mpd:2011 FramePacking,omitempty"`
AudioChannelConfiguration []DescriptorType `xml:"urn:mpeg:dash:schema:mpd:2011 AudioChannelConfiguration,omitempty"`
ContentProtection []DescriptorType `xml:"urn:mpeg:dash:schema:mpd:2011 ContentProtection,omitempty"`
EssentialProperty []DescriptorType `xml:"urn:mpeg:dash:schema:mpd:2011 EssentialProperty,omitempty"`
SupplementalProperty []DescriptorType `xml:"urn:mpeg:dash:schema:mpd:2011 SupplementalProperty,omitempty"`
InbandEventStream []EventStreamType `xml:"urn:mpeg:dash:schema:mpd:2011 InbandEventStream,omitempty"`
BaseURL []BaseURLType `xml:"urn:mpeg:dash:schema:mpd:2011 BaseURL,omitempty"`
SubRepresentation []SubRepresentationType `xml:"urn:mpeg:dash:schema:mpd:2011 SubRepresentation,omitempty"`
SegmentBase SegmentBaseType `xml:"urn:mpeg:dash:schema:mpd:2011 SegmentBase,omitempty"`
SegmentList SegmentListType `xml:"urn:mpeg:dash:schema:mpd:2011 SegmentList,omitempty"`
SegmentTemplate SegmentTemplateType `xml:"urn:mpeg:dash:schema:mpd:2011 SegmentTemplate,omitempty"`
Id StringNoWhitespaceType `xml:"id,attr"`
Bandwidth uint `xml:"bandwidth,attr"`
QualityRanking uint `xml:"qualityRanking,attr,omitempty"`
DependencyId StringVectorType `xml:"dependencyId,attr,omitempty"`
MediaStreamStructureId StringVectorType `xml:"mediaStreamStructureId,attr,omitempty"`
Profiles string `xml:"profiles,attr,omitempty"`
Width uint `xml:"width,attr,omitempty"`
Height uint `xml:"height,attr,omitempty"`
Sar RatioType `xml:"sar,attr,omitempty"`
FrameRate FrameRateType `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 uint `xml:"startWithSAP,attr,omitempty"`
MaxPlayoutRate float64 `xml:"maxPlayoutRate,attr,omitempty"`
CodingDependency bool `xml:"codingDependency,attr,omitempty"`
ScanType VideoScanType `xml:"scanType,attr,omitempty"`
}
type S ¶
type S struct {
T uint64 `xml:"t,attr,omitempty"`
N uint64 `xml:"n,attr,omitempty"`
D uint64 `xml:"d,attr"`
R int `xml:"r,attr,omitempty"`
}
func (*S) UnmarshalXML ¶
type SegmentBaseType ¶
type SegmentBaseType struct {
Items []string `xml:",any"`
Initialization URLType `xml:"urn:mpeg:dash:schema:mpd:2011 Initialization,omitempty"`
RepresentationIndex URLType `xml:"urn:mpeg:dash:schema:mpd:2011 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"`
AvailabilityTimeOffset float64 `xml:"availabilityTimeOffset,attr,omitempty"`
AvailabilityTimeComplete bool `xml:"availabilityTimeComplete,attr,omitempty"`
}
func (*SegmentBaseType) UnmarshalXML ¶
func (t *SegmentBaseType) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type SegmentListType ¶
type SegmentListType struct {
Items []string `xml:",any"`
Initialization URLType `xml:"urn:mpeg:dash:schema:mpd:2011 Initialization,omitempty"`
RepresentationIndex URLType `xml:"urn:mpeg:dash:schema:mpd:2011 RepresentationIndex,omitempty"`
SegmentTimeline SegmentTimelineType `xml:"urn:mpeg:dash:schema:mpd:2011 SegmentTimeline,omitempty"`
BitstreamSwitching URLType `xml:"urn:mpeg:dash:schema:mpd:2011 BitstreamSwitching,omitempty"`
SegmentURL []SegmentURLType `xml:"urn:mpeg:dash:schema:mpd:2011 SegmentURL,omitempty"`
Href string `xml:"href,attr,omitempty"`
Actuate ActuateType `xml:"actuate,attr,omitempty"`
Duration uint `xml:"duration,attr,omitempty"`
StartNumber uint `xml:"startNumber,attr,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"`
AvailabilityTimeOffset float64 `xml:"availabilityTimeOffset,attr,omitempty"`
AvailabilityTimeComplete bool `xml:"availabilityTimeComplete,attr,omitempty"`
}
func (*SegmentListType) UnmarshalXML ¶
func (t *SegmentListType) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type SegmentTemplateType ¶
type SegmentTemplateType struct {
Items []string `xml:",any"`
Initialization URLType `xml:"urn:mpeg:dash:schema:mpd:2011 Initialization,omitempty"`
RepresentationIndex URLType `xml:"urn:mpeg:dash:schema:mpd:2011 RepresentationIndex,omitempty"`
SegmentTimeline SegmentTimelineType `xml:"urn:mpeg:dash:schema:mpd:2011 SegmentTimeline,omitempty"`
BitstreamSwitching URLType `xml:"urn:mpeg:dash:schema:mpd:2011 BitstreamSwitching,omitempty"`
Media string `xml:"media,attr,omitempty"`
Index string `xml:"index,attr,omitempty"`
InitializationAttr string `xml:"initialization,attr,omitempty"`
BitstreamSwitchingAttr string `xml:"bitstreamSwitching,attr,omitempty"`
Duration uint `xml:"duration,attr,omitempty"`
StartNumber uint `xml:"startNumber,attr,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"`
AvailabilityTimeOffset float64 `xml:"availabilityTimeOffset,attr,omitempty"`
AvailabilityTimeComplete bool `xml:"availabilityTimeComplete,attr,omitempty"`
}
func (*SegmentTemplateType) UnmarshalXML ¶
func (t *SegmentTemplateType) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type SegmentTimelineType ¶
type SegmentURLType ¶
type StreamSelector ¶
type StreamSelector struct {
ID string `json:"id,omitempty"`
ContentType string `json:"contentType"`
BitRates []string `json:"bitratesexprs,omitempty"`
Codecs []string `json:"codecsregexs,omitempty"`
Langs []string `json:"langsregexs,omitempty"`
}
StreamSelector - Selection criteria for checking if AdaptationSet is good ContentType - "video","audio", etc... BitRates supported (bps) - 3000000 (for 3mpbs)
if empty anything is accepted e.g. >3000000, <=3000000, ==3000000
Codecs supported - regex
if empty anything is accepted e.g. hvc1*, avc1.*
Langs supported - regex of ISO 639-2 lang code
if empty anything is accepted e.g. eng, spa
func (*StreamSelector) IsMatch ¶
func (s *StreamSelector) IsMatch(adaptSet AdaptationSetType) int
IsMatch - Finds if codecs present and required matches adaptSet : AdaptationSet return -
-1 - Don't Care 0 - Not Found 1 - Partial match 2 - Full match
func (*StreamSelector) IsMatchRepresentation ¶
func (s *StreamSelector) IsMatchRepresentation(representation RepresentationType) int
IsMatchRepresentation - Finds if codecs present and required matches adaptSet : AdaptationSet return -
-1 - Don't Care 0 - Not Found 1 - Partial match 2 - Full match
type StreamSelectorList ¶
type StreamSelectorList []StreamSelector
StreamSelectorList List of streams
func NewStreamSelectorList ¶
func NewStreamSelectorList(filename string) (*StreamSelectorList, error)
NewStreamSelectorList - Loads the StreamSelector configuration from file
func (*StreamSelectorList) GetStream ¶
func (sl *StreamSelectorList) GetStream(contentType string) *StreamSelector
GetStream - Returns the StreamSelector for givne contentType
func (*StreamSelectorList) SelectAdaptationSets ¶
func (sl *StreamSelectorList) SelectAdaptationSets(period PeriodType) ([]*AdaptationSetType, []error)
SelectAdaptationSets - select adaptationSets for the period period : The selected period streams : selection criteria Return: []adaptationSet : selected adaptationSets []error : specific error for each stream
type StringNoWhitespaceType ¶
type StringNoWhitespaceType string
Must match the pattern [^\r\n\t \p{Z}]*
type StringVectorType ¶
type StringVectorType []string
func (*StringVectorType) MarshalText ¶
func (x *StringVectorType) MarshalText() ([]byte, error)
func (*StringVectorType) UnmarshalText ¶
func (x *StringVectorType) UnmarshalText(text []byte) error
type SubRepresentationType ¶
type SubRepresentationType struct {
Items []string `xml:",any"`
FramePacking []DescriptorType `xml:"urn:mpeg:dash:schema:mpd:2011 FramePacking,omitempty"`
AudioChannelConfiguration []DescriptorType `xml:"urn:mpeg:dash:schema:mpd:2011 AudioChannelConfiguration,omitempty"`
ContentProtection []DescriptorType `xml:"urn:mpeg:dash:schema:mpd:2011 ContentProtection,omitempty"`
EssentialProperty []DescriptorType `xml:"urn:mpeg:dash:schema:mpd:2011 EssentialProperty,omitempty"`
SupplementalProperty []DescriptorType `xml:"urn:mpeg:dash:schema:mpd:2011 SupplementalProperty,omitempty"`
InbandEventStream []EventStreamType `xml:"urn:mpeg:dash:schema:mpd:2011 InbandEventStream,omitempty"`
Level uint `xml:"level,attr,omitempty"`
DependencyLevel UIntVectorType `xml:"dependencyLevel,attr,omitempty"`
Bandwidth uint `xml:"bandwidth,attr,omitempty"`
ContentComponent StringVectorType `xml:"contentComponent,attr,omitempty"`
Profiles string `xml:"profiles,attr,omitempty"`
Width uint `xml:"width,attr,omitempty"`
Height uint `xml:"height,attr,omitempty"`
Sar RatioType `xml:"sar,attr,omitempty"`
FrameRate FrameRateType `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 uint `xml:"startWithSAP,attr,omitempty"`
MaxPlayoutRate float64 `xml:"maxPlayoutRate,attr,omitempty"`
CodingDependency bool `xml:"codingDependency,attr,omitempty"`
ScanType VideoScanType `xml:"scanType,attr,omitempty"`
}
type SubsetType ¶
type SubsetType struct {
Contains UIntVectorType `xml:"contains,attr"`
Id string `xml:"id,attr,omitempty"`
}
type UIntVectorType ¶
type UIntVectorType []uint
func (*UIntVectorType) MarshalText ¶
func (x *UIntVectorType) MarshalText() ([]byte, error)
func (*UIntVectorType) UnmarshalText ¶
func (x *UIntVectorType) UnmarshalText(text []byte) error