Esempio n. 1
0
    def test_both_mpd_and_m3u8_should_be_generated_for_adaptive_format(self):
        packager = ShakaPackager(self.output_settings, "tests/nodes/data/")
        packager.start()
        packager._process.wait()

        self.assertTrue(os.path.isfile("tests/nodes/data/audio_init.mp4"))
        self.assertTrue(os.path.isfile("tests/nodes/data/video_360p_init.mp4"))
        self.assertTrue(os.path.isfile("tests/nodes/data/video.m3u8"))
        self.assertTrue(os.path.isfile("tests/nodes/data/video.mpd"))
Esempio n. 2
0
    def test_mpd_should_be_generated_for_hls_format(self):
        config = self.output_settings
        config["format"] = "dash"
        packager = ShakaPackager(config, "tests/nodes/data/")
        packager.start()
        packager._process.wait()

        self.assertTrue(os.path.isfile("tests/nodes/data/audio_init.mp4"))
        self.assertTrue(os.path.isfile("tests/nodes/data/video_360p_init.mp4"))
        self.assertTrue(os.path.isfile("tests/nodes/data/video.mpd"))
Esempio n. 3
0
    def test_status_should_be_finished_on_completion(self):
        packager = ShakaPackager(self.output_settings, "tests/nodes/data/")
        packager.start()
        packager._process.wait()

        self.assertEqual(Status.Finished, packager.check_status())
Esempio n. 4
0
    def test_start_should_run_packager_in_a_thread(self):
        packager = ShakaPackager(self.output_settings, "tests/nodes/data/")
        packager.start()

        self.assertEqual(Status.Running, packager.check_status())