Skip to content

Commit

Permalink
Make a separate method for creating Adaptation Sets with IDs (#46)
Browse files Browse the repository at this point in the history
* Make separate methods for creating Adaptation Sets with IDs

* Revert ordering of Representation attributes and structure AdaptationSet in the standard golang way

* Added generate step and regenerated fixtures
  • Loading branch information
thomshutt committed Mar 9, 2018
1 parent cd2b164 commit 9b71037
Show file tree
Hide file tree
Showing 14 changed files with 321 additions and 172 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@ examples-live:

examples-ondemand:
go run examples/ondemand.go

generate:
GENERATE_FIXTURES=true $(MAKE) test
44 changes: 15 additions & 29 deletions helpers/testfixtures/testfixtures.go
Original file line number Diff line number Diff line change
@@ -1,43 +1,29 @@
package testfixtures

import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
)

func LoadJSONFixture(path string, uo interface{}) (js string, fjs string) {
// Load in the file and store in a string
f, err := ioutil.ReadFile(path)
if err != nil {
panic(fmt.Sprintf("LoadJSONFixture Error. ioutil.ReadFile. path = %s, Err = %s", path, err.Error()))
}
js = string(f)

// Generate the flat(compacted) JSON
cb := new(bytes.Buffer)
err = json.Compact(cb, f)
if err != nil {
panic(fmt.Sprintf("LoadJSONFixture Error. json.Compact. path = %s, Err = %s", path, err.Error()))
}
fjs = cb.String()
"os"
"testing"

// Unmarshal the JSON to an object
err = json.Unmarshal(f, &uo)
if err != nil {
panic(fmt.Sprintf("LoadJSONFixture Error. json.Unmarshal. path = %s, Err = %s", path, err.Error()))
}

return
}
"github.com/stretchr/testify/require"
)

// Load test fixture from path relative to fixtures directory
func LoadFixture(path string) (js string) {
f, err := ioutil.ReadFile(path)
if err != nil {
panic(fmt.Sprintf("LoadFixture Error. ioutil.ReadFile. path = %s, Err = %s", path, err.Error()))
}
js = string(f)
return
return string(f)
}

