diff --git a/AUTHORS b/AUTHORS index 8537d0d0d4..11b0abb5bd 100644 --- a/AUTHORS +++ b/AUTHORS @@ -22,6 +22,7 @@ Chun-da Chen Daniel CantarĂ­n Dolby Laboratories <*@dolby.com> Evgeny Zajcev +Eyevinn Technology AB <*@eyevinn.se> Google LLC. <*@google.com> Ivi.ru LLC <*@ivi.ru> Leandro Moreira @@ -34,3 +35,4 @@ Richard Eklycke Sanil Raut Sergio Ammirata The Chromium Authors <*@chromium.org> +Dennis E. Mungai (Brainiarc7) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index b11338f611..de58caf56a 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -39,6 +39,7 @@ Joey Parrish Kongqun Yang Leandro Moreira Leo Law +Marcus Spangenberg Ole Andre Birkedal Piotr Srebrny Qingquan Wang @@ -51,3 +52,4 @@ Thomas Inskip Tim Lansen Vincent Nguyen Weiguo Shao +Dennis E. Mungai (Brainiarc7) diff --git a/docs/source/build_instructions.md b/docs/source/build_instructions.md index 416c018496..69a756ba30 100644 --- a/docs/source/build_instructions.md +++ b/docs/source/build_instructions.md @@ -117,7 +117,7 @@ dependencies. ```shell gclient config https://github.com/shaka-project/shaka-packager.git --name=src --unmanaged -gclient sync +gclient sync -r main ``` To sync to a particular commit or version, add the '-r \' flag to diff --git a/packager/app/test/testdata/audio-video-with-language-override-with-subtag/output.m3u8 b/packager/app/test/testdata/audio-video-with-language-override-with-subtag/output.m3u8 index 4019bde7a0..693caf2960 100644 --- a/packager/app/test/testdata/audio-video-with-language-override-with-subtag/output.m3u8 +++ b/packager/app/test/testdata/audio-video-with-language-override-with-subtag/output.m3u8 @@ -3,7 +3,7 @@ #EXT-X-INDEPENDENT-SEGMENTS -#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-audio.m3u8",GROUP-ID="default-audio-group",LANGUAGE="pt-BR",NAME="stream_0",AUTOSELECT=YES,CHANNELS="2" +#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-audio.m3u8",GROUP-ID="default-audio-group",LANGUAGE="pt-BR",NAME="stream_0",DEFAULT=NO,AUTOSELECT=YES,CHANNELS="2" #EXT-X-STREAM-INF:BANDWIDTH=1106817,AVERAGE-BANDWIDTH=1004632,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group",CLOSED-CAPTIONS=NONE bear-640x360-video.m3u8 diff --git a/packager/app/test/testdata/avc-aac-ts/output.m3u8 b/packager/app/test/testdata/avc-aac-ts/output.m3u8 index 9345f1c4c1..b827ca1dc8 100644 --- a/packager/app/test/testdata/avc-aac-ts/output.m3u8 +++ b/packager/app/test/testdata/avc-aac-ts/output.m3u8 @@ -3,7 +3,7 @@ #EXT-X-INDEPENDENT-SEGMENTS -#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",AUTOSELECT=YES,CHANNELS="2" +#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",DEFAULT=NO,AUTOSELECT=YES,CHANNELS="2" #EXT-X-STREAM-INF:BANDWIDTH=1217520,AVERAGE-BANDWIDTH=1117320,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group",CLOSED-CAPTIONS=NONE bear-640x360-video.m3u8 diff --git a/packager/app/test/testdata/avc-ac3-ts-to-mp4/output.m3u8 b/packager/app/test/testdata/avc-ac3-ts-to-mp4/output.m3u8 index 5d0edce3c9..cef562803f 100644 --- a/packager/app/test/testdata/avc-ac3-ts-to-mp4/output.m3u8 +++ b/packager/app/test/testdata/avc-ac3-ts-to-mp4/output.m3u8 @@ -3,7 +3,7 @@ #EXT-X-INDEPENDENT-SEGMENTS -#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-ac3-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",AUTOSELECT=YES,CHANNELS="2" +#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-ac3-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",DEFAULT=NO,AUTOSELECT=YES,CHANNELS="2" #EXT-X-STREAM-INF:BANDWIDTH=1168321,AVERAGE-BANDWIDTH=1074156,CODECS="avc1.64001e,ac-3",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group",CLOSED-CAPTIONS=NONE bear-640x360-ac3-video.m3u8 diff --git a/packager/app/test/testdata/avc-ac3-ts-with-encryption/output.m3u8 b/packager/app/test/testdata/avc-ac3-ts-with-encryption/output.m3u8 index 4ef87deb79..61e8f12578 100644 --- a/packager/app/test/testdata/avc-ac3-ts-with-encryption/output.m3u8 +++ b/packager/app/test/testdata/avc-ac3-ts-with-encryption/output.m3u8 @@ -3,7 +3,7 @@ #EXT-X-INDEPENDENT-SEGMENTS -#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-ac3-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",AUTOSELECT=YES,CHANNELS="2" +#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-ac3-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",DEFAULT=NO,AUTOSELECT=YES,CHANNELS="2" #EXT-X-STREAM-INF:BANDWIDTH=1242863,AVERAGE-BANDWIDTH=1148679,CODECS="avc1.64001e,ac-3",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group",CLOSED-CAPTIONS=NONE bear-640x360-ac3-video.m3u8 diff --git a/packager/app/test/testdata/avc-ac3-ts/output.m3u8 b/packager/app/test/testdata/avc-ac3-ts/output.m3u8 index 4ef87deb79..61e8f12578 100644 --- a/packager/app/test/testdata/avc-ac3-ts/output.m3u8 +++ b/packager/app/test/testdata/avc-ac3-ts/output.m3u8 @@ -3,7 +3,7 @@ #EXT-X-INDEPENDENT-SEGMENTS -#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-ac3-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",AUTOSELECT=YES,CHANNELS="2" +#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-ac3-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",DEFAULT=NO,AUTOSELECT=YES,CHANNELS="2" #EXT-X-STREAM-INF:BANDWIDTH=1242863,AVERAGE-BANDWIDTH=1148679,CODECS="avc1.64001e,ac-3",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group",CLOSED-CAPTIONS=NONE bear-640x360-ac3-video.m3u8 diff --git a/packager/app/test/testdata/avc-ts-aac-packed-audio-with-encryption/output.m3u8 b/packager/app/test/testdata/avc-ts-aac-packed-audio-with-encryption/output.m3u8 index 484c3b0d79..85bf835f17 100644 --- a/packager/app/test/testdata/avc-ts-aac-packed-audio-with-encryption/output.m3u8 +++ b/packager/app/test/testdata/avc-ts-aac-packed-audio-with-encryption/output.m3u8 @@ -3,7 +3,7 @@ #EXT-X-INDEPENDENT-SEGMENTS -#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",AUTOSELECT=YES,CHANNELS="2" +#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",DEFAULT=NO,AUTOSELECT=YES,CHANNELS="2" #EXT-X-STREAM-INF:BANDWIDTH=1154999,AVERAGE-BANDWIDTH=1054750,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group",CLOSED-CAPTIONS=NONE bear-640x360-video.m3u8 diff --git a/packager/app/test/testdata/avc-ts-ac3-packed-audio-with-encryption/output.m3u8 b/packager/app/test/testdata/avc-ts-ac3-packed-audio-with-encryption/output.m3u8 index 0f3a8f7bbb..e228cf672e 100644 --- a/packager/app/test/testdata/avc-ts-ac3-packed-audio-with-encryption/output.m3u8 +++ b/packager/app/test/testdata/avc-ts-ac3-packed-audio-with-encryption/output.m3u8 @@ -3,7 +3,7 @@ #EXT-X-INDEPENDENT-SEGMENTS -#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-ac3-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",AUTOSELECT=YES,CHANNELS="2" +#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-ac3-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",DEFAULT=NO,AUTOSELECT=YES,CHANNELS="2" #EXT-X-STREAM-INF:BANDWIDTH=1216578,AVERAGE-BANDWIDTH=1122532,CODECS="avc1.64001e,ac-3",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group",CLOSED-CAPTIONS=NONE bear-640x360-ac3-video.m3u8 diff --git a/packager/app/test/testdata/avc-ts-event-playlist/output.m3u8 b/packager/app/test/testdata/avc-ts-event-playlist/output.m3u8 index 9345f1c4c1..b827ca1dc8 100644 --- a/packager/app/test/testdata/avc-ts-event-playlist/output.m3u8 +++ b/packager/app/test/testdata/avc-ts-event-playlist/output.m3u8 @@ -3,7 +3,7 @@ #EXT-X-INDEPENDENT-SEGMENTS -#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",AUTOSELECT=YES,CHANNELS="2" +#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",DEFAULT=NO,AUTOSELECT=YES,CHANNELS="2" #EXT-X-STREAM-INF:BANDWIDTH=1217520,AVERAGE-BANDWIDTH=1117320,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group",CLOSED-CAPTIONS=NONE bear-640x360-video.m3u8 diff --git a/packager/app/test/testdata/avc-ts-live-playlist-dash-dynamic-with-segment-deletion/output.m3u8 b/packager/app/test/testdata/avc-ts-live-playlist-dash-dynamic-with-segment-deletion/output.m3u8 index e5678b089f..ce41556e99 100644 --- a/packager/app/test/testdata/avc-ts-live-playlist-dash-dynamic-with-segment-deletion/output.m3u8 +++ b/packager/app/test/testdata/avc-ts-live-playlist-dash-dynamic-with-segment-deletion/output.m3u8 @@ -3,7 +3,7 @@ #EXT-X-INDEPENDENT-SEGMENTS -#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",AUTOSELECT=YES,CHANNELS="2" +#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",DEFAULT=NO,AUTOSELECT=YES,CHANNELS="2" #EXT-X-STREAM-INF:BANDWIDTH=133919,AVERAGE-BANDWIDTH=126463,CODECS="mp4a.40.2",AUDIO="default-audio-group",CLOSED-CAPTIONS=NONE bear-640x360-audio.m3u8 diff --git a/packager/app/test/testdata/avc-ts-live-playlist-with-key-rotation/output.m3u8 b/packager/app/test/testdata/avc-ts-live-playlist-with-key-rotation/output.m3u8 index 9345f1c4c1..b827ca1dc8 100644 --- a/packager/app/test/testdata/avc-ts-live-playlist-with-key-rotation/output.m3u8 +++ b/packager/app/test/testdata/avc-ts-live-playlist-with-key-rotation/output.m3u8 @@ -3,7 +3,7 @@ #EXT-X-INDEPENDENT-SEGMENTS -#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",AUTOSELECT=YES,CHANNELS="2" +#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",DEFAULT=NO,AUTOSELECT=YES,CHANNELS="2" #EXT-X-STREAM-INF:BANDWIDTH=1217520,AVERAGE-BANDWIDTH=1117320,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group",CLOSED-CAPTIONS=NONE bear-640x360-video.m3u8 diff --git a/packager/app/test/testdata/avc-ts-live-playlist-with-segment-deletion/output.m3u8 b/packager/app/test/testdata/avc-ts-live-playlist-with-segment-deletion/output.m3u8 index 6761ed1464..93e42b39e5 100644 --- a/packager/app/test/testdata/avc-ts-live-playlist-with-segment-deletion/output.m3u8 +++ b/packager/app/test/testdata/avc-ts-live-playlist-with-segment-deletion/output.m3u8 @@ -1,4 +1,4 @@ #EXTM3U ## Generated with https://github.com/shaka-project/shaka-packager version -- -#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",AUTOSELECT=YES,CHANNELS="2" +#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",DEFAULT=NO,AUTOSELECT=YES,CHANNELS="2" diff --git a/packager/app/test/testdata/avc-ts-live-playlist/output.m3u8 b/packager/app/test/testdata/avc-ts-live-playlist/output.m3u8 index 9345f1c4c1..b827ca1dc8 100644 --- a/packager/app/test/testdata/avc-ts-live-playlist/output.m3u8 +++ b/packager/app/test/testdata/avc-ts-live-playlist/output.m3u8 @@ -3,7 +3,7 @@ #EXT-X-INDEPENDENT-SEGMENTS -#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",AUTOSELECT=YES,CHANNELS="2" +#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",DEFAULT=NO,AUTOSELECT=YES,CHANNELS="2" #EXT-X-STREAM-INF:BANDWIDTH=1217520,AVERAGE-BANDWIDTH=1117320,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group",CLOSED-CAPTIONS=NONE bear-640x360-video.m3u8 diff --git a/packager/app/test/testdata/avc-ts-with-encryption-and-fairplay/output.m3u8 b/packager/app/test/testdata/avc-ts-with-encryption-and-fairplay/output.m3u8 index 9345f1c4c1..b827ca1dc8 100644 --- a/packager/app/test/testdata/avc-ts-with-encryption-and-fairplay/output.m3u8 +++ b/packager/app/test/testdata/avc-ts-with-encryption-and-fairplay/output.m3u8 @@ -3,7 +3,7 @@ #EXT-X-INDEPENDENT-SEGMENTS -#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",AUTOSELECT=YES,CHANNELS="2" +#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",DEFAULT=NO,AUTOSELECT=YES,CHANNELS="2" #EXT-X-STREAM-INF:BANDWIDTH=1217520,AVERAGE-BANDWIDTH=1117320,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group",CLOSED-CAPTIONS=NONE bear-640x360-video.m3u8 diff --git a/packager/app/test/testdata/avc-ts-with-encryption/output.m3u8 b/packager/app/test/testdata/avc-ts-with-encryption/output.m3u8 index 9345f1c4c1..b827ca1dc8 100644 --- a/packager/app/test/testdata/avc-ts-with-encryption/output.m3u8 +++ b/packager/app/test/testdata/avc-ts-with-encryption/output.m3u8 @@ -3,7 +3,7 @@ #EXT-X-INDEPENDENT-SEGMENTS -#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",AUTOSELECT=YES,CHANNELS="2" +#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",DEFAULT=NO,AUTOSELECT=YES,CHANNELS="2" #EXT-X-STREAM-INF:BANDWIDTH=1217520,AVERAGE-BANDWIDTH=1117320,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group",CLOSED-CAPTIONS=NONE bear-640x360-video.m3u8 diff --git a/packager/app/test/testdata/bandwidth-override/output.m3u8 b/packager/app/test/testdata/bandwidth-override/output.m3u8 index 077ed885ed..da47b929d6 100644 --- a/packager/app/test/testdata/bandwidth-override/output.m3u8 +++ b/packager/app/test/testdata/bandwidth-override/output.m3u8 @@ -3,7 +3,7 @@ #EXT-X-INDEPENDENT-SEGMENTS -#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",AUTOSELECT=YES,CHANNELS="2" +#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",DEFAULT=NO,AUTOSELECT=YES,CHANNELS="2" #EXT-X-STREAM-INF:BANDWIDTH=55555,AVERAGE-BANDWIDTH=1004632,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group",CLOSED-CAPTIONS=NONE bear-640x360-video.m3u8 diff --git a/packager/app/test/testdata/ec3-and-hls-single-segment-mp4-encrypted/output.m3u8 b/packager/app/test/testdata/ec3-and-hls-single-segment-mp4-encrypted/output.m3u8 index 568dae01b1..7ec849768f 100644 --- a/packager/app/test/testdata/ec3-and-hls-single-segment-mp4-encrypted/output.m3u8 +++ b/packager/app/test/testdata/ec3-and-hls-single-segment-mp4-encrypted/output.m3u8 @@ -3,7 +3,7 @@ #EXT-X-INDEPENDENT-SEGMENTS -#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-ec3-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",AUTOSELECT=YES,CHANNELS="2" +#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-ec3-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",DEFAULT=NO,AUTOSELECT=YES,CHANNELS="2" #EXT-X-STREAM-INF:BANDWIDTH=1174214,AVERAGE-BANDWIDTH=1061802,CODECS="avc1.64001e,ec-3",RESOLUTION=640x360,FRAME-RATE=9.990,AUDIO="default-audio-group",CLOSED-CAPTIONS=NONE bear-640x360-ec3-video.m3u8 diff --git a/packager/app/test/testdata/ec3-packed-audio-encrypted/output.m3u8 b/packager/app/test/testdata/ec3-packed-audio-encrypted/output.m3u8 index 130c27c23e..d8374b9970 100644 --- a/packager/app/test/testdata/ec3-packed-audio-encrypted/output.m3u8 +++ b/packager/app/test/testdata/ec3-packed-audio-encrypted/output.m3u8 @@ -3,7 +3,7 @@ #EXT-X-INDEPENDENT-SEGMENTS -#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-ec3-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",AUTOSELECT=YES,CHANNELS="2" +#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-ec3-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",DEFAULT=NO,AUTOSELECT=YES,CHANNELS="2" #EXT-X-STREAM-INF:BANDWIDTH=1216655,AVERAGE-BANDWIDTH=1104925,CODECS="avc1.64001e,ec-3",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group",CLOSED-CAPTIONS=NONE bear-640x360-ec3-video.m3u8 diff --git a/packager/app/test/testdata/encryption-and-ad-cues-split-content/output.m3u8 b/packager/app/test/testdata/encryption-and-ad-cues-split-content/output.m3u8 index fd021d6aae..b5bb5fd155 100644 --- a/packager/app/test/testdata/encryption-and-ad-cues-split-content/output.m3u8 +++ b/packager/app/test/testdata/encryption-and-ad-cues-split-content/output.m3u8 @@ -3,7 +3,7 @@ #EXT-X-INDEPENDENT-SEGMENTS -#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",AUTOSELECT=YES,CHANNELS="2" +#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",DEFAULT=NO,AUTOSELECT=YES,CHANNELS="2" #EXT-X-STREAM-INF:BANDWIDTH=1111200,AVERAGE-BANDWIDTH=1009412,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group",CLOSED-CAPTIONS=NONE bear-640x360-video.m3u8 diff --git a/packager/app/test/testdata/encryption-and-ad-cues/output.m3u8 b/packager/app/test/testdata/encryption-and-ad-cues/output.m3u8 index fd021d6aae..b5bb5fd155 100644 --- a/packager/app/test/testdata/encryption-and-ad-cues/output.m3u8 +++ b/packager/app/test/testdata/encryption-and-ad-cues/output.m3u8 @@ -3,7 +3,7 @@ #EXT-X-INDEPENDENT-SEGMENTS -#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",AUTOSELECT=YES,CHANNELS="2" +#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",DEFAULT=NO,AUTOSELECT=YES,CHANNELS="2" #EXT-X-STREAM-INF:BANDWIDTH=1111200,AVERAGE-BANDWIDTH=1009412,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group",CLOSED-CAPTIONS=NONE bear-640x360-video.m3u8 diff --git a/packager/app/test/testdata/encryption-with-multi-drms/output.m3u8 b/packager/app/test/testdata/encryption-with-multi-drms/output.m3u8 index e453da6f3a..dd67ca69a5 100644 --- a/packager/app/test/testdata/encryption-with-multi-drms/output.m3u8 +++ b/packager/app/test/testdata/encryption-with-multi-drms/output.m3u8 @@ -3,7 +3,7 @@ #EXT-X-INDEPENDENT-SEGMENTS -#EXT-X-MEDIA:TYPE=AUDIO,URI="stream_0.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",AUTOSELECT=YES,CHANNELS="2" +#EXT-X-MEDIA:TYPE=AUDIO,URI="stream_0.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",DEFAULT=NO,AUTOSELECT=YES,CHANNELS="2" #EXT-X-STREAM-INF:BANDWIDTH=1111406,AVERAGE-BANDWIDTH=1009412,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group",CLOSED-CAPTIONS=NONE stream_1.m3u8 diff --git a/packager/app/test/testdata/flac-with-encryption/output.m3u8 b/packager/app/test/testdata/flac-with-encryption/output.m3u8 index 0d8dd55cc1..927d4267a6 100644 --- a/packager/app/test/testdata/flac-with-encryption/output.m3u8 +++ b/packager/app/test/testdata/flac-with-encryption/output.m3u8 @@ -3,7 +3,7 @@ #EXT-X-INDEPENDENT-SEGMENTS -#EXT-X-MEDIA:TYPE=AUDIO,URI="stream_0.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",AUTOSELECT=YES,CHANNELS="2" +#EXT-X-MEDIA:TYPE=AUDIO,URI="stream_0.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",DEFAULT=NO,AUTOSELECT=YES,CHANNELS="2" #EXT-X-STREAM-INF:BANDWIDTH=672924,AVERAGE-BANDWIDTH=631380,CODECS="flac",AUDIO="default-audio-group",CLOSED-CAPTIONS=NONE stream_0.m3u8 diff --git a/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/output.m3u8 b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/output.m3u8 index c39e94749a..4611d7198d 100644 --- a/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/output.m3u8 +++ b/packager/app/test/testdata/hls-audio-video-text-with-ad-cues/output.m3u8 @@ -3,9 +3,9 @@ #EXT-X-INDEPENDENT-SEGMENTS -#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",AUTOSELECT=YES,CHANNELS="2" +#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",DEFAULT=NO,AUTOSELECT=YES,CHANNELS="2" -#EXT-X-MEDIA:TYPE=SUBTITLES,URI="bear-english-text.m3u8",GROUP-ID="default-text-group",NAME="stream_2",AUTOSELECT=YES +#EXT-X-MEDIA:TYPE=SUBTITLES,URI="bear-english-text.m3u8",GROUP-ID="default-text-group",NAME="stream_2",DEFAULT=NO,AUTOSELECT=YES #EXT-X-STREAM-INF:BANDWIDTH=1108115,AVERAGE-BANDWIDTH=1006069,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group",SUBTITLES="default-text-group",CLOSED-CAPTIONS=NONE bear-640x360-video.m3u8 diff --git a/packager/app/test/testdata/hls-multi-segment-mp4-with-custom-path/output.m3u8 b/packager/app/test/testdata/hls-multi-segment-mp4-with-custom-path/output.m3u8 index 74abafa996..ddb25cc7c9 100644 --- a/packager/app/test/testdata/hls-multi-segment-mp4-with-custom-path/output.m3u8 +++ b/packager/app/test/testdata/hls-multi-segment-mp4-with-custom-path/output.m3u8 @@ -3,7 +3,7 @@ #EXT-X-INDEPENDENT-SEGMENTS -#EXT-X-MEDIA:TYPE=AUDIO,URI="audio/audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",AUTOSELECT=YES,CHANNELS="2" +#EXT-X-MEDIA:TYPE=AUDIO,URI="audio/audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",DEFAULT=NO,AUTOSELECT=YES,CHANNELS="2" #EXT-X-STREAM-INF:BANDWIDTH=1108115,AVERAGE-BANDWIDTH=1006069,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group",CLOSED-CAPTIONS=NONE video/video.m3u8 diff --git a/packager/app/test/testdata/hls-only-dash-only-captions/output.m3u8 b/packager/app/test/testdata/hls-only-dash-only-captions/output.m3u8 index de0f8c364b..ecc7771c68 100644 --- a/packager/app/test/testdata/hls-only-dash-only-captions/output.m3u8 +++ b/packager/app/test/testdata/hls-only-dash-only-captions/output.m3u8 @@ -3,9 +3,9 @@ #EXT-X-INDEPENDENT-SEGMENTS -#EXT-X-MEDIA:TYPE=AUDIO,URI="stream_0.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",AUTOSELECT=YES,CHANNELS="2" +#EXT-X-MEDIA:TYPE=AUDIO,URI="stream_0.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",DEFAULT=NO,AUTOSELECT=YES,CHANNELS="2" -#EXT-X-MEDIA:TYPE=SUBTITLES,URI="stream_3.m3u8",GROUP-ID="default-text-group",NAME="stream_3",AUTOSELECT=YES +#EXT-X-MEDIA:TYPE=SUBTITLES,URI="stream_3.m3u8",GROUP-ID="default-text-group",NAME="stream_3",DEFAULT=NO,AUTOSELECT=YES #EXT-X-STREAM-INF:BANDWIDTH=1108115,AVERAGE-BANDWIDTH=1006069,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group",SUBTITLES="default-text-group",CLOSED-CAPTIONS=NONE stream_1.m3u8 diff --git a/packager/app/test/testdata/hls-segmented-webvtt/output.m3u8 b/packager/app/test/testdata/hls-segmented-webvtt/output.m3u8 index 2b17374e40..3997a6e7c9 100644 --- a/packager/app/test/testdata/hls-segmented-webvtt/output.m3u8 +++ b/packager/app/test/testdata/hls-segmented-webvtt/output.m3u8 @@ -3,9 +3,9 @@ #EXT-X-INDEPENDENT-SEGMENTS -#EXT-X-MEDIA:TYPE=AUDIO,URI="stream_0.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",AUTOSELECT=YES,CHANNELS="2" +#EXT-X-MEDIA:TYPE=AUDIO,URI="stream_0.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",DEFAULT=NO,AUTOSELECT=YES,CHANNELS="2" -#EXT-X-MEDIA:TYPE=SUBTITLES,URI="stream_2.m3u8",GROUP-ID="default-text-group",NAME="stream_2",AUTOSELECT=YES,CHARACTERISTICS="public.accessibility.transcribes-spoken-dialog,private.accessibility.widevine-special" +#EXT-X-MEDIA:TYPE=SUBTITLES,URI="stream_2.m3u8",GROUP-ID="default-text-group",NAME="stream_2",DEFAULT=NO,AUTOSELECT=YES,CHARACTERISTICS="public.accessibility.transcribes-spoken-dialog,private.accessibility.widevine-special" #EXT-X-STREAM-INF:BANDWIDTH=1217518,AVERAGE-BANDWIDTH=1117319,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group",SUBTITLES="default-text-group",CLOSED-CAPTIONS=NONE stream_1.m3u8 diff --git a/packager/app/test/testdata/hls-single-segment-mp4-encrypted-and-ad-cues/output.m3u8 b/packager/app/test/testdata/hls-single-segment-mp4-encrypted-and-ad-cues/output.m3u8 index c34929fccb..27c623b822 100644 --- a/packager/app/test/testdata/hls-single-segment-mp4-encrypted-and-ad-cues/output.m3u8 +++ b/packager/app/test/testdata/hls-single-segment-mp4-encrypted-and-ad-cues/output.m3u8 @@ -1,7 +1,7 @@ #EXTM3U ## Generated with https://github.com/shaka-project/shaka-packager version -- -#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",AUTOSELECT=YES,CHANNELS="2" +#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",DEFAULT=NO,AUTOSELECT=YES,CHANNELS="2" #EXT-X-STREAM-INF:BANDWIDTH=1111200,AVERAGE-BANDWIDTH=1009412,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,AUDIO="default-audio-group" bear-640x360-video.m3u8 diff --git a/packager/app/test/testdata/hls-single-segment-mp4-encrypted/output.m3u8 b/packager/app/test/testdata/hls-single-segment-mp4-encrypted/output.m3u8 index bc4f0bdb3b..2f7d4ad0ad 100644 --- a/packager/app/test/testdata/hls-single-segment-mp4-encrypted/output.m3u8 +++ b/packager/app/test/testdata/hls-single-segment-mp4-encrypted/output.m3u8 @@ -3,7 +3,7 @@ #EXT-X-INDEPENDENT-SEGMENTS -#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",AUTOSELECT=YES,CHANNELS="2" +#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",DEFAULT=NO,AUTOSELECT=YES,CHANNELS="2" #EXT-X-STREAM-INF:BANDWIDTH=1111406,AVERAGE-BANDWIDTH=1009412,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group",CLOSED-CAPTIONS=NONE bear-640x360-video.m3u8 diff --git a/packager/app/test/testdata/hls-with-bandwidth-override/output.m3u8 b/packager/app/test/testdata/hls-with-bandwidth-override/output.m3u8 index 5cd3530db0..f701f1a92c 100644 --- a/packager/app/test/testdata/hls-with-bandwidth-override/output.m3u8 +++ b/packager/app/test/testdata/hls-with-bandwidth-override/output.m3u8 @@ -1,7 +1,7 @@ #EXTM3U ## Generated with https://github.com/shaka-project/shaka-packager version -- -#EXT-X-MEDIA:TYPE=AUDIO,URI="stream_0.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",AUTOSELECT=YES,CHANNELS="2" +#EXT-X-MEDIA:TYPE=AUDIO,URI="stream_0.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",DEFAULT=NO,AUTOSELECT=YES,CHANNELS="2" #EXT-X-STREAM-INF:BANDWIDTH=55555,AVERAGE-BANDWIDTH=983986,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,AUDIO="default-audio-group" stream_1.m3u8 diff --git a/packager/app/test/testdata/live-profile-with-webm/output.m3u8 b/packager/app/test/testdata/live-profile-with-webm/output.m3u8 index 7f855c39d6..57ad801cfc 100644 --- a/packager/app/test/testdata/live-profile-with-webm/output.m3u8 +++ b/packager/app/test/testdata/live-profile-with-webm/output.m3u8 @@ -3,7 +3,7 @@ #EXT-X-INDEPENDENT-SEGMENTS -#EXT-X-MEDIA:TYPE=AUDIO,URI="stream_0.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",AUTOSELECT=YES,CHANNELS="2" +#EXT-X-MEDIA:TYPE=AUDIO,URI="stream_0.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",DEFAULT=NO,AUTOSELECT=YES,CHANNELS="2" #EXT-X-STREAM-INF:BANDWIDTH=556353,AVERAGE-BANDWIDTH=412719,CODECS="vp08.00.10.08.01.02.02.02.00,vorbis",RESOLUTION=640x360,FRAME-RATE=30.303,AUDIO="default-audio-group",CLOSED-CAPTIONS=NONE stream_1.m3u8 diff --git a/packager/app/test/testdata/mp4-trailing-moov/output.m3u8 b/packager/app/test/testdata/mp4-trailing-moov/output.m3u8 index 2712e9c7e7..b6704051e0 100644 --- a/packager/app/test/testdata/mp4-trailing-moov/output.m3u8 +++ b/packager/app/test/testdata/mp4-trailing-moov/output.m3u8 @@ -3,7 +3,7 @@ #EXT-X-INDEPENDENT-SEGMENTS -#EXT-X-MEDIA:TYPE=AUDIO,URI="stream_0.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",AUTOSELECT=YES,CHANNELS="2" +#EXT-X-MEDIA:TYPE=AUDIO,URI="stream_0.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",DEFAULT=NO,AUTOSELECT=YES,CHANNELS="2" #EXT-X-STREAM-INF:BANDWIDTH=1106817,AVERAGE-BANDWIDTH=1004632,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group",CLOSED-CAPTIONS=NONE stream_1.m3u8 diff --git a/packager/app/test/testdata/segmented-ttml-mp4/output.m3u8 b/packager/app/test/testdata/segmented-ttml-mp4/output.m3u8 index ecf7a821e3..43ca58ff4c 100644 --- a/packager/app/test/testdata/segmented-ttml-mp4/output.m3u8 +++ b/packager/app/test/testdata/segmented-ttml-mp4/output.m3u8 @@ -3,4 +3,4 @@ #EXT-X-INDEPENDENT-SEGMENTS -#EXT-X-MEDIA:TYPE=SUBTITLES,URI="stream_0.m3u8",GROUP-ID="default-text-group",NAME="stream_0",AUTOSELECT=YES +#EXT-X-MEDIA:TYPE=SUBTITLES,URI="stream_0.m3u8",GROUP-ID="default-text-group",NAME="stream_0",DEFAULT=NO,AUTOSELECT=YES diff --git a/packager/app/test/testdata/segmented-ttml-text/output.m3u8 b/packager/app/test/testdata/segmented-ttml-text/output.m3u8 index ecf7a821e3..43ca58ff4c 100644 --- a/packager/app/test/testdata/segmented-ttml-text/output.m3u8 +++ b/packager/app/test/testdata/segmented-ttml-text/output.m3u8 @@ -3,4 +3,4 @@ #EXT-X-INDEPENDENT-SEGMENTS -#EXT-X-MEDIA:TYPE=SUBTITLES,URI="stream_0.m3u8",GROUP-ID="default-text-group",NAME="stream_0",AUTOSELECT=YES +#EXT-X-MEDIA:TYPE=SUBTITLES,URI="stream_0.m3u8",GROUP-ID="default-text-group",NAME="stream_0",DEFAULT=NO,AUTOSELECT=YES diff --git a/packager/app/test/testdata/segmented-webvtt-mp4/output.m3u8 b/packager/app/test/testdata/segmented-webvtt-mp4/output.m3u8 index ecf7a821e3..43ca58ff4c 100644 --- a/packager/app/test/testdata/segmented-webvtt-mp4/output.m3u8 +++ b/packager/app/test/testdata/segmented-webvtt-mp4/output.m3u8 @@ -3,4 +3,4 @@ #EXT-X-INDEPENDENT-SEGMENTS -#EXT-X-MEDIA:TYPE=SUBTITLES,URI="stream_0.m3u8",GROUP-ID="default-text-group",NAME="stream_0",AUTOSELECT=YES +#EXT-X-MEDIA:TYPE=SUBTITLES,URI="stream_0.m3u8",GROUP-ID="default-text-group",NAME="stream_0",DEFAULT=NO,AUTOSELECT=YES diff --git a/packager/app/test/testdata/segmented-webvtt-text/output.m3u8 b/packager/app/test/testdata/segmented-webvtt-text/output.m3u8 index ecf7a821e3..43ca58ff4c 100644 --- a/packager/app/test/testdata/segmented-webvtt-text/output.m3u8 +++ b/packager/app/test/testdata/segmented-webvtt-text/output.m3u8 @@ -3,4 +3,4 @@ #EXT-X-INDEPENDENT-SEGMENTS -#EXT-X-MEDIA:TYPE=SUBTITLES,URI="stream_0.m3u8",GROUP-ID="default-text-group",NAME="stream_0",AUTOSELECT=YES +#EXT-X-MEDIA:TYPE=SUBTITLES,URI="stream_0.m3u8",GROUP-ID="default-text-group",NAME="stream_0",DEFAULT=NO,AUTOSELECT=YES diff --git a/packager/app/test/testdata/segmented-webvtt-with-language-override/output.m3u8 b/packager/app/test/testdata/segmented-webvtt-with-language-override/output.m3u8 index 1566d6c65b..4c16b8cfa6 100644 --- a/packager/app/test/testdata/segmented-webvtt-with-language-override/output.m3u8 +++ b/packager/app/test/testdata/segmented-webvtt-with-language-override/output.m3u8 @@ -3,4 +3,4 @@ #EXT-X-INDEPENDENT-SEGMENTS -#EXT-X-MEDIA:TYPE=SUBTITLES,URI="stream_1.m3u8",GROUP-ID="default-text-group",LANGUAGE="pt",NAME="stream_1",AUTOSELECT=YES +#EXT-X-MEDIA:TYPE=SUBTITLES,URI="stream_1.m3u8",GROUP-ID="default-text-group",LANGUAGE="pt",NAME="stream_1",DEFAULT=NO,AUTOSELECT=YES diff --git a/packager/app/test/testdata/single-file-webvtt-text/output.m3u8 b/packager/app/test/testdata/single-file-webvtt-text/output.m3u8 index ecf7a821e3..43ca58ff4c 100644 --- a/packager/app/test/testdata/single-file-webvtt-text/output.m3u8 +++ b/packager/app/test/testdata/single-file-webvtt-text/output.m3u8 @@ -3,4 +3,4 @@ #EXT-X-INDEPENDENT-SEGMENTS -#EXT-X-MEDIA:TYPE=SUBTITLES,URI="stream_0.m3u8",GROUP-ID="default-text-group",NAME="stream_0",AUTOSELECT=YES +#EXT-X-MEDIA:TYPE=SUBTITLES,URI="stream_0.m3u8",GROUP-ID="default-text-group",NAME="stream_0",DEFAULT=NO,AUTOSELECT=YES diff --git a/packager/app/test/testdata/vtt-text-to-mp4-with-ad-cues/output.m3u8 b/packager/app/test/testdata/vtt-text-to-mp4-with-ad-cues/output.m3u8 index c39e94749a..4611d7198d 100644 --- a/packager/app/test/testdata/vtt-text-to-mp4-with-ad-cues/output.m3u8 +++ b/packager/app/test/testdata/vtt-text-to-mp4-with-ad-cues/output.m3u8 @@ -3,9 +3,9 @@ #EXT-X-INDEPENDENT-SEGMENTS -#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",AUTOSELECT=YES,CHANNELS="2" +#EXT-X-MEDIA:TYPE=AUDIO,URI="bear-640x360-audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",DEFAULT=NO,AUTOSELECT=YES,CHANNELS="2" -#EXT-X-MEDIA:TYPE=SUBTITLES,URI="bear-english-text.m3u8",GROUP-ID="default-text-group",NAME="stream_2",AUTOSELECT=YES +#EXT-X-MEDIA:TYPE=SUBTITLES,URI="bear-english-text.m3u8",GROUP-ID="default-text-group",NAME="stream_2",DEFAULT=NO,AUTOSELECT=YES #EXT-X-STREAM-INF:BANDWIDTH=1108115,AVERAGE-BANDWIDTH=1006069,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group",SUBTITLES="default-text-group",CLOSED-CAPTIONS=NONE bear-640x360-video.m3u8 diff --git a/packager/file/http_file.cc b/packager/file/http_file.cc index 9d8694e857..37f4e799f7 100644 --- a/packager/file/http_file.cc +++ b/packager/file/http_file.cc @@ -260,6 +260,7 @@ int64_t HttpFile::Read(void* buffer, uint64_t length) { } int64_t HttpFile::Write(const void* buffer, uint64_t length) { + DCHECK(!upload_cache_.closed()); VLOG(2) << "Writing to " << url_ << ", length=" << length; return upload_cache_.Write(buffer, length); } @@ -270,7 +271,8 @@ int64_t HttpFile::Size() { } bool HttpFile::Flush() { - upload_cache_.Close(); + // Wait for curl to read any data we may have buffered. + upload_cache_.WaitUntilEmptyOrClosed(); return true; } diff --git a/packager/hls/base/master_playlist.cc b/packager/hls/base/master_playlist.cc index cdb1f080a5..ec5849d2d9 100644 --- a/packager/hls/base/master_playlist.cc +++ b/packager/hls/base/master_playlist.cc @@ -312,6 +312,8 @@ void BuildMediaTag(const MediaPlaylist& playlist, if (is_default) { tag.AddString("DEFAULT", "YES"); + } else { + tag.AddString("DEFAULT", "NO"); } if (is_autoselect) { diff --git a/packager/media/formats/ttml/ttml_generator.cc b/packager/media/formats/ttml/ttml_generator.cc index 883691f670..193810fba8 100644 --- a/packager/media/formats/ttml/ttml_generator.cc +++ b/packager/media/formats/ttml/ttml_generator.cc @@ -29,7 +29,7 @@ std::string ToTtmlTime(int64_t time, int32_t timescale) { remaining /= 60; const int hr = remaining; - return base::StringPrintf("%02d:%02d:%02d.%02d", hr, min, sec, ms); + return base::StringPrintf("%02d:%02d:%02d.%03d", hr, min, sec, ms); } std::string ToTtmlSize(const TextNumber& x, const TextNumber& y) { diff --git a/packager/media/formats/ttml/ttml_generator_unittest.cc b/packager/media/formats/ttml/ttml_generator_unittest.cc index 8ae644c8c8..8a3915e8ca 100644 --- a/packager/media/formats/ttml/ttml_generator_unittest.cc +++ b/packager/media/formats/ttml/ttml_generator_unittest.cc @@ -67,8 +67,8 @@ TEST_F(TtmlMuxerTest, WithOneSegmentAndWithOneSample) { " \n" " \n" "
\n" - "

