summaryrefslogtreecommitdiff
path: root/src/lib
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 /src/lib
parenta8cd625da7064816fc890d458c0d4e2dc04ba796 (diff)
More renaming.
Diffstat (limited to 'src/lib')
-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
8 files changed, 31 insertions, 31 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 ();