Пример #1
0
    def test_dash_manifest_generator_should_combine_multiple_manifest_and(self, mock_open):
        manifest_generator = DashManifestGenerator(self.output.job)

        with open("tests/jobs/data/output.mpd", "r") as fp:
            expected_mpd = MPEGDASHParser().parse(fp.read())
            actual_mpd = MPEGDASHParser().parse(manifest_generator.merge())
            self.assertEqual(
                MPEGDASHParser.get_as_doc(expected_mpd).toxml(), MPEGDASHParser.get_as_doc(actual_mpd).toxml()
            )
Пример #2
0
 def merge(self):
     manifest_paths = self.get_relative_manifest_paths()
     initial_manifest = self.clone_manifest(manifest_paths[0])
     tracks_dict = self.get_tracks(manifest_paths)
     self.add_tracks_to_manifest(tracks_dict, initial_manifest)
     return MPEGDASHParser.get_as_doc(initial_manifest).toprettyxml()