summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-07-23 11:20:12 +0100
committerCarl Hetherington <cth@carlh.net>2018-07-23 11:20:12 +0100
commitdf17bbd25da69fc38eb2dcd8b4a2531cf0bab0bc (patch)
tree04e6f5917ed3c2e8ea45904ff0235c08d29a6446 /src/lib
parent6f146336b73fe720c83cb75ebdf15e9cb9c02973 (diff)
More automated renaming.
ActiveCaptions -> ActiveText BitmapCaption -> BitmapText ContentCaption -> ContentText ContentTextCaption -> ContentStringText TextCaptionFileContent -> StringTextFileContent TextCaptionFileDecoder -> StringTextFileDecoder TextCaptionFile -> StringTextFile TextCaption -> StringText PlayerCaption -> PlayerText CaptionContent -> TextContent CaptionDecoder -> TextDecoder CaptionPanel -> TextPanel CaptionView -> TextView CaptionAppearanceDialog -> SubtitleAppearanceDialog CaptionType -> TextType
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/active_text.cc (renamed from src/lib/active_captions.cc)36
-rw-r--r--src/lib/active_text.h (renamed from src/lib/active_captions.h)28
-rw-r--r--src/lib/bitmap_text.h (renamed from src/lib/bitmap_caption.h)4
-rw-r--r--src/lib/content.cc18
-rw-r--r--src/lib/content.h6
-rw-r--r--src/lib/content_factory.cc6
-rw-r--r--src/lib/content_text.h (renamed from src/lib/content_caption.h)24
-rw-r--r--src/lib/dcp_content.cc16
-rw-r--r--src/lib/dcp_content.h6
-rw-r--r--src/lib/dcp_decoder.cc10
-rw-r--r--src/lib/dcp_decoder.h2
-rw-r--r--src/lib/dcp_encoder.cc6
-rw-r--r--src/lib/dcp_encoder.h4
-rw-r--r--src/lib/dcp_examiner.h2
-rw-r--r--src/lib/dcp_subtitle_content.cc6
-rw-r--r--src/lib/dcp_subtitle_decoder.cc4
-rw-r--r--src/lib/dcp_subtitle_decoder.h2
-rw-r--r--src/lib/decoder.cc10
-rw-r--r--src/lib/decoder.h6
-rw-r--r--src/lib/decoder_factory.cc8
-rw-r--r--src/lib/encoder.h2
-rw-r--r--src/lib/ffmpeg_content.cc8
-rw-r--r--src/lib/ffmpeg_decoder.cc6
-rw-r--r--src/lib/ffmpeg_encoder.cc2
-rw-r--r--src/lib/ffmpeg_encoder.h2
-rw-r--r--src/lib/film.cc10
-rw-r--r--src/lib/hints.cc4
-rw-r--r--src/lib/player.cc72
-rw-r--r--src/lib/player.h20
-rw-r--r--src/lib/player_text.cc (renamed from src/lib/player_caption.cc)4
-rw-r--r--src/lib/player_text.h (renamed from src/lib/player_caption.h)12
-rw-r--r--src/lib/playlist.cc4
-rw-r--r--src/lib/reel_writer.cc6
-rw-r--r--src/lib/reel_writer.h4
-rw-r--r--src/lib/render_text.cc12
-rw-r--r--src/lib/render_text.h6
-rw-r--r--src/lib/string_text.h (renamed from src/lib/text_caption.h)6
-rw-r--r--src/lib/string_text_file.cc (renamed from src/lib/text_caption_file.cc)10
-rw-r--r--src/lib/string_text_file.h (renamed from src/lib/text_caption_file.h)12
-rw-r--r--src/lib/string_text_file_content.cc (renamed from src/lib/text_caption_file_content.cc)26
-rw-r--r--src/lib/string_text_file_content.h (renamed from src/lib/text_caption_file_content.h)12
-rw-r--r--src/lib/string_text_file_decoder.cc (renamed from src/lib/text_caption_file_decoder.cc)20
-rw-r--r--src/lib/string_text_file_decoder.h (renamed from src/lib/text_caption_file_decoder.h)8
-rw-r--r--src/lib/text_content.cc (renamed from src/lib/caption_content.cc)164
-rw-r--r--src/lib/text_content.h (renamed from src/lib/caption_content.h)26
-rw-r--r--src/lib/text_decoder.cc (renamed from src/lib/caption_decoder.cc)26
-rw-r--r--src/lib/text_decoder.h (renamed from src/lib/caption_decoder.h)18
-rw-r--r--src/lib/types.cc6
-rw-r--r--src/lib/types.h10
-rw-r--r--src/lib/writer.cc2
-rw-r--r--src/lib/writer.h4
-rw-r--r--src/lib/wscript14
52 files changed, 371 insertions, 371 deletions
diff --git a/src/lib/active_captions.cc b/src/lib/active_text.cc
index 1d3a53609..de3dc8165 100644
--- a/src/lib/active_captions.cc
+++ b/src/lib/active_text.cc
@@ -18,8 +18,8 @@
*/
-#include "active_captions.h"
-#include "caption_content.h"
+#include "active_text.h"
+#include "text_content.h"
#include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp>
@@ -31,7 +31,7 @@ using boost::shared_ptr;
using boost::optional;
void
-ActiveCaptions::add (DCPTimePeriod period, list<PlayerCaption>& pc, list<Period> p) const
+ActiveText::add (DCPTimePeriod period, list<PlayerText>& pc, list<Period> p) const
{
BOOST_FOREACH (Period i, p) {
DCPTimePeriod test (i.from, i.to.get_value_or(DCPTime::max()));
@@ -42,14 +42,14 @@ ActiveCaptions::add (DCPTimePeriod period, list<PlayerCaption>& pc, list<Period>
}
}
-list<PlayerCaption>
-ActiveCaptions::get (DCPTimePeriod period) const
+list<PlayerText>
+ActiveText::get (DCPTimePeriod period) const
{
- list<PlayerCaption> ps;
+ list<PlayerText> ps;
for (Map::const_iterator i = _data.begin(); i != _data.end(); ++i) {
- shared_ptr<const CaptionContent> caption = i->first.lock ();
+ shared_ptr<const TextContent> caption = i->first.lock ();
if (!caption || !caption->use()) {
continue;
}
@@ -64,14 +64,14 @@ ActiveCaptions::get (DCPTimePeriod period) const
* @param period Period of interest.
* @param always_burn_captions Always burn captions even if their content is not set to burn.
*/
-list<PlayerCaption>
-ActiveCaptions::get_burnt (DCPTimePeriod period, bool always_burn_captions) const
+list<PlayerText>
+ActiveText::get_burnt (DCPTimePeriod period, bool always_burn_captions) const
{
- list<PlayerCaption> ps;
+ list<PlayerText> ps;
for (Map::const_iterator i = _data.begin(); i != _data.end(); ++i) {
- shared_ptr<const CaptionContent> caption = i->first.lock ();
+ shared_ptr<const TextContent> caption = i->first.lock ();
if (!caption) {
continue;
}
@@ -91,7 +91,7 @@ ActiveCaptions::get_burnt (DCPTimePeriod period, bool always_burn_captions) cons
* @param time Time to remove before.
*/
void
-ActiveCaptions::clear_before (DCPTime time)
+ActiveText::clear_before (DCPTime time)
{
Map updated;
for (Map::const_iterator i = _data.begin(); i != _data.end(); ++i) {
@@ -114,7 +114,7 @@ ActiveCaptions::clear_before (DCPTime time)
* @param from From time for these subtitles.
*/
void
-ActiveCaptions::add_from (weak_ptr<const CaptionContent> content, PlayerCaption ps, DCPTime from)
+ActiveText::add_from (weak_ptr<const TextContent> content, PlayerText ps, DCPTime from)
{
if (_data.find(content) == _data.end()) {
_data[content] = list<Period>();
@@ -127,14 +127,14 @@ ActiveCaptions::add_from (weak_ptr<const CaptionContent> content, PlayerCaption
* @param to To time for the last subtitle submitted to add_from for this content.
* @return Return the corresponding subtitles and their from time.
*/
-pair<PlayerCaption, DCPTime>
-ActiveCaptions::add_to (weak_ptr<const CaptionContent> content, DCPTime to)
+pair<PlayerText, DCPTime>
+ActiveText::add_to (weak_ptr<const TextContent> content, DCPTime to)
{
DCPOMATIC_ASSERT (_data.find(content) != _data.end());
_data[content].back().to = to;
- BOOST_FOREACH (TextCaption& i, _data[content].back().subs.text) {
+ BOOST_FOREACH (StringText& i, _data[content].back().subs.text) {
i.set_out (dcp::Time(to.seconds(), 1000));
}
@@ -145,7 +145,7 @@ ActiveCaptions::add_to (weak_ptr<const CaptionContent> content, DCPTime to)
* @return true if we have any active subtitles from this content.
*/
bool
-ActiveCaptions::have (weak_ptr<const CaptionContent> content) const
+ActiveText::have (weak_ptr<const TextContent> content) const
{
Map::const_iterator i = _data.find(content);
if (i == _data.end()) {
@@ -156,7 +156,7 @@ ActiveCaptions::have (weak_ptr<const CaptionContent> content) const
}
void
-ActiveCaptions::clear ()
+ActiveText::clear ()
{
_data.clear ();
}
diff --git a/src/lib/active_captions.h b/src/lib/active_text.h
index 8e38564f5..10ce30f08 100644
--- a/src/lib/active_captions.h
+++ b/src/lib/active_text.h
@@ -19,30 +19,30 @@
*/
/** @file src/lib/active_captions.h
- * @brief ActiveCaptions class.
+ * @brief ActiveText class.
*/
#include "dcpomatic_time.h"
-#include "player_caption.h"
+#include "player_text.h"
#include <boost/noncopyable.hpp>
#include <list>
#include <map>
-class CaptionContent;
+class TextContent;
-/** @class ActiveCaptions
+/** @class ActiveText
* @brief A class to maintain information on active subtitles for Player.
*/
-class ActiveCaptions : public boost::noncopyable
+class ActiveText : public boost::noncopyable
{
public:
- std::list<PlayerCaption> get (DCPTimePeriod period) const;
- std::list<PlayerCaption> get_burnt (DCPTimePeriod period, bool always_burn_captions) const;
+ std::list<PlayerText> get (DCPTimePeriod period) const;
+ std::list<PlayerText> get_burnt (DCPTimePeriod period, bool always_burn_captions) const;
void clear_before (DCPTime time);
void clear ();
- void add_from (boost::weak_ptr<const CaptionContent> content, PlayerCaption ps, DCPTime from);
- std::pair<PlayerCaption, DCPTime> add_to (boost::weak_ptr<const CaptionContent> content, DCPTime to);
- bool have (boost::weak_ptr<const CaptionContent> content) const;
+ void add_from (boost::weak_ptr<const TextContent> content, PlayerText ps, DCPTime from);
+ std::pair<PlayerText, DCPTime> add_to (boost::weak_ptr<const TextContent> content, DCPTime to);
+ bool have (boost::weak_ptr<const TextContent> content) const;
private:
class Period
@@ -50,19 +50,19 @@ private:
public:
Period () {}
- Period (PlayerCaption s, DCPTime f)
+ Period (PlayerText s, DCPTime f)
: subs (s)
, from (f)
{}
- PlayerCaption subs;
+ PlayerText subs;
DCPTime from;
boost::optional<DCPTime> to;
};
- typedef std::map<boost::weak_ptr<const CaptionContent>, std::list<Period> > Map;
+ typedef std::map<boost::weak_ptr<const TextContent>, std::list<Period> > Map;
- void add (DCPTimePeriod period, std::list<PlayerCaption>& pc, std::list<Period> p) const;
+ void add (DCPTimePeriod period, std::list<PlayerText>& pc, std::list<Period> p) const;
Map _data;
};
diff --git a/src/lib/bitmap_caption.h b/src/lib/bitmap_text.h
index 8883272ad..2314c2db0 100644
--- a/src/lib/bitmap_caption.h
+++ b/src/lib/bitmap_text.h
@@ -26,10 +26,10 @@
class Image;
-class BitmapCaption
+class BitmapText
{
public:
- BitmapCaption (boost::shared_ptr<Image> i, dcpomatic::Rect<double> r)
+ BitmapText (boost::shared_ptr<Image> i, dcpomatic::Rect<double> r)
: image (i)
, rectangle (r)
{}
diff --git a/src/lib/content.cc b/src/lib/content.cc
index 629672b73..7a8088289 100644
--- a/src/lib/content.cc
+++ b/src/lib/content.cc
@@ -27,7 +27,7 @@
#include "content_factory.h"
#include "video_content.h"
#include "audio_content.h"
-#include "caption_content.h"
+#include "text_content.h"
#include "exceptions.h"
#include "film.h"
#include "job.h"
@@ -437,8 +437,8 @@ Content::take_settings_from (shared_ptr<const Content> c)
audio->take_settings_from (c->audio);
}
- list<shared_ptr<CaptionContent> >::iterator i = caption.begin ();
- list<shared_ptr<CaptionContent> >::const_iterator j = c->caption.begin ();
+ list<shared_ptr<TextContent> >::iterator i = caption.begin ();
+ list<shared_ptr<TextContent> >::const_iterator j = c->caption.begin ();
while (i != caption.end() && j != c->caption.end()) {
(*i)->take_settings_from (*j);
++i;
@@ -446,24 +446,24 @@ Content::take_settings_from (shared_ptr<const Content> c)
}
}
-shared_ptr<CaptionContent>
+shared_ptr<TextContent>
Content::only_caption () const
{
DCPOMATIC_ASSERT (caption.size() < 2);
if (caption.empty ()) {
- return shared_ptr<CaptionContent> ();
+ return shared_ptr<TextContent> ();
}
return caption.front ();
}
-shared_ptr<CaptionContent>
-Content::caption_of_original_type (CaptionType type) const
+shared_ptr<TextContent>
+Content::caption_of_original_type (TextType type) const
{
- BOOST_FOREACH (shared_ptr<CaptionContent> i, caption) {
+ BOOST_FOREACH (shared_ptr<TextContent> i, caption) {
if (i->original_type() == type) {
return i;
}
}
- return shared_ptr<CaptionContent> ();
+ return shared_ptr<TextContent> ();
}
diff --git a/src/lib/content.h b/src/lib/content.h
index d84f636fb..850cb0891 100644
--- a/src/lib/content.h
+++ b/src/lib/content.h
@@ -182,10 +182,10 @@ public:
boost::shared_ptr<VideoContent> video;
boost::shared_ptr<AudioContent> audio;
- std::list<boost::shared_ptr<CaptionContent> > caption;
+ std::list<boost::shared_ptr<TextContent> > caption;
- boost::shared_ptr<CaptionContent> only_caption () const;
- boost::shared_ptr<CaptionContent> caption_of_original_type (CaptionType type) const;
+ boost::shared_ptr<TextContent> only_caption () const;
+ boost::shared_ptr<TextContent> caption_of_original_type (TextType type) const;
void signal_changed (int);
diff --git a/src/lib/content_factory.cc b/src/lib/content_factory.cc
index 8c473b7bc..077ef529e 100644
--- a/src/lib/content_factory.cc
+++ b/src/lib/content_factory.cc
@@ -26,7 +26,7 @@
#include "audio_content.h"
#include "image_content.h"
#include "atmos_mxf_content.h"
-#include "text_caption_file_content.h"
+#include "string_text_file_content.h"
#include "dcp_content.h"
#include "dcp_subtitle_content.h"
#include "util.h"
@@ -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 TextCaptionFileContent (film, node, version));
+ content.reset (new StringTextFileContent (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 TextCaptionFileContent (film, path));
+ single.reset (new StringTextFileContent (film, path));
} else if (ext == ".xml") {
cxml::Document doc;
doc.read_file (path);
diff --git a/src/lib/content_caption.h b/src/lib/content_text.h
index ad83fcb89..3ef011f61 100644
--- a/src/lib/content_caption.h
+++ b/src/lib/content_text.h
@@ -24,16 +24,16 @@
#include "dcpomatic_time.h"
#include "rect.h"
#include "types.h"
-#include "bitmap_caption.h"
+#include "bitmap_text.h"
#include <dcp/subtitle_string.h>
#include <list>
class Image;
-class ContentCaption
+class ContentText
{
public:
- explicit ContentCaption (ContentTime f, CaptionType t)
+ explicit ContentText (ContentTime f, TextType t)
: _from (f)
, _type (t)
{}
@@ -42,36 +42,36 @@ public:
return _from;
}
- CaptionType type () const {
+ TextType type () const {
return _type;
}
private:
ContentTime _from;
- CaptionType _type;
+ TextType _type;
};
-class ContentBitmapCaption : public ContentCaption
+class ContentBitmapText : public ContentText
{
public:
- ContentBitmapCaption (ContentTime f, CaptionType type, boost::shared_ptr<Image> im, dcpomatic::Rect<double> r)
- : ContentCaption (f, type)
+ ContentBitmapText (ContentTime f, TextType type, boost::shared_ptr<Image> im, dcpomatic::Rect<double> r)
+ : ContentText (f, type)
, sub (im, r)
{}
/* Our text, with its rectangle unmodified by any offsets or scales that the content specifies */
- BitmapCaption sub;
+ BitmapText sub;
};
/** A text caption. We store the time period separately (as well as in the dcp::SubtitleStrings)
* as the dcp::SubtitleString timings are sometimes quite heavily quantised and this causes problems
* when we want to compare the quantised periods to the unquantised ones.
*/
-class ContentTextCaption : public ContentCaption
+class ContentStringText : public ContentText
{
public:
- ContentTextCaption (ContentTime f, CaptionType type, std::list<dcp::SubtitleString> s)
- : ContentCaption (f, type)
+ ContentStringText (ContentTime f, TextType type, std::list<dcp::SubtitleString> s)
+ : ContentText (f, type)
, subs (s)
{}
diff --git a/src/lib/dcp_content.cc b/src/lib/dcp_content.cc
index 414a22256..aaf8064f3 100644
--- a/src/lib/dcp_content.cc
+++ b/src/lib/dcp_content.cc
@@ -28,7 +28,7 @@
#include "overlaps.h"
#include "compose.hpp"
#include "dcp_decoder.h"
-#include "caption_content.h"
+#include "text_content.h"
#include <dcp/dcp.h>
#include <dcp/raw_convert.h>
#include <dcp/exceptions.h>
@@ -84,7 +84,7 @@ DCPContent::DCPContent (shared_ptr<const Film> film, cxml::ConstNodePtr node, in
{
video = VideoContent::from_xml (this, node, version);
audio = AudioContent::from_xml (this, node, version);
- caption = CaptionContent::from_xml (this, node, version);
+ caption = TextContent::from_xml (this, node, version);
for (int i = 0; i < CAPTION_COUNT; ++i) {
_reference_caption[i] = false;
@@ -192,8 +192,8 @@ DCPContent::examine (shared_ptr<Job> job)
boost::mutex::scoped_lock lm (_mutex);
_name = examiner->name ();
for (int i = 0; i < CAPTION_COUNT; ++i) {
- if (examiner->has_caption(static_cast<CaptionType>(i))) {
- caption.push_back (shared_ptr<CaptionContent>(new CaptionContent(this, static_cast<CaptionType>(i))));
+ if (examiner->has_caption(static_cast<TextType>(i))) {
+ caption.push_back (shared_ptr<TextContent>(new TextContent(this, static_cast<TextType>(i))));
}
}
captions = caption.size ();
@@ -267,7 +267,7 @@ DCPContent::as_xml (xmlpp::Node* node, bool with_paths) const
audio->stream()->mapping().as_xml (node->add_child("AudioMapping"));
}
- BOOST_FOREACH (shared_ptr<CaptionContent> i, caption) {
+ BOOST_FOREACH (shared_ptr<TextContent> i, caption) {
i->as_xml (node);
}
@@ -323,7 +323,7 @@ DCPContent::identifier () const
s += video->identifier() + "_";
}
- BOOST_FOREACH (shared_ptr<CaptionContent> i, caption) {
+ BOOST_FOREACH (shared_ptr<TextContent> i, caption) {
s += i->identifier () + " ";
}
@@ -416,7 +416,7 @@ DCPContent::set_reference_audio (bool r)
}
void
-DCPContent::set_reference_caption (CaptionType type, bool r)
+DCPContent::set_reference_caption (TextType type, bool r)
{
{
boost::mutex::scoped_lock lm (_mutex);
@@ -596,7 +596,7 @@ bool check_caption (shared_ptr<const Content> c)
return !c->caption.empty();
}
bool
-DCPContent::can_reference_caption (CaptionType type, string& why_not) const
+DCPContent::can_reference_caption (TextType type, string& why_not) const
{
shared_ptr<DCPDecoder> decoder;
try {
diff --git a/src/lib/dcp_content.h b/src/lib/dcp_content.h
index f01790b89..fedc43d64 100644
--- a/src/lib/dcp_content.h
+++ b/src/lib/dcp_content.h
@@ -108,17 +108,17 @@ public:
bool can_reference_audio (std::string &) const;
- void set_reference_caption (CaptionType type, bool r);
+ void set_reference_caption (TextType type, bool r);
/** @param type Original type of captions in the DCP.
* @return true if these captions are to be referenced.
*/
- bool reference_caption (CaptionType type) const {
+ bool reference_caption (TextType type) const {
boost::mutex::scoped_lock lm (_mutex);
return _reference_caption[type];
}
- bool can_reference_caption (CaptionType type, std::string &) const;
+ bool can_reference_caption (TextType type, std::string &) const;
void set_cpl (std::string id);
diff --git a/src/lib/dcp_decoder.cc b/src/lib/dcp_decoder.cc
index ab655ebf8..86152c817 100644
--- a/src/lib/dcp_decoder.cc
+++ b/src/lib/dcp_decoder.cc
@@ -24,7 +24,7 @@
#include "video_decoder.h"
#include "audio_decoder.h"
#include "j2k_image_proxy.h"
-#include "caption_decoder.h"
+#include "text_decoder.h"
#include "image.h"
#include "config.h"
#include <dcp/dcp.h>
@@ -63,9 +63,9 @@ DCPDecoder::DCPDecoder (shared_ptr<const DCPContent> c, shared_ptr<Log> log, boo
if (c->audio) {
audio.reset (new AudioDecoder (this, c->audio, log, fast));
}
- BOOST_FOREACH (shared_ptr<CaptionContent> i, c->caption) {
+ BOOST_FOREACH (shared_ptr<TextContent> i, c->caption) {
/* XXX: this time here should be the time of the first subtitle, not 0 */
- caption.push_back (shared_ptr<CaptionDecoder> (new CaptionDecoder (this, i, log, ContentTime())));
+ caption.push_back (shared_ptr<TextDecoder> (new TextDecoder (this, i, log, ContentTime())));
}
list<shared_ptr<dcp::CPL> > cpl_list = cpls ();
@@ -193,7 +193,7 @@ DCPDecoder::pass ()
void
DCPDecoder::pass_captions (ContentTime next)
{
- list<shared_ptr<CaptionDecoder> >::const_iterator decoder = caption.begin ();
+ list<shared_ptr<TextDecoder> >::const_iterator decoder = caption.begin ();
if ((*_reel)->main_subtitle()) {
pass_captions (
next, (*_reel)->main_subtitle()->asset(), _dcp_content->reference_caption(CAPTION_OPEN), (*_reel)->main_subtitle()->entry_point(), *decoder
@@ -209,7 +209,7 @@ DCPDecoder::pass_captions (ContentTime next)
}
void
-DCPDecoder::pass_captions (ContentTime next, shared_ptr<dcp::SubtitleAsset> asset, bool reference, int64_t entry_point, shared_ptr<CaptionDecoder> decoder)
+DCPDecoder::pass_captions (ContentTime next, shared_ptr<dcp::SubtitleAsset> asset, bool reference, int64_t entry_point, shared_ptr<TextDecoder> decoder)
{
double const vfr = _dcp_content->active_video_frame_rate ();
/* Frame within the (played part of the) reel that is coming up next */
diff --git a/src/lib/dcp_decoder.h b/src/lib/dcp_decoder.h
index 898b84e5d..2fbdb884a 100644
--- a/src/lib/dcp_decoder.h
+++ b/src/lib/dcp_decoder.h
@@ -58,7 +58,7 @@ private:
void next_reel ();
void get_readers ();
void pass_captions (ContentTime next);
- void pass_captions (ContentTime next, boost::shared_ptr<dcp::SubtitleAsset> asset, bool reference, int64_t entry_point, boost::shared_ptr<CaptionDecoder> decoder);
+ void pass_captions (ContentTime next, boost::shared_ptr<dcp::SubtitleAsset> asset, bool reference, int64_t entry_point, boost::shared_ptr<TextDecoder> decoder);
/** Time of next thing to return from pass relative to the start of _reel */
ContentTime _next;
diff --git a/src/lib/dcp_encoder.cc b/src/lib/dcp_encoder.cc
index f518aefef..42984887d 100644
--- a/src/lib/dcp_encoder.cc
+++ b/src/lib/dcp_encoder.cc
@@ -35,7 +35,7 @@
#include "writer.h"
#include "compose.hpp"
#include "referenced_reel_asset.h"
-#include "caption_content.h"
+#include "text_content.h"
#include "player_video.h"
#include <boost/signals2.hpp>
#include <boost/foreach.hpp>
@@ -64,7 +64,7 @@ DCPEncoder::DCPEncoder (shared_ptr<const Film> film, weak_ptr<Job> job)
_player_caption_connection = _player->Caption.connect (bind (&DCPEncoder::caption, this, _1, _2, _3));
BOOST_FOREACH (shared_ptr<const Content> c, film->content ()) {
- BOOST_FOREACH (shared_ptr<CaptionContent> i, c->caption) {
+ BOOST_FOREACH (shared_ptr<TextContent> i, c->caption) {
if (i->use() && !i->burn()) {
_non_burnt_subtitles = true;
}
@@ -143,7 +143,7 @@ DCPEncoder::audio (shared_ptr<AudioBuffers> data, DCPTime time)
}
void
-DCPEncoder::caption (PlayerCaption data, CaptionType type, DCPTimePeriod period)
+DCPEncoder::caption (PlayerText data, TextType type, DCPTimePeriod period)
{
if (type == CAPTION_CLOSED || _non_burnt_subtitles) {
_writer->write (data, type, period);
diff --git a/src/lib/dcp_encoder.h b/src/lib/dcp_encoder.h
index 9808987c3..23b05d0dc 100644
--- a/src/lib/dcp_encoder.h
+++ b/src/lib/dcp_encoder.h
@@ -19,7 +19,7 @@
*/
#include "types.h"
-#include "player_caption.h"
+#include "player_text.h"
#include "encoder.h"
#include <boost/weak_ptr.hpp>
@@ -52,7 +52,7 @@ private:
void video (boost::shared_ptr<PlayerVideo>, DCPTime);
void audio (boost::shared_ptr<AudioBuffers>, DCPTime);
- void caption (PlayerCaption, CaptionType, DCPTimePeriod);
+ void caption (PlayerText, TextType, DCPTimePeriod);
boost::shared_ptr<Writer> _writer;
boost::shared_ptr<J2KEncoder> _j2k_encoder;
diff --git a/src/lib/dcp_examiner.h b/src/lib/dcp_examiner.h
index 16385e07a..29fcc48d2 100644
--- a/src/lib/dcp_examiner.h
+++ b/src/lib/dcp_examiner.h
@@ -83,7 +83,7 @@ public:
return _audio_frame_rate.get_value_or (48000);
}
- bool has_caption (CaptionType type) const {
+ bool has_caption (TextType type) const {
return _has_caption[type];
}
diff --git a/src/lib/dcp_subtitle_content.cc b/src/lib/dcp_subtitle_content.cc
index 779361f63..6a7e38153 100644
--- a/src/lib/dcp_subtitle_content.cc
+++ b/src/lib/dcp_subtitle_content.cc
@@ -21,7 +21,7 @@
#include "font.h"
#include "dcp_subtitle_content.h"
#include "film.h"
-#include "caption_content.h"
+#include "text_content.h"
#include <dcp/raw_convert.h>
#include <dcp/interop_subtitle_asset.h>
#include <dcp/smpte_subtitle_asset.h>
@@ -40,14 +40,14 @@ using dcp::raw_convert;
DCPSubtitleContent::DCPSubtitleContent (shared_ptr<const Film> film, boost::filesystem::path path)
: Content (film, path)
{
- caption.push_back (shared_ptr<CaptionContent> (new CaptionContent (this, CAPTION_OPEN)));
+ caption.push_back (shared_ptr<TextContent> (new TextContent (this, CAPTION_OPEN)));
}
DCPSubtitleContent::DCPSubtitleContent (shared_ptr<const Film> film, cxml::ConstNodePtr node, int version)
: Content (film, node)
, _length (node->number_child<ContentTime::Type> ("Length"))
{
- caption = CaptionContent::from_xml (this, node, version);
+ caption = TextContent::from_xml (this, node, version);
}
void
diff --git a/src/lib/dcp_subtitle_decoder.cc b/src/lib/dcp_subtitle_decoder.cc
index 3ed4a6827..05d815265 100644
--- a/src/lib/dcp_subtitle_decoder.cc
+++ b/src/lib/dcp_subtitle_decoder.cc
@@ -39,7 +39,7 @@ DCPSubtitleDecoder::DCPSubtitleDecoder (shared_ptr<const DCPSubtitleContent> con
if (_next != _subtitles.end()) {
first = content_time_period(*_next).from;
}
- caption.push_back (shared_ptr<CaptionDecoder> (new CaptionDecoder (this, content->only_caption(), log, first)));
+ caption.push_back (shared_ptr<TextDecoder> (new TextDecoder (this, content->only_caption(), log, first)));
}
void
@@ -64,7 +64,7 @@ DCPSubtitleDecoder::pass ()
/* Gather all subtitles with the same time period that are next
on the list. We must emit all subtitles for the same time
period with the same plain_text() call otherwise the
- CaptionDecoder will assume there is nothing else at the
+ TextDecoder will assume there is nothing else at the
time of emit the first.
*/
diff --git a/src/lib/dcp_subtitle_decoder.h b/src/lib/dcp_subtitle_decoder.h
index ef4dad3f5..984d98826 100644
--- a/src/lib/dcp_subtitle_decoder.h
+++ b/src/lib/dcp_subtitle_decoder.h
@@ -18,7 +18,7 @@
*/
-#include "caption_decoder.h"
+#include "text_decoder.h"
#include "dcp_subtitle.h"
class DCPSubtitleContent;
diff --git a/src/lib/decoder.cc b/src/lib/decoder.cc
index 2fddddc91..52949a098 100644
--- a/src/lib/decoder.cc
+++ b/src/lib/decoder.cc
@@ -21,7 +21,7 @@
#include "decoder.h"
#include "video_decoder.h"
#include "audio_decoder.h"
-#include "caption_decoder.h"
+#include "text_decoder.h"
#include <boost/optional.hpp>
#include <iostream>
@@ -43,7 +43,7 @@ Decoder::position () const
pos = audio->position();
}
- BOOST_FOREACH (shared_ptr<CaptionDecoder> i, caption) {
+ BOOST_FOREACH (shared_ptr<TextDecoder> i, caption) {
if (!i->ignore() && (!pos || i->position() < *pos)) {
pos = i->position();
}
@@ -61,17 +61,17 @@ Decoder::seek (ContentTime, bool)
if (audio) {
audio->seek ();
}
- BOOST_FOREACH (shared_ptr<CaptionDecoder> i, caption) {
+ BOOST_FOREACH (shared_ptr<TextDecoder> i, caption) {
i->seek ();
}
}
-shared_ptr<CaptionDecoder>
+shared_ptr<TextDecoder>
Decoder::only_caption () const
{
DCPOMATIC_ASSERT (caption.size() < 2);
if (caption.empty ()) {
- return shared_ptr<CaptionDecoder> ();
+ return shared_ptr<TextDecoder> ();
}
return caption.front ();
}
diff --git a/src/lib/decoder.h b/src/lib/decoder.h
index d48df7517..1b330316e 100644
--- a/src/lib/decoder.h
+++ b/src/lib/decoder.h
@@ -32,7 +32,7 @@
class Decoded;
class VideoDecoder;
class AudioDecoder;
-class CaptionDecoder;
+class TextDecoder;
class DecoderPart;
/** @class Decoder.
@@ -45,9 +45,9 @@ public:
boost::shared_ptr<VideoDecoder> video;
boost::shared_ptr<AudioDecoder> audio;
- std::list<boost::shared_ptr<CaptionDecoder> > caption;
+ std::list<boost::shared_ptr<TextDecoder> > caption;
- boost::shared_ptr<CaptionDecoder> only_caption () const;
+ boost::shared_ptr<TextDecoder> only_caption () const;
/** Do some decoding and perhaps emit video, audio or subtitle data.
* @return true if this decoder will emit no more data unless a seek() happens.
diff --git a/src/lib/decoder_factory.cc b/src/lib/decoder_factory.cc
index bb3bdb13e..02d7064f4 100644
--- a/src/lib/decoder_factory.cc
+++ b/src/lib/decoder_factory.cc
@@ -24,8 +24,8 @@
#include "dcp_decoder.h"
#include "image_content.h"
#include "image_decoder.h"
-#include "text_caption_file_content.h"
-#include "text_caption_file_decoder.h"
+#include "string_text_file_content.h"
+#include "string_text_file_decoder.h"
#include "dcp_subtitle_content.h"
#include "dcp_subtitle_decoder.h"
#include "video_mxf_content.h"
@@ -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 TextCaptionFileContent> rc = dynamic_pointer_cast<const TextCaptionFileContent> (content);
+ shared_ptr<const StringTextFileContent> rc = dynamic_pointer_cast<const StringTextFileContent> (content);
if (rc) {
- return shared_ptr<Decoder> (new TextCaptionFileDecoder (rc, log));
+ return shared_ptr<Decoder> (new StringTextFileDecoder (rc, log));
}
shared_ptr<const DCPSubtitleContent> dsc = dynamic_pointer_cast<const DCPSubtitleContent> (content);
diff --git a/src/lib/encoder.h b/src/lib/encoder.h
index 27fa0745f..f4116c50c 100644
--- a/src/lib/encoder.h
+++ b/src/lib/encoder.h
@@ -22,7 +22,7 @@
#define DCPOMATIC_ENCODER_H
#include "types.h"
-#include "player_caption.h"
+#include "player_text.h"
#include <boost/weak_ptr.hpp>
#include <boost/signals2.hpp>
diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc
index 3f0a692cd..86965ff49 100644
--- a/src/lib/ffmpeg_content.cc
+++ b/src/lib/ffmpeg_content.cc
@@ -32,7 +32,7 @@
#include "log.h"
#include "exceptions.h"
#include "frame_rate_change.h"
-#include "caption_content.h"
+#include "text_content.h"
#include <dcp/raw_convert.h>
#include <libcxml/cxml.h>
extern "C" {
@@ -85,7 +85,7 @@ FFmpegContent::FFmpegContent (shared_ptr<const Film> film, cxml::ConstNodePtr no
{
video = VideoContent::from_xml (this, node, version);
audio = AudioContent::from_xml (this, node, version);
- caption = CaptionContent::from_xml (this, node, version);
+ caption = TextContent::from_xml (this, node, version);
list<cxml::NodePtr> c = node->node_children ("SubtitleStream");
for (list<cxml::NodePtr>::const_iterator i = c.begin(); i != c.end(); ++i) {
@@ -163,7 +163,7 @@ FFmpegContent::FFmpegContent (shared_ptr<const Film> film, vector<shared_ptr<Con
audio.reset (new AudioContent (this, c));
}
if (need_caption) {
- caption.push_back (shared_ptr<CaptionContent> (new CaptionContent (this, c)));
+ caption.push_back (shared_ptr<TextContent> (new TextContent (this, c)));
}
shared_ptr<FFmpegContent> ref = dynamic_pointer_cast<FFmpegContent> (c[0]);
@@ -304,7 +304,7 @@ FFmpegContent::examine (shared_ptr<Job> job)
_subtitle_streams = examiner->subtitle_streams ();
if (!_subtitle_streams.empty ()) {
caption.clear ();
- caption.push_back (shared_ptr<CaptionContent> (new CaptionContent (this, CAPTION_OPEN)));
+ caption.push_back (shared_ptr<TextContent> (new TextContent (this, CAPTION_OPEN)));
_subtitle_stream = _subtitle_streams.front ();
}
diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc
index 1f2fcfef8..665ee3e13 100644
--- a/src/lib/ffmpeg_decoder.cc
+++ b/src/lib/ffmpeg_decoder.cc
@@ -28,7 +28,7 @@
#include "util.h"
#include "log.h"
#include "ffmpeg_decoder.h"
-#include "caption_decoder.h"
+#include "text_decoder.h"
#include "ffmpeg_audio_stream.h"
#include "ffmpeg_subtitle_stream.h"
#include "video_filter_graph.h"
@@ -39,7 +39,7 @@
#include "film.h"
#include "audio_decoder.h"
#include "compose.hpp"
-#include "caption_content.h"
+#include "text_content.h"
#include "audio_content.h"
#include <dcp/subtitle_string.h>
#include <sub/ssa_reader.h>
@@ -99,7 +99,7 @@ FFmpegDecoder::FFmpegDecoder (shared_ptr<const FFmpegContent> c, shared_ptr<Log>
if (c->only_caption()) {
/* XXX: this time here should be the time of the first subtitle, not 0 */
- caption.push_back (shared_ptr<CaptionDecoder> (new CaptionDecoder (this, c->only_caption(), log, ContentTime())));
+ caption.push_back (shared_ptr<TextDecoder> (new TextDecoder (this, c->only_caption(), log, ContentTime())));
}
_next_time.resize (_format_context->nb_streams);
diff --git a/src/lib/ffmpeg_encoder.cc b/src/lib/ffmpeg_encoder.cc
index 29334e8ed..f82290c6c 100644
--- a/src/lib/ffmpeg_encoder.cc
+++ b/src/lib/ffmpeg_encoder.cc
@@ -411,7 +411,7 @@ FFmpegEncoder::audio_frame (int size)
}
void
-FFmpegEncoder::subtitle (PlayerCaption, DCPTimePeriod)
+FFmpegEncoder::subtitle (PlayerText, DCPTimePeriod)
{
}
diff --git a/src/lib/ffmpeg_encoder.h b/src/lib/ffmpeg_encoder.h
index 35fd85064..b1d07eb7f 100644
--- a/src/lib/ffmpeg_encoder.h
+++ b/src/lib/ffmpeg_encoder.h
@@ -54,7 +54,7 @@ public:
private:
void video (boost::shared_ptr<PlayerVideo>, DCPTime);
void audio (boost::shared_ptr<AudioBuffers>);
- void subtitle (PlayerCaption, DCPTimePeriod);
+ void subtitle (PlayerText, DCPTimePeriod);
void setup_video ();
void setup_audio ();
diff --git a/src/lib/film.cc b/src/lib/film.cc
index b56f85dbe..475d28b4f 100644
--- a/src/lib/film.cc
+++ b/src/lib/film.cc
@@ -46,7 +46,7 @@
#include "screen.h"
#include "audio_content.h"
#include "video_content.h"
-#include "caption_content.h"
+#include "text_content.h"
#include "ffmpeg_content.h"
#include "dcp_content.h"
#include "screen_kdm.h"
@@ -125,7 +125,7 @@ string const Film::metadata_file = "metadata.xml";
* 35 -> 36
* EffectColour rather than OutlineColour in Subtitle.
* 36 -> 37
- * CaptionContent can be in a Caption tag, and some of the tag names
+ * TextContent can be in a Caption tag, and some of the tag names
* have had Subtitle prefixes or suffixes removed.
*/
int const Film::current_state_version = 37;
@@ -704,7 +704,7 @@ Film::isdcf_name (bool if_created_now) const
bool burnt_in = true;
bool ccap = false;
BOOST_FOREACH (shared_ptr<Content> i, content()) {
- BOOST_FOREACH (shared_ptr<CaptionContent> j, i->caption) {
+ BOOST_FOREACH (shared_ptr<TextContent> j, i->caption) {
if (j->type() == CAPTION_OPEN && j->use() && !j->burn()) {
burnt_in = false;
} else if (j->type() == CAPTION_CLOSED) {
@@ -784,7 +784,7 @@ Film::isdcf_name (bool if_created_now) const
bool any_caption = false;
for (int i = 0; i < CAPTION_COUNT; ++i) {
- if (dc->reference_caption(static_cast<CaptionType>(i))) {
+ if (dc->reference_caption(static_cast<TextType>(i))) {
any_caption = true;
}
}
@@ -1391,7 +1391,7 @@ Film::subtitle_language () const
set<string> languages;
BOOST_FOREACH (shared_ptr<Content> i, content()) {
- BOOST_FOREACH (shared_ptr<CaptionContent> j, i->caption) {
+ BOOST_FOREACH (shared_ptr<TextContent> j, i->caption) {
languages.insert (j->language ());
}
}
diff --git a/src/lib/hints.cc b/src/lib/hints.cc
index 33c2faba5..8cc0cfbfb 100644
--- a/src/lib/hints.cc
+++ b/src/lib/hints.cc
@@ -23,7 +23,7 @@
#include "film.h"
#include "content.h"
#include "video_content.h"
-#include "caption_content.h"
+#include "text_content.h"
#include "audio_processor.h"
#include "font.h"
#include "ratio.h"
@@ -56,7 +56,7 @@ get_hints (shared_ptr<const Film> film)
bool big_font_files = false;
if (film->interop ()) {
BOOST_FOREACH (shared_ptr<Content> i, content) {
- BOOST_FOREACH (shared_ptr<CaptionContent> j, i->caption) {
+ BOOST_FOREACH (shared_ptr<TextContent> j, i->caption) {
BOOST_FOREACH (shared_ptr<Font> k, j->fonts()) {
for (int l = 0; l < FontFiles::VARIANTS; ++l) {
optional<boost::filesystem::path> const p = k->file (static_cast<FontFiles::Variant>(l));
diff --git a/src/lib/player.cc b/src/lib/player.cc
index 4635233ff..22526edef 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -40,8 +40,8 @@
#include "decoder.h"
#include "video_decoder.h"
#include "audio_decoder.h"
-#include "caption_content.h"
-#include "caption_decoder.h"
+#include "text_content.h"
+#include "text_decoder.h"
#include "ffmpeg_content.h"
#include "audio_content.h"
#include "dcp_decoder.h"
@@ -138,7 +138,7 @@ Player::setup_pieces ()
}
if (_ignore_caption) {
- BOOST_FOREACH (shared_ptr<CaptionDecoder> i, decoder->caption) {
+ BOOST_FOREACH (shared_ptr<TextDecoder> i, decoder->caption) {
i->set_ignore (true);
}
}
@@ -167,17 +167,17 @@ Player::setup_pieces ()
decoder->audio->Data.connect (bind (&Player::audio, this, weak_ptr<Piece> (piece), _1, _2));
}
- list<shared_ptr<CaptionDecoder> >::const_iterator j = decoder->caption.begin();
+ list<shared_ptr<TextDecoder> >::const_iterator j = decoder->caption.begin();
while (j != decoder->caption.end()) {
(*j)->BitmapStart.connect (
- bind(&Player::bitmap_text_start, this, weak_ptr<Piece>(piece), weak_ptr<const CaptionContent>((*j)->content()), _1)
+ bind(&Player::bitmap_text_start, this, weak_ptr<Piece>(piece), weak_ptr<const TextContent>((*j)->content()), _1)
);
(*j)->PlainStart.connect (
- bind(&Player::plain_text_start, this, weak_ptr<Piece>(piece), weak_ptr<const CaptionContent>((*j)->content()), _1)
+ bind(&Player::plain_text_start, this, weak_ptr<Piece>(piece), weak_ptr<const TextContent>((*j)->content()), _1)
);
(*j)->Stop.connect (
- bind(&Player::subtitle_stop, this, weak_ptr<Piece>(piece), weak_ptr<const CaptionContent>((*j)->content()), _1, _2)
+ bind(&Player::subtitle_stop, this, weak_ptr<Piece>(piece), weak_ptr<const TextContent>((*j)->content()), _1, _2)
);
++j;
@@ -221,9 +221,9 @@ Player::playlist_content_changed (weak_ptr<Content> w, int property, bool freque
property == AudioContentProperty::STREAMS ||
property == DCPContentProperty::NEEDS_ASSETS ||
property == DCPContentProperty::NEEDS_KDM ||
- property == CaptionContentProperty::COLOUR ||
- property == CaptionContentProperty::EFFECT ||
- property == CaptionContentProperty::EFFECT_COLOUR ||
+ property == TextContentProperty::COLOUR ||
+ property == TextContentProperty::EFFECT ||
+ property == TextContentProperty::EFFECT_COLOUR ||
property == FFmpegContentProperty::SUBTITLE_STREAM ||
property == FFmpegContentProperty::FILTERS
) {
@@ -232,18 +232,18 @@ Player::playlist_content_changed (weak_ptr<Content> w, int property, bool freque
Changed (property, frequent);
} else if (
- property == CaptionContentProperty::LINE_SPACING ||
- property == CaptionContentProperty::OUTLINE_WIDTH ||
- property == CaptionContentProperty::Y_SCALE ||
- property == CaptionContentProperty::FADE_IN ||
- property == CaptionContentProperty::FADE_OUT ||
+ property == TextContentProperty::LINE_SPACING ||
+ property == TextContentProperty::OUTLINE_WIDTH ||
+ property == TextContentProperty::Y_SCALE ||
+ property == TextContentProperty::FADE_IN ||
+ property == TextContentProperty::FADE_OUT ||
property == ContentProperty::VIDEO_FRAME_RATE ||
- property == CaptionContentProperty::USE ||
- property == CaptionContentProperty::X_OFFSET ||
- property == CaptionContentProperty::Y_OFFSET ||
- property == CaptionContentProperty::X_SCALE ||
- property == CaptionContentProperty::FONTS ||
- property == CaptionContentProperty::TYPE ||
+ property == TextContentProperty::USE ||
+ property == TextContentProperty::X_OFFSET ||
+ property == TextContentProperty::Y_OFFSET ||
+ property == TextContentProperty::X_SCALE ||
+ property == TextContentProperty::FONTS ||
+ property == TextContentProperty::TYPE ||
property == VideoContentProperty::CROP ||
property == VideoContentProperty::SCALE ||
property == VideoContentProperty::FADE_IN ||
@@ -302,11 +302,11 @@ Player::film_changed (Film::Property p)
}
list<PositionImage>
-Player::transform_bitmap_captions (list<BitmapCaption> subs) const
+Player::transform_bitmap_captions (list<BitmapText> subs) const
{
list<PositionImage> all;
- for (list<BitmapCaption>::const_iterator i = subs.begin(); i != subs.end(); ++i) {
+ for (list<BitmapText>::const_iterator i = subs.begin(); i != subs.end(); ++i) {
if (!i->image) {
continue;
}
@@ -419,7 +419,7 @@ Player::get_subtitle_fonts ()
list<shared_ptr<Font> > fonts;
BOOST_FOREACH (shared_ptr<Piece> i, _pieces) {
- BOOST_FOREACH (shared_ptr<CaptionContent> j, i->content->caption) {
+ BOOST_FOREACH (shared_ptr<TextContent> j, i->content->caption) {
/* XXX: things may go wrong if there are duplicate font IDs
with different font files.
*/
@@ -676,7 +676,7 @@ Player::pass ()
return done;
}
-list<PlayerCaption>
+list<PlayerText>
Player::closed_captions_for_frame (DCPTime time) const
{
return _active_captions[CAPTION_CLOSED].get (
@@ -692,7 +692,7 @@ Player::open_captions_for_frame (DCPTime time) const
int const vfr = _film->video_frame_rate();
BOOST_FOREACH (
- PlayerCaption j,
+ PlayerText j,
_active_captions[CAPTION_OPEN].get_burnt(DCPTimePeriod(time, time + DCPTime::from_frames(1, vfr)), _always_burn_open_captions)
) {
@@ -870,10 +870,10 @@ Player::audio (weak_ptr<Piece> wp, AudioStreamPtr stream, ContentAudio content_a
}
void
-Player::bitmap_text_start (weak_ptr<Piece> wp, weak_ptr<const CaptionContent> wc, ContentBitmapCaption subtitle)
+Player::bitmap_text_start (weak_ptr<Piece> wp, weak_ptr<const TextContent> wc, ContentBitmapText subtitle)
{
shared_ptr<Piece> piece = wp.lock ();
- shared_ptr<const CaptionContent> caption = wc.lock ();
+ shared_ptr<const TextContent> caption = wc.lock ();
if (!piece || !caption) {
return;
}
@@ -890,7 +890,7 @@ Player::bitmap_text_start (weak_ptr<Piece> wp, weak_ptr<const CaptionContent> wc
subtitle.sub.rectangle.width *= caption->x_scale ();
subtitle.sub.rectangle.height *= caption->y_scale ();
- PlayerCaption ps;
+ PlayerText ps;
ps.image.push_back (subtitle.sub);
DCPTime from (content_time_to_dcp (piece, subtitle.from()));
@@ -898,15 +898,15 @@ Player::bitmap_text_start (weak_ptr<Piece> wp, weak_ptr<const CaptionContent> wc
}
void
-Player::plain_text_start (weak_ptr<Piece> wp, weak_ptr<const CaptionContent> wc, ContentTextCaption subtitle)
+Player::plain_text_start (weak_ptr<Piece> wp, weak_ptr<const TextContent> wc, ContentStringText subtitle)
{
shared_ptr<Piece> piece = wp.lock ();
- shared_ptr<const CaptionContent> caption = wc.lock ();
+ shared_ptr<const TextContent> caption = wc.lock ();
if (!piece || !caption) {
return;
}
- PlayerCaption ps;
+ PlayerText ps;
DCPTime const from (content_time_to_dcp (piece, subtitle.from()));
if (from > piece->content->end()) {
@@ -934,7 +934,7 @@ Player::plain_text_start (weak_ptr<Piece> wp, weak_ptr<const CaptionContent> wc,
}
s.set_in (dcp::Time(from.seconds(), 1000));
- ps.text.push_back (TextCaption (s, caption->outline_width()));
+ ps.text.push_back (StringText (s, caption->outline_width()));
ps.add_fonts (caption->fonts ());
}
@@ -942,14 +942,14 @@ Player::plain_text_start (weak_ptr<Piece> wp, weak_ptr<const CaptionContent> wc,
}
void
-Player::subtitle_stop (weak_ptr<Piece> wp, weak_ptr<const CaptionContent> wc, ContentTime to, CaptionType type)
+Player::subtitle_stop (weak_ptr<Piece> wp, weak_ptr<const TextContent> wc, ContentTime to, TextType type)
{
if (!_active_captions[type].have (wc)) {
return;
}
shared_ptr<Piece> piece = wp.lock ();
- shared_ptr<const CaptionContent> caption = wc.lock ();
+ shared_ptr<const TextContent> caption = wc.lock ();
if (!piece || !caption) {
return;
}
@@ -960,7 +960,7 @@ Player::subtitle_stop (weak_ptr<Piece> wp, weak_ptr<const CaptionContent> wc, Co
return;
}
- pair<PlayerCaption, DCPTime> from = _active_captions[type].add_to (wc, dcp_to);
+ pair<PlayerText, DCPTime> from = _active_captions[type].add_to (wc, dcp_to);
bool const always = type == CAPTION_OPEN && _always_burn_open_captions;
if (caption->use() && !always && !caption->burn()) {
diff --git a/src/lib/player.h b/src/lib/player.h
index c086b9697..280373738 100644
--- a/src/lib/player.h
+++ b/src/lib/player.h
@@ -21,9 +21,9 @@
#ifndef DCPOMATIC_PLAYER_H
#define DCPOMATIC_PLAYER_H
-#include "player_caption.h"
-#include "active_captions.h"
-#include "content_caption.h"
+#include "player_text.h"
+#include "active_text.h"
+#include "content_text.h"
#include "film.h"
#include "content.h"
#include "position_image.h"
@@ -86,7 +86,7 @@ public:
DCPTime content_time_to_dcp (boost::shared_ptr<Content> content, ContentTime t);
- std::list<PlayerCaption> closed_captions_for_frame (DCPTime time) const;
+ std::list<PlayerText> closed_captions_for_frame (DCPTime time) const;
/** Emitted when something has changed such that if we went back and emitted
* the last frame again it would look different. This is not emitted after
@@ -103,7 +103,7 @@ public:
/** Emitted when a caption is ready. This signal may be emitted considerably
* after the corresponding Video.
*/
- boost::signals2::signal<void (PlayerCaption, CaptionType, DCPTimePeriod)> Caption;
+ boost::signals2::signal<void (PlayerText, TextType, DCPTimePeriod)> Caption;
private:
friend class PlayerWrapper;
@@ -118,7 +118,7 @@ private:
void film_changed (Film::Property);
void playlist_changed ();
void playlist_content_changed (boost::weak_ptr<Content>, int, bool);
- std::list<PositionImage> transform_bitmap_captions (std::list<BitmapCaption>) const;
+ std::list<PositionImage> transform_bitmap_captions (std::list<BitmapText>) const;
Frame dcp_to_content_video (boost::shared_ptr<const Piece> piece, DCPTime t) const;
DCPTime content_video_to_dcp (boost::shared_ptr<const Piece> piece, Frame f) const;
Frame dcp_to_resampled_audio (boost::shared_ptr<const Piece> piece, DCPTime t) const;
@@ -128,9 +128,9 @@ private:
boost::shared_ptr<PlayerVideo> black_player_video_frame (Eyes eyes) const;
void video (boost::weak_ptr<Piece>, ContentVideo);
void audio (boost::weak_ptr<Piece>, AudioStreamPtr, ContentAudio);
- void bitmap_text_start (boost::weak_ptr<Piece>, boost::weak_ptr<const CaptionContent>, ContentBitmapCaption);
- void plain_text_start (boost::weak_ptr<Piece>, boost::weak_ptr<const CaptionContent>, ContentTextCaption);
- void subtitle_stop (boost::weak_ptr<Piece>, boost::weak_ptr<const CaptionContent>, ContentTime, CaptionType);
+ void bitmap_text_start (boost::weak_ptr<Piece>, boost::weak_ptr<const TextContent>, ContentBitmapText);
+ void plain_text_start (boost::weak_ptr<Piece>, boost::weak_ptr<const TextContent>, ContentStringText);
+ void subtitle_stop (boost::weak_ptr<Piece>, boost::weak_ptr<const TextContent>, ContentTime, TextType);
DCPTime one_video_frame () const;
void fill_audio (DCPTimePeriod period);
std::pair<boost::shared_ptr<AudioBuffers>, DCPTime> discard_audio (
@@ -195,7 +195,7 @@ private:
Empty _black;
Empty _silent;
- ActiveCaptions _active_captions[CAPTION_COUNT];
+ ActiveText _active_captions[CAPTION_COUNT];
boost::shared_ptr<AudioProcessor> _audio_processor;
boost::signals2::scoped_connection _film_changed_connection;
diff --git a/src/lib/player_caption.cc b/src/lib/player_text.cc
index 74c847aae..16e89b0f1 100644
--- a/src/lib/player_caption.cc
+++ b/src/lib/player_text.cc
@@ -18,7 +18,7 @@
*/
-#include "player_caption.h"
+#include "player_text.h"
#include "font.h"
#include <boost/foreach.hpp>
@@ -26,7 +26,7 @@ using std::list;
using boost::shared_ptr;
void
-PlayerCaption::add_fonts (list<shared_ptr<Font> > fonts_)
+PlayerText::add_fonts (list<shared_ptr<Font> > fonts_)
{
BOOST_FOREACH (shared_ptr<Font> i, fonts_) {
bool got = false;
diff --git a/src/lib/player_caption.h b/src/lib/player_text.h
index 2f7e909aa..5a8799116 100644
--- a/src/lib/player_caption.h
+++ b/src/lib/player_text.h
@@ -21,22 +21,22 @@
#ifndef DCPOMATIC_PLAYER_CAPTION_H
#define DCPOMATIC_PLAYER_CAPTION_H
-#include "bitmap_caption.h"
+#include "bitmap_text.h"
#include "dcpomatic_time.h"
-#include "text_caption.h"
+#include "string_text.h"
class Font;
/** A set of text (subtitle/CCAP) which span the same time period */
-class PlayerCaption
+class PlayerText
{
public:
void add_fonts (std::list<boost::shared_ptr<Font> > fonts_);
std::list<boost::shared_ptr<Font> > fonts;
- /** BitmapCaptions, with their rectangles transformed as specified by their content */
- std::list<BitmapCaption> image;
- std::list<TextCaption> text;
+ /** BitmapTexts, with their rectangles transformed as specified by their content */
+ std::list<BitmapText> image;
+ std::list<StringText> text;
};
#endif
diff --git a/src/lib/playlist.cc b/src/lib/playlist.cc
index 6c7fd7f4e..a55893291 100644
--- a/src/lib/playlist.cc
+++ b/src/lib/playlist.cc
@@ -20,7 +20,7 @@
#include "playlist.h"
#include "video_content.h"
-#include "caption_content.h"
+#include "text_content.h"
#include "ffmpeg_decoder.h"
#include "ffmpeg_content.h"
#include "image_decoder.h"
@@ -156,7 +156,7 @@ Playlist::video_identifier () const
BOOST_FOREACH (shared_ptr<const Content> i, _content) {
bool burn = false;
- BOOST_FOREACH (shared_ptr<CaptionContent> j, i->caption) {
+ BOOST_FOREACH (shared_ptr<TextContent> j, i->caption) {
if (j->burn()) {
burn = true;
}
diff --git a/src/lib/reel_writer.cc b/src/lib/reel_writer.cc
index 1836b6543..7f5572c36 100644
--- a/src/lib/reel_writer.cc
+++ b/src/lib/reel_writer.cc
@@ -545,7 +545,7 @@ ReelWriter::write (shared_ptr<const AudioBuffers> audio)
}
void
-ReelWriter::write (PlayerCaption subs, CaptionType type, DCPTimePeriod period)
+ReelWriter::write (PlayerText subs, TextType type, DCPTimePeriod period)
{
if (!_caption_asset[type]) {
string lang = _film->subtitle_language ();
@@ -573,14 +573,14 @@ ReelWriter::write (PlayerCaption subs, CaptionType type, DCPTimePeriod period)
}
}
- BOOST_FOREACH (TextCaption i, subs.text) {
+ BOOST_FOREACH (StringText i, subs.text) {
/* XXX: couldn't / shouldn't we use period here rather than getting time from the subtitle? */
i.set_in (i.in() - dcp::Time (_period.from.seconds(), i.in().tcr));
i.set_out (i.out() - dcp::Time (_period.from.seconds(), i.out().tcr));
_caption_asset[type]->add (shared_ptr<dcp::Subtitle>(new dcp::SubtitleString(i)));
}
- BOOST_FOREACH (BitmapCaption i, subs.image) {
+ BOOST_FOREACH (BitmapText i, subs.image) {
_caption_asset[type]->add (
shared_ptr<dcp::Subtitle>(
new dcp::SubtitleImage(
diff --git a/src/lib/reel_writer.h b/src/lib/reel_writer.h
index 24a5e9a8a..8007b7f29 100644
--- a/src/lib/reel_writer.h
+++ b/src/lib/reel_writer.h
@@ -21,7 +21,7 @@
#include "types.h"
#include "dcpomatic_time.h"
#include "referenced_reel_asset.h"
-#include "player_caption.h"
+#include "player_text.h"
#include <dcp/picture_asset_writer.h>
#include <boost/shared_ptr.hpp>
@@ -60,7 +60,7 @@ public:
void fake_write (Frame frame, Eyes eyes, int size);
void repeat_write (Frame frame, Eyes eyes);
void write (boost::shared_ptr<const AudioBuffers> audio);
- void write (PlayerCaption text, CaptionType type, DCPTimePeriod period);
+ void write (PlayerText text, TextType type, DCPTimePeriod period);
void finish ();
boost::shared_ptr<dcp::Reel> create_reel (std::list<ReferencedReelAsset> const & refs, std::list<boost::shared_ptr<Font> > const & fonts);
diff --git a/src/lib/render_text.cc b/src/lib/render_text.cc
index 63ff2b74c..cbc19efc9 100644
--- a/src/lib/render_text.cc
+++ b/src/lib/render_text.cc
@@ -51,11 +51,11 @@ static FcConfig* fc_config = 0;
static list<pair<FontFiles, string> > fc_config_fonts;
string
-marked_up (list<TextCaption> subtitles, int target_height, float fade_factor)
+marked_up (list<StringText> subtitles, int target_height, float fade_factor)
{
string out;
- BOOST_FOREACH (TextCaption const & i, subtitles) {
+ BOOST_FOREACH (StringText const & i, subtitles) {
out += "<span ";
if (i.italic()) {
out += "style=\"italic\" ";
@@ -91,7 +91,7 @@ set_source_rgba (Cairo::RefPtr<Cairo::Context> context, dcp::Colour colour, floa
* at the same time and with the same fade in/out.
*/
static PositionImage
-render_line (list<TextCaption> subtitles, list<shared_ptr<Font> > fonts, dcp::Size target, DCPTime time, int frame_rate)
+render_line (list<StringText> subtitles, list<shared_ptr<Font> > fonts, dcp::Size target, DCPTime time, int frame_rate)
{
/* XXX: this method can only handle italic / bold changes mid-line,
nothing else yet.
@@ -365,12 +365,12 @@ render_line (list<TextCaption> subtitles, list<shared_ptr<Font> > fonts, dcp::Si
* @param frame_rate DCP frame rate.
*/
list<PositionImage>
-render_text (list<TextCaption> subtitles, list<shared_ptr<Font> > fonts, dcp::Size target, DCPTime time, int frame_rate)
+render_text (list<StringText> subtitles, list<shared_ptr<Font> > fonts, dcp::Size target, DCPTime time, int frame_rate)
{
- list<TextCaption> pending;
+ list<StringText> pending;
list<PositionImage> images;
- BOOST_FOREACH (TextCaption const & i, subtitles) {
+ BOOST_FOREACH (StringText const & i, subtitles) {
if (!pending.empty() && fabs (i.v_position() - pending.back().v_position()) > 1e-4) {
images.push_back (render_line (pending, fonts, target, time, frame_rate));
pending.clear ();
diff --git a/src/lib/render_text.h b/src/lib/render_text.h
index 0a8e97bc9..99b4391db 100644
--- a/src/lib/render_text.h
+++ b/src/lib/render_text.h
@@ -20,12 +20,12 @@
#include "position_image.h"
#include "dcpomatic_time.h"
-#include "text_caption.h"
+#include "string_text.h"
#include <dcp/util.h>
class Font;
-std::string marked_up (std::list<TextCaption> subtitles, int target_height, float fade_factor);
+std::string marked_up (std::list<StringText> subtitles, int target_height, float fade_factor);
std::list<PositionImage> render_text (
- std::list<TextCaption>, std::list<boost::shared_ptr<Font> > fonts, dcp::Size, DCPTime, int
+ std::list<StringText>, std::list<boost::shared_ptr<Font> > fonts, dcp::Size, DCPTime, int
);
diff --git a/src/lib/text_caption.h b/src/lib/string_text.h
index b4400f5bb..feef90d61 100644
--- a/src/lib/text_caption.h
+++ b/src/lib/string_text.h
@@ -27,15 +27,15 @@
* applicable to true DCP subtitles. For example, we can set outline width for burn-in
* but this cannot be specified in DCP XML.
*/
-class TextCaption : public dcp::SubtitleString
+class StringText : public dcp::SubtitleString
{
public:
- explicit TextCaption (dcp::SubtitleString dcp_)
+ explicit StringText (dcp::SubtitleString dcp_)
: dcp::SubtitleString (dcp_)
, outline_width (2)
{}
- TextCaption (dcp::SubtitleString dcp_, int outline_width_)
+ StringText (dcp::SubtitleString dcp_, int outline_width_)
: dcp::SubtitleString (dcp_)
, outline_width (outline_width_)
{}
diff --git a/src/lib/text_caption_file.cc b/src/lib/string_text_file.cc
index 11d4517db..c7eadbbb1 100644
--- a/src/lib/text_caption_file.cc
+++ b/src/lib/string_text_file.cc
@@ -18,10 +18,10 @@
*/
-#include "text_caption_file.h"
+#include "string_text_file.h"
#include "cross.h"
#include "exceptions.h"
-#include "text_caption_file_content.h"
+#include "string_text_file_content.h"
#include <sub/subrip_reader.h>
#include <sub/ssa_reader.h>
#include <sub/collect.h>
@@ -39,7 +39,7 @@ using boost::scoped_array;
using boost::optional;
using dcp::Data;
-TextCaptionFile::TextCaptionFile (shared_ptr<const TextCaptionFileContent> content)
+StringTextFile::StringTextFile (shared_ptr<const StringTextFileContent> content)
{
Data in (content->path (0));
@@ -96,7 +96,7 @@ TextCaptionFile::TextCaptionFile (shared_ptr<const TextCaptionFileContent> conte
/** @return time of first subtitle, if there is one */
optional<ContentTime>
-TextCaptionFile::first () const
+StringTextFile::first () const
{
if (_subtitles.empty()) {
return optional<ContentTime>();
@@ -106,7 +106,7 @@ TextCaptionFile::first () const
}
ContentTime
-TextCaptionFile::length () const
+StringTextFile::length () const
{
if (_subtitles.empty ()) {
return ContentTime ();
diff --git a/src/lib/text_caption_file.h b/src/lib/string_text_file.h
index 4a5657a08..0091973a4 100644
--- a/src/lib/text_caption_file.h
+++ b/src/lib/string_text_file.h
@@ -26,22 +26,22 @@
#include <boost/shared_ptr.hpp>
#include <vector>
-class TextCaptionFileContent;
+class StringTextFileContent;
class plain_text_time_test;
class plain_text_coordinate_test;
class plain_text_content_test;
class plain_text_parse_test;
-/** @class TextCaptionFile
- * @brief Base for TextCaptionFile decoder and examiner.
+/** @class StringTextFile
+ * @brief Base for StringTextFile decoder and examiner.
*
* In fact this is sufficient for the examiner, so it's used as-is rather than deriving
- * a pointless TextCaptionFileExaminer.
+ * a pointless StringTextFileExaminer.
*/
-class TextCaptionFile
+class StringTextFile
{
public:
- explicit TextCaptionFile (boost::shared_ptr<const TextCaptionFileContent>);
+ explicit StringTextFile (boost::shared_ptr<const StringTextFileContent>);
boost::optional<ContentTime> first () const;
ContentTime length () const;
diff --git a/src/lib/text_caption_file_content.cc b/src/lib/string_text_file_content.cc
index aa64ca572..6c181bb91 100644
--- a/src/lib/text_caption_file_content.cc
+++ b/src/lib/string_text_file_content.cc
@@ -18,12 +18,12 @@
*/
-#include "text_caption_file_content.h"
+#include "string_text_file_content.h"
#include "util.h"
-#include "text_caption_file.h"
+#include "string_text_file.h"
#include "film.h"
#include "font.h"
-#include "caption_content.h"
+#include "text_content.h"
#include <dcp/raw_convert.h>
#include <libxml++/libxml++.h>
#include <iostream>
@@ -35,24 +35,24 @@ using std::cout;
using boost::shared_ptr;
using dcp::raw_convert;
-TextCaptionFileContent::TextCaptionFileContent (shared_ptr<const Film> film, boost::filesystem::path path)
+StringTextFileContent::StringTextFileContent (shared_ptr<const Film> film, boost::filesystem::path path)
: Content (film, path)
{
- caption.push_back (shared_ptr<CaptionContent> (new CaptionContent (this, CAPTION_OPEN)));
+ caption.push_back (shared_ptr<TextContent> (new TextContent (this, CAPTION_OPEN)));
}
-TextCaptionFileContent::TextCaptionFileContent (shared_ptr<const Film> film, cxml::ConstNodePtr node, int version)
+StringTextFileContent::StringTextFileContent (shared_ptr<const Film> film, cxml::ConstNodePtr node, int version)
: Content (film, node)
, _length (node->number_child<ContentTime::Type> ("Length"))
{
- caption = CaptionContent::from_xml (this, node, version);
+ caption = TextContent::from_xml (this, node, version);
}
void
-TextCaptionFileContent::examine (boost::shared_ptr<Job> job)
+StringTextFileContent::examine (boost::shared_ptr<Job> job)
{
Content::examine (job);
- TextCaptionFile s (shared_from_this ());
+ StringTextFile s (shared_from_this ());
/* Default to turning these subtitles on */
only_caption()->set_use (true);
@@ -63,19 +63,19 @@ TextCaptionFileContent::examine (boost::shared_ptr<Job> job)
}
string
-TextCaptionFileContent::summary () const
+StringTextFileContent::summary () const
{
return path_summary() + " " + _("[subtitles]");
}
string
-TextCaptionFileContent::technical_summary () const
+StringTextFileContent::technical_summary () const
{
return Content::technical_summary() + " - " + _("Text subtitles");
}
void
-TextCaptionFileContent::as_xml (xmlpp::Node* node, bool with_paths) const
+StringTextFileContent::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 @@ TextCaptionFileContent::as_xml (xmlpp::Node* node, bool with_paths) const
}
DCPTime
-TextCaptionFileContent::full_length () const
+StringTextFileContent::full_length () const
{
FrameRateChange const frc (active_video_frame_rate(), film()->video_frame_rate ());
return DCPTime (_length, frc);
diff --git a/src/lib/text_caption_file_content.h b/src/lib/string_text_file_content.h
index f8f4a9851..c2de86ce5 100644
--- a/src/lib/text_caption_file_content.h
+++ b/src/lib/string_text_file_content.h
@@ -22,17 +22,17 @@
class Job;
-/** @class TextCaptionFileContent
+/** @class StringTextFileContent
* @brief A SubRip, SSA or ASS file.
*/
-class TextCaptionFileContent : public Content
+class StringTextFileContent : public Content
{
public:
- TextCaptionFileContent (boost::shared_ptr<const Film>, boost::filesystem::path);
- TextCaptionFileContent (boost::shared_ptr<const Film>, cxml::ConstNodePtr, int);
+ StringTextFileContent (boost::shared_ptr<const Film>, boost::filesystem::path);
+ StringTextFileContent (boost::shared_ptr<const Film>, cxml::ConstNodePtr, int);
- boost::shared_ptr<TextCaptionFileContent> shared_from_this () {
- return boost::dynamic_pointer_cast<TextCaptionFileContent> (Content::shared_from_this ());
+ boost::shared_ptr<StringTextFileContent> shared_from_this () {
+ return boost::dynamic_pointer_cast<StringTextFileContent> (Content::shared_from_this ());
}
void examine (boost::shared_ptr<Job>);
diff --git a/src/lib/text_caption_file_decoder.cc b/src/lib/string_text_file_decoder.cc
index 65de6a562..a81f2592d 100644
--- a/src/lib/text_caption_file_decoder.cc
+++ b/src/lib/string_text_file_decoder.cc
@@ -18,10 +18,10 @@
*/
-#include "text_caption_file_decoder.h"
-#include "text_caption_file_content.h"
-#include "caption_content.h"
-#include "caption_decoder.h"
+#include "string_text_file_decoder.h"
+#include "string_text_file_content.h"
+#include "text_content.h"
+#include "text_decoder.h"
#include <dcp/subtitle_string.h>
#include <boost/foreach.hpp>
#include <iostream>
@@ -35,19 +35,19 @@ using boost::shared_ptr;
using boost::optional;
using boost::dynamic_pointer_cast;
-TextCaptionFileDecoder::TextCaptionFileDecoder (shared_ptr<const TextCaptionFileContent> content, shared_ptr<Log> log)
- : TextCaptionFile (content)
+StringTextFileDecoder::StringTextFileDecoder (shared_ptr<const StringTextFileContent> content, shared_ptr<Log> log)
+ : StringTextFile (content)
, _next (0)
{
ContentTime first;
if (!_subtitles.empty()) {
first = content_time_period(_subtitles[0]).from;
}
- caption.push_back (shared_ptr<CaptionDecoder> (new CaptionDecoder (this, content->only_caption(), log, first)));
+ caption.push_back (shared_ptr<TextDecoder> (new TextDecoder (this, content->only_caption(), log, first)));
}
void
-TextCaptionFileDecoder::seek (ContentTime time, bool accurate)
+StringTextFileDecoder::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.
@@ -66,7 +66,7 @@ TextCaptionFileDecoder::seek (ContentTime time, bool accurate)
}
bool
-TextCaptionFileDecoder::pass ()
+StringTextFileDecoder::pass ()
{
if (_next >= _subtitles.size ()) {
return true;
@@ -80,7 +80,7 @@ TextCaptionFileDecoder::pass ()
}
ContentTimePeriod
-TextCaptionFileDecoder::content_time_period (sub::Subtitle s) const
+StringTextFileDecoder::content_time_period (sub::Subtitle s) const
{
return ContentTimePeriod (
ContentTime::from_seconds (s.from.all_as_seconds()),
diff --git a/src/lib/text_caption_file_decoder.h b/src/lib/string_text_file_decoder.h
index 769777571..6a9552bbe 100644
--- a/src/lib/text_caption_file_decoder.h
+++ b/src/lib/string_text_file_decoder.h
@@ -21,16 +21,16 @@
#ifndef DCPOMATIC_TEXT_CAPTION_FILE_DECODER_H
#define DCPOMATIC_TEXT_CAPTION_FILE_DECODER_H
-#include "text_caption_file.h"
+#include "string_text_file.h"
#include "decoder.h"
-class TextCaptionFileContent;
+class StringTextFileContent;
class Log;
-class TextCaptionFileDecoder : public Decoder, public TextCaptionFile
+class StringTextFileDecoder : public Decoder, public StringTextFile
{
public:
- TextCaptionFileDecoder (boost::shared_ptr<const TextCaptionFileContent>, boost::shared_ptr<Log> log);
+ StringTextFileDecoder (boost::shared_ptr<const StringTextFileContent>, boost::shared_ptr<Log> log);
void seek (ContentTime time, bool accurate);
bool pass ();
diff --git a/src/lib/caption_content.cc b/src/lib/text_content.cc
index 4d0795190..fbc7d82af 100644
--- a/src/lib/caption_content.cc
+++ b/src/lib/text_content.cc
@@ -18,7 +18,7 @@
*/
-#include "caption_content.h"
+#include "text_content.h"
#include "util.h"
#include "exceptions.h"
#include "font.h"
@@ -40,24 +40,24 @@ using boost::dynamic_pointer_cast;
using boost::optional;
using dcp::raw_convert;
-int const CaptionContentProperty::X_OFFSET = 500;
-int const CaptionContentProperty::Y_OFFSET = 501;
-int const CaptionContentProperty::X_SCALE = 502;
-int const CaptionContentProperty::Y_SCALE = 503;
-int const CaptionContentProperty::USE = 504;
-int const CaptionContentProperty::BURN = 505;
-int const CaptionContentProperty::LANGUAGE = 506;
-int const CaptionContentProperty::FONTS = 507;
-int const CaptionContentProperty::COLOUR = 508;
-int const CaptionContentProperty::EFFECT = 509;
-int const CaptionContentProperty::EFFECT_COLOUR = 510;
-int const CaptionContentProperty::LINE_SPACING = 511;
-int const CaptionContentProperty::FADE_IN = 512;
-int const CaptionContentProperty::FADE_OUT = 513;
-int const CaptionContentProperty::OUTLINE_WIDTH = 514;
-int const CaptionContentProperty::TYPE = 515;
-
-CaptionContent::CaptionContent (Content* parent, CaptionType original_type)
+int const TextContentProperty::X_OFFSET = 500;
+int const TextContentProperty::Y_OFFSET = 501;
+int const TextContentProperty::X_SCALE = 502;
+int const TextContentProperty::Y_SCALE = 503;
+int const TextContentProperty::USE = 504;
+int const TextContentProperty::BURN = 505;
+int const TextContentProperty::LANGUAGE = 506;
+int const TextContentProperty::FONTS = 507;
+int const TextContentProperty::COLOUR = 508;
+int const TextContentProperty::EFFECT = 509;
+int const TextContentProperty::EFFECT_COLOUR = 510;
+int const TextContentProperty::LINE_SPACING = 511;
+int const TextContentProperty::FADE_IN = 512;
+int const TextContentProperty::FADE_OUT = 513;
+int const TextContentProperty::OUTLINE_WIDTH = 514;
+int const TextContentProperty::TYPE = 515;
+
+TextContent::TextContent (Content* parent, TextType original_type)
: ContentPart (parent)
, _use (false)
, _burn (false)
@@ -73,18 +73,18 @@ CaptionContent::CaptionContent (Content* parent, CaptionType original_type)
}
-/** @return CaptionContents from node or <Caption> nodes under node (according to version).
- * The list could be empty if no CaptionContents are found.
+/** @return TextContents from node or <Caption> nodes under node (according to version).
+ * The list could be empty if no TextContents are found.
*/
-list<shared_ptr<CaptionContent> >
-CaptionContent::from_xml (Content* parent, cxml::ConstNodePtr node, int version)
+list<shared_ptr<TextContent> >
+TextContent::from_xml (Content* parent, cxml::ConstNodePtr node, int version)
{
if (version < 34) {
/* With old metadata FFmpeg content has the subtitle-related tags even with no
subtitle streams, so check for that.
*/
if (node->string_child("Type") == "FFmpeg" && node->node_children("SubtitleStream").empty()) {
- return list<shared_ptr<CaptionContent> >();
+ return list<shared_ptr<TextContent> >();
}
/* Otherwise we can drop through to the newer logic */
@@ -92,25 +92,25 @@ CaptionContent::from_xml (Content* parent, cxml::ConstNodePtr node, int version)
if (version < 37) {
if (!node->optional_number_child<double>("SubtitleXOffset") && !node->optional_number_child<double>("SubtitleOffset")) {
- return list<shared_ptr<CaptionContent> >();
+ return list<shared_ptr<TextContent> >();
}
- list<shared_ptr<CaptionContent> > c;
- c.push_back (shared_ptr<CaptionContent> (new CaptionContent (parent, node, version)));
+ list<shared_ptr<TextContent> > c;
+ c.push_back (shared_ptr<TextContent> (new TextContent (parent, node, version)));
return c;
}
if (!node->optional_node_child("Caption")) {
- return list<shared_ptr<CaptionContent> >();
+ return list<shared_ptr<TextContent> >();
}
- list<shared_ptr<CaptionContent> > c;
+ list<shared_ptr<TextContent> > c;
BOOST_FOREACH (cxml::ConstNodePtr i, node->node_children("Caption")) {
- c.push_back (shared_ptr<CaptionContent> (new CaptionContent (parent, i, version)));
+ c.push_back (shared_ptr<TextContent> (new TextContent (parent, i, version)));
}
return c;
}
-CaptionContent::CaptionContent (Content* parent, cxml::ConstNodePtr node, int version)
+TextContent::TextContent (Content* parent, cxml::ConstNodePtr node, int version)
: ContentPart (parent)
, _use (false)
, _burn (false)
@@ -229,13 +229,13 @@ CaptionContent::CaptionContent (Content* parent, cxml::ConstNodePtr node, int ve
_original_type = string_to_caption_type (node->optional_string_child("OriginalType").get_value_or("open"));
}
-CaptionContent::CaptionContent (Content* parent, vector<shared_ptr<Content> > c)
+TextContent::TextContent (Content* parent, vector<shared_ptr<Content> > c)
: ContentPart (parent)
{
/* This constructor is for join which is only supported for content types
that have a single caption, so we can use only_caption() here.
*/
- shared_ptr<CaptionContent> ref = c[0]->only_caption();
+ shared_ptr<TextContent> ref = c[0]->only_caption();
DCPOMATIC_ASSERT (ref);
list<shared_ptr<Font> > ref_fonts = ref->fonts ();
@@ -314,7 +314,7 @@ CaptionContent::CaptionContent (Content* parent, vector<shared_ptr<Content> > c)
/** _mutex must not be held on entry */
void
-CaptionContent::as_xml (xmlpp::Node* root) const
+TextContent::as_xml (xmlpp::Node* root) const
{
boost::mutex::scoped_lock lm (_mutex);
@@ -368,7 +368,7 @@ CaptionContent::as_xml (xmlpp::Node* root) const
}
string
-CaptionContent::identifier () const
+TextContent::identifier () const
{
string s = raw_convert<string> (x_scale())
+ "_" + raw_convert<string> (y_scale())
@@ -399,14 +399,14 @@ CaptionContent::identifier () const
}
void
-CaptionContent::add_font (shared_ptr<Font> font)
+TextContent::add_font (shared_ptr<Font> font)
{
_fonts.push_back (font);
connect_to_fonts ();
}
void
-CaptionContent::connect_to_fonts ()
+TextContent::connect_to_fonts ()
{
BOOST_FOREACH (boost::signals2::connection& i, _font_connections) {
i.disconnect ();
@@ -415,138 +415,138 @@ CaptionContent::connect_to_fonts ()
_font_connections.clear ();
BOOST_FOREACH (shared_ptr<Font> i, _fonts) {
- _font_connections.push_back (i->Changed.connect (boost::bind (&CaptionContent::font_changed, this)));
+ _font_connections.push_back (i->Changed.connect (boost::bind (&TextContent::font_changed, this)));
}
}
void
-CaptionContent::font_changed ()
+TextContent::font_changed ()
{
- _parent->signal_changed (CaptionContentProperty::FONTS);
+ _parent->signal_changed (TextContentProperty::FONTS);
}
void
-CaptionContent::set_colour (dcp::Colour colour)
+TextContent::set_colour (dcp::Colour colour)
{
- maybe_set (_colour, colour, CaptionContentProperty::COLOUR);
+ maybe_set (_colour, colour, TextContentProperty::COLOUR);
}
void
-CaptionContent::unset_colour ()
+TextContent::unset_colour ()
{
- maybe_set (_colour, optional<dcp::Colour>(), CaptionContentProperty::COLOUR);
+ maybe_set (_colour, optional<dcp::Colour>(), TextContentProperty::COLOUR);
}
void
-CaptionContent::set_effect (dcp::Effect e)
+TextContent::set_effect (dcp::Effect e)
{
- maybe_set (_effect, e, CaptionContentProperty::EFFECT);
+ maybe_set (_effect, e, TextContentProperty::EFFECT);
}
void
-CaptionContent::unset_effect ()
+TextContent::unset_effect ()
{
- maybe_set (_effect, optional<dcp::Effect>(), CaptionContentProperty::EFFECT);
+ maybe_set (_effect, optional<dcp::Effect>(), TextContentProperty::EFFECT);
}
void
-CaptionContent::set_effect_colour (dcp::Colour colour)
+TextContent::set_effect_colour (dcp::Colour colour)
{
- maybe_set (_effect_colour, colour, CaptionContentProperty::EFFECT_COLOUR);
+ maybe_set (_effect_colour, colour, TextContentProperty::EFFECT_COLOUR);
}
void
-CaptionContent::unset_effect_colour ()
+TextContent::unset_effect_colour ()
{
- maybe_set (_effect_colour, optional<dcp::Colour>(), CaptionContentProperty::EFFECT_COLOUR);
+ maybe_set (_effect_colour, optional<dcp::Colour>(), TextContentProperty::EFFECT_COLOUR);
}
void
-CaptionContent::set_use (bool u)
+TextContent::set_use (bool u)
{
- maybe_set (_use, u, CaptionContentProperty::USE);
+ maybe_set (_use, u, TextContentProperty::USE);
}
void
-CaptionContent::set_burn (bool b)
+TextContent::set_burn (bool b)
{
- maybe_set (_burn, b, CaptionContentProperty::BURN);
+ maybe_set (_burn, b, TextContentProperty::BURN);
}
void
-CaptionContent::set_x_offset (double o)
+TextContent::set_x_offset (double o)
{
- maybe_set (_x_offset, o, CaptionContentProperty::X_OFFSET);
+ maybe_set (_x_offset, o, TextContentProperty::X_OFFSET);
}
void
-CaptionContent::set_y_offset (double o)
+TextContent::set_y_offset (double o)
{
- maybe_set (_y_offset, o, CaptionContentProperty::Y_OFFSET);
+ maybe_set (_y_offset, o, TextContentProperty::Y_OFFSET);
}
void
-CaptionContent::set_x_scale (double s)
+TextContent::set_x_scale (double s)
{
- maybe_set (_x_scale, s, CaptionContentProperty::X_SCALE);
+ maybe_set (_x_scale, s, TextContentProperty::X_SCALE);
}
void
-CaptionContent::set_y_scale (double s)
+TextContent::set_y_scale (double s)
{
- maybe_set (_y_scale, s, CaptionContentProperty::Y_SCALE);
+ maybe_set (_y_scale, s, TextContentProperty::Y_SCALE);
}
void
-CaptionContent::set_language (string language)
+TextContent::set_language (string language)
{
- maybe_set (_language, language, CaptionContentProperty::LANGUAGE);
+ maybe_set (_language, language, TextContentProperty::LANGUAGE);
}
void
-CaptionContent::set_line_spacing (double s)
+TextContent::set_line_spacing (double s)
{
- maybe_set (_line_spacing, s, CaptionContentProperty::LINE_SPACING);
+ maybe_set (_line_spacing, s, TextContentProperty::LINE_SPACING);
}
void
-CaptionContent::set_fade_in (ContentTime t)
+TextContent::set_fade_in (ContentTime t)
{
- maybe_set (_fade_in, t, CaptionContentProperty::FADE_IN);
+ maybe_set (_fade_in, t, TextContentProperty::FADE_IN);
}
void
-CaptionContent::unset_fade_in ()
+TextContent::unset_fade_in ()
{
- maybe_set (_fade_in, optional<ContentTime>(), CaptionContentProperty::FADE_IN);
+ maybe_set (_fade_in, optional<ContentTime>(), TextContentProperty::FADE_IN);
}
void
-CaptionContent::set_fade_out (ContentTime t)
+TextContent::set_fade_out (ContentTime t)
{
- maybe_set (_fade_out, t, CaptionContentProperty::FADE_OUT);
+ maybe_set (_fade_out, t, TextContentProperty::FADE_OUT);
}
void
-CaptionContent::unset_fade_out ()
+TextContent::unset_fade_out ()
{
- maybe_set (_fade_out, optional<ContentTime>(), CaptionContentProperty::FADE_OUT);
+ maybe_set (_fade_out, optional<ContentTime>(), TextContentProperty::FADE_OUT);
}
void
-CaptionContent::set_type (CaptionType type)
+TextContent::set_type (TextType type)
{
- maybe_set (_type, type, CaptionContentProperty::TYPE);
+ maybe_set (_type, type, TextContentProperty::TYPE);
}
void
-CaptionContent::set_outline_width (int w)
+TextContent::set_outline_width (int w)
{
- maybe_set (_outline_width, w, CaptionContentProperty::OUTLINE_WIDTH);
+ maybe_set (_outline_width, w, TextContentProperty::OUTLINE_WIDTH);
}
void
-CaptionContent::take_settings_from (shared_ptr<const CaptionContent> c)
+TextContent::take_settings_from (shared_ptr<const TextContent> c)
{
set_use (c->_use);
set_burn (c->_burn);
@@ -554,7 +554,7 @@ CaptionContent::take_settings_from (shared_ptr<const CaptionContent> c)
set_y_offset (c->_y_offset);
set_x_scale (c->_x_scale);
set_y_scale (c->_y_scale);
- maybe_set (_fonts, c->_fonts, CaptionContentProperty::FONTS);
+ maybe_set (_fonts, c->_fonts, TextContentProperty::FONTS);
if (c->_colour) {
set_colour (*c->_colour);
} else {
diff --git a/src/lib/caption_content.h b/src/lib/text_content.h
index 4f5780d23..5aacc7ecf 100644
--- a/src/lib/caption_content.h
+++ b/src/lib/text_content.h
@@ -28,7 +28,7 @@
class Font;
-class CaptionContentProperty
+class TextContentProperty
{
public:
static int const X_OFFSET;
@@ -49,21 +49,21 @@ public:
static int const TYPE;
};
-/** @class CaptionContent
+/** @class TextContent
* @brief Description of how some text content should be presented.
*
* There are `bitmap' subtitles and `plain' subtitles (plain text),
* and not all of the settings in this class correspond to both types.
*/
-class CaptionContent : public ContentPart
+class TextContent : public ContentPart
{
public:
- CaptionContent (Content* parent, CaptionType original_type);
- CaptionContent (Content* parent, std::vector<boost::shared_ptr<Content> >);
+ TextContent (Content* parent, TextType original_type);
+ TextContent (Content* parent, std::vector<boost::shared_ptr<Content> >);
void as_xml (xmlpp::Node *) const;
std::string identifier () const;
- void take_settings_from (boost::shared_ptr<const CaptionContent> c);
+ void take_settings_from (boost::shared_ptr<const TextContent> c);
void add_font (boost::shared_ptr<Font> font);
@@ -86,7 +86,7 @@ public:
void set_fade_out (ContentTime);
void set_outline_width (int);
void unset_fade_out ();
- void set_type (CaptionType type);
+ void set_type (TextType type);
bool use () const {
boost::mutex::scoped_lock lm (_mutex);
@@ -163,17 +163,17 @@ public:
return _outline_width;
}
- CaptionType type () const {
+ TextType type () const {
boost::mutex::scoped_lock lm (_mutex);
return _type;
}
- CaptionType original_type () const {
+ TextType original_type () const {
boost::mutex::scoped_lock lm (_mutex);
return _original_type;
}
- static std::list<boost::shared_ptr<CaptionContent> > from_xml (Content* parent, cxml::ConstNodePtr, int version);
+ static std::list<boost::shared_ptr<TextContent> > from_xml (Content* parent, cxml::ConstNodePtr, int version);
protected:
/** subtitle language (e.g. "German") or empty if it is not known */
@@ -182,7 +182,7 @@ protected:
private:
friend struct ffmpeg_pts_offset_test;
- CaptionContent (Content* parent, cxml::ConstNodePtr, int version);
+ TextContent (Content* parent, cxml::ConstNodePtr, int version);
void font_changed ();
void connect_to_fonts ();
@@ -214,9 +214,9 @@ private:
/** what these captions will be used for in the output DCP (not necessarily what
* they were originally).
*/
- CaptionType _type;
+ TextType _type;
/** the original type of these captions in their content */
- CaptionType _original_type;
+ TextType _original_type;
};
#endif
diff --git a/src/lib/caption_decoder.cc b/src/lib/text_decoder.cc
index 1a2221024..3b6a06ea1 100644
--- a/src/lib/caption_decoder.cc
+++ b/src/lib/text_decoder.cc
@@ -18,8 +18,8 @@
*/
-#include "caption_decoder.h"
-#include "caption_content.h"
+#include "text_decoder.h"
+#include "text_content.h"
#include "util.h"
#include "log.h"
#include "compose.hpp"
@@ -37,9 +37,9 @@ using boost::shared_ptr;
using boost::optional;
using boost::function;
-CaptionDecoder::CaptionDecoder (
+TextDecoder::TextDecoder (
Decoder* parent,
- shared_ptr<const CaptionContent> c,
+ shared_ptr<const TextContent> c,
shared_ptr<Log> log,
ContentTime first
)
@@ -58,14 +58,14 @@ CaptionDecoder::CaptionDecoder (
* of the video frame)
*/
void
-CaptionDecoder::emit_bitmap_start (ContentTime from, shared_ptr<Image> image, dcpomatic::Rect<double> rect)
+TextDecoder::emit_bitmap_start (ContentTime from, shared_ptr<Image> image, dcpomatic::Rect<double> rect)
{
- BitmapStart (ContentBitmapCaption (from, _content->type(), image, rect));
+ BitmapStart (ContentBitmapText (from, _content->type(), image, rect));
_position = from;
}
void
-CaptionDecoder::emit_plain_start (ContentTime from, list<dcp::SubtitleString> s)
+TextDecoder::emit_plain_start (ContentTime from, list<dcp::SubtitleString> s)
{
BOOST_FOREACH (dcp::SubtitleString& i, s) {
/* We must escape < and > in strings, otherwise they might confuse our subtitle
@@ -94,12 +94,12 @@ CaptionDecoder::emit_plain_start (ContentTime from, list<dcp::SubtitleString> s)
}
}
- PlainStart (ContentTextCaption (from, _content->type(), s));
+ PlainStart (ContentStringText (from, _content->type(), s));
_position = from;
}
void
-CaptionDecoder::emit_plain_start (ContentTime from, sub::Subtitle const & subtitle)
+TextDecoder::emit_plain_start (ContentTime from, sub::Subtitle const & subtitle)
{
/* See if our next subtitle needs to be vertically placed on screen by us */
bool needs_placement = false;
@@ -231,27 +231,27 @@ CaptionDecoder::emit_plain_start (ContentTime from, sub::Subtitle const & subtit
}
void
-CaptionDecoder::emit_stop (ContentTime to)
+TextDecoder::emit_stop (ContentTime to)
{
Stop (to, _content->type());
}
void
-CaptionDecoder::emit_plain (ContentTimePeriod period, list<dcp::SubtitleString> s)
+TextDecoder::emit_plain (ContentTimePeriod period, list<dcp::SubtitleString> s)
{
emit_plain_start (period.from, s);
emit_stop (period.to);
}
void
-CaptionDecoder::emit_plain (ContentTimePeriod period, sub::Subtitle const & s)
+TextDecoder::emit_plain (ContentTimePeriod period, sub::Subtitle const & s)
{
emit_plain_start (period.from, s);
emit_stop (period.to);
}
void
-CaptionDecoder::seek ()
+TextDecoder::seek ()
{
_position = ContentTime ();
}
diff --git a/src/lib/caption_decoder.h b/src/lib/text_decoder.h
index d555446c7..25125e701 100644
--- a/src/lib/caption_decoder.h
+++ b/src/lib/text_decoder.h
@@ -24,7 +24,7 @@
#include "decoder.h"
#include "rect.h"
#include "types.h"
-#include "content_caption.h"
+#include "content_text.h"
#include "decoder_part.h"
#include <dcp/subtitle_string.h>
#include <boost/signals2.hpp>
@@ -35,12 +35,12 @@ namespace sub {
class Image;
-class CaptionDecoder : public DecoderPart
+class TextDecoder : public DecoderPart
{
public:
- CaptionDecoder (
+ TextDecoder (
Decoder* parent,
- boost::shared_ptr<const CaptionContent>,
+ boost::shared_ptr<const TextContent>,
boost::shared_ptr<Log> log,
ContentTime first
);
@@ -58,16 +58,16 @@ public:
void seek ();
- boost::shared_ptr<const CaptionContent> content () const {
+ boost::shared_ptr<const TextContent> content () const {
return _content;
}
- boost::signals2::signal<void (ContentBitmapCaption)> BitmapStart;
- boost::signals2::signal<void (ContentTextCaption)> PlainStart;
- boost::signals2::signal<void (ContentTime, CaptionType)> Stop;
+ boost::signals2::signal<void (ContentBitmapText)> BitmapStart;
+ boost::signals2::signal<void (ContentStringText)> PlainStart;
+ boost::signals2::signal<void (ContentTime, TextType)> Stop;
private:
- boost::shared_ptr<const CaptionContent> _content;
+ boost::shared_ptr<const TextContent> _content;
ContentTime _position;
};
diff --git a/src/lib/types.cc b/src/lib/types.cc
index 5474b609a..7f0bf4305 100644
--- a/src/lib/types.cc
+++ b/src/lib/types.cc
@@ -93,7 +93,7 @@ Crop::as_xml (xmlpp::Node* node) const
node->add_child("BottomCrop")->add_child_text (raw_convert<string> (bottom));
}
-CaptionType
+TextType
string_to_caption_type (string s)
{
if (s == "open") {
@@ -106,7 +106,7 @@ string_to_caption_type (string s)
}
string
-caption_type_to_string (CaptionType t)
+caption_type_to_string (TextType t)
{
switch (t) {
case CAPTION_OPEN:
@@ -119,7 +119,7 @@ caption_type_to_string (CaptionType t)
}
string
-caption_type_to_name (CaptionType t)
+caption_type_to_name (TextType t)
{
switch (t) {
case CAPTION_OPEN:
diff --git a/src/lib/types.h b/src/lib/types.h
index 6a05f66c9..6e3732d31 100644
--- a/src/lib/types.h
+++ b/src/lib/types.h
@@ -31,7 +31,7 @@
class Content;
class VideoContent;
class AudioContent;
-class CaptionContent;
+class TextContent;
class FFmpegContent;
namespace cxml {
@@ -139,16 +139,16 @@ enum ReelType
* There is also still use of the word `subtitle' in the code; these are the
* same as open captions in DoM.
*/
-enum CaptionType
+enum TextType
{
CAPTION_OPEN,
CAPTION_CLOSED,
CAPTION_COUNT
};
-extern std::string caption_type_to_string (CaptionType t);
-extern std::string caption_type_to_name (CaptionType t);
-extern CaptionType string_to_caption_type (std::string s);
+extern std::string caption_type_to_string (TextType t);
+extern std::string caption_type_to_name (TextType t);
+extern TextType string_to_caption_type (std::string s);
/** @struct Crop
* @brief A description of the crop of an image or video.
diff --git a/src/lib/writer.cc b/src/lib/writer.cc
index c0a774f03..3ab1cc5b9 100644
--- a/src/lib/writer.cc
+++ b/src/lib/writer.cc
@@ -665,7 +665,7 @@ Writer::can_fake_write (Frame frame) const
}
void
-Writer::write (PlayerCaption text, CaptionType type, DCPTimePeriod period)
+Writer::write (PlayerText text, TextType type, DCPTimePeriod period)
{
while (_caption_reel[type]->period().to <= period.from) {
++_caption_reel[type];
diff --git a/src/lib/writer.h b/src/lib/writer.h
index f67419072..71d11b773 100644
--- a/src/lib/writer.h
+++ b/src/lib/writer.h
@@ -23,7 +23,7 @@
*/
#include "types.h"
-#include "player_caption.h"
+#include "player_text.h"
#include "exception_store.h"
#include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp>
@@ -104,7 +104,7 @@ public:
bool can_repeat (Frame) const;
void repeat (Frame, Eyes);
void write (boost::shared_ptr<const AudioBuffers>, DCPTime time);
- void write (PlayerCaption text, CaptionType type, DCPTimePeriod period);
+ void write (PlayerText text, TextType type, DCPTimePeriod period);
void write (std::list<boost::shared_ptr<Font> > fonts);
void write (ReferencedReelAsset asset);
void finish ();
diff --git a/src/lib/wscript b/src/lib/wscript
index a841e5b55..a9ed0c621 100644
--- a/src/lib/wscript
+++ b/src/lib/wscript
@@ -21,7 +21,7 @@ import os
import i18n
sources = """
- active_captions.cc
+ active_text.cc
analyse_audio_job.cc
atmos_mxf_content.cc
audio_analysis.cc
@@ -38,8 +38,8 @@ sources = """
audio_ring_buffers.cc
audio_stream.cc
butler.cc
- caption_content.cc
- caption_decoder.cc
+ text_content.cc
+ text_decoder.cc
case_insensitive_sorter.cc
cinema.cc
cinema_kdms.cc
@@ -114,7 +114,7 @@ sources = """
mid_side_decoder.cc
overlaps.cc
player.cc
- player_caption.cc
+ player_text.cc
player_video.cc
playlist.cc
position_image.cc
@@ -134,9 +134,9 @@ sources = """
server.cc
shuffler.cc
string_log_entry.cc
- text_caption_file.cc
- text_caption_file_content.cc
- text_caption_file_decoder.cc
+ string_text_file.cc
+ string_text_file_content.cc
+ string_text_file_decoder.cc
timer.cc
transcode_job.cc
types.cc