summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-07-19 01:09:19 +0100
committerCarl Hetherington <cth@carlh.net>2018-07-19 23:45:19 +0100
commitc53c3e9f3d08478a391bfa1989772378609af693 (patch)
tree34a1ebe4b00e50b2a589a552ce8e88be63967c8f
parenta8cd625da7064816fc890d458c0d4e2dc04ba796 (diff)
More renaming.
-rw-r--r--src/lib/content_factory.cc4
-rw-r--r--src/lib/decoder_factory.cc4
-rw-r--r--src/lib/plain_text.cc6
-rw-r--r--src/lib/plain_text.h6
-rw-r--r--src/lib/plain_text_content.cc18
-rw-r--r--src/lib/plain_text_content.h10
-rw-r--r--src/lib/plain_text_decoder.cc10
-rw-r--r--src/lib/plain_text_decoder.h4
-rw-r--r--src/wx/content_panel.cc4
-rw-r--r--test/ffmpeg_encoder_test.cc8
-rw-r--r--test/player_test.cc2
-rw-r--r--test/reels_test.cc4
-rw-r--r--test/srt_subtitle_test.cc12
-rw-r--r--test/ssa_subtitle_test.cc2
-rw-r--r--test/subtitle_reel_number_test.cc2
15 files changed, 48 insertions, 48 deletions
diff --git a/src/lib/content_factory.cc b/src/lib/content_factory.cc
index 24ad95578..4e8880ffe 100644
--- a/src/lib/content_factory.cc
+++ b/src/lib/content_factory.cc
@@ -88,7 +88,7 @@ content_factory (shared_ptr<const Film> film, cxml::NodePtr node, int version, l
);
} else if (type == "SubRip" || type == "TextSubtitle") {
- content.reset (new PlainText (film, node, version));
+ content.reset (new PlainTextContent (film, node, version));
} else if (type == "DCP") {
content.reset (new DCPContent (film, node, version));
} else if (type == "DCPSubtitle") {
@@ -210,7 +210,7 @@ content_factory (shared_ptr<const Film> film, boost::filesystem::path path)
if (valid_image_file (path)) {
single.reset (new ImageContent (film, path));
} else if (ext == ".srt" || ext == ".ssa" || ext == ".ass") {
- single.reset (new PlainText (film, path));
+ single.reset (new PlainTextContent (film, path));
} else if (ext == ".xml") {
cxml::Document doc;
doc.read_file (path);
diff --git a/src/lib/decoder_factory.cc b/src/lib/decoder_factory.cc
index 4301edd17..73a5b66fe 100644
--- a/src/lib/decoder_factory.cc
+++ b/src/lib/decoder_factory.cc
@@ -54,9 +54,9 @@ decoder_factory (shared_ptr<const Content> content, shared_ptr<Log> log, bool fa
return shared_ptr<Decoder> (new ImageDecoder (ic, log));
}
- shared_ptr<const PlainText> rc = dynamic_pointer_cast<const PlainText> (content);
+ shared_ptr<const PlainTextContent> rc = dynamic_pointer_cast<const PlainTextContent> (content);
if (rc) {
- return shared_ptr<Decoder> (new TextTextDecoder (rc, log));
+ return shared_ptr<Decoder> (new PlainTextDecoder (rc, log));
}
shared_ptr<const DCPTextContent> dsc = dynamic_pointer_cast<const DCPTextContent> (content);
diff --git a/src/lib/plain_text.cc b/src/lib/plain_text.cc
index ee9bc4b8b..58035a07f 100644
--- a/src/lib/plain_text.cc
+++ b/src/lib/plain_text.cc
@@ -39,7 +39,7 @@ using boost::scoped_array;
using boost::optional;
using dcp::Data;
-TextSubtitle::TextSubtitle (shared_ptr<const PlainText> content)
+PlainText::PlainText (shared_ptr<const PlainTextContent> content)
{
Data in (content->path (0));
@@ -96,7 +96,7 @@ TextSubtitle::TextSubtitle (shared_ptr<const PlainText> content)
/** @return time of first subtitle, if there is one */
optional<ContentTime>
-TextSubtitle::first () const
+PlainText::first () const
{
if (_subtitles.empty()) {
return optional<ContentTime>();
@@ -106,7 +106,7 @@ TextSubtitle::first () const
}
ContentTime
-TextSubtitle::length () const
+PlainText::length () const
{
if (_subtitles.empty ()) {
return ContentTime ();
diff --git a/src/lib/plain_text.h b/src/lib/plain_text.h
index 61d714702..01d3d77ef 100644
--- a/src/lib/plain_text.h
+++ b/src/lib/plain_text.h
@@ -26,16 +26,16 @@
#include <boost/shared_ptr.hpp>
#include <vector>
-class PlainText;
+class PlainTextContent;
class plain_text_time_test;
class plain_text_coordinate_test;
class plain_text_content_test;
class plain_text_parse_test;
-class TextSubtitle
+class PlainText
{
public:
- explicit TextSubtitle (boost::shared_ptr<const PlainText>);
+ explicit PlainText (boost::shared_ptr<const PlainTextContent>);
boost::optional<ContentTime> first () const;
ContentTime length () const;
diff --git a/src/lib/plain_text_content.cc b/src/lib/plain_text_content.cc
index f51e365d5..a07dcb67c 100644
--- a/src/lib/plain_text_content.cc
+++ b/src/lib/plain_text_content.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2014-2016 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2014-2018 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
@@ -35,13 +35,13 @@ using std::cout;
using boost::shared_ptr;
using dcp::raw_convert;
-PlainText::PlainText (shared_ptr<const Film> film, boost::filesystem::path path)
+PlainTextContent::PlainTextContent (shared_ptr<const Film> film, boost::filesystem::path path)
: Content (film, path)
{
subtitle.reset (new TextContent (this));
}
-PlainText::PlainText (shared_ptr<const Film> film, cxml::ConstNodePtr node, int version)
+PlainTextContent::PlainTextContent (shared_ptr<const Film> film, cxml::ConstNodePtr node, int version)
: Content (film, node)
, _length (node->number_child<ContentTime::Type> ("Length"))
{
@@ -49,10 +49,10 @@ PlainText::PlainText (shared_ptr<const Film> film, cxml::ConstNodePtr node, int
}
void
-PlainText::examine (boost::shared_ptr<Job> job)
+PlainTextContent::examine (boost::shared_ptr<Job> job)
{
Content::examine (job);
- TextSubtitle s (shared_from_this ());
+ PlainText s (shared_from_this ());
/* Default to turning these subtitles on */
subtitle->set_use (true);
@@ -63,19 +63,19 @@ PlainText::examine (boost::shared_ptr<Job> job)
}
string
-PlainText::summary () const
+PlainTextContent::summary () const
{
return path_summary() + " " + _("[subtitles]");
}
string
-PlainText::technical_summary () const
+PlainTextContent::technical_summary () const
{
return Content::technical_summary() + " - " + _("Text subtitles");
}
void
-PlainText::as_xml (xmlpp::Node* node, bool with_paths) const
+PlainTextContent::as_xml (xmlpp::Node* node, bool with_paths) const
{
node->add_child("Type")->add_child_text ("TextSubtitle");
Content::as_xml (node, with_paths);
@@ -88,7 +88,7 @@ PlainText::as_xml (xmlpp::Node* node, bool with_paths) const
}
DCPTime
-PlainText::full_length () const
+PlainTextContent::full_length () const
{
FrameRateChange const frc (active_video_frame_rate(), film()->video_frame_rate ());
return DCPTime (_length, frc);
diff --git a/src/lib/plain_text_content.h b/src/lib/plain_text_content.h
index 7a7ef66ea..02b4596ed 100644
--- a/src/lib/plain_text_content.h
+++ b/src/lib/plain_text_content.h
@@ -25,14 +25,14 @@ class Job;
/** @class PlainText
* @brief SubRip or SSA subtitles.
*/
-class PlainText : public Content
+class PlainTextContent : public Content
{
public:
- PlainText (boost::shared_ptr<const Film>, boost::filesystem::path);
- PlainText (boost::shared_ptr<const Film>, cxml::ConstNodePtr, int);
+ PlainTextContent (boost::shared_ptr<const Film>, boost::filesystem::path);
+ PlainTextContent (boost::shared_ptr<const Film>, cxml::ConstNodePtr, int);
- boost::shared_ptr<PlainText> shared_from_this () {
- return boost::dynamic_pointer_cast<PlainText> (Content::shared_from_this ());
+ boost::shared_ptr<PlainTextContent> shared_from_this () {
+ return boost::dynamic_pointer_cast<PlainTextContent> (Content::shared_from_this ());
}
void examine (boost::shared_ptr<Job>);
diff --git a/src/lib/plain_text_decoder.cc b/src/lib/plain_text_decoder.cc
index 46a4bd552..005d30669 100644
--- a/src/lib/plain_text_decoder.cc
+++ b/src/lib/plain_text_decoder.cc
@@ -34,8 +34,8 @@ using boost::shared_ptr;
using boost::optional;
using boost::dynamic_pointer_cast;
-TextTextDecoder::TextTextDecoder (shared_ptr<const PlainText> content, shared_ptr<Log> log)
- : TextSubtitle (content)
+PlainTextDecoder::PlainTextDecoder (shared_ptr<const PlainTextContent> content, shared_ptr<Log> log)
+ : PlainText (content)
, _next (0)
{
ContentTime first;
@@ -46,7 +46,7 @@ TextTextDecoder::TextTextDecoder (shared_ptr<const PlainText> content, shared_pt
}
void
-TextTextDecoder::seek (ContentTime time, bool accurate)
+PlainTextDecoder::seek (ContentTime time, bool accurate)
{
/* It's worth back-tracking a little here as decoding is cheap and it's nice if we don't miss
too many subtitles when seeking.
@@ -65,7 +65,7 @@ TextTextDecoder::seek (ContentTime time, bool accurate)
}
bool
-TextTextDecoder::pass ()
+PlainTextDecoder::pass ()
{
if (_next >= _subtitles.size ()) {
return true;
@@ -79,7 +79,7 @@ TextTextDecoder::pass ()
}
ContentTimePeriod
-TextTextDecoder::content_time_period (sub::Subtitle s) const
+PlainTextDecoder::content_time_period (sub::Subtitle s) const
{
return ContentTimePeriod (
ContentTime::from_seconds (s.from.all_as_seconds()),
diff --git a/src/lib/plain_text_decoder.h b/src/lib/plain_text_decoder.h
index 046c5f8e0..f11fe3eab 100644
--- a/src/lib/plain_text_decoder.h
+++ b/src/lib/plain_text_decoder.h
@@ -26,10 +26,10 @@
class PlainText;
-class TextTextDecoder : public Decoder, public TextSubtitle
+class PlainTextDecoder : public Decoder, public PlainText
{
public:
- TextTextDecoder (boost::shared_ptr<const PlainText>, boost::shared_ptr<Log> log);
+ PlainTextDecoder (boost::shared_ptr<const PlainTextContent>, boost::shared_ptr<Log> log);
void seek (ContentTime time, bool accurate);
bool pass ();
diff --git a/src/wx/content_panel.cc b/src/wx/content_panel.cc
index 578c9fa24..8a24b2170 100644
--- a/src/wx/content_panel.cc
+++ b/src/wx/content_panel.cc
@@ -258,11 +258,11 @@ ContentPanel::selection_changed ()
BOOST_FOREACH (shared_ptr<Content> i, selected ()) {
DCPTime p;
p = i->position();
- if (dynamic_pointer_cast<PlainText>(i) && i->paths_valid()) {
+ if (dynamic_pointer_cast<PlainTextContent>(i) && i->paths_valid()) {
/* Rather special case; if we select a text subtitle file jump to its
first subtitle.
*/
- TextSubtitle ts (dynamic_pointer_cast<PlainText>(i));
+ PlainText ts (dynamic_pointer_cast<PlainTextContent>(i));
if (ts.first()) {
p += DCPTime(ts.first().get(), _film->active_frame_rate_change(i->position()));
}
diff --git a/test/ffmpeg_encoder_test.cc b/test/ffmpeg_encoder_test.cc
index 65f98ed1a..e579621c6 100644
--- a/test/ffmpeg_encoder_test.cc
+++ b/test/ffmpeg_encoder_test.cc
@@ -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<PlainText> s (new PlainText (film, "test/data/subrip2.srt"));
+ shared_ptr<PlainTextContent> s (new PlainTextContent (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<PlainText> s (new PlainText (film, "test/data/subrip.srt"));
+ shared_ptr<PlainTextContent> s (new PlainTextContent (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<PlainText> s (new PlainText (film, "test/data/subrip2.srt"));
+ shared_ptr<PlainTextContent> s (new PlainTextContent (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<PlainText> s (new PlainText (film, "test/data/subrip.srt"));
+ shared_ptr<PlainTextContent> s (new PlainTextContent (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 915dab4f7..7cc3bc27b 100644
--- a/test/player_test.cc
+++ b/test/player_test.cc
@@ -181,7 +181,7 @@ BOOST_AUTO_TEST_CASE (player_interleave_test)
film->examine_and_add_content (c);
BOOST_REQUIRE (!wait_for_jobs ());
- shared_ptr<PlainText> s (new PlainText (film, "test/data/subrip.srt"));
+ shared_ptr<PlainTextContent> s (new PlainTextContent (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 2949adc73..70552a703 100644
--- a/test/reels_test.cc
+++ b/test/reels_test.cc
@@ -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 PlainText (film, "test/data/subrip.srt"));
+ shared_ptr<Content> sub (new PlainTextContent (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<PlainText> subs (new PlainText (film, "test/data/subrip3.srt"));
+ shared_ptr<PlainTextContent> subs (new PlainTextContent (film, "test/data/subrip3.srt"));
film->examine_and_add_content (subs);
wait_for_jobs ();
diff --git a/test/srt_subtitle_test.cc b/test/srt_subtitle_test.cc
index 1570cdce9..e44e33c14 100644
--- a/test/srt_subtitle_test.cc
+++ b/test/srt_subtitle_test.cc
@@ -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<PlainText> content (new PlainText (film, "test/data/subrip2.srt"));
+ shared_ptr<PlainTextContent> content (new PlainTextContent (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<PlainText> content (new PlainText (film, "test/data/subrip2.srt"));
+ shared_ptr<PlainTextContent> content (new PlainTextContent (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<PlainText> content (new PlainText (film, private_data / "Ankoemmling_short.srt"));
+ shared_ptr<PlainTextContent> content (new PlainTextContent (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<PlainText> content (new PlainText (film, "test/data/subrip2.srt"));
+ shared_ptr<PlainTextContent> content (new PlainTextContent (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<PlainText> content (new PlainText (film, "test/data/subrip2.srt"));
+ shared_ptr<PlainTextContent> content (new PlainTextContent (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<PlainText> content (new PlainText (film, "test/data/frames.srt"));
+ shared_ptr<PlainTextContent> content (new PlainTextContent (film, "test/data/frames.srt"));
content->subtitle->set_use (true);
content->subtitle->set_burn (false);
film->examine_and_add_content (content);
diff --git a/test/ssa_subtitle_test.cc b/test/ssa_subtitle_test.cc
index 7e2233cca..ab15af139 100644
--- a/test/ssa_subtitle_test.cc
+++ b/test/ssa_subtitle_test.cc
@@ -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<PlainText> content (new PlainText (film, private_data / "DKH_UT_EN20160601def.ssa"));
+ shared_ptr<PlainTextContent> content (new PlainTextContent (film, private_data / "DKH_UT_EN20160601def.ssa"));
film->examine_and_add_content (content);
wait_for_jobs ();
diff --git a/test/subtitle_reel_number_test.cc b/test/subtitle_reel_number_test.cc
index d150e90dd..317f93ff5 100644
--- a/test/subtitle_reel_number_test.cc
+++ b/test/subtitle_reel_number_test.cc
@@ -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<PlainText> content (new PlainText (film, "test/data/subrip5.srt"));
+ shared_ptr<PlainTextContent> content (new PlainTextContent (film, "test/data/subrip5.srt"));
film->examine_and_add_content (content);
BOOST_REQUIRE (!wait_for_jobs ());
content->subtitle->set_use (true);