func CompareFixture(t *testing.T, fixturePath string, actualContent string) {
expectedContent := LoadFixture(fixturePath)
if os.Getenv("GENERATE_FIXTURES") != "" {
ioutil.WriteFile(fixturePath, []byte(actualContent), os.ModePerm)
fmt.Println("Wrote fixture: " + fixturePath)
} else {
require.Equal(t, expectedContent, actualContent)
}
}
18 changes: 9 additions & 9 deletions mpd/fixtures/hbbtv_profile.mpd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:hbbtv:dash:profile:isoff-live:2012,urn:mpeg:dash:profile:isoff-live:2011" type="static" mediaPresentationDuration="PT6M16S" minBufferTime="PT1.97S">
<Period>
<AdaptationSet id="7357" mimeType="audio/mp4" startWithSAP="1" segmentAlignment="true" lang="en">
<AdaptationSet mimeType="audio/mp4" startWithSAP="1" id="7357" segmentAlignment="true" lang="en">
<ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" xmlns:cenc="urn:mpeg:cenc:2013" cenc:default_KID="08e36702-8f33-436c-a5dd-60ffe5571e60" value="cenc"></ContentProtection>
<ContentProtection schemeIdUri="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed" xmlns:cenc="urn:mpeg:cenc:2013">
<cenc:pssh>AAAAYXBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAEEIARIQWr3VL1VKTyq40GH3YUJRVRoIY2FzdGxhYnMiGFdyM1ZMMVZLVHlxNDBHSDNZVUpSVlE9PTIHZGVmYXVsdA==</cenc:pssh>
Expand All @@ -12,11 +12,11 @@
</ContentProtection>
<Role schemeIdUri="urn:mpeg:dash:role:2011" value="main"></Role>
<SegmentTemplate duration="1968" initialization="$RepresentationID$/audio/en/init.mp4" media="$RepresentationID$/audio/en/seg-$Number$.m4f" startNumber="0" timescale="1000"></SegmentTemplate>
<Representation id="800" audioSamplingRate="44100" bandwidth="67095" codecs="mp4a.40.2">
<Representation audioSamplingRate="44100" bandwidth="67095" codecs="mp4a.40.2" id="800">
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"></AudioChannelConfiguration>
</Representation>
</AdaptationSet>
<AdaptationSet id="7357" mimeType="video/mp4" startWithSAP="1" scanType="progressive" segmentAlignment="true">
<AdaptationSet mimeType="video/mp4" startWithSAP="1" scanType="progressive" id="7357" segmentAlignment="true">
<ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" xmlns:cenc="urn:mpeg:cenc:2013" cenc:default_KID="08e36702-8f33-436c-a5dd-60ffe5571e60" value="cenc"></ContentProtection>
<ContentProtection schemeIdUri="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed" xmlns:cenc="urn:mpeg:cenc:2013">
<cenc:pssh>AAAAYXBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAEEIARIQWr3VL1VKTyq40GH3YUJRVRoIY2FzdGxhYnMiGFdyM1ZMMVZLVHlxNDBHSDNZVUpSVlE9PTIHZGVmYXVsdA==</cenc:pssh>
Expand All @@ -27,13 +27,13 @@
</ContentProtection>
<Role schemeIdUri="urn:mpeg:dash:role:2011" value="main"></Role>
<SegmentTemplate duration="1968" initialization="$RepresentationID$/video/1/init.mp4" media="$RepresentationID$/video/1/seg-$Number$.m4f" startNumber="0" timescale="1000"></SegmentTemplate>
<Representation id="800" bandwidth="1518664" codecs="avc1.4d401f" frameRate="30000/1001" height="540" width="960"></Representation>
<Representation id="1000" bandwidth="1911775" codecs="avc1.4d401f" frameRate="30000/1001" height="576" width="1024"></Representation>
<Representation id="1200" bandwidth="2295158" codecs="avc1.4d401f" frameRate="30000/1001" height="576" width="1024"></Representation>
<Representation id="1500" bandwidth="2780732" codecs="avc1.4d401f" frameRate="30000/1001" height="720" width="1280"></Representation>
<Representation bandwidth="1518664" codecs="avc1.4d401f" frameRate="30000/1001" height="540" id="800" width="960"></Representation>
<Representation bandwidth="1911775" codecs="avc1.4d401f" frameRate="30000/1001" height="576" id="1000" width="1024"></Representation>
<Representation bandwidth="2295158" codecs="avc1.4d401f" frameRate="30000/1001" height="576" id="1200" width="1024"></Representation>
<Representation bandwidth="2780732" codecs="avc1.4d401f" frameRate="30000/1001" height="720" id="1500" width="1280"></Representation>
</AdaptationSet>
<AdaptationSet id="7357" mimeType="text/vtt" lang="en">
<Representation id="subtitle_en" bandwidth="256">
<AdaptationSet mimeType="text/vtt" id="7357" lang="en">
<Representation bandwidth="256" id="subtitle_en">
<BaseURL>http://example.com/content/sintel/subtitles/subtitles_en.vtt</BaseURL>
</Representation>
</AdaptationSet>
Expand Down
18 changes: 9 additions & 9 deletions mpd/fixtures/live_profile.mpd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="static" mediaPresentationDuration="PT6M16S" minBufferTime="PT1.97S">
<Period>
<AdaptationSet id="7357" mimeType="audio/mp4" startWithSAP="1" segmentAlignment="true" lang="en">
<AdaptationSet mimeType="audio/mp4" startWithSAP="1" id="7357" segmentAlignment="true" lang="en">
<ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" xmlns:cenc="urn:mpeg:cenc:2013" cenc:default_KID="08e36702-8f33-436c-a5dd-60ffe5571e60" value="cenc"></ContentProtection>
<ContentProtection schemeIdUri="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed" xmlns:cenc="urn:mpeg:cenc:2013">
<cenc:pssh>AAAAYXBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAEEIARIQWr3VL1VKTyq40GH3YUJRVRoIY2FzdGxhYnMiGFdyM1ZMMVZLVHlxNDBHSDNZVUpSVlE9PTIHZGVmYXVsdA==</cenc:pssh>
Expand All @@ -12,9 +12,9 @@
</ContentProtection>
<Role schemeIdUri="urn:mpeg:dash:role:2011" value="main"></Role>
<SegmentTemplate duration="1968" initialization="$RepresentationID$/audio/en/init.mp4" media="$RepresentationID$/audio/en/seg-$Number$.m4f" startNumber="0" timescale="1000"></SegmentTemplate>
<Representation id="800" audioSamplingRate="44100" bandwidth="67095" codecs="mp4a.40.2"></Representation>
<Representation audioSamplingRate="44100" bandwidth="67095" codecs="mp4a.40.2" id="800"></Representation>
</AdaptationSet>
<AdaptationSet id="7357" mimeType="video/mp4" startWithSAP="1" scanType="progressive" segmentAlignment="true">
<AdaptationSet mimeType="video/mp4" startWithSAP="1" scanType="progressive" id="7357" segmentAlignment="true">
<ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" xmlns:cenc="urn:mpeg:cenc:2013" cenc:default_KID="08e36702-8f33-436c-a5dd-60ffe5571e60" value="cenc"></ContentProtection>
<ContentProtection schemeIdUri="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed" xmlns:cenc="urn:mpeg:cenc:2013">
<cenc:pssh>AAAAYXBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAEEIARIQWr3VL1VKTyq40GH3YUJRVRoIY2FzdGxhYnMiGFdyM1ZMMVZLVHlxNDBHSDNZVUpSVlE9PTIHZGVmYXVsdA==</cenc:pssh>
Expand All @@ -25,13 +25,13 @@
</ContentProtection>
<Role schemeIdUri="urn:mpeg:dash:role:2011" value="main"></Role>
<SegmentTemplate duration="1968" initialization="$RepresentationID$/video/1/init.mp4" media="$RepresentationID$/video/1/seg-$Number$.m4f" startNumber="0" timescale="1000"></SegmentTemplate>
<Representation id="800" bandwidth="1518664" codecs="avc1.4d401f" frameRate="30000/1001" height="540" width="960"></Representation>
<Representation id="1000" bandwidth="1911775" codecs="avc1.4d401f" frameRate="30000/1001" height="576" width="1024"></Representation>
<Representation id="1200" bandwidth="2295158" codecs="avc1.4d401f" frameRate="30000/1001" height="576" width="1024"></Representation>
<Representation id="1500" bandwidth="2780732" codecs="avc1.4d401f" frameRate="30000/1001" height="720" width="1280"></Representation>
<Representation bandwidth="1518664" codecs="avc1.4d401f" frameRate="30000/1001" height="540" id="800" width="960"></Representation>
<Representation bandwidth="1911775" codecs="avc1.4d401f" frameRate="30000/1001" height="576" id="1000" width="1024"></Representation>
<Representation bandwidth="2295158" codecs="avc1.4d401f" frameRate="30000/1001" height="576" id="1200" width="1024"></Representation>
<Representation bandwidth="2780732" codecs="avc1.4d401f" frameRate="30000/1001" height="720" id="1500" width="1280"></Representation>
</AdaptationSet>
<AdaptationSet id="7357" mimeType="text/vtt" lang="en">
<Representation id="subtitle_en" bandwidth="256">
<AdaptationSet mimeType="text/vtt" id="7357" lang="en">
<Representation bandwidth="256" id="subtitle_en">
<BaseURL>http://example.com/content/sintel/subtitles/subtitles_en.vtt</BaseURL>
</Representation>
</AdaptationSet>
Expand Down
8 changes: 4 additions & 4 deletions mpd/fixtures/newperiod.mpd
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="static" mediaPresentationDuration="PT6M16S" minBufferTime="PT1.97S">
<Period>
<AdaptationSet id="1" mimeType="video/mp4" startWithSAP="1" scanType="progressive" segmentAlignment="true">
<AdaptationSet mimeType="video/mp4" startWithSAP="1" scanType="progressive" id="1" segmentAlignment="true">
<SegmentTemplate duration="1968" initialization="$RepresentationID$/video-1.mp4" media="$RepresentationID$/video-1/seg-$Number$.m4f" startNumber="0" timescale="1000"></SegmentTemplate>
</AdaptationSet>
<AdaptationSet id="1" mimeType="audio/mp4" startWithSAP="1" segmentAlignment="true" lang="en">
<AdaptationSet mimeType="audio/mp4" startWithSAP="1" id="1" segmentAlignment="true" lang="en">
<SegmentTemplate duration="1968" initialization="$RepresentationID$/audio-1.mp4" media="$RepresentationID$/audio-1/seg-$Number$.m4f" startNumber="0" timescale="1000"></SegmentTemplate>
</AdaptationSet>
</Period>
<Period duration="PT3M0S">
<AdaptationSet id="2" mimeType="video/mp4" startWithSAP="1" scanType="progressive" segmentAlignment="true">
<AdaptationSet mimeType="video/mp4" startWithSAP="1" scanType="progressive" id="2" segmentAlignment="true">
<SegmentTemplate duration="1968" initialization="$RepresentationID$/video-2.mp4" media="$RepresentationID$/video-2/seg-$Number$.m4f" startNumber="0" timescale="1000"></SegmentTemplate>
</AdaptationSet>
<AdaptationSet id="2" mimeType="audio/mp4" startWithSAP="1" segmentAlignment="true" lang="en">
<AdaptationSet mimeType="audio/mp4" startWithSAP="1" id="2" segmentAlignment="true" lang="en">
<SegmentTemplate duration="1968" initialization="$RepresentationID$/audio-2.mp4" media="$RepresentationID$/audio-2/seg-$Number$.m4f" startNumber="0" timescale="1000"></SegmentTemplate>
</AdaptationSet>
</Period>
Expand Down
14 changes: 7 additions & 7 deletions mpd/fixtures/ondemand_profile.mpd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:isoff-on-demand:2011" type="static" mediaPresentationDuration="PT30S" minBufferTime="PT1.97S">
<Period>
<AdaptationSet id="7357" mimeType="audio/mp4" startWithSAP="1" segmentAlignment="true" lang="und">
<AdaptationSet mimeType="audio/mp4" startWithSAP="1" id="7357" segmentAlignment="true" lang="und">
<ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" xmlns:cenc="urn:mpeg:cenc:2013" cenc:default_KID="08e36702-8f33-436c-a5dd-60ffe5571e60" value="cenc"></ContentProtection>
<ContentProtection schemeIdUri="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed" xmlns:cenc="urn:mpeg:cenc:2013">
<cenc:pssh>AAAAYXBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAEEIARIQWr3VL1VKTyq40GH3YUJRVRoIY2FzdGxhYnMiGFdyM1ZMMVZLVHlxNDBHSDNZVUpSVlE9PTIHZGVmYXVsdA==</cenc:pssh>
Expand All @@ -10,14 +10,14 @@
<mspr:pro>BgIAAAEAAQD8ATwAVwBSAE0ASABFAEEARABFAFIAIAB4AG0AbABuAHMAPQAiAGgAdAB0A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vAFAAUgBPAFQARQBDAFQASQBOAEYATwA+ADwASwBJAEQAPgBMADkAVwA5AFcAawBwAFYASwBrACsANAAwAEcASAAzAFkAVQBKAFIAVgBRAD0APQA8AC8ASwBJAEQAPgA8AEMASABFAEMASwBTAFUATQA+AEkASwB6AFkAMgBIAFoATABBAGwASQA9ADwALwBDAEgARQBDAEsAUwBVAE0APgA8AC8ARABBAFQAQQA+ADwALwBXAFIATQBIAEUAQQBEAEUAUgA+AA==</cenc:pssh>
</ContentProtection>
<Representation id="800k/audio-und" audioSamplingRate="44100" bandwidth="128558" codecs="mp4a.40.5">
<Representation audioSamplingRate="44100" bandwidth="128558" codecs="mp4a.40.5" id="800k/audio-und">
<BaseURL>800k/output-audio-und.mp4</BaseURL>
<SegmentBase indexRange="629-756">
<Initialization range="0-628"></Initialization>
</SegmentBase>
</Representation>
</AdaptationSet>
<AdaptationSet id="7357" mimeType="video/mp4" startWithSAP="1" scanType="progressive" segmentAlignment="true">
<AdaptationSet mimeType="video/mp4" startWithSAP="1" scanType="progressive" id="7357" segmentAlignment="true">
<ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" xmlns:cenc="urn:mpeg:cenc:2013" cenc:default_KID="08e36702-8f33-436c-a5dd-60ffe5571e60" value="cenc"></ContentProtection>
<ContentProtection schemeIdUri="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed" xmlns:cenc="urn:mpeg:cenc:2013">
<cenc:pssh>AAAAYXBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAEEIARIQWr3VL1VKTyq40GH3YUJRVRoIY2FzdGxhYnMiGFdyM1ZMMVZLVHlxNDBHSDNZVUpSVlE9PTIHZGVmYXVsdA==</cenc:pssh>
Expand All @@ -26,21 +26,21 @@
<mspr:pro>BgIAAAEAAQD8ATwAVwBSAE0ASABFAEEARABFAFIAIAB4AG0AbABuAHMAPQAiAGgAdAB0AHAAOgAvAC8AcwBjAGgAZQBtAGEAcwAuAG0AaQBjAHIAb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MADkAVwA5AFcAawBwAFYASwBrACsANAAwAEcASAAzAFkAVQBKAFIAVgBRAD0APQA8AC8ASwBJAEQAPgA8AEMASABFAEMASwBTAFUATQA+AEkASwB6AFkAMgBIAFoATABBAGwASQA9ADwALwBDAEgARQBDAEsAUwBVAE0APgA8AC8ARABBAFQAQQA+ADwALwBXAFIATQBIAEUAQQBEAEUAUgA+AA==</cenc:pssh>
</ContentProtection>
<Representation id="800k/video-1" bandwidth="1100690" codecs="avc1.4d401e" frameRate="30000/1001" height="360" width="640">
<Representation bandwidth="1100690" codecs="avc1.4d401e" frameRate="30000/1001" height="360" id="800k/video-1" width="640">
<BaseURL>800k/output-video-1.mp4</BaseURL>
<SegmentBase indexRange="686-813">
<Initialization range="0-685"></Initialization>
</SegmentBase>
</Representation>
<Representation id="1200k/video-1" bandwidth="1633516" codecs="avc1.4d401f" frameRate="30000/1001" height="540" width="960">
<Representation bandwidth="1633516" codecs="avc1.4d401f" frameRate="30000/1001" height="540" id="1200k/video-1" width="960">
<BaseURL>1200k/output-video-1.mp4</BaseURL>
<SegmentBase indexRange="686-813">
<Initialization range="0-685"></Initialization>
</SegmentBase>
</Representation>
</AdaptationSet>
<AdaptationSet id="7357" mimeType="text/vtt" lang="en">
<Representation id="subtitle_en" bandwidth="256">
<AdaptationSet mimeType="text/vtt" id="7357" lang="en">
<Representation bandwidth="256" id="subtitle_en">
<BaseURL>http://example.com/content/sintel/subtitles/subtitles_en.vtt</BaseURL>
</Representation>
</AdaptationSet>
Expand Down
8 changes: 4 additions & 4 deletions mpd/fixtures/segment_list.mpd
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="static" mediaPresentationDuration="PT30.016S" minBufferTime="PT2.000S">
<Period>
<BaseURL>http://localhost:8002/dash/</BaseURL>
<AdaptationSet id="1" mimeType="audio/mp4" startWithSAP="1" segmentAlignment="true" lang="English">
<Representation id="audio_1" audioSamplingRate="48000" bandwidth="255000" codecs="mp4a.40.2">
<AdaptationSet mimeType="audio/mp4" startWithSAP="1" id="1" segmentAlignment="true" lang="English">
<Representation audioSamplingRate="48000" bandwidth="255000" codecs="mp4a.40.2" id="audio_1">
<SegmentList timescale="48000" duration="479232">
<Initialization sourceURL="b4324d65-ad06-4735-9535-5cd4af84ebb6/dcb11457-9092-4410-b204-67b3c6d9a9e2/init.m4f"></Initialization>
<SegmentURL media="b4324d65-ad06-4735-9535-5cd4af84ebb6/dcb11457-9092-4410-b204-67b3c6d9a9e2/segment0.m4f"></SegmentURL>
Expand All @@ -13,8 +13,8 @@
</SegmentList>
</Representation>
</AdaptationSet>
<AdaptationSet id="2" mimeType="video/mp4" startWithSAP="1" scanType="progressive" segmentAlignment="true">
<Representation id="video_1" bandwidth="4172274" codecs="avc1.640028" frameRate="30000/1001" height="720" width="1280">
<AdaptationSet mimeType="video/mp4" startWithSAP="1" scanType="progressive" id="2" segmentAlignment="true">
<Representation bandwidth="4172274" codecs="avc1.640028" frameRate="30000/1001" height="720" id="video_1" width="1280">
<SegmentList timescale="30000" duration="225120">
<Initialization sourceURL="b4324d65-ad06-4735-9535-5cd4af84ebb6/f2ad47b2-5362-46e6-ad1d-dff7b10f00b8/init.m4f"></Initialization>
<SegmentURL media="b4324d65-ad06-4735-9535-5cd4af84ebb6/f2ad47b2-5362-46e6-ad1d-dff7b10f00b8/segment0.m4f"></SegmentURL>
Expand Down
Loading

0 comments on commit 9b71037

Please sign in to comment.