payload

\n" + "

payload

\n" "
\n" " \n" "\n"; @@ -86,8 +86,8 @@ TEST_F(TtmlMuxerTest, MultipleFragmentsWithNewlines) { " \n" " \n" "
\n" - "

foo bar
baz

\n" + "

foo bar
baz

\n" "
\n" " \n" "\n"; @@ -109,8 +109,8 @@ TEST_F(TtmlMuxerTest, HandlesStyles) { " \n" " \n" "
\n" - "

\n" + "

\n" " foo\n" " bar\n" " baz\n" @@ -141,8 +141,8 @@ TEST_F(TtmlMuxerTest, HandlesRegions) { " \n" " \n" "

\n" - "

bar

\n" + "

bar

\n" "
\n" " \n" "\n"; @@ -169,8 +169,8 @@ TEST_F(TtmlMuxerTest, HandlesLanguage) { " \n" " \n" "
\n" - "

bar

\n" + "

bar

\n" "
\n" " \n" "\n"; @@ -192,8 +192,8 @@ TEST_F(TtmlMuxerTest, HandlesPosition) { "
\n" " \n" - "

bar

\n" + "

bar

\n" "
\n" " \n" "\n"; @@ -216,8 +216,8 @@ TEST_F(TtmlMuxerTest, HandlesOtherSettings) { " \n" " \n" "
\n" - "

