diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-07-19 21:48:27 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-07-19 23:45:23 +0100 |
| commit | 9cb73fbc0fa4643612f01665bc6d9fc430656f32 (patch) | |
| tree | 2b13822810da4118e4af6810c78c2f78d90099b8 /test | |
| parent | b9dc4932eba9e84f50abe62d8cd779b8b436f3a4 (diff) | |
Reword again: Text -> Caption and Plain -> Text.
sed -i "s/ActiveText/ActiveCaptions/g" src/lib/*.{cc,h}
sed -i "s/active_text.h/active_captions.h/g" src/lib/*.{cc,h}
sed -i "s/active_text.cc/active_captions.cc/g" src/lib/wscript
mv src/lib/active_text.cc src/lib/active_captions.cc
mv src/lib/active_text.h src/lib/active_captions.h
sed -i "s/PlainTextFileContent/TextCaptionFileContent/g" src/lib/*.{cc,h} src/wx/*.cc
sed -i "s/PlainTextFile/TextCaptionFile/g" src/lib/*.{cc,h} src/wx/*.cc
sed -i "s/plain_text_file_content/text_caption_file_content/g" src/lib/*.{cc,h} src/lib/wscript src/wx/*.{cc,h} test/*.cc
mv src/lib/plain_text_file_content.cc src/lib/text_caption_file_content.cc
mv src/lib/plain_text_file_content.h src/lib/text_caption_file_content.h
sed -i "s/PlainTextFileDecoder/TextCaptionFileDecoder/g" src/lib/*.{cc,h}
sed -i "s/plain_text_file_decoder/text_caption_file_decoder/g" src/lib/*.{cc,h} src/lib/wscript src/wx/*.{cc,h}
mv src/lib/plain_text_file_decoder.cc src/lib/text_caption_file_decoder.cc
mv src/lib/plain_text_file_decoder.h src/lib/text_caption_file_decoder.h
sed -i "s/PlayerText/PlayerCaption/g" src/lib/*.{cc,h}
sed -i "s/player_text.cc/player_caption.cc/g" src/lib/wscript
sed -i "s/player_text.h/player_caption.h/g" src/lib/*.{cc,h}
mv src/lib/player_text.cc src/lib/player_caption.cc
mv src/lib/player_text.h src/lib/player_caption.h
sed -i "s/ContentPlainText/ContentTextCaption/g" src/lib/*.{cc,h} src/wx/*.{cc,h}
sed -i "s/ContentBitmapText/ContentBitmapCaption/g" src/lib/*.{cc,h} src/wx/*.{cc,h}
sed -i "s/PlainText/TextCaption/g" src/lib/*.{cc,h} test/*.cc
sed -i "s/plain_text.h/text_caption.h/g" src/lib/*.{cc,h}
mv src/lib/plain_text.h src/lib/text_caption.h
Diffstat (limited to 'test')
| -rw-r--r-- | test/burnt_subtitle_test.cc | 4 | ||||
| -rw-r--r-- | test/dcp_subtitle_test.cc | 10 | ||||
| -rw-r--r-- | test/ffmpeg_encoder_test.cc | 10 | ||||
| -rw-r--r-- | test/player_test.cc | 4 | ||||
| -rw-r--r-- | test/reels_test.cc | 6 | ||||
| -rw-r--r-- | test/render_subtitles_test.cc | 16 | ||||
| -rw-r--r-- | test/srt_subtitle_test.cc | 16 | ||||
| -rw-r--r-- | test/ssa_subtitle_test.cc | 4 | ||||
| -rw-r--r-- | test/subtitle_charset_test.cc | 4 | ||||
| -rw-r--r-- | test/subtitle_reel_number_test.cc | 4 |
10 files changed, 39 insertions, 39 deletions
diff --git a/test/burnt_subtitle_test.cc b/test/burnt_subtitle_test.cc index e01e1e3d1..8ca436207 100644 --- a/test/burnt_subtitle_test.cc +++ b/test/burnt_subtitle_test.cc @@ -59,7 +59,7 @@ BOOST_AUTO_TEST_CASE (burnt_subtitle_test_subrip) film->set_container (Ratio::from_id ("185")); film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TLR")); film->set_name ("frobozz"); - shared_ptr<PlainText> content (new PlainText (film, "test/data/subrip2.srt")); + shared_ptr<TextCaption> content (new TextCaption (film, "test/data/subrip2.srt")); content->subtitle->set_use (true); content->subtitle->set_burn (true); film->examine_and_add_content (content); @@ -106,7 +106,7 @@ BOOST_AUTO_TEST_CASE (burnt_subtitle_test_onto_dcp) film2->set_name ("frobozz"); shared_ptr<DCPContent> background_dcp (new DCPContent(film2, film->dir(film->dcp_name()))); film2->examine_and_add_content (background_dcp); - shared_ptr<PlainText> sub = dynamic_pointer_cast<PlainText> ( + shared_ptr<TextCaption> sub = dynamic_pointer_cast<TextCaption> ( content_factory(film2, "test/data/subrip2.srt").front() ); sub->subtitle->set_burn (true); diff --git a/test/dcp_subtitle_test.cc b/test/dcp_subtitle_test.cc index 9ea708ed5..e5d0408bb 100644 --- a/test/dcp_subtitle_test.cc +++ b/test/dcp_subtitle_test.cc @@ -43,10 +43,10 @@ using std::list; using boost::shared_ptr; using boost::optional; -optional<ContentPlainText> stored; +optional<ContentTextCaption> stored; static void -store (ContentPlainText sub) +store (ContentTextCaption sub) { if (!stored) { stored = sub; @@ -93,7 +93,7 @@ BOOST_AUTO_TEST_CASE (dcp_subtitle_within_dcp_test) shared_ptr<DCPDecoder> decoder (new DCPDecoder (content, film->log(), false)); decoder->subtitle->PlainStart.connect (bind (store, _1)); - stored = optional<ContentPlainText> (); + stored = optional<ContentTextCaption> (); while (!decoder->pass() && !stored) {} BOOST_REQUIRE (stored); @@ -116,7 +116,7 @@ BOOST_AUTO_TEST_CASE (dcp_subtitle_test2) shared_ptr<DCPTextDecoder> decoder (new DCPTextDecoder (content, film->log())); decoder->subtitle->PlainStart.connect (bind (store, _1)); - stored = optional<ContentPlainText> (); + stored = optional<ContentTextCaption> (); while (!decoder->pass ()) { if (stored && stored->from() == ContentTime(0)) { BOOST_CHECK_EQUAL (stored->subs.front().text(), "<b>Hello world!</b>"); @@ -140,7 +140,7 @@ BOOST_AUTO_TEST_CASE (dcp_subtitle_test3) BOOST_REQUIRE (!wait_for_jobs ()); shared_ptr<DCPTextDecoder> decoder (new DCPTextDecoder (content, film->log())); - stored = optional<ContentPlainText> (); + stored = optional<ContentTextCaption> (); while (!decoder->pass ()) { decoder->subtitle->PlainStart.connect (bind (store, _1)); if (stored && stored->from() == ContentTime::from_seconds(0.08)) { diff --git a/test/ffmpeg_encoder_test.cc b/test/ffmpeg_encoder_test.cc index 00ca976e0..65ca59d34 100644 --- a/test/ffmpeg_encoder_test.cc +++ b/test/ffmpeg_encoder_test.cc @@ -24,7 +24,7 @@ #include "lib/image_content.h" #include "lib/video_content.h" #include "lib/audio_content.h" -#include "lib/plain_text_file_content.h" +#include "lib/text_caption_file_content.h" #include "lib/ratio.h" #include "lib/transcode_job.h" #include "lib/dcp_content.h" @@ -121,7 +121,7 @@ BOOST_AUTO_TEST_CASE (ffmpeg_encoder_prores_test6) film->set_container (Ratio::from_id ("185")); film->set_audio_channels (6); - shared_ptr<PlainTextFileContent> s (new PlainTextFileContent (film, "test/data/subrip2.srt")); + shared_ptr<TextCaptionFileContent> s (new TextCaptionFileContent (film, "test/data/subrip2.srt")); film->examine_and_add_content (s); BOOST_REQUIRE (!wait_for_jobs ()); s->subtitle->set_colour (dcp::Colour (255, 255, 0)); @@ -146,7 +146,7 @@ BOOST_AUTO_TEST_CASE (ffmpeg_encoder_prores_test7) film->examine_and_add_content (c); BOOST_REQUIRE (!wait_for_jobs ()); - shared_ptr<PlainTextFileContent> s (new PlainTextFileContent (film, "test/data/subrip.srt")); + shared_ptr<TextCaptionFileContent> s (new TextCaptionFileContent (film, "test/data/subrip.srt")); film->examine_and_add_content (s); BOOST_REQUIRE (!wait_for_jobs ()); s->subtitle->set_colour (dcp::Colour (255, 255, 0)); @@ -172,7 +172,7 @@ BOOST_AUTO_TEST_CASE (ffmpeg_encoder_h264_test2) film->set_container (Ratio::from_id ("185")); film->set_audio_channels (6); - shared_ptr<PlainTextFileContent> s (new PlainTextFileContent (film, "test/data/subrip2.srt")); + shared_ptr<TextCaptionFileContent> s (new TextCaptionFileContent (film, "test/data/subrip2.srt")); film->examine_and_add_content (s); BOOST_REQUIRE (!wait_for_jobs ()); s->subtitle->set_colour (dcp::Colour (255, 255, 0)); @@ -197,7 +197,7 @@ BOOST_AUTO_TEST_CASE (ffmpeg_encoder_h264_test3) film->examine_and_add_content (c); BOOST_REQUIRE (!wait_for_jobs ()); - shared_ptr<PlainTextFileContent> s (new PlainTextFileContent (film, "test/data/subrip.srt")); + shared_ptr<TextCaptionFileContent> s (new TextCaptionFileContent (film, "test/data/subrip.srt")); film->examine_and_add_content (s); BOOST_REQUIRE (!wait_for_jobs ()); s->subtitle->set_colour (dcp::Colour (255, 255, 0)); diff --git a/test/player_test.cc b/test/player_test.cc index a66860911..d3b6df6da 100644 --- a/test/player_test.cc +++ b/test/player_test.cc @@ -31,7 +31,7 @@ #include "lib/player.h" #include "lib/video_content.h" #include "lib/image_content.h" -#include "lib/plain_text_file_content.h" +#include "lib/text_caption_file_content.h" #include "lib/content_factory.h" #include "lib/dcp_content.h" #include "lib/text_content.h" @@ -181,7 +181,7 @@ BOOST_AUTO_TEST_CASE (player_interleave_test) film->examine_and_add_content (c); BOOST_REQUIRE (!wait_for_jobs ()); - shared_ptr<PlainTextFileContent> s (new PlainTextFileContent (film, "test/data/subrip.srt")); + shared_ptr<TextCaptionFileContent> s (new TextCaptionFileContent (film, "test/data/subrip.srt")); film->examine_and_add_content (s); BOOST_REQUIRE (!wait_for_jobs ()); diff --git a/test/reels_test.cc b/test/reels_test.cc index 9a915ab2b..a408402c9 100644 --- a/test/reels_test.cc +++ b/test/reels_test.cc @@ -30,7 +30,7 @@ #include "lib/dcp_content_type.h" #include "lib/dcp_content.h" #include "lib/video_content.h" -#include "lib/plain_text_file_content.h" +#include "lib/text_caption_file_content.h" #include "lib/content_factory.h" #include "test.h" #include <boost/test/unit_test.hpp> @@ -165,7 +165,7 @@ BOOST_AUTO_TEST_CASE (reels_test3) shared_ptr<Content> dcp (new DCPContent (film, "test/data/reels_test2")); film->examine_and_add_content (dcp); - shared_ptr<Content> sub (new PlainTextFileContent (film, "test/data/subrip.srt")); + shared_ptr<Content> sub (new TextCaptionFileContent (film, "test/data/subrip.srt")); film->examine_and_add_content (sub); wait_for_jobs (); @@ -206,7 +206,7 @@ BOOST_AUTO_TEST_CASE (reels_test4) content[i]->video->set_length (24); } - shared_ptr<PlainTextFileContent> subs (new PlainTextFileContent (film, "test/data/subrip3.srt")); + shared_ptr<TextCaptionFileContent> subs (new TextCaptionFileContent (film, "test/data/subrip3.srt")); film->examine_and_add_content (subs); wait_for_jobs (); diff --git a/test/render_subtitles_test.cc b/test/render_subtitles_test.cc index a8db80c8b..5b3136497 100644 --- a/test/render_subtitles_test.cc +++ b/test/render_subtitles_test.cc @@ -28,10 +28,10 @@ #include <boost/test/unit_test.hpp> static void -add (std::list<PlainText>& s, std::string text, bool italic, bool bold, bool underline) +add (std::list<TextCaption>& s, std::string text, bool italic, bool bold, bool underline) { s.push_back ( - PlainText ( + TextCaption ( dcp::SubtitleString ( boost::optional<std::string> (), italic, @@ -60,7 +60,7 @@ add (std::list<PlainText>& s, std::string text, bool italic, bool bold, bool und /** Test marked_up() in render_text.cc */ BOOST_AUTO_TEST_CASE (render_markup_test1) { - std::list<PlainText> s; + std::list<TextCaption> s; add (s, "Hello", false, false, false); BOOST_CHECK_EQUAL (marked_up (s, 1024, 1), "<span size=\"41472\" alpha=\"65535\" color=\"#FFFFFF\">Hello</span>"); } @@ -68,7 +68,7 @@ BOOST_AUTO_TEST_CASE (render_markup_test1) /** Test marked_up() in render_text.cc */ BOOST_AUTO_TEST_CASE (render_markup_test2) { - std::list<PlainText> s; + std::list<TextCaption> s; add (s, "Hello", false, true, false); BOOST_CHECK_EQUAL (marked_up (s, 1024, 1), "<span weight=\"bold\" size=\"41472\" alpha=\"65535\" color=\"#FFFFFF\">Hello</span>"); } @@ -77,7 +77,7 @@ BOOST_AUTO_TEST_CASE (render_markup_test2) /** Test marked_up() in render_text.cc */ BOOST_AUTO_TEST_CASE (render_markup_test3) { - std::list<PlainText> s; + std::list<TextCaption> s; add (s, "Hello", true, true, false); BOOST_CHECK_EQUAL (marked_up (s, 1024, 1), "<span style=\"italic\" weight=\"bold\" size=\"41472\" alpha=\"65535\" color=\"#FFFFFF\">Hello</span>"); } @@ -85,7 +85,7 @@ BOOST_AUTO_TEST_CASE (render_markup_test3) /** Test marked_up() in render_text.cc */ BOOST_AUTO_TEST_CASE (render_markup_test4) { - std::list<PlainText> s; + std::list<TextCaption> s; add (s, "Hello", true, true, true); BOOST_CHECK_EQUAL (marked_up (s, 1024, 1), "<span style=\"italic\" weight=\"bold\" underline=\"single\" size=\"41472\" alpha=\"65535\" color=\"#FFFFFF\">Hello</span>"); } @@ -93,7 +93,7 @@ BOOST_AUTO_TEST_CASE (render_markup_test4) /** Test marked_up() in render_text.cc */ BOOST_AUTO_TEST_CASE (render_markup_test5) { - std::list<PlainText> s; + std::list<TextCaption> s; add (s, "Hello", false, true, false); add (s, " world.", false, false, false); BOOST_CHECK_EQUAL (marked_up (s, 1024, 1), "<span weight=\"bold\" size=\"41472\" alpha=\"65535\" color=\"#FFFFFF\">Hello</span><span size=\"41472\" alpha=\"65535\" color=\"#FFFFFF\"> world.</span>"); @@ -102,7 +102,7 @@ BOOST_AUTO_TEST_CASE (render_markup_test5) /** Test marked_up() in render_text.cc */ BOOST_AUTO_TEST_CASE (render_markup_test6) { - std::list<PlainText> s; + std::list<TextCaption> s; add (s, "Hello", true, false, false); add (s, " world ", false, false, false); add (s, "we are bold.", false, true, false); diff --git a/test/srt_subtitle_test.cc b/test/srt_subtitle_test.cc index 268da3472..6fe430d77 100644 --- a/test/srt_subtitle_test.cc +++ b/test/srt_subtitle_test.cc @@ -24,7 +24,7 @@ */ #include "lib/film.h" -#include "lib/plain_text_file_content.h" +#include "lib/text_caption_file_content.h" #include "lib/dcp_content_type.h" #include "lib/font.h" #include "lib/ratio.h" @@ -47,7 +47,7 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test) film->set_name ("frobozz"); film->set_audio_channels (6); film->set_interop (false); - shared_ptr<PlainTextFileContent> content (new PlainTextFileContent (film, "test/data/subrip2.srt")); + shared_ptr<TextCaptionFileContent> content (new TextCaptionFileContent (film, "test/data/subrip2.srt")); film->examine_and_add_content (content); wait_for_jobs (); @@ -69,7 +69,7 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test2) film->set_name ("frobozz"); film->set_audio_channels (6); film->set_interop (false); - shared_ptr<PlainTextFileContent> content (new PlainTextFileContent (film, "test/data/subrip2.srt")); + shared_ptr<TextCaptionFileContent> content (new TextCaptionFileContent (film, "test/data/subrip2.srt")); film->examine_and_add_content (content); wait_for_jobs (); @@ -104,7 +104,7 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test3) film->set_name ("frobozz"); film->set_interop (true); film->set_audio_channels (6); - shared_ptr<PlainTextFileContent> content (new PlainTextFileContent (film, private_data / "Ankoemmling_short.srt")); + shared_ptr<TextCaptionFileContent> content (new TextCaptionFileContent (film, private_data / "Ankoemmling_short.srt")); film->examine_and_add_content (content); wait_for_jobs (); @@ -125,7 +125,7 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test4) film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TLR")); film->set_name ("frobozz"); film->set_interop (false); - shared_ptr<PlainTextFileContent> content (new PlainTextFileContent (film, "test/data/subrip2.srt")); + shared_ptr<TextCaptionFileContent> content (new TextCaptionFileContent (film, "test/data/subrip2.srt")); content->subtitle->set_use (true); content->subtitle->set_burn (false); film->examine_and_add_content (content); @@ -146,7 +146,7 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test5) film->set_name ("frobozz"); film->set_interop (true); film->set_sequence (false); - shared_ptr<PlainTextFileContent> content (new PlainTextFileContent (film, "test/data/subrip2.srt")); + shared_ptr<TextCaptionFileContent> content (new TextCaptionFileContent (film, "test/data/subrip2.srt")); content->subtitle->set_use (true); content->subtitle->set_burn (false); film->examine_and_add_content (content); @@ -164,7 +164,7 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test6) { shared_ptr<Film> film = new_test_film2 ("srt_subtitle_test6"); film->set_interop (false); - shared_ptr<PlainTextFileContent> content (new PlainTextFileContent (film, "test/data/frames.srt")); + shared_ptr<TextCaptionFileContent> content (new TextCaptionFileContent (film, "test/data/frames.srt")); content->subtitle->set_use (true); content->subtitle->set_burn (false); film->examine_and_add_content (content); @@ -185,7 +185,7 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test6) BOOST_AUTO_TEST_CASE (srt_subtitle_test4) { shared_ptr<Film> film = new_test_film ("subrip_render_test"); - shared_ptr<PlainTextFile> content (new PlainTextFile (film, "test/data/subrip.srt")); + shared_ptr<TextCaptionFile> content (new TextCaptionFile (film, "test/data/subrip.srt")); content->examine (shared_ptr<Job> (), true); BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds ((3 * 60) + 56.471)); diff --git a/test/ssa_subtitle_test.cc b/test/ssa_subtitle_test.cc index 536a3ce6a..b3e4f9d33 100644 --- a/test/ssa_subtitle_test.cc +++ b/test/ssa_subtitle_test.cc @@ -24,7 +24,7 @@ */ #include "lib/film.h" -#include "lib/plain_text_file_content.h" +#include "lib/text_caption_file_content.h" #include "lib/dcp_content_type.h" #include "lib/font.h" #include "lib/ratio.h" @@ -47,7 +47,7 @@ BOOST_AUTO_TEST_CASE (ssa_subtitle_test1) film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TLR")); film->set_name ("frobozz"); film->set_interop (true); - shared_ptr<PlainTextFileContent> content (new PlainTextFileContent (film, private_data / "DKH_UT_EN20160601def.ssa")); + shared_ptr<TextCaptionFileContent> content (new TextCaptionFileContent (film, private_data / "DKH_UT_EN20160601def.ssa")); film->examine_and_add_content (content); wait_for_jobs (); diff --git a/test/subtitle_charset_test.cc b/test/subtitle_charset_test.cc index 892ea76f5..3e7df0a61 100644 --- a/test/subtitle_charset_test.cc +++ b/test/subtitle_charset_test.cc @@ -23,7 +23,7 @@ #include "lib/film.h" #include "lib/content_factory.h" #include "lib/plain_text_file.h" -#include "lib/plain_text_file_content.h" +#include "lib/text_caption_file_content.h" #include <boost/test/unit_test.hpp> using boost::shared_ptr; @@ -45,7 +45,7 @@ BOOST_AUTO_TEST_CASE (subtitle_charset_test2) shared_ptr<Content> content = content_factory (film, "test/data/osx.srt").front (); film->examine_and_add_content (content); BOOST_REQUIRE (!wait_for_jobs ()); - shared_ptr<PlainTextFile> ts = dynamic_pointer_cast<PlainTextFile> (content); + shared_ptr<TextCaptionFile> ts = dynamic_pointer_cast<TextCaptionFile> (content); BOOST_REQUIRE (ts); /* Make sure we got the subtitle data from the file */ BOOST_REQUIRE_EQUAL (content->full_length().get(), 6052032); diff --git a/test/subtitle_reel_number_test.cc b/test/subtitle_reel_number_test.cc index ee9c8ecc7..27c6e2d0e 100644 --- a/test/subtitle_reel_number_test.cc +++ b/test/subtitle_reel_number_test.cc @@ -18,7 +18,7 @@ */ -#include "lib/plain_text_file_content.h" +#include "lib/text_caption_file_content.h" #include "lib/film.h" #include "lib/ratio.h" #include "lib/text_content.h" @@ -43,7 +43,7 @@ BOOST_AUTO_TEST_CASE (subtitle_reel_number_test) film->set_container (Ratio::from_id ("185")); film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TLR")); film->set_name ("frobozz"); - shared_ptr<PlainTextFileContent> content (new PlainTextFileContent (film, "test/data/subrip5.srt")); + shared_ptr<TextCaptionFileContent> content (new TextCaptionFileContent (film, "test/data/subrip5.srt")); film->examine_and_add_content (content); BOOST_REQUIRE (!wait_for_jobs ()); content->subtitle->set_use (true); |
