diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-05-01 01:31:35 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-05-01 01:31:35 +0200 |
| commit | 8963f0007af1a312017b9627c18b82ec2a577591 (patch) | |
| tree | baeb6f2c17da72248408b8c1d695242b44edda9e /src/lib/text_decoder.cc | |
| parent | 29f84e2b8785585885e0658bdf9938967547460f (diff) | |
C++11 tidying.
Diffstat (limited to 'src/lib/text_decoder.cc')
| -rw-r--r-- | src/lib/text_decoder.cc | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/lib/text_decoder.cc b/src/lib/text_decoder.cc index 099e3ee74..0a7bdf95d 100644 --- a/src/lib/text_decoder.cc +++ b/src/lib/text_decoder.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2013-2017 Carl Hetherington <cth@carlh.net> + Copyright (C) 2013-2021 Carl Hetherington <cth@carlh.net> This file is part of DCP-o-matic. @@ -18,6 +18,7 @@ */ + #include "text_decoder.h" #include "text_content.h" #include "util.h" @@ -27,6 +28,7 @@ #include <boost/algorithm/string.hpp> #include <iostream> + using std::list; using std::cout; using std::string; @@ -34,9 +36,10 @@ using std::min; using std::max; using std::shared_ptr; using boost::optional; -using boost::function; +using std::function; using namespace dcpomatic; + TextDecoder::TextDecoder ( Decoder* parent, shared_ptr<const TextContent> c, @@ -49,6 +52,7 @@ TextDecoder::TextDecoder ( } + /** Called by subclasses when an image subtitle is starting. * @param from From time of the subtitle. * @param image Subtitle image. @@ -63,6 +67,7 @@ TextDecoder::emit_bitmap_start (ContentTime from, shared_ptr<Image> image, dcpom _position = from; } + void TextDecoder::emit_plain_start (ContentTime from, list<dcp::SubtitleString> s) { @@ -97,6 +102,7 @@ TextDecoder::emit_plain_start (ContentTime from, list<dcp::SubtitleString> s) _position = from; } + void TextDecoder::emit_plain_start (ContentTime from, sub::Subtitle const & subtitle) { @@ -250,12 +256,14 @@ TextDecoder::emit_plain_start (ContentTime from, sub::Subtitle const & subtitle) emit_plain_start (from, out); } + void TextDecoder::emit_stop (ContentTime to) { Stop (to); } + void TextDecoder::emit_plain (ContentTimePeriod period, list<dcp::SubtitleString> s) { @@ -263,6 +271,7 @@ TextDecoder::emit_plain (ContentTimePeriod period, list<dcp::SubtitleString> s) emit_stop (period.to); } + void TextDecoder::emit_plain (ContentTimePeriod period, sub::Subtitle const & s) { @@ -270,6 +279,7 @@ TextDecoder::emit_plain (ContentTimePeriod period, sub::Subtitle const & s) emit_stop (period.to); } + /* @param rect Area expressed as a fraction of the video frame that this subtitle * is for (e.g. a width of 0.5 means the width of the subtitle is half the width * of the video frame) @@ -281,6 +291,7 @@ TextDecoder::emit_bitmap (ContentTimePeriod period, shared_ptr<Image> image, dcp emit_stop (period.to); } + void TextDecoder::seek () { |