bar

\n" "
\n" " \n" @@ -240,8 +240,8 @@ TEST_F(TtmlMuxerTest, HandlesCueId) { " \n" " \n" "
\n" - "

bar

\n" + "

bar

\n" "
\n" " \n" "\n"; @@ -265,8 +265,8 @@ TEST_F(TtmlMuxerTest, EscapesSpecialChars) { " \n" " \n" "
\n" - "

<tag>\"foo&bar\"

\n" "
\n" " \n" @@ -290,8 +290,8 @@ TEST_F(TtmlMuxerTest, HandlesReset) { " \n" " \n" "
\n" - "

foo

\n" + "

foo

\n" "
\n" " \n" "\n"; @@ -302,8 +302,8 @@ TEST_F(TtmlMuxerTest, HandlesReset) { " \n" " \n" "
\n" - "

bar

\n" + "

bar

\n" "
\n" " \n" "\n"; @@ -339,8 +339,8 @@ TEST_F(TtmlMuxerTest, HandlesImage) { " \n" " \n" "
\n" - "

\n" + "

\n" "

\n" " \n" "\n"; @@ -352,6 +352,27 @@ TEST_F(TtmlMuxerTest, HandlesImage) { ParseSingleCue(kExpectedOutput, properties); } +TEST_F(TtmlMuxerTest, FormatsTimeWithFixedNumberOfDigits) { + const char* kExpectedOutput = + "\n" + "\n" + " \n" + " \n" + "
\n" + "

