diff --git a/.circleci/config.yml b/.circleci/config.yml index 89d2e12..6451e43 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,7 +4,7 @@ jobs: build: docker: - image: circleci/golang - working_directory: "/go/src/github.com/zencoder/go-dash" + working_directory: "/go/src/github.com/garkettleung/go-dash" steps: - checkout - run: make test diff --git a/.whitesource b/.whitesource index 11023c1..726e446 100644 --- a/.whitesource +++ b/.whitesource @@ -1,3 +1,3 @@ { - "settingsInheritedFrom": "zencoder/whitesource-config@main" + "settingsInheritedFrom": "garkettleung/whitesource-config@main" } \ No newline at end of file diff --git a/README.md b/README.md index 89887f0..1bd387d 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ -# go-dash [![godoc](https://godoc.org/github.com/zencoder/go-dash/mpd?status.svg)](http://godoc.org/github.com/zencoder/go-dash/mpd) +# go-dash [![godoc](https://godoc.org/github.com/garkettleung/go-dash/mpd?status.svg)](http://godoc.org/github.com/garkettleung/go-dash/mpd) A [Go](https://golang.org) library for generating [MPEG-DASH](https://en.wikipedia.org/wiki/Dynamic_Adaptive_Streaming_over_HTTP) manifests. ## Install ``` -go get -u github.com/zencoder/go-dash +go get -u github.com/garkettleung/go-dash ``` ## Supported Features @@ -29,7 +29,7 @@ go get -u github.com/zencoder/go-dash ## Example Usage -See the [examples/](https://github.com/zencoder/go-dash/tree/master/examples) directory. +See the [examples/](https://github.com/garkettleung/go-dash/tree/master/examples) directory. ## Development @@ -39,7 +39,7 @@ make test ### CI -[This project builds in Circle CI](https://circleci.com/gh/zencoder/go-dash/) +[This project builds in Circle CI](https://circleci.com/gh/garkettleung/go-dash/) ## License diff --git a/examples/live.go b/examples/live.go index dd955a6..f2c36e6 100644 --- a/examples/live.go +++ b/examples/live.go @@ -3,7 +3,7 @@ package main import ( "fmt" - "github.com/zencoder/go-dash/v3/mpd" + "github.com/garkettleung/go-dash/v3/mpd" ) func main() { diff --git a/examples/ondemand.go b/examples/ondemand.go index 54463f2..9e50cb3 100644 --- a/examples/ondemand.go +++ b/examples/ondemand.go @@ -3,7 +3,7 @@ package main import ( "fmt" - "github.com/zencoder/go-dash/v3/mpd" + "github.com/garkettleung/go-dash/v3/mpd" ) func exampleOndemand() { diff --git a/go.mod b/go.mod index da472a9..698a89e 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ -module github.com/zencoder/go-dash/v3 +module github.com/garkettleung/go-dash/v3 go 1.13 diff --git a/helpers/testfixtures/testfixtures.go b/helpers/testfixtures/testfixtures.go index 754f80d..1316ca6 100644 --- a/helpers/testfixtures/testfixtures.go +++ b/helpers/testfixtures/testfixtures.go @@ -6,7 +6,7 @@ import ( "os" "testing" - "github.com/zencoder/go-dash/v3/helpers/require" + "github.com/garkettleung/go-dash/v3/helpers/require" ) // Load test fixture from path relative to fixtures directory diff --git a/mpd/duration_test.go b/mpd/duration_test.go index edd29b6..c8cbe0f 100644 --- a/mpd/duration_test.go +++ b/mpd/duration_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/zencoder/go-dash/v3/helpers/require" + "github.com/garkettleung/go-dash/v3/helpers/require" ) func TestDuration(t *testing.T) { diff --git a/mpd/events_test.go b/mpd/events_test.go index 4aa230b..ed2dc17 100644 --- a/mpd/events_test.go +++ b/mpd/events_test.go @@ -3,9 +3,9 @@ package mpd import ( "testing" - "github.com/zencoder/go-dash/v3/helpers/ptrs" - "github.com/zencoder/go-dash/v3/helpers/require" - "github.com/zencoder/go-dash/v3/helpers/testfixtures" + "github.com/garkettleung/go-dash/v3/helpers/ptrs" + "github.com/garkettleung/go-dash/v3/helpers/require" + "github.com/garkettleung/go-dash/v3/helpers/testfixtures" ) const ( diff --git a/mpd/mpd.go b/mpd/mpd.go index 9972443..5666d60 100644 --- a/mpd/mpd.go +++ b/mpd/mpd.go @@ -8,7 +8,7 @@ import ( "strings" "time" - . "github.com/zencoder/go-dash/v3/helpers/ptrs" + . "github.com/garkettleung/go-dash/v3/helpers/ptrs" ) // Type definition for DASH profiles @@ -108,25 +108,25 @@ type DescriptorType struct { // ISO 23009-1-2014 5.3.7 type CommonAttributesAndElements struct { - Profiles *string `xml:"profiles,attr"` - Width *string `xml:"width,attr"` - Height *string `xml:"height,attr"` - Sar *string `xml:"sar,attr"` - FrameRate *string `xml:"frameRate,attr"` - AudioSamplingRate *string `xml:"audioSamplingRate,attr"` - MimeType *string `xml:"mimeType,attr"` - SegmentProfiles *string `xml:"segmentProfiles,attr"` - Codecs *string `xml:"codecs,attr"` - MaximumSAPPeriod *string `xml:"maximumSAPPeriod,attr"` - StartWithSAP *int64 `xml:"startWithSAP,attr"` - MaxPlayoutRate *string `xml:"maxPlayoutRate,attr"` - ScanType *string `xml:"scanType,attr"` - FramePacking []DescriptorType `xml:"FramePacking,omitempty"` - AudioChannelConfiguration []DescriptorType `xml:"AudioChannelConfiguration,omitempty"` - ContentProtection []ContentProtectioner `xml:"ContentProtection,omitempty"` - EssentialProperty []DescriptorType `xml:"EssentialProperty,omitempty"` - SupplementalProperty []DescriptorType `xml:"SupplementalProperty,omitempty"` - InbandEventStream []DescriptorType `xml:"InbandEventStream,omitempty"` + Profiles *string `xml:"profiles,attr"` + Width *string `xml:"width,attr"` + Height *string `xml:"height,attr"` + Sar *string `xml:"sar,attr"` + FrameRate *string `xml:"frameRate,attr"` + AudioSamplingRate *string `xml:"audioSamplingRate,attr"` + MimeType *string `xml:"mimeType,attr"` + SegmentProfiles *string `xml:"segmentProfiles,attr"` + Codecs *string `xml:"codecs,attr"` + MaximumSAPPeriod *string `xml:"maximumSAPPeriod,attr"` + StartWithSAP *int64 `xml:"startWithSAP,attr"` + MaxPlayoutRate *string `xml:"maxPlayoutRate,attr"` + ScanType *string `xml:"scanType,attr"` + FramePacking []DescriptorType `xml:"FramePacking,omitempty"` + AudioChannelConfiguration []DescriptorType `xml:"AudioChannelConfiguration,omitempty"` + ContentProtection contentProtections `xml:"ContentProtection,omitempty"` + EssentialProperty []DescriptorType `xml:"EssentialProperty,omitempty"` + SupplementalProperty []DescriptorType `xml:"SupplementalProperty,omitempty"` + InbandEventStream []DescriptorType `xml:"InbandEventStream,omitempty"` } type contentProtections []ContentProtectioner @@ -171,27 +171,28 @@ type dtoAdaptationSet struct { type AdaptationSet struct { CommonAttributesAndElements - XMLName xml.Name `xml:"AdaptationSet"` - ID *string `xml:"id,attr"` - SegmentAlignment *bool `xml:"segmentAlignment,attr"` - Lang *string `xml:"lang,attr"` - Group *string `xml:"group,attr"` - PAR *string `xml:"par,attr"` - MinBandwidth *string `xml:"minBandwidth,attr"` - MaxBandwidth *string `xml:"maxBandwidth,attr"` - MinWidth *string `xml:"minWidth,attr"` - MaxWidth *string `xml:"maxWidth,attr"` - MinHeight *string `xml:"minHeight,attr"` - MaxHeight *string `xml:"maxHeight,attr"` - ContentType *string `xml:"contentType,attr"` - Roles []*Role `xml:"Role,omitempty"` - SegmentBase *SegmentBase `xml:"SegmentBase,omitempty"` - SegmentList *SegmentList `xml:"SegmentList,omitempty"` - SegmentTemplate *SegmentTemplate `xml:"SegmentTemplate,omitempty"` // Live Profile Only - Representations []*Representation `xml:"Representation,omitempty"` - AccessibilityElems []*Accessibility `xml:"Accessibility,omitempty"` - Labels []string `xml:"Label,omitempty"` - BaseURL []string `xml:"BaseURL,omitempty"` + XMLName xml.Name `xml:"AdaptationSet"` + ID *string `xml:"id,attr"` + SegmentAlignment *bool `xml:"segmentAlignment,attr"` + SubSegmentAlignment *bool `xml:"subsegmentAlignment,attr"` + Lang *string `xml:"lang,attr"` + Group *string `xml:"group,attr"` + PAR *string `xml:"par,attr"` + MinBandwidth *string `xml:"minBandwidth,attr"` + MaxBandwidth *string `xml:"maxBandwidth,attr"` + MinWidth *string `xml:"minWidth,attr"` + MaxWidth *string `xml:"maxWidth,attr"` + MinHeight *string `xml:"minHeight,attr"` + MaxHeight *string `xml:"maxHeight,attr"` + ContentType *string `xml:"contentType,attr"` + Roles []*Role `xml:"Role,omitempty"` + SegmentBase *SegmentBase `xml:"SegmentBase,omitempty"` + SegmentList *SegmentList `xml:"SegmentList,omitempty"` + SegmentTemplate *SegmentTemplate `xml:"SegmentTemplate,omitempty"` // Live Profile Only + Representations []*Representation `xml:"Representation,omitempty"` + AccessibilityElems []*Accessibility `xml:"Accessibility,omitempty"` + Labels []string `xml:"Label,omitempty"` + BaseURL []string `xml:"BaseURL,omitempty"` } func (as *AdaptationSet) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { @@ -406,9 +407,9 @@ func (m *MPD) SetDolbyXMLNs() { func NewMPD(profile DashProfile, mediaPresentationDuration, minBufferTime string, attributes ...AttrMPD) *MPD { period := &Period{} mpd := &MPD{ - XMLNs: Strptr("urn:mpeg:dash:schema:mpd:2011"), - Profiles: Strptr((string)(profile)), - Type: Strptr("static"), + XMLNs: Strptr("urn:mpeg:dash:schema:mpd:2011"), + Profiles: Strptr((string)(profile)), + Type: Strptr("static"), MediaPresentationDuration: Strptr(mediaPresentationDuration), MinBufferTime: Strptr(minBufferTime), period: period, @@ -433,9 +434,9 @@ func NewMPD(profile DashProfile, mediaPresentationDuration, minBufferTime string func NewDynamicMPD(profile DashProfile, availabilityStartTime, minBufferTime string, attributes ...AttrMPD) *MPD { period := &Period{} mpd := &MPD{ - XMLNs: Strptr("urn:mpeg:dash:schema:mpd:2011"), - Profiles: Strptr((string)(profile)), - Type: Strptr("dynamic"), + XMLNs: Strptr("urn:mpeg:dash:schema:mpd:2011"), + Profiles: Strptr((string)(profile)), + Type: Strptr("dynamic"), AvailabilityStartTime: Strptr(availabilityStartTime), MinBufferTime: Strptr(minBufferTime), period: period, diff --git a/mpd/mpd_read_write_test.go b/mpd/mpd_read_write_test.go index 80981b3..1e0a8c5 100644 --- a/mpd/mpd_read_write_test.go +++ b/mpd/mpd_read_write_test.go @@ -5,9 +5,9 @@ import ( "testing" "time" - "github.com/zencoder/go-dash/v3/helpers/ptrs" - "github.com/zencoder/go-dash/v3/helpers/require" - "github.com/zencoder/go-dash/v3/helpers/testfixtures" + "github.com/garkettleung/go-dash/v3/helpers/ptrs" + "github.com/garkettleung/go-dash/v3/helpers/require" + "github.com/garkettleung/go-dash/v3/helpers/testfixtures" ) func TestReadingManifests(t *testing.T) { diff --git a/mpd/mpd_test.go b/mpd/mpd_test.go index 19ab6c1..89de60b 100644 --- a/mpd/mpd_test.go +++ b/mpd/mpd_test.go @@ -6,9 +6,9 @@ import ( "strconv" "testing" - . "github.com/zencoder/go-dash/v3/helpers/ptrs" - "github.com/zencoder/go-dash/v3/helpers/require" - "github.com/zencoder/go-dash/v3/helpers/testfixtures" + . "github.com/garkettleung/go-dash/v3/helpers/ptrs" + "github.com/garkettleung/go-dash/v3/helpers/require" + "github.com/garkettleung/go-dash/v3/helpers/testfixtures" ) const ( diff --git a/mpd/pssh_test.go b/mpd/pssh_test.go index a681194..ef99110 100644 --- a/mpd/pssh_test.go +++ b/mpd/pssh_test.go @@ -3,7 +3,7 @@ package mpd import ( "encoding/base64" "encoding/hex" - "github.com/zencoder/go-dash/v3/helpers/require" + "github.com/garkettleung/go-dash/v3/helpers/require" "testing" ) diff --git a/mpd/segment_list_test.go b/mpd/segment_list_test.go index 40cf500..329ef76 100644 --- a/mpd/segment_list_test.go +++ b/mpd/segment_list_test.go @@ -3,9 +3,9 @@ package mpd import ( "testing" - "github.com/zencoder/go-dash/v3/helpers/ptrs" - "github.com/zencoder/go-dash/v3/helpers/require" - "github.com/zencoder/go-dash/v3/helpers/testfixtures" + "github.com/garkettleung/go-dash/v3/helpers/ptrs" + "github.com/garkettleung/go-dash/v3/helpers/require" + "github.com/garkettleung/go-dash/v3/helpers/testfixtures" ) func TestSegmentListSerialization(t *testing.T) { diff --git a/mpd/segment_timeline_test.go b/mpd/segment_timeline_test.go index 1e9ee1d..2cfc3d3 100644 --- a/mpd/segment_timeline_test.go +++ b/mpd/segment_timeline_test.go @@ -5,9 +5,9 @@ import ( "testing" "time" - "github.com/zencoder/go-dash/v3/helpers/ptrs" - "github.com/zencoder/go-dash/v3/helpers/require" - "github.com/zencoder/go-dash/v3/helpers/testfixtures" + "github.com/garkettleung/go-dash/v3/helpers/ptrs" + "github.com/garkettleung/go-dash/v3/helpers/require" + "github.com/garkettleung/go-dash/v3/helpers/testfixtures" ) func TestSegmentTimelineSerialization(t *testing.T) {