diff --git a/packager/app/test/packager_test.py b/packager/app/test/packager_test.py index 308064ebd1..7603e1fb6b 100755 --- a/packager/app/test/packager_test.py +++ b/packager/app/test/packager_test.py @@ -1732,6 +1732,18 @@ class PackagerFunctionalTest(PackagerAppTest): force_cl_index=True)) self._CheckTestResults('forced-commandline-ordering') + def testForcedCommandlineOrderingWithTTML(self): + streams = [ + self._GetStream('video', test_file='bear-640x360.mp4'), + self._GetStream('audio', test_file='bear-640x360.mp4'), + self._GetStream('text', test_file='bear-english.ttml'), + ] + + self.assertPackageSuccess(streams, + self._GetFlags(output_dash=True, output_hls=False, + force_cl_index=True)) + self._CheckTestResults('forced-commandline-ordering-ttml') + def testAllowCodecSwitchingWithCommandlineOrdering(self): streams = [ self._GetStream('audio', test_file='bear-640x360.mp4'), diff --git a/packager/app/test/testdata/forced-commandline-ordering-ttml/bear-640x360-audio.mp4 b/packager/app/test/testdata/forced-commandline-ordering-ttml/bear-640x360-audio.mp4 new file mode 100644 index 0000000000..10077f9af8 Binary files /dev/null and b/packager/app/test/testdata/forced-commandline-ordering-ttml/bear-640x360-audio.mp4 differ diff --git a/packager/app/test/testdata/forced-commandline-ordering-ttml/bear-640x360-video.mp4 b/packager/app/test/testdata/forced-commandline-ordering-ttml/bear-640x360-video.mp4 new file mode 100644 index 0000000000..de83807979 Binary files /dev/null and b/packager/app/test/testdata/forced-commandline-ordering-ttml/bear-640x360-video.mp4 differ diff --git a/packager/app/test/testdata/forced-commandline-ordering-ttml/bear-english-text.ttml b/packager/app/test/testdata/forced-commandline-ordering-ttml/bear-english-text.ttml new file mode 100644 index 0000000000..978056a2ab --- /dev/null +++ b/packager/app/test/testdata/forced-commandline-ordering-ttml/bear-english-text.ttml @@ -0,0 +1,9 @@ + + + + + Yup, that's a bear, eh. + He 's... um... doing bear-like stuff. + + + diff --git a/packager/app/test/testdata/forced-commandline-ordering-ttml/output.mpd b/packager/app/test/testdata/forced-commandline-ordering-ttml/output.mpd new file mode 100644 index 0000000000..b53225c868 --- /dev/null +++ b/packager/app/test/testdata/forced-commandline-ordering-ttml/output.mpd @@ -0,0 +1,28 @@ + + + + + + + bear-640x360-video.mp4 + + + + + + + + + bear-640x360-audio.mp4 + + + + + + + + bear-english-text.ttml + + + + diff --git a/packager/packager.cc b/packager/packager.cc index 557aef9334..f0ff2c9348 100644 --- a/packager/packager.cc +++ b/packager/packager.cc @@ -418,6 +418,10 @@ bool StreamInfoToTextMediaInfo(const StreamDescriptor& stream_descriptor, text_info->set_language(language); } + if (stream_descriptor.index.has_value()) { + text_media_info->set_index(stream_descriptor.index.value()); + } + text_media_info->set_media_file_name(stream_descriptor.output); text_media_info->set_container_type(MediaInfo::CONTAINER_TEXT);
Yup, that's a bear, eh.
He 's... um... doing bear-like stuff.