diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-10-13 22:59:22 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-10-13 22:59:22 +0200 |
| commit | 0225cfa5933cbcb8c236b7cf9dbd05a6260ea911 (patch) | |
| tree | 97623dd51ba60ed30407a8cb47a1acf7b181e57b /test/scc_reader_test.cc | |
| parent | ba6765286f5746510cfa731a9312c7f31f723043 (diff) | |
fixup! WIP: SCC support.scc
Diffstat (limited to 'test/scc_reader_test.cc')
| -rw-r--r-- | test/scc_reader_test.cc | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/test/scc_reader_test.cc b/test/scc_reader_test.cc index 1c55032..10444f7 100644 --- a/test/scc_reader_test.cc +++ b/test/scc_reader_test.cc @@ -26,7 +26,7 @@ #include <boost/filesystem.hpp> -BOOST_AUTO_TEST_CASE(scc_reader_test) +BOOST_AUTO_TEST_CASE(scc_reader_test1) { auto file = private_test / "mir.scc"; auto f = fopen(file.string().c_str(), "r"); @@ -37,6 +37,28 @@ BOOST_AUTO_TEST_CASE(scc_reader_test) for (auto sub: subs) { for (auto line: sub.lines) { + std::cout << ">Line " << *line.vertical_position.line << "\n"; + for (auto block: line.blocks) { + std::cout << block.text << "\n"; + } + } + } +} + + +BOOST_AUTO_TEST_CASE(scc_reader_test2) +{ + auto file = private_test / "NIKI•TOMI•BETO Surround captions_CEA-608_English.scc"; + auto f = fopen(file.string().c_str(), "r"); + BOOST_REQUIRE(f); + sub::SCCReader reader(f); + fclose(f); + auto subs = sub::collect<std::vector<sub::Subtitle>> (reader.subtitles()); + + for (auto sub: subs) { + std::cout << ">Time " << sub.from << " -> " << sub.to << "\n"; + for (auto line: sub.lines) { + std::cout << ">Line " << *line.vertical_position.line << "\n"; for (auto block: line.blocks) { std::cout << block.text << "\n"; } |
