github.com/puellanivis/breton@v0.2.16/lib/net/dash/mpd/mpd.go (about) 1 // Code generated by XSLT from DASH-MPD.xml. DO NOT EDIT. 2 // Package mpd is an autogenerated implementation of the DASH-schema. 3 package mpd 4 5 import ( 6 "regexp" 7 "time" 8 ) 9 10 // Reference imports to suppress errors if they are not otherwise used. 11 var _ = regexp.MustCompile 12 var _ = time.Second 13 14 // mostly computer generated from from http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd 15 16 type Presentation string 17 18 var Presentation_Valid = map[string]bool{ 19 "static": true, 20 "dynamic": true, 21 } 22 23 type Ratio string 24 25 var Ratio_Validate = regexp.MustCompile(`[0-9]*:[0-9]*`) 26 27 type FrameRate string 28 29 var FrameRate_Validate = regexp.MustCompile(`[0-9]*[0-9](/[0-9]*[0-9])?`) 30 31 type ConditionalUint string // union { 32 // uint 33 // bool 34 // } 35 36 type StringNoWhitespace string 37 38 var StringNoWhitespace_Validate = regexp.MustCompile(`[^\r\n\t \p{Z}]*`) 39 40 type SAP uint 41 42 const ( 43 SAP_MinInclusive SAP = 0 44 SAP_MaxInclusive SAP = 6 45 ) 46 47 type VideoScan string 48 49 var VideoScan_Valid = map[string]bool{ 50 "progressive": true, 51 "interlaced": true, 52 "unknown": true, 53 } 54 55 type StringVector []string 56 57 type UIntVector []uint 58 59 type MPD struct { 60 ProgramInformation []*ProgramInformation `xml:"ProgramInformation,omitempty"` 61 BaseURL []*BaseURL `xml:"BaseURL,omitempty"` 62 Location []string `xml:"Location,omitempty"` 63 Period []*Period `xml:"Period"` 64 Metrics []*Metrics `xml:"Metrics,omitempty"` 65 EssentialProperty []*Descriptor `xml:"EssentialProperty,omitempty"` 66 SupplementalProperty []*Descriptor `xml:"SupplementalProperty,omitempty"` 67 UTCTiming []*Descriptor `xml:"UTCTiming,omitempty"` 68 69 Id string `xml:"id,attr,omitempty"` 70 Profiles string `xml:"profiles,attr"` 71 Type Presentation `xml:"type,attr,omitempty"` // default: static 72 AvailabilityStartTime time.Time `xml:"availabilityStartTime,attr,omitempty"` 73 AvailabilityEndTime time.Time `xml:"availabilityEndTime,attr,omitempty"` 74 PublishTime time.Time `xml:"publishTime,attr,omitempty"` 75 MediaPresentationDuration Duration `xml:"mediaPresentationDuration,attr,omitempty"` 76 MinimumUpdatePeriod Duration `xml:"minimumUpdatePeriod,attr,omitempty"` 77 MinBufferTime Duration `xml:"minBufferTime,attr"` 78 TimeShiftBufferDepth Duration `xml:"timeShiftBufferDepth,attr,omitempty"` 79 SuggestedPresentationDelay Duration `xml:"suggestedPresentationDelay,attr,omitempty"` 80 MaxSegmentDuration Duration `xml:"maxSegmentDuration,attr,omitempty"` 81 MaxSubsegmentDuration Duration `xml:"maxSubsegmentDuration,attr,omitempty"` 82 } 83 84 type Period struct { 85 BaseURL []*BaseURL `xml:"BaseURL,omitempty"` 86 SegmentBase *SegmentBase `xml:"SegmentBase,omitempty"` 87 SegmentList *SegmentList `xml:"SegmentList,omitempty"` 88 SegmentTemplate *SegmentTemplate `xml:"SegmentTemplate,omitempty"` 89 AssetIdentifier *Descriptor `xml:"AssetIdentifier,omitempty"` 90 EventStream []*EventStream `xml:"EventStream,omitempty"` 91 AdaptationSet []*AdaptationSet `xml:"AdaptationSet,omitempty"` 92 Subset []*Subset `xml:"Subset,omitempty"` 93 SupplementalProperty []*Descriptor `xml:"SupplementalProperty,omitempty"` 94 95 Id string `xml:"id,attr,omitempty"` 96 Start Duration `xml:"start,attr,omitempty"` 97 Duration Duration `xml:"duration,attr,omitempty"` 98 BitstreamSwitching bool `xml:"bitstreamSwitching,attr,omitempty"` // default: false 99 } 100 101 type EventStream struct { 102 Event []*Event `xml:"Event,omitempty"` 103 104 SchemeIdUri string `xml:"schemeIdUri,attr"` 105 Value string `xml:"value,attr,omitempty"` 106 Timescale uint `xml:"timescale,attr,omitempty"` 107 } 108 109 type Event struct { 110 PresentationTime uint64 `xml:"presentationTime,attr,omitempty"` // default: 0 111 Duration uint64 `xml:"duration,attr,omitempty"` 112 Id uint `xml:"id,attr,omitempty"` 113 MessageData string `xml:"messageData,attr,omitempty"` 114 } 115 116 type AdaptationSet struct { 117 *RepresentationBase 118 119 Accessibility []*Descriptor `xml:"Accessibility,omitempty"` 120 Role []*Descriptor `xml:"Role,omitempty"` 121 Rating []*Descriptor `xml:"Rating,omitempty"` 122 Viewpoint []*Descriptor `xml:"Viewpoint,omitempty"` 123 ContentComponent []*ContentComponent `xml:"ContentComponent,omitempty"` 124 BaseURL []*BaseURL `xml:"BaseURL,omitempty"` 125 SegmentBase *SegmentBase `xml:"SegmentBase,omitempty"` 126 SegmentList *SegmentList `xml:"SegmentList,omitempty"` 127 SegmentTemplate *SegmentTemplate `xml:"SegmentTemplate,omitempty"` 128 Representation []*Representation `xml:"Representation,omitempty"` 129 130 Id uint `xml:"id,attr,omitempty"` 131 Group uint `xml:"group,attr,omitempty"` 132 Lang string `xml:"lang,attr,omitempty"` 133 ContentType string `xml:"contentType,attr,omitempty"` 134 Par Ratio `xml:"par,attr,omitempty"` 135 MinBandwidth uint `xml:"minBandwidth,attr,omitempty"` 136 MaxBandwidth uint `xml:"maxBandwidth,attr,omitempty"` 137 MinWidth uint `xml:"minWidth,attr,omitempty"` 138 MaxWidth uint `xml:"maxWidth,attr,omitempty"` 139 MinHeight uint `xml:"minHeight,attr,omitempty"` 140 MaxHeight uint `xml:"maxHeight,attr,omitempty"` 141 MinFrameRate FrameRate `xml:"minFrameRate,attr,omitempty"` 142 MaxFrameRate FrameRate `xml:"maxFrameRate,attr,omitempty"` 143 SegmentAlignment ConditionalUint `xml:"segmentAlignment,attr,omitempty"` // default: false 144 SubsegmentAlignment ConditionalUint `xml:"subsegmentAlignment,attr,omitempty"` // default: false 145 SubsegmentStartsWithSAP SAP `xml:"subsegmentStartsWithSAP,attr,omitempty"` // default: 0 146 BitstreamSwitching bool `xml:"bitstreamSwitching,attr,omitempty"` 147 } 148 149 type ContentComponent struct { 150 Accessibility []*Descriptor `xml:"Accessibility,omitempty"` 151 Role []*Descriptor `xml:"Role,omitempty"` 152 Rating []*Descriptor `xml:"Rating,omitempty"` 153 Viewpoint []*Descriptor `xml:"Viewpoint,omitempty"` 154 155 Id uint `xml:"id,attr,omitempty"` 156 Lang string `xml:"lang,attr,omitempty"` 157 ContentType string `xml:"contentType,attr,omitempty"` 158 Par Ratio `xml:"par,attr,omitempty"` 159 } 160 161 type Representation struct { 162 *RepresentationBase 163 164 BaseURL []*BaseURL `xml:"BaseURL,omitempty"` 165 SubRepresentation []*SubRepresentation `xml:"SubRepresentation,omitempty"` 166 SegmentBase *SegmentBase `xml:"SegmentBase,omitempty"` 167 SegmentList *SegmentList `xml:"SegmentList,omitempty"` 168 SegmentTemplate *SegmentTemplate `xml:"SegmentTemplate,omitempty"` 169 170 Id StringNoWhitespace `xml:"id,attr"` 171 Bandwidth uint `xml:"bandwidth,attr"` 172 QualityRanking uint `xml:"qualityRanking,attr,omitempty"` 173 DependencyId StringVector `xml:"dependencyId,attr,omitempty"` 174 MediaStreamStructureId StringVector `xml:"mediaStreamStructureId,attr,omitempty"` 175 } 176 177 type SubRepresentation struct { 178 *RepresentationBase 179 180 Level uint `xml:"level,attr,omitempty"` 181 DependencyLevel UIntVector `xml:"dependencyLevel,attr,omitempty"` 182 Bandwidth uint `xml:"bandwidth,attr,omitempty"` 183 ContentComponent StringVector `xml:"contentComponent,attr,omitempty"` 184 } 185 186 type RepresentationBase struct { 187 FramePacking []*Descriptor `xml:"FramePacking,omitempty"` 188 AudioChannelConfiguration []*Descriptor `xml:"AudioChannelConfiguration,omitempty"` 189 ContentProtection []*Descriptor `xml:"ContentProtection,omitempty"` 190 EssentialProperty []*Descriptor `xml:"EssentialProperty,omitempty"` 191 SupplementalProperty []*Descriptor `xml:"SupplementalProperty,omitempty"` 192 InbandEventStream []*EventStream `xml:"InbandEventStream,omitempty"` 193 194 Profiles string `xml:"profiles,attr,omitempty"` 195 Width uint `xml:"width,attr,omitempty"` 196 Height uint `xml:"height,attr,omitempty"` 197 Sar Ratio `xml:"sar,attr,omitempty"` 198 FrameRate FrameRate `xml:"frameRate,attr,omitempty"` 199 AudioSamplingRate string `xml:"audioSamplingRate,attr,omitempty"` 200 MimeType string `xml:"mimeType,attr,omitempty"` 201 SegmentProfiles string `xml:"segmentProfiles,attr,omitempty"` 202 Codecs string `xml:"codecs,attr,omitempty"` 203 MaximumSAPPeriod float64 `xml:"maximumSAPPeriod,attr,omitempty"` 204 StartWithSAP SAP `xml:"startWithSAP,attr,omitempty"` 205 MaxPlayoutRate float64 `xml:"maxPlayoutRate,attr,omitempty"` 206 CodingDependency bool `xml:"codingDependency,attr,omitempty"` 207 ScanType VideoScan `xml:"scanType,attr,omitempty"` 208 } 209 210 type Subset struct { 211 Contains UIntVector `xml:"contains,attr"` 212 Id string `xml:"id,attr,omitempty"` 213 } 214 215 type SegmentBase struct { 216 Initialization *URL `xml:"Initialization,omitempty"` 217 RepresentationIndex *URL `xml:"RepresentationIndex,omitempty"` 218 219 Timescale uint `xml:"timescale,attr,omitempty"` 220 PresentationTimeOffset uint64 `xml:"presentationTimeOffset,attr,omitempty"` 221 IndexRange string `xml:"indexRange,attr,omitempty"` 222 IndexRangeExact bool `xml:"indexRangeExact,attr,omitempty"` // default: false 223 AvailabilityTimeOffset float64 `xml:"availabilityTimeOffset,attr,omitempty"` 224 AvailabilityTimeComplete bool `xml:"availabilityTimeComplete,attr,omitempty"` 225 } 226 227 type MultipleSegmentBase struct { 228 *SegmentBase 229 230 SegmentTimeline *SegmentTimeline `xml:"SegmentTimeline,omitempty"` 231 BitstreamSwitching *URL `xml:"BitstreamSwitching,omitempty"` 232 233 Duration uint `xml:"duration,attr,omitempty"` 234 StartNumber uint `xml:"startNumber,attr,omitempty"` 235 } 236 237 type URL struct { 238 SourceURL string `xml:"sourceURL,attr,omitempty"` 239 Range string `xml:"range,attr,omitempty"` 240 } 241 242 type SegmentList struct { 243 *MultipleSegmentBase 244 245 SegmentURL []*SegmentURL `xml:"SegmentURL,omitempty"` 246 } 247 248 type SegmentURL struct { 249 Media string `xml:"media,attr,omitempty"` 250 MediaRange string `xml:"mediaRange,attr,omitempty"` 251 Index string `xml:"index,attr,omitempty"` 252 IndexRange string `xml:"indexRange,attr,omitempty"` 253 } 254 255 type SegmentTemplate struct { 256 *MultipleSegmentBase 257 258 Media string `xml:"media,attr,omitempty"` 259 Index string `xml:"index,attr,omitempty"` 260 Initialization string `xml:"initialization,attr,omitempty"` 261 BitstreamSwitching string `xml:"bitstreamSwitching,attr,omitempty"` 262 } 263 264 type SegmentTimeline struct { 265 S []struct { 266 T uint64 `xml:"t,attr,omitempty"` 267 N uint64 `xml:"n,attr,omitempty"` 268 D uint64 `xml:"d,attr"` 269 R int `xml:"r,attr,omitempty"` // default: 0 270 } 271 } 272 273 type BaseURL struct { 274 CDATA string `xml:",chardata"` 275 276 ServiceLocation string `xml:"serviceLocation,attr,omitempty"` 277 ByteRange string `xml:"byteRange,attr,omitempty"` 278 AvailabilityTimeOffset float64 `xml:"availabilityTimeOffset,attr,omitempty"` 279 AvailabilityTimeComplete bool `xml:"availabilityTimeComplete,attr,omitempty"` 280 } 281 282 type ProgramInformation struct { 283 Title string `xml:"Title,omitempty"` 284 Source string `xml:"Source,omitempty"` 285 Copyright string `xml:"Copyright,omitempty"` 286 287 Lang string `xml:"lang,attr,omitempty"` 288 MoreInformationURL string `xml:"moreInformationURL,attr,omitempty"` 289 } 290 291 type Descriptor struct { 292 SchemeIdUri string `xml:"schemeIdUri,attr"` 293 Value string `xml:"value,attr,omitempty"` 294 Id string `xml:"id,attr,omitempty"` 295 } 296 297 type Metrics struct { 298 Reporting []*Descriptor `xml:"Reporting"` 299 Range []*Range `xml:"Range,omitempty"` 300 301 Metrics string `xml:"metrics,attr"` 302 } 303 304 type Range struct { 305 Starttime Duration `xml:"starttime,attr,omitempty"` 306 Duration Duration `xml:"duration,attr,omitempty"` 307 }