68
68
69
69
type MPD struct {
70
70
XMLNs * string `xml:"xmlns,attr"`
71
+ Scte35NS * Scte35NS `xml:"scte35,attr,omitempty"`
72
+ XsiNS * XsiNS `xml:"xsi,attr,omitempty"`
73
+ XsiSchemaLocation * XsiSL `xml:"schemaLocation,attr,omitempty"`
71
74
Profiles * string `xml:"profiles,attr"`
72
75
Type * string `xml:"type,attr"`
73
76
MediaPresentationDuration * string `xml:"mediaPresentationDuration,attr"`
@@ -82,18 +85,56 @@ type MPD struct {
82
85
period * Period
83
86
Periods []* Period `xml:"Period,omitempty"`
84
87
UTCTiming * DescriptorType `xml:"UTCTiming,omitempty"`
88
+ ID string `xml:"id,attr,omitempty"`
89
+ }
90
+
91
+ type XsiNS struct {
92
+ XmlName xml.Name
93
+ Value string
94
+ }
95
+
96
+ func (s * XsiNS ) UnmarshalXMLAttr (attr xml.Attr ) error {
97
+ s .XmlName = attr .Name
98
+ s .Value = attr .Value
99
+ return nil
100
+ }
101
+
102
+ func (s * XsiNS ) MarshalXMLAttr (name xml.Name ) (xml.Attr , error ) {
103
+ if strings .Contains (s .XmlName .Local , "xsi" ) {
104
+ return xml.Attr {Name : xml.Name {Local : "xmlns:xsi" }, Value : s .Value }, nil
105
+ }
106
+ return xml.Attr {}, nil
107
+ }
108
+
109
+ type XsiSL struct {
110
+ XmlName xml.Name
111
+ Value string
112
+ }
113
+
114
+ func (s * XsiSL ) UnmarshalXMLAttr (attr xml.Attr ) error {
115
+ s .XmlName = attr .Name
116
+ s .Value = attr .Value
117
+ return nil
118
+ }
119
+
120
+ func (s * XsiSL ) MarshalXMLAttr (name xml.Name ) (xml.Attr , error ) {
121
+ if strings .Contains (s .XmlName .Local , "schemaLocation" ) {
122
+ return xml.Attr {Name : xml.Name {Local : "xsi:schemaLocation" }, Value : s .Value }, nil
123
+ }
124
+ return xml.Attr {}, nil
85
125
}
86
126
87
127
type Period struct {
88
- ID string `xml:"id,attr,omitempty"`
89
- Duration Duration `xml:"duration,attr,omitempty"`
90
- Start * Duration `xml:"start,attr,omitempty"`
91
- BaseURL string `xml:"BaseURL,omitempty"`
92
- SegmentBase * SegmentBase `xml:"SegmentBase,omitempty"`
93
- SegmentList * SegmentList `xml:"SegmentList,omitempty"`
94
- SegmentTemplate * SegmentTemplate `xml:"SegmentTemplate,omitempty"`
95
- AdaptationSets []* AdaptationSet `xml:"AdaptationSet,omitempty"`
96
- EventStreams []EventStream `xml:"EventStream,omitempty"`
128
+ SupplementalProperty []DescriptorType `xml:"SupplementalProperty,omitempty"`
129
+ ID string `xml:"id,attr,omitempty"`
130
+ Duration Duration `xml:"duration,attr,omitempty"`
131
+ Start * Duration `xml:"start,attr,omitempty"`
132
+ BaseURL string `xml:"BaseURL,omitempty"`
133
+ SegmentBase * SegmentBase `xml:"SegmentBase,omitempty"`
134
+ SegmentList * SegmentList `xml:"SegmentList,omitempty"`
135
+ SegmentTemplate * SegmentTemplate `xml:"SegmentTemplate,omitempty"`
136
+ AdaptationSets []* AdaptationSet `xml:"AdaptationSet,omitempty"`
137
+ EventStreams []EventStream `xml:"EventStream,omitempty"`
97
138
}
98
139
99
140
type DescriptorType struct {
@@ -115,6 +156,7 @@ type CommonAttributesAndElements struct {
115
156
Codecs * string `xml:"codecs,attr"`
116
157
MaximumSAPPeriod * string `xml:"maximumSAPPeriod,attr"`
117
158
StartWithSAP * int64 `xml:"startWithSAP,attr"`
159
+ SubsegmentStartsWithSAP * int64 `xml:"subsegmentStartsWithSAP,attr,omitempty"`
118
160
MaxPlayoutRate * string `xml:"maxPlayoutRate,attr"`
119
161
ScanType * string `xml:"scanType,attr"`
120
162
FramePacking []DescriptorType `xml:"FramePacking,omitempty"`
@@ -167,26 +209,28 @@ type dtoAdaptationSet struct {
167
209
168
210
type AdaptationSet struct {
169
211
CommonAttributesAndElements
170
- XMLName xml.Name `xml:"AdaptationSet"`
171
- ID * string `xml:"id,attr"`
172
- SegmentAlignment * bool `xml:"segmentAlignment,attr"`
173
- Lang * string `xml:"lang,attr"`
174
- Group * string `xml:"group,attr"`
175
- PAR * string `xml:"par,attr"`
176
- MinBandwidth * string `xml:"minBandwidth,attr"`
177
- MaxBandwidth * string `xml:"maxBandwidth,attr"`
178
- MinWidth * string `xml:"minWidth,attr"`
179
- MaxWidth * string `xml:"maxWidth,attr"`
180
- MinHeight * string `xml:"minHeight,attr"`
181
- MaxHeight * string `xml:"maxHeight,attr"`
182
- ContentType * string `xml:"contentType,attr"`
183
- SelectionPriority * uint64 `xml:"selectionPriority,attr"`
184
- Roles []* Role `xml:"Role,omitempty"`
185
- SegmentBase * SegmentBase `xml:"SegmentBase,omitempty"`
186
- SegmentList * SegmentList `xml:"SegmentList,omitempty"`
187
- SegmentTemplate * SegmentTemplate `xml:"SegmentTemplate,omitempty"` // Live Profile Only
188
- Representations []* Representation `xml:"Representation,omitempty"`
189
- AccessibilityElems []* Accessibility `xml:"Accessibility,omitempty"`
212
+ XMLName xml.Name `xml:"AdaptationSet"`
213
+ ID * string `xml:"id,attr"`
214
+ SegmentAlignment * bool `xml:"segmentAlignment,attr"`
215
+ SubsegmentAlignment * bool `xml:"subsegmentAlignment,attr,omitempty"`
216
+ BitstreamSwitching * bool `xml:"bitstreamSwitching,attr,omitempty"`
217
+ Lang * string `xml:"lang,attr"`
218
+ Group * string `xml:"group,attr"`
219
+ PAR * string `xml:"par,attr"`
220
+ MinBandwidth * string `xml:"minBandwidth,attr"`
221
+ MaxBandwidth * string `xml:"maxBandwidth,attr"`
222
+ MinWidth * string `xml:"minWidth,attr"`
223
+ MaxWidth * string `xml:"maxWidth,attr"`
224
+ MinHeight * string `xml:"minHeight,attr"`
225
+ MaxHeight * string `xml:"maxHeight,attr"`
226
+ ContentType * string `xml:"contentType,attr"`
227
+ SelectionPriority * uint64 `xml:"selectionPriority,attr"`
228
+ Roles []* Role `xml:"Role,omitempty"`
229
+ SegmentBase * SegmentBase `xml:"SegmentBase,omitempty"`
230
+ SegmentList * SegmentList `xml:"SegmentList,omitempty"`
231
+ SegmentTemplate * SegmentTemplate `xml:"SegmentTemplate,omitempty"` // Live Profile Only
232
+ Representations []* Representation `xml:"Representation,omitempty"`
233
+ AccessibilityElems []* Accessibility `xml:"Accessibility,omitempty"`
190
234
}
191
235
192
236
func (as * AdaptationSet ) UnmarshalXML (d * xml.Decoder , start xml.StartElement ) error {
0 commit comments