diff --git a/packager/app/test/packager_test.py b/packager/app/test/packager_test.py index 5724703ca5..6b71dc9d20 100755 --- a/packager/app/test/packager_test.py +++ b/packager/app/test/packager_test.py @@ -8,6 +8,7 @@ """Tests utilizing the sample packager binary.""" import filecmp +import glob import os import platform import re @@ -42,6 +43,38 @@ class StreamDescriptor(object): return self.buffer +def _UpdateMpdTimes(mpd_filepath): + # Take a single pattern, and replace the first match with the + # given new string. + def _Replace(str_in, pattern, new): + m = re.search(pattern, str_in) + + if m: + old = m.group(0) + out = str_in.replace(old, new) + print 'Replacing "%s" with "%s"' % (old, new) + else: + out = str_in + + return out + + with open(mpd_filepath, 'rb') as f: + content = f.read() + + content = _Replace( + content, + 'availabilityStartTime="[^"]+"', + 'availabilityStartTime="some_time"') + + content = _Replace( + content, + 'publishTime="[^"]+"', + 'publishTime="some_time"') + + with open(mpd_filepath, 'wb') as f: + f.write(content) + + def GetExtension(stream_descriptor, output_format): # TODO(rkuroiwa): Support ttml. if stream_descriptor == 'text': @@ -358,6 +391,7 @@ class PackagerAppTest(unittest.TestCase): f.write(content.replace(test_output, 'place_holder')) self._DiffGold(media_info_output, golden_file_name + '.media_info') + # TODO(vaage): Replace all used of this with |_CheckTestResults|. def _DiffLiveGold(self, test_output_prefix, golden_file_name_prefix, @@ -374,33 +408,15 @@ class PackagerAppTest(unittest.TestCase): self._DiffGold('%s-%d.m4s' % (test_output_prefix, i), '%s-%d.m4s' % (golden_file_name_prefix, i)) - # Live mpd contains current availabilityStartTime and publishTime, which - # needs to be replaced for comparison. - def _DiffLiveMpdGold(self, test_output, golden_file_name): - with open(test_output, 'rb') as f: - content = f.read() - - # Extract availabilityStartTime. - m = re.search('availabilityStartTime="[^"]+"', content) - self.assertIsNotNone(m) - availability_start_time = m.group(0) - print availability_start_time - - # Extract publishTime. - m = re.search('publishTime="[^"]+"', content) - self.assertIsNotNone(m) - publish_time = m.group(0) - print publish_time - with open(test_output, 'wb') as f: - f.write(content.replace( - availability_start_time, - 'availabilityStartTime="some_availability_start_time"').replace( - publish_time, 'publishTime="some_publish_time"')) - - self._DiffGold(test_output, golden_file_name) - # |test_dir| is expected to be relative to |self.golden_file_dir|. def _CheckTestResults(self, test_dir): + # Live mpd contains current availabilityStartTime and publishTime, which + # needs to be replaced before comparison. If this is not a live test, then + # this will be a no-op. + mpds = glob.glob(os.path.join(self.tmp_dir, '*.mpd')) + for manifest in mpds: + _UpdateMpdTimes(manifest) + if test_env.options.test_update_golden_files: self._UpdateGold(test_dir) else: @@ -913,20 +929,7 @@ class PackagerFunctionalTest(PackagerAppTest): hls=True, test_files=['bear-640x360.ts']), self._GetFlags(encryption=True, output_hls=True)) - self._DiffLiveGold(self.output[0], - 'bear-640x360-a-enc-golden', - output_format='ts') - self._DiffLiveGold(self.output[1], - 'bear-640x360-v-enc-golden', - output_format='ts') - self._DiffGold(self.hls_master_playlist_output, - 'bear-640x360-av-master-golden.m3u8') - self._DiffGold( - os.path.join(self.tmp_dir, 'audio.m3u8'), - 'bear-640x360-a-enc-golden.m3u8') - self._DiffGold( - os.path.join(self.tmp_dir, 'video.m3u8'), - 'bear-640x360-v-enc-golden.m3u8') + self._CheckTestResults('avc-ts-with-encryption') def testPackageAvcTsWithEncryptionAndFairplay(self): # Currently we only support live packaging for ts. @@ -938,20 +941,7 @@ class PackagerFunctionalTest(PackagerAppTest): hls=True, test_files=['bear-640x360.ts']), self._GetFlags(encryption=True, output_hls=True, fairplay=True)) - self._DiffLiveGold(self.output[0], - 'bear-640x360-a-enc-golden', - output_format='ts') - self._DiffLiveGold(self.output[1], - 'bear-640x360-v-enc-golden', - output_format='ts') - self._DiffGold(self.hls_master_playlist_output, - 'bear-640x360-av-master-golden.m3u8') - self._DiffGold( - os.path.join(self.tmp_dir, 'audio.m3u8'), - 'bear-640x360-a-fairplay-enc-golden.m3u8') - self._DiffGold( - os.path.join(self.tmp_dir, 'video.m3u8'), - 'bear-640x360-v-fairplay-enc-golden.m3u8') + self._CheckTestResults('avc-ts-with-encryption-and-fairplay') def testPackageAvcAc3TsWithEncryption(self): # Currently we only support live packaging for ts. @@ -963,20 +953,7 @@ class PackagerFunctionalTest(PackagerAppTest): hls=True, test_files=['bear-640x360-ac3.ts']), self._GetFlags(encryption=True, output_hls=True)) - self._DiffLiveGold(self.output[0], - 'bear-640x360-ac3-enc-golden', - output_format='ts') - self._DiffLiveGold(self.output[1], - 'bear-640x360-v-enc-golden', - output_format='ts') - self._DiffGold(self.hls_master_playlist_output, - 'bear-640x360-av-ac3-master-golden.m3u8') - self._DiffGold( - os.path.join(self.tmp_dir, 'audio.m3u8'), - 'bear-640x360-ac3-enc-golden.m3u8') - self._DiffGold( - os.path.join(self.tmp_dir, 'video.m3u8'), - 'bear-640x360-v-enc-golden.m3u8') + self._CheckTestResults('avc-ac3-ts-with-encryption') def testPackageAvcTsWithEncryptionExerciseEmulationPrevention(self): self.encryption_key = 'ad7e9786def9159db6724be06dfcde7a' @@ -991,14 +968,8 @@ class PackagerFunctionalTest(PackagerAppTest): self._GetFlags( encryption=True, output_hls=True)) - self._DiffLiveGold(self.output[0], - 'sintel-1024x436-v-enc-golden', - output_format='ts') - self._DiffGold(self.hls_master_playlist_output, - 'sintel-1024x436-v-enc-master-golden.m3u8') - self._DiffGold( - os.path.join(self.tmp_dir, 'video.m3u8'), - 'sintel-1024x436-v-enc-golden.m3u8') + self._CheckTestResults( + 'avc-ts-with-encryption-exercise-emulation-prevention') def testPackageWebmWithEncryption(self): self.assertPackageSuccess( @@ -1158,9 +1129,7 @@ class PackagerFunctionalTest(PackagerAppTest): def testPackageLiveProfile(self): self.assertPackageSuccess( self._GetStreams(['audio', 'video'], segmented=True), self._GetFlags()) - self._DiffLiveGold(self.output[0], 'bear-640x360-a-live-golden') - self._DiffLiveGold(self.output[1], 'bear-640x360-v-live-golden') - self._DiffLiveMpdGold(self.mpd_output, 'bear-640x360-av-live-golden.mpd') + self._CheckTestResults('live-profile') def testPackageLiveStaticProfile(self): self.assertPackageSuccess( @@ -1178,19 +1147,14 @@ class PackagerFunctionalTest(PackagerAppTest): self.assertPackageSuccess( self._GetStreams(['audio', 'video'], segmented=True), self._GetFlags(encryption=True)) - self._DiffLiveGold(self.output[0], 'bear-640x360-a-live-cenc-golden') - self._DiffLiveGold(self.output[1], 'bear-640x360-v-live-cenc-golden') - self._DiffLiveMpdGold(self.mpd_output, - 'bear-640x360-av-live-cenc-golden.mpd') + self._CheckTestResults('live-profile-and-encryption') def testPackageLiveProfileAndEncryptionAndNonDashIfIop(self): self.assertPackageSuccess( self._GetStreams(['audio', 'video'], segmented=True), self._GetFlags(encryption=True, dash_if_iop=False)) - self._DiffLiveGold(self.output[0], 'bear-640x360-a-live-cenc-golden') - self._DiffLiveGold(self.output[1], 'bear-640x360-v-live-cenc-golden') - self._DiffLiveMpdGold(self.mpd_output, - 'bear-640x360-av-live-cenc-non-iop-golden.mpd') + self._CheckTestResults( + 'live-profile-and-encryption-and-non-dash-if-iop') def testPackageLiveProfileAndEncryptionAndMultFiles(self): self.assertPackageSuccess( @@ -1210,25 +1174,15 @@ class PackagerFunctionalTest(PackagerAppTest): self.assertPackageSuccess( self._GetStreams(['audio', 'video'], segmented=True), self._GetFlags(encryption=True, key_rotation=True)) - self._DiffLiveGold(self.output[0], - 'bear-640x360-a-live-cenc-rotation-golden') - self._DiffLiveGold(self.output[1], - 'bear-640x360-v-live-cenc-rotation-golden') - self._DiffLiveMpdGold(self.mpd_output, - 'bear-640x360-av-live-cenc-rotation-golden.mpd') + self._CheckTestResults('live-profile-and-key-rotation') def testPackageLiveProfileAndKeyRotationAndNoPsshInStream(self): self.assertPackageSuccess( self._GetStreams(['audio', 'video'], segmented=True), self._GetFlags( encryption=True, key_rotation=True, include_pssh_in_stream=False)) - self._DiffLiveGold(self.output[0], - 'bear-640x360-a-live-cenc-rotation-no-pssh-golden') - self._DiffLiveGold(self.output[1], - 'bear-640x360-v-live-cenc-rotation-no-pssh-golden') - self._DiffLiveMpdGold( - self.mpd_output, - 'bear-640x360-av-live-cenc-rotation-no-pssh-golden.mpd') + self._CheckTestResults( + 'live-profile-and-key-rotation-and-no-pssh-in-stream') def testPackageLiveProfileAndKeyRotationAndNonDashIfIop(self): self.assertPackageSuccess( @@ -1236,13 +1190,8 @@ class PackagerFunctionalTest(PackagerAppTest): self._GetFlags(encryption=True, key_rotation=True, dash_if_iop=False)) - self._DiffLiveGold(self.output[0], - 'bear-640x360-a-live-cenc-rotation-golden') - self._DiffLiveGold(self.output[1], - 'bear-640x360-v-live-cenc-rotation-golden') - self._DiffLiveMpdGold( - self.mpd_output, - 'bear-640x360-av-live-cenc-rotation-non-iop-golden.mpd') + self._CheckTestResults( + 'live-profile-and-key-rotation-and-non-dash-if-iop') @unittest.skipUnless(test_env.has_aes_flags, 'Requires AES credentials.') def testWidevineEncryptionWithAes(self): diff --git a/packager/app/test/testdata/bear-640x360-ac3-enc-golden.m3u8 b/packager/app/test/testdata/avc-ac3-ts-with-encryption/audio.m3u8 similarity index 100% rename from packager/app/test/testdata/bear-640x360-ac3-enc-golden.m3u8 rename to packager/app/test/testdata/avc-ac3-ts-with-encryption/audio.m3u8 diff --git a/packager/app/test/testdata/bear-640x360-av-ac3-master-golden.m3u8 b/packager/app/test/testdata/avc-ac3-ts-with-encryption/output.m3u8 similarity index 100% rename from packager/app/test/testdata/bear-640x360-av-ac3-master-golden.m3u8 rename to packager/app/test/testdata/avc-ac3-ts-with-encryption/output.m3u8 diff --git a/packager/app/test/testdata/bear-640x360-ac3-enc-golden-1.ts b/packager/app/test/testdata/avc-ac3-ts-with-encryption/output_audio-1.ts similarity index 100% rename from packager/app/test/testdata/bear-640x360-ac3-enc-golden-1.ts rename to packager/app/test/testdata/avc-ac3-ts-with-encryption/output_audio-1.ts diff --git a/packager/app/test/testdata/bear-640x360-ac3-enc-golden-2.ts b/packager/app/test/testdata/avc-ac3-ts-with-encryption/output_audio-2.ts similarity index 100% rename from packager/app/test/testdata/bear-640x360-ac3-enc-golden-2.ts rename to packager/app/test/testdata/avc-ac3-ts-with-encryption/output_audio-2.ts diff --git a/packager/app/test/testdata/bear-640x360-ac3-enc-golden-3.ts b/packager/app/test/testdata/avc-ac3-ts-with-encryption/output_audio-3.ts similarity index 100% rename from packager/app/test/testdata/bear-640x360-ac3-enc-golden-3.ts rename to packager/app/test/testdata/avc-ac3-ts-with-encryption/output_audio-3.ts diff --git a/packager/app/test/testdata/bear-640x360-v-enc-golden-1.ts b/packager/app/test/testdata/avc-ac3-ts-with-encryption/output_video-1.ts similarity index 100% rename from packager/app/test/testdata/bear-640x360-v-enc-golden-1.ts rename to packager/app/test/testdata/avc-ac3-ts-with-encryption/output_video-1.ts diff --git a/packager/app/test/testdata/bear-640x360-v-enc-golden-2.ts b/packager/app/test/testdata/avc-ac3-ts-with-encryption/output_video-2.ts similarity index 100% rename from packager/app/test/testdata/bear-640x360-v-enc-golden-2.ts rename to packager/app/test/testdata/avc-ac3-ts-with-encryption/output_video-2.ts diff --git a/packager/app/test/testdata/bear-640x360-v-enc-golden-3.ts b/packager/app/test/testdata/avc-ac3-ts-with-encryption/output_video-3.ts similarity index 100% rename from packager/app/test/testdata/bear-640x360-v-enc-golden-3.ts rename to packager/app/test/testdata/avc-ac3-ts-with-encryption/output_video-3.ts diff --git a/packager/app/test/testdata/bear-640x360-v-enc-golden.m3u8 b/packager/app/test/testdata/avc-ac3-ts-with-encryption/video.m3u8 similarity index 100% rename from packager/app/test/testdata/bear-640x360-v-enc-golden.m3u8 rename to packager/app/test/testdata/avc-ac3-ts-with-encryption/video.m3u8 diff --git a/packager/app/test/testdata/bear-640x360-a-fairplay-enc-golden.m3u8 b/packager/app/test/testdata/avc-ts-with-encryption-and-fairplay/audio.m3u8 similarity index 100% rename from packager/app/test/testdata/bear-640x360-a-fairplay-enc-golden.m3u8 rename to packager/app/test/testdata/avc-ts-with-encryption-and-fairplay/audio.m3u8 diff --git a/packager/app/test/testdata/bear-640x360-av-master-golden.m3u8 b/packager/app/test/testdata/avc-ts-with-encryption-and-fairplay/output.m3u8 similarity index 100% rename from packager/app/test/testdata/bear-640x360-av-master-golden.m3u8 rename to packager/app/test/testdata/avc-ts-with-encryption-and-fairplay/output.m3u8 diff --git a/packager/app/test/testdata/bear-640x360-a-enc-golden-1.ts b/packager/app/test/testdata/avc-ts-with-encryption-and-fairplay/output_audio-1.ts similarity index 100% rename from packager/app/test/testdata/bear-640x360-a-enc-golden-1.ts rename to packager/app/test/testdata/avc-ts-with-encryption-and-fairplay/output_audio-1.ts diff --git a/packager/app/test/testdata/bear-640x360-a-enc-golden-2.ts b/packager/app/test/testdata/avc-ts-with-encryption-and-fairplay/output_audio-2.ts similarity index 100% rename from packager/app/test/testdata/bear-640x360-a-enc-golden-2.ts rename to packager/app/test/testdata/avc-ts-with-encryption-and-fairplay/output_audio-2.ts diff --git a/packager/app/test/testdata/bear-640x360-a-enc-golden-3.ts b/packager/app/test/testdata/avc-ts-with-encryption-and-fairplay/output_audio-3.ts similarity index 100% rename from packager/app/test/testdata/bear-640x360-a-enc-golden-3.ts rename to packager/app/test/testdata/avc-ts-with-encryption-and-fairplay/output_audio-3.ts diff --git a/packager/app/test/testdata/avc-ts-with-encryption-and-fairplay/output_video-1.ts b/packager/app/test/testdata/avc-ts-with-encryption-and-fairplay/output_video-1.ts new file mode 100644 index 0000000000..c8600d8422 Binary files /dev/null and b/packager/app/test/testdata/avc-ts-with-encryption-and-fairplay/output_video-1.ts differ diff --git a/packager/app/test/testdata/avc-ts-with-encryption-and-fairplay/output_video-2.ts b/packager/app/test/testdata/avc-ts-with-encryption-and-fairplay/output_video-2.ts new file mode 100644 index 0000000000..80d082525f Binary files /dev/null and b/packager/app/test/testdata/avc-ts-with-encryption-and-fairplay/output_video-2.ts differ diff --git a/packager/app/test/testdata/avc-ts-with-encryption-and-fairplay/output_video-3.ts b/packager/app/test/testdata/avc-ts-with-encryption-and-fairplay/output_video-3.ts new file mode 100644 index 0000000000..679ea2f35b Binary files /dev/null and b/packager/app/test/testdata/avc-ts-with-encryption-and-fairplay/output_video-3.ts differ diff --git a/packager/app/test/testdata/bear-640x360-v-fairplay-enc-golden.m3u8 b/packager/app/test/testdata/avc-ts-with-encryption-and-fairplay/video.m3u8 similarity index 100% rename from packager/app/test/testdata/bear-640x360-v-fairplay-enc-golden.m3u8 rename to packager/app/test/testdata/avc-ts-with-encryption-and-fairplay/video.m3u8 diff --git a/packager/app/test/testdata/sintel-1024x436-v-enc-master-golden.m3u8 b/packager/app/test/testdata/avc-ts-with-encryption-exercise-emulation-prevention/output.m3u8 similarity index 100% rename from packager/app/test/testdata/sintel-1024x436-v-enc-master-golden.m3u8 rename to packager/app/test/testdata/avc-ts-with-encryption-exercise-emulation-prevention/output.m3u8 diff --git a/packager/app/test/testdata/sintel-1024x436-v-enc-golden-1.ts b/packager/app/test/testdata/avc-ts-with-encryption-exercise-emulation-prevention/output_video-1.ts similarity index 100% rename from packager/app/test/testdata/sintel-1024x436-v-enc-golden-1.ts rename to packager/app/test/testdata/avc-ts-with-encryption-exercise-emulation-prevention/output_video-1.ts diff --git a/packager/app/test/testdata/sintel-1024x436-v-enc-golden-2.ts b/packager/app/test/testdata/avc-ts-with-encryption-exercise-emulation-prevention/output_video-2.ts similarity index 100% rename from packager/app/test/testdata/sintel-1024x436-v-enc-golden-2.ts rename to packager/app/test/testdata/avc-ts-with-encryption-exercise-emulation-prevention/output_video-2.ts diff --git a/packager/app/test/testdata/sintel-1024x436-v-enc-golden-3.ts b/packager/app/test/testdata/avc-ts-with-encryption-exercise-emulation-prevention/output_video-3.ts similarity index 100% rename from packager/app/test/testdata/sintel-1024x436-v-enc-golden-3.ts rename to packager/app/test/testdata/avc-ts-with-encryption-exercise-emulation-prevention/output_video-3.ts diff --git a/packager/app/test/testdata/avc-ts-with-encryption-exercise-emulation-prevention/output_video-4.ts b/packager/app/test/testdata/avc-ts-with-encryption-exercise-emulation-prevention/output_video-4.ts new file mode 100644 index 0000000000..c29fc7f86b Binary files /dev/null and b/packager/app/test/testdata/avc-ts-with-encryption-exercise-emulation-prevention/output_video-4.ts differ diff --git a/packager/app/test/testdata/avc-ts-with-encryption-exercise-emulation-prevention/output_video-5.ts b/packager/app/test/testdata/avc-ts-with-encryption-exercise-emulation-prevention/output_video-5.ts new file mode 100644 index 0000000000..384788ad1d Binary files /dev/null and b/packager/app/test/testdata/avc-ts-with-encryption-exercise-emulation-prevention/output_video-5.ts differ diff --git a/packager/app/test/testdata/avc-ts-with-encryption-exercise-emulation-prevention/output_video-6.ts b/packager/app/test/testdata/avc-ts-with-encryption-exercise-emulation-prevention/output_video-6.ts new file mode 100644 index 0000000000..63fbee9a00 Binary files /dev/null and b/packager/app/test/testdata/avc-ts-with-encryption-exercise-emulation-prevention/output_video-6.ts differ diff --git a/packager/app/test/testdata/sintel-1024x436-v-enc-golden.m3u8 b/packager/app/test/testdata/avc-ts-with-encryption-exercise-emulation-prevention/video.m3u8 similarity index 100% rename from packager/app/test/testdata/sintel-1024x436-v-enc-golden.m3u8 rename to packager/app/test/testdata/avc-ts-with-encryption-exercise-emulation-prevention/video.m3u8 diff --git a/packager/app/test/testdata/bear-640x360-a-enc-golden.m3u8 b/packager/app/test/testdata/avc-ts-with-encryption/audio.m3u8 similarity index 100% rename from packager/app/test/testdata/bear-640x360-a-enc-golden.m3u8 rename to packager/app/test/testdata/avc-ts-with-encryption/audio.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 new file mode 100644 index 0000000000..dbd74f0f68 --- /dev/null +++ b/packager/app/test/testdata/avc-ts-with-encryption/output.m3u8 @@ -0,0 +1,7 @@ +#EXTM3U +## Generated with https://github.com/google/shaka-packager version -- + +#EXT-X-MEDIA:TYPE=AUDIO,URI="audio.m3u8",GROUP-ID="default-audio-group",NAME="stream_0",AUTOSELECT=YES,CHANNELS="2" + +#EXT-X-STREAM-INF:BANDWIDTH=1217518,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,AUDIO="default-audio-group" +video.m3u8 diff --git a/packager/app/test/testdata/avc-ts-with-encryption/output_audio-1.ts b/packager/app/test/testdata/avc-ts-with-encryption/output_audio-1.ts new file mode 100644 index 0000000000..17d20c42c9 Binary files /dev/null and b/packager/app/test/testdata/avc-ts-with-encryption/output_audio-1.ts differ diff --git a/packager/app/test/testdata/avc-ts-with-encryption/output_audio-2.ts b/packager/app/test/testdata/avc-ts-with-encryption/output_audio-2.ts new file mode 100644 index 0000000000..3c3e210dac Binary files /dev/null and b/packager/app/test/testdata/avc-ts-with-encryption/output_audio-2.ts differ diff --git a/packager/app/test/testdata/avc-ts-with-encryption/output_audio-3.ts b/packager/app/test/testdata/avc-ts-with-encryption/output_audio-3.ts new file mode 100644 index 0000000000..ac61fde335 Binary files /dev/null and b/packager/app/test/testdata/avc-ts-with-encryption/output_audio-3.ts differ diff --git a/packager/app/test/testdata/avc-ts-with-encryption/output_video-1.ts b/packager/app/test/testdata/avc-ts-with-encryption/output_video-1.ts new file mode 100644 index 0000000000..c8600d8422 Binary files /dev/null and b/packager/app/test/testdata/avc-ts-with-encryption/output_video-1.ts differ diff --git a/packager/app/test/testdata/avc-ts-with-encryption/output_video-2.ts b/packager/app/test/testdata/avc-ts-with-encryption/output_video-2.ts new file mode 100644 index 0000000000..80d082525f Binary files /dev/null and b/packager/app/test/testdata/avc-ts-with-encryption/output_video-2.ts differ diff --git a/packager/app/test/testdata/avc-ts-with-encryption/output_video-3.ts b/packager/app/test/testdata/avc-ts-with-encryption/output_video-3.ts new file mode 100644 index 0000000000..679ea2f35b Binary files /dev/null and b/packager/app/test/testdata/avc-ts-with-encryption/output_video-3.ts differ diff --git a/packager/app/test/testdata/avc-ts-with-encryption/video.m3u8 b/packager/app/test/testdata/avc-ts-with-encryption/video.m3u8 new file mode 100644 index 0000000000..c5b1330a30 --- /dev/null +++ b/packager/app/test/testdata/avc-ts-with-encryption/video.m3u8 @@ -0,0 +1,14 @@ +#EXTM3U +#EXT-X-VERSION:6 +## Generated with https://github.com/google/shaka-packager version -- +#EXT-X-TARGETDURATION:2 +#EXT-X-PLAYLIST-TYPE:VOD +#EXTINF:1.001, +output_video-1.ts +#EXT-X-DISCONTINUITY +#EXT-X-KEY:METHOD=SAMPLE-AES,URI="data:text/plain;base64,MTIzNDU2Nzg5MDEyMzQ1Ng==",IV=0x3334353637383930,KEYFORMAT="identity" +#EXTINF:1.001, +output_video-2.ts +#EXTINF:0.734, +output_video-3.ts +#EXT-X-ENDLIST diff --git a/packager/app/test/testdata/bear-640x360-av-live-cenc-non-iop-golden.mpd b/packager/app/test/testdata/live-profile-and-encryption-and-non-dash-if-iop/output.mpd similarity index 94% rename from packager/app/test/testdata/bear-640x360-av-live-cenc-non-iop-golden.mpd rename to packager/app/test/testdata/live-profile-and-encryption-and-non-dash-if-iop/output.mpd index 2ff1091ee3..b7633f2567 100644 --- a/packager/app/test/testdata/bear-640x360-av-live-cenc-non-iop-golden.mpd +++ b/packager/app/test/testdata/live-profile-and-encryption-and-non-dash-if-iop/output.mpd @@ -1,6 +1,6 @@ - + diff --git a/packager/app/test/testdata/bear-640x360-a-live-cenc-rotation-no-pssh-golden-1.m4s b/packager/app/test/testdata/live-profile-and-encryption-and-non-dash-if-iop/output_audio-1.m4s similarity index 100% rename from packager/app/test/testdata/bear-640x360-a-live-cenc-rotation-no-pssh-golden-1.m4s rename to packager/app/test/testdata/live-profile-and-encryption-and-non-dash-if-iop/output_audio-1.m4s diff --git a/packager/app/test/testdata/live-profile-and-encryption-and-non-dash-if-iop/output_audio-2.m4s b/packager/app/test/testdata/live-profile-and-encryption-and-non-dash-if-iop/output_audio-2.m4s new file mode 100644 index 0000000000..e7e2c85278 Binary files /dev/null and b/packager/app/test/testdata/live-profile-and-encryption-and-non-dash-if-iop/output_audio-2.m4s differ diff --git a/packager/app/test/testdata/live-profile-and-encryption-and-non-dash-if-iop/output_audio-3.m4s b/packager/app/test/testdata/live-profile-and-encryption-and-non-dash-if-iop/output_audio-3.m4s new file mode 100644 index 0000000000..4243aa6447 Binary files /dev/null and b/packager/app/test/testdata/live-profile-and-encryption-and-non-dash-if-iop/output_audio-3.m4s differ diff --git a/packager/app/test/testdata/live-profile-and-encryption-and-non-dash-if-iop/output_audio-init.mp4 b/packager/app/test/testdata/live-profile-and-encryption-and-non-dash-if-iop/output_audio-init.mp4 new file mode 100644 index 0000000000..8baf873921 Binary files /dev/null and b/packager/app/test/testdata/live-profile-and-encryption-and-non-dash-if-iop/output_audio-init.mp4 differ diff --git a/packager/app/test/testdata/bear-640x360-v-live-cenc-rotation-no-pssh-golden-1.m4s b/packager/app/test/testdata/live-profile-and-encryption-and-non-dash-if-iop/output_video-1.m4s similarity index 100% rename from packager/app/test/testdata/bear-640x360-v-live-cenc-rotation-no-pssh-golden-1.m4s rename to packager/app/test/testdata/live-profile-and-encryption-and-non-dash-if-iop/output_video-1.m4s diff --git a/packager/app/test/testdata/live-profile-and-encryption-and-non-dash-if-iop/output_video-2.m4s b/packager/app/test/testdata/live-profile-and-encryption-and-non-dash-if-iop/output_video-2.m4s new file mode 100644 index 0000000000..0643459854 Binary files /dev/null and b/packager/app/test/testdata/live-profile-and-encryption-and-non-dash-if-iop/output_video-2.m4s differ diff --git a/packager/app/test/testdata/live-profile-and-encryption-and-non-dash-if-iop/output_video-3.m4s b/packager/app/test/testdata/live-profile-and-encryption-and-non-dash-if-iop/output_video-3.m4s new file mode 100644 index 0000000000..c14b44bcf0 Binary files /dev/null and b/packager/app/test/testdata/live-profile-and-encryption-and-non-dash-if-iop/output_video-3.m4s differ diff --git a/packager/app/test/testdata/live-profile-and-encryption-and-non-dash-if-iop/output_video-init.mp4 b/packager/app/test/testdata/live-profile-and-encryption-and-non-dash-if-iop/output_video-init.mp4 new file mode 100644 index 0000000000..69d5615bdb Binary files /dev/null and b/packager/app/test/testdata/live-profile-and-encryption-and-non-dash-if-iop/output_video-init.mp4 differ diff --git a/packager/app/test/testdata/bear-640x360-av-live-cenc-golden.mpd b/packager/app/test/testdata/live-profile-and-encryption/output.mpd similarity index 94% rename from packager/app/test/testdata/bear-640x360-av-live-cenc-golden.mpd rename to packager/app/test/testdata/live-profile-and-encryption/output.mpd index 7c994c222e..f0437b886e 100644 --- a/packager/app/test/testdata/bear-640x360-av-live-cenc-golden.mpd +++ b/packager/app/test/testdata/live-profile-and-encryption/output.mpd @@ -1,6 +1,6 @@ - + diff --git a/packager/app/test/testdata/live-profile-and-encryption/output_audio-1.m4s b/packager/app/test/testdata/live-profile-and-encryption/output_audio-1.m4s new file mode 100644 index 0000000000..26e069ee9e Binary files /dev/null and b/packager/app/test/testdata/live-profile-and-encryption/output_audio-1.m4s differ diff --git a/packager/app/test/testdata/live-profile-and-encryption/output_audio-2.m4s b/packager/app/test/testdata/live-profile-and-encryption/output_audio-2.m4s new file mode 100644 index 0000000000..e7e2c85278 Binary files /dev/null and b/packager/app/test/testdata/live-profile-and-encryption/output_audio-2.m4s differ diff --git a/packager/app/test/testdata/live-profile-and-encryption/output_audio-3.m4s b/packager/app/test/testdata/live-profile-and-encryption/output_audio-3.m4s new file mode 100644 index 0000000000..4243aa6447 Binary files /dev/null and b/packager/app/test/testdata/live-profile-and-encryption/output_audio-3.m4s differ diff --git a/packager/app/test/testdata/live-profile-and-encryption/output_audio-init.mp4 b/packager/app/test/testdata/live-profile-and-encryption/output_audio-init.mp4 new file mode 100644 index 0000000000..8baf873921 Binary files /dev/null and b/packager/app/test/testdata/live-profile-and-encryption/output_audio-init.mp4 differ diff --git a/packager/app/test/testdata/live-profile-and-encryption/output_video-1.m4s b/packager/app/test/testdata/live-profile-and-encryption/output_video-1.m4s new file mode 100644 index 0000000000..c8e0ec8cfa Binary files /dev/null and b/packager/app/test/testdata/live-profile-and-encryption/output_video-1.m4s differ diff --git a/packager/app/test/testdata/live-profile-and-encryption/output_video-2.m4s b/packager/app/test/testdata/live-profile-and-encryption/output_video-2.m4s new file mode 100644 index 0000000000..0643459854 Binary files /dev/null and b/packager/app/test/testdata/live-profile-and-encryption/output_video-2.m4s differ diff --git a/packager/app/test/testdata/live-profile-and-encryption/output_video-3.m4s b/packager/app/test/testdata/live-profile-and-encryption/output_video-3.m4s new file mode 100644 index 0000000000..c14b44bcf0 Binary files /dev/null and b/packager/app/test/testdata/live-profile-and-encryption/output_video-3.m4s differ diff --git a/packager/app/test/testdata/live-profile-and-encryption/output_video-init.mp4 b/packager/app/test/testdata/live-profile-and-encryption/output_video-init.mp4 new file mode 100644 index 0000000000..69d5615bdb Binary files /dev/null and b/packager/app/test/testdata/live-profile-and-encryption/output_video-init.mp4 differ diff --git a/packager/app/test/testdata/bear-640x360-av-live-cenc-rotation-no-pssh-golden.mpd b/packager/app/test/testdata/live-profile-and-key-rotation-and-no-pssh-in-stream/output.mpd similarity index 93% rename from packager/app/test/testdata/bear-640x360-av-live-cenc-rotation-no-pssh-golden.mpd rename to packager/app/test/testdata/live-profile-and-key-rotation-and-no-pssh-in-stream/output.mpd index 779863417c..3e6c3c72a4 100644 --- a/packager/app/test/testdata/bear-640x360-av-live-cenc-rotation-no-pssh-golden.mpd +++ b/packager/app/test/testdata/live-profile-and-key-rotation-and-no-pssh-in-stream/output.mpd @@ -1,6 +1,6 @@ - + diff --git a/packager/app/test/testdata/live-profile-and-key-rotation-and-no-pssh-in-stream/output_audio-1.m4s b/packager/app/test/testdata/live-profile-and-key-rotation-and-no-pssh-in-stream/output_audio-1.m4s new file mode 100644 index 0000000000..26e069ee9e Binary files /dev/null and b/packager/app/test/testdata/live-profile-and-key-rotation-and-no-pssh-in-stream/output_audio-1.m4s differ diff --git a/packager/app/test/testdata/bear-640x360-a-live-cenc-rotation-no-pssh-golden-2.m4s b/packager/app/test/testdata/live-profile-and-key-rotation-and-no-pssh-in-stream/output_audio-2.m4s similarity index 100% rename from packager/app/test/testdata/bear-640x360-a-live-cenc-rotation-no-pssh-golden-2.m4s rename to packager/app/test/testdata/live-profile-and-key-rotation-and-no-pssh-in-stream/output_audio-2.m4s diff --git a/packager/app/test/testdata/bear-640x360-a-live-cenc-rotation-no-pssh-golden-3.m4s b/packager/app/test/testdata/live-profile-and-key-rotation-and-no-pssh-in-stream/output_audio-3.m4s similarity index 100% rename from packager/app/test/testdata/bear-640x360-a-live-cenc-rotation-no-pssh-golden-3.m4s rename to packager/app/test/testdata/live-profile-and-key-rotation-and-no-pssh-in-stream/output_audio-3.m4s diff --git a/packager/app/test/testdata/bear-640x360-a-live-cenc-rotation-golden-init.mp4 b/packager/app/test/testdata/live-profile-and-key-rotation-and-no-pssh-in-stream/output_audio-init.mp4 similarity index 100% rename from packager/app/test/testdata/bear-640x360-a-live-cenc-rotation-golden-init.mp4 rename to packager/app/test/testdata/live-profile-and-key-rotation-and-no-pssh-in-stream/output_audio-init.mp4 diff --git a/packager/app/test/testdata/live-profile-and-key-rotation-and-no-pssh-in-stream/output_video-1.m4s b/packager/app/test/testdata/live-profile-and-key-rotation-and-no-pssh-in-stream/output_video-1.m4s new file mode 100644 index 0000000000..c8e0ec8cfa Binary files /dev/null and b/packager/app/test/testdata/live-profile-and-key-rotation-and-no-pssh-in-stream/output_video-1.m4s differ diff --git a/packager/app/test/testdata/bear-640x360-v-live-cenc-rotation-no-pssh-golden-2.m4s b/packager/app/test/testdata/live-profile-and-key-rotation-and-no-pssh-in-stream/output_video-2.m4s similarity index 100% rename from packager/app/test/testdata/bear-640x360-v-live-cenc-rotation-no-pssh-golden-2.m4s rename to packager/app/test/testdata/live-profile-and-key-rotation-and-no-pssh-in-stream/output_video-2.m4s diff --git a/packager/app/test/testdata/bear-640x360-v-live-cenc-rotation-no-pssh-golden-3.m4s b/packager/app/test/testdata/live-profile-and-key-rotation-and-no-pssh-in-stream/output_video-3.m4s similarity index 100% rename from packager/app/test/testdata/bear-640x360-v-live-cenc-rotation-no-pssh-golden-3.m4s rename to packager/app/test/testdata/live-profile-and-key-rotation-and-no-pssh-in-stream/output_video-3.m4s diff --git a/packager/app/test/testdata/bear-640x360-v-live-cenc-rotation-golden-init.mp4 b/packager/app/test/testdata/live-profile-and-key-rotation-and-no-pssh-in-stream/output_video-init.mp4 similarity index 100% rename from packager/app/test/testdata/bear-640x360-v-live-cenc-rotation-golden-init.mp4 rename to packager/app/test/testdata/live-profile-and-key-rotation-and-no-pssh-in-stream/output_video-init.mp4 diff --git a/packager/app/test/testdata/bear-640x360-av-live-cenc-rotation-non-iop-golden.mpd b/packager/app/test/testdata/live-profile-and-key-rotation-and-non-dash-if-iop/output.mpd similarity index 93% rename from packager/app/test/testdata/bear-640x360-av-live-cenc-rotation-non-iop-golden.mpd rename to packager/app/test/testdata/live-profile-and-key-rotation-and-non-dash-if-iop/output.mpd index 90fa72cdd1..7713fefdc2 100644 --- a/packager/app/test/testdata/bear-640x360-av-live-cenc-rotation-non-iop-golden.mpd +++ b/packager/app/test/testdata/live-profile-and-key-rotation-and-non-dash-if-iop/output.mpd @@ -1,6 +1,6 @@ - + diff --git a/packager/app/test/testdata/bear-640x360-a-live-cenc-rotation-golden-1.m4s b/packager/app/test/testdata/live-profile-and-key-rotation-and-non-dash-if-iop/output_audio-1.m4s similarity index 100% rename from packager/app/test/testdata/bear-640x360-a-live-cenc-rotation-golden-1.m4s rename to packager/app/test/testdata/live-profile-and-key-rotation-and-non-dash-if-iop/output_audio-1.m4s diff --git a/packager/app/test/testdata/bear-640x360-a-live-cenc-rotation-golden-2.m4s b/packager/app/test/testdata/live-profile-and-key-rotation-and-non-dash-if-iop/output_audio-2.m4s similarity index 100% rename from packager/app/test/testdata/bear-640x360-a-live-cenc-rotation-golden-2.m4s rename to packager/app/test/testdata/live-profile-and-key-rotation-and-non-dash-if-iop/output_audio-2.m4s diff --git a/packager/app/test/testdata/bear-640x360-a-live-cenc-rotation-golden-3.m4s b/packager/app/test/testdata/live-profile-and-key-rotation-and-non-dash-if-iop/output_audio-3.m4s similarity index 100% rename from packager/app/test/testdata/bear-640x360-a-live-cenc-rotation-golden-3.m4s rename to packager/app/test/testdata/live-profile-and-key-rotation-and-non-dash-if-iop/output_audio-3.m4s diff --git a/packager/app/test/testdata/bear-640x360-a-live-cenc-rotation-no-pssh-golden-init.mp4 b/packager/app/test/testdata/live-profile-and-key-rotation-and-non-dash-if-iop/output_audio-init.mp4 similarity index 100% rename from packager/app/test/testdata/bear-640x360-a-live-cenc-rotation-no-pssh-golden-init.mp4 rename to packager/app/test/testdata/live-profile-and-key-rotation-and-non-dash-if-iop/output_audio-init.mp4 diff --git a/packager/app/test/testdata/bear-640x360-v-live-cenc-rotation-golden-1.m4s b/packager/app/test/testdata/live-profile-and-key-rotation-and-non-dash-if-iop/output_video-1.m4s similarity index 100% rename from packager/app/test/testdata/bear-640x360-v-live-cenc-rotation-golden-1.m4s rename to packager/app/test/testdata/live-profile-and-key-rotation-and-non-dash-if-iop/output_video-1.m4s diff --git a/packager/app/test/testdata/bear-640x360-v-live-cenc-rotation-golden-2.m4s b/packager/app/test/testdata/live-profile-and-key-rotation-and-non-dash-if-iop/output_video-2.m4s similarity index 100% rename from packager/app/test/testdata/bear-640x360-v-live-cenc-rotation-golden-2.m4s rename to packager/app/test/testdata/live-profile-and-key-rotation-and-non-dash-if-iop/output_video-2.m4s diff --git a/packager/app/test/testdata/bear-640x360-v-live-cenc-rotation-golden-3.m4s b/packager/app/test/testdata/live-profile-and-key-rotation-and-non-dash-if-iop/output_video-3.m4s similarity index 100% rename from packager/app/test/testdata/bear-640x360-v-live-cenc-rotation-golden-3.m4s rename to packager/app/test/testdata/live-profile-and-key-rotation-and-non-dash-if-iop/output_video-3.m4s diff --git a/packager/app/test/testdata/bear-640x360-v-live-cenc-rotation-no-pssh-golden-init.mp4 b/packager/app/test/testdata/live-profile-and-key-rotation-and-non-dash-if-iop/output_video-init.mp4 similarity index 100% rename from packager/app/test/testdata/bear-640x360-v-live-cenc-rotation-no-pssh-golden-init.mp4 rename to packager/app/test/testdata/live-profile-and-key-rotation-and-non-dash-if-iop/output_video-init.mp4 diff --git a/packager/app/test/testdata/bear-640x360-av-live-cenc-rotation-golden.mpd b/packager/app/test/testdata/live-profile-and-key-rotation/output.mpd similarity index 93% rename from packager/app/test/testdata/bear-640x360-av-live-cenc-rotation-golden.mpd rename to packager/app/test/testdata/live-profile-and-key-rotation/output.mpd index 47ca735044..da04efa872 100644 --- a/packager/app/test/testdata/bear-640x360-av-live-cenc-rotation-golden.mpd +++ b/packager/app/test/testdata/live-profile-and-key-rotation/output.mpd @@ -1,6 +1,6 @@ - + diff --git a/packager/app/test/testdata/live-profile-and-key-rotation/output_audio-1.m4s b/packager/app/test/testdata/live-profile-and-key-rotation/output_audio-1.m4s new file mode 100644 index 0000000000..bf8580ceb3 Binary files /dev/null and b/packager/app/test/testdata/live-profile-and-key-rotation/output_audio-1.m4s differ diff --git a/packager/app/test/testdata/live-profile-and-key-rotation/output_audio-2.m4s b/packager/app/test/testdata/live-profile-and-key-rotation/output_audio-2.m4s new file mode 100644 index 0000000000..846a7fb92e Binary files /dev/null and b/packager/app/test/testdata/live-profile-and-key-rotation/output_audio-2.m4s differ diff --git a/packager/app/test/testdata/live-profile-and-key-rotation/output_audio-3.m4s b/packager/app/test/testdata/live-profile-and-key-rotation/output_audio-3.m4s new file mode 100644 index 0000000000..3354221854 Binary files /dev/null and b/packager/app/test/testdata/live-profile-and-key-rotation/output_audio-3.m4s differ diff --git a/packager/app/test/testdata/live-profile-and-key-rotation/output_audio-init.mp4 b/packager/app/test/testdata/live-profile-and-key-rotation/output_audio-init.mp4 new file mode 100644 index 0000000000..e0d23b00ae Binary files /dev/null and b/packager/app/test/testdata/live-profile-and-key-rotation/output_audio-init.mp4 differ diff --git a/packager/app/test/testdata/live-profile-and-key-rotation/output_video-1.m4s b/packager/app/test/testdata/live-profile-and-key-rotation/output_video-1.m4s new file mode 100644 index 0000000000..5ff1a7ced3 Binary files /dev/null and b/packager/app/test/testdata/live-profile-and-key-rotation/output_video-1.m4s differ diff --git a/packager/app/test/testdata/live-profile-and-key-rotation/output_video-2.m4s b/packager/app/test/testdata/live-profile-and-key-rotation/output_video-2.m4s new file mode 100644 index 0000000000..bc4a7695bc Binary files /dev/null and b/packager/app/test/testdata/live-profile-and-key-rotation/output_video-2.m4s differ diff --git a/packager/app/test/testdata/live-profile-and-key-rotation/output_video-3.m4s b/packager/app/test/testdata/live-profile-and-key-rotation/output_video-3.m4s new file mode 100644 index 0000000000..c6ff59c643 Binary files /dev/null and b/packager/app/test/testdata/live-profile-and-key-rotation/output_video-3.m4s differ diff --git a/packager/app/test/testdata/live-profile-and-key-rotation/output_video-init.mp4 b/packager/app/test/testdata/live-profile-and-key-rotation/output_video-init.mp4 new file mode 100644 index 0000000000..cfbd64015f Binary files /dev/null and b/packager/app/test/testdata/live-profile-and-key-rotation/output_video-init.mp4 differ diff --git a/packager/app/test/testdata/bear-640x360-av-live-golden.mpd b/packager/app/test/testdata/live-profile/output.mpd similarity index 92% rename from packager/app/test/testdata/bear-640x360-av-live-golden.mpd rename to packager/app/test/testdata/live-profile/output.mpd index 3bba3a7577..91519c4622 100644 --- a/packager/app/test/testdata/bear-640x360-av-live-golden.mpd +++ b/packager/app/test/testdata/live-profile/output.mpd @@ -1,6 +1,6 @@ - + diff --git a/packager/app/test/testdata/live-profile/output_audio-1.m4s b/packager/app/test/testdata/live-profile/output_audio-1.m4s new file mode 100644 index 0000000000..f37ed8a13c Binary files /dev/null and b/packager/app/test/testdata/live-profile/output_audio-1.m4s differ diff --git a/packager/app/test/testdata/live-profile/output_audio-2.m4s b/packager/app/test/testdata/live-profile/output_audio-2.m4s new file mode 100644 index 0000000000..bf0257dff3 Binary files /dev/null and b/packager/app/test/testdata/live-profile/output_audio-2.m4s differ diff --git a/packager/app/test/testdata/live-profile/output_audio-3.m4s b/packager/app/test/testdata/live-profile/output_audio-3.m4s new file mode 100644 index 0000000000..4efd91c5dd Binary files /dev/null and b/packager/app/test/testdata/live-profile/output_audio-3.m4s differ diff --git a/packager/app/test/testdata/live-profile/output_audio-init.mp4 b/packager/app/test/testdata/live-profile/output_audio-init.mp4 new file mode 100644 index 0000000000..a703e29da8 Binary files /dev/null and b/packager/app/test/testdata/live-profile/output_audio-init.mp4 differ diff --git a/packager/app/test/testdata/live-profile/output_video-1.m4s b/packager/app/test/testdata/live-profile/output_video-1.m4s new file mode 100644 index 0000000000..e8a21a613c Binary files /dev/null and b/packager/app/test/testdata/live-profile/output_video-1.m4s differ diff --git a/packager/app/test/testdata/live-profile/output_video-2.m4s b/packager/app/test/testdata/live-profile/output_video-2.m4s new file mode 100644 index 0000000000..311f93260e Binary files /dev/null and b/packager/app/test/testdata/live-profile/output_video-2.m4s differ diff --git a/packager/app/test/testdata/live-profile/output_video-3.m4s b/packager/app/test/testdata/live-profile/output_video-3.m4s new file mode 100644 index 0000000000..71e371e17a Binary files /dev/null and b/packager/app/test/testdata/live-profile/output_video-3.m4s differ diff --git a/packager/app/test/testdata/live-profile/output_video-init.mp4 b/packager/app/test/testdata/live-profile/output_video-init.mp4 new file mode 100644 index 0000000000..b183dc5d1c Binary files /dev/null and b/packager/app/test/testdata/live-profile/output_video-init.mp4 differ