-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsmooth-manifest.go
42 lines (40 loc) · 1.3 KB
/
smooth-manifest.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package main
type SmoothStreamingMedia struct {
MinorVersion int `xml:"MinorVersion,attr"`
Duration int `xml:"Duration,attr"`
MajorVersion int `xml:"MajorVersion,attr"`
ProtectionHeader ProtectionHeader `xml:"Protection>ProtectionHeader"`
StreamIndex []StreamIndex `xml:"StreamIndex"`
}
type ProtectionHeader struct {
SystemID string `xml:"SystemID,attr"`
Text string `xml:",chardata"`
}
type StreamIndex struct {
Language string `xml:"Language,attr"`
Chunks int `xml:"Chunks,attr"`
Url string `xml:"Url,attr"`
QualityLevels int `xml:"QualityLevels,attr"`
Type string `xml:"Type,attr"`
Name string `xml:"Name,attr"`
Subtype string `xml:"Subtype,attr"`
QualityLevel []QualityLevel `xml:"QualityLevel"`
Fragment []Fragment `xml:"c"`
}
type QualityLevel struct {
Bitrate int `xml:"Bitrate,attr"`
MaxWidth int `xml:"MaxWidth,attr"`
FourCC string `xml:"FourCC,attr"`
CodecPrivateData string `xml:"CodecPrivateData,attr"`
MaxHeight int `xml:"MaxHeight,attr"`
Index int `xml:"Index,attr"`
PacketSize int `xml:"PacketSize,attr"`
Channels int `xml:"Channels,attr"`
AudioTag string `xml:"AudioTag,attr"`
BitsPerSample int `xml:"BitsPerSample,attr"`
SamplingRate int `xml:"SamplingRate,attr"`
}
type Fragment struct {
Duration int `xml:"d,attr"`
Timestamp int `xml:"t,attr"`
}