Skip to content

Commit 54d38b7

Browse files
author
Andrew Sinclair
committed
Minor changes to match spec
1 parent ac2f9cc commit 54d38b7

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

mpd/events.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ type EventStream struct {
66
XMLName xml.Name `xml:"EventStream"`
77
SchemeIDURI *string `xml:"schemeIdUri,attr"`
88
Value *string `xml:"value,attr,omitempty"`
9-
Timescale *int64 `xml:"timescale,attr"`
9+
Timescale *uint `xml:"timescale,attr"`
1010
Events []Event `xml:"Event,omitempty"`
1111
}
1212

1313
type Event struct {
1414
XMLName xml.Name `xml:"Event"`
1515
ID *string `xml:"id,attr,omitempty"`
16-
PresentationTime *int64 `xml:"presentationTime,attr,omitempty"`
17-
Duration *int64 `xml:"duration,attr,omitempty"`
16+
PresentationTime *uint64 `xml:"presentationTime,attr,omitempty"`
17+
Duration *uint64 `xml:"duration,attr,omitempty"`
1818
}

mpd/events_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import (
99
)
1010

1111
const (
12-
VALID_EVENT_STREAM_SCHEME_ID_URI = "urn:example:eventstream"
13-
VALID_EVENT_STREAM_VALUE = "eventstream"
14-
VALID_EVENT_STREAM_TIMESCALE int64 = 10
12+
VALID_EVENT_STREAM_SCHEME_ID_URI = "urn:example:eventstream"
13+
VALID_EVENT_STREAM_VALUE = "eventstream"
14+
VALID_EVENT_STREAM_TIMESCALE uint = 10
1515
)
1616

1717
func newEventStreamMPD() *MPD {
@@ -25,19 +25,19 @@ func newEventStreamMPD() *MPD {
2525
es := EventStream{
2626
SchemeIDURI: ptrs.Strptr(VALID_EVENT_STREAM_SCHEME_ID_URI),
2727
Value: ptrs.Strptr(VALID_EVENT_STREAM_VALUE),
28-
Timescale: ptrs.Int64ptr(VALID_EVENT_STREAM_TIMESCALE),
28+
Timescale: ptrs.Uintptr(VALID_EVENT_STREAM_TIMESCALE),
2929
}
3030

3131
e0 := Event{
3232
ID: ptrs.Strptr("event-0"),
33-
PresentationTime: ptrs.Int64ptr(100),
34-
Duration: ptrs.Int64ptr(50),
33+
PresentationTime: ptrs.Uint64ptr(100),
34+
Duration: ptrs.Uint64ptr(50),
3535
}
3636

3737
e1 := Event{
3838
ID: ptrs.Strptr("event-1"),
39-
PresentationTime: ptrs.Int64ptr(200),
40-
Duration: ptrs.Int64ptr(50),
39+
PresentationTime: ptrs.Uint64ptr(200),
40+
Duration: ptrs.Uint64ptr(50),
4141
}
4242

4343
es.Events = append(es.Events, e0, e1)

0 commit comments

Comments
 (0)