payload

\n" + "
\n" + " \n" + "
\n"; + + TestProperties properties; + properties.body.body = "payload"; + properties.start = 0; + properties.end = 1; + ParseSingleCue(kExpectedOutput, properties); +} + } // namespace ttml } // namespace media } // namespace shaka diff --git a/packager/mpd/base/representation_unittest.cc b/packager/mpd/base/representation_unittest.cc index 8b00ad2ff1..acf734a0e2 100644 --- a/packager/mpd/base/representation_unittest.cc +++ b/packager/mpd/base/representation_unittest.cc @@ -559,8 +559,8 @@ TEST_F(SegmentTemplateTest, OneSegmentLowLatency) { " width=\"720\" height=\"480\" frameRate=\"10/5\">\n" " \n" + " availabilityTimeComplete=\"false\" initialization=\"init.mp4\" " + " media=\"$Time$.mp4\" startNumber=\"1\"/>\n" "\n"; EXPECT_THAT(representation_->GetXml(), XmlNodeEqual(kOutputTemplate)); } diff --git a/packager/mpd/base/xml/xml_node.cc b/packager/mpd/base/xml/xml_node.cc index 7ebaf4e180..8b1044d1c4 100644 --- a/packager/mpd/base/xml/xml_node.cc +++ b/packager/mpd/base/xml/xml_node.cc @@ -483,6 +483,11 @@ bool RepresentationXmlNode::AddLiveOnlyInfo( "availabilityTimeOffset", media_info.availability_time_offset())); } + if (low_latency_dash_mode) { + RCHECK(segment_template.SetStringAttribute("availabilityTimeComplete", + "false")); + } + if (media_info.has_init_segment_url()) { RCHECK(segment_template.SetStringAttribute("initialization", media_info.init_segment_url())); diff --git a/packager/mpd/base/xml/xml_node_unittest.cc b/packager/mpd/base/xml/xml_node_unittest.cc index 1e3bb09d42..22d35aa98f 100644 --- a/packager/mpd/base/xml/xml_node_unittest.cc +++ b/packager/mpd/base/xml/xml_node_unittest.cc @@ -752,6 +752,7 @@ TEST_F(LowLatencySegmentTest, LowLatencySegmentTemplate) { XmlNodeEqual("" " "