Some subtitle renaming.
authorCarl Hetherington <cth@carlh.net>
Fri, 3 Aug 2018 23:22:51 +0000 (00:22 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 3 Aug 2018 23:22:51 +0000 (00:22 +0100)
src/lib/active_text.cc
src/lib/hints.cc
src/lib/player.cc
src/lib/player_text.h
src/lib/reel_writer.cc
src/wx/closed_captions_dialog.cc

index 6e813144cf2e6240204900388dd979cb63c1092e..5f4440728f338e4ca068c8c23846ca93493c18d2 100644 (file)
@@ -144,7 +144,7 @@ ActiveText::add_to (weak_ptr<const TextContent> content, DCPTime to)
 
        _data[content].back().to = to;
 
-       BOOST_FOREACH (StringText& i, _data[content].back().subs.text) {
+       BOOST_FOREACH (StringText& i, _data[content].back().subs.string) {
                i.set_out (dcp::Time(to.seconds(), 1000));
        }
 
index 943991d2bc584f839f2a1eff085218106b35f8cc..8979b6b4ce3941a95f3e0ace2f69298866c6738b 100644 (file)
@@ -287,8 +287,8 @@ Hints::text (PlayerText text, TextType type, DCPTimePeriod period)
                return;
        }
 
-       int lines = text.text.size();
-       BOOST_FOREACH (StringText i, text.text) {
+       int lines = text.string.size();
+       BOOST_FOREACH (StringText i, text.string) {
                if (i.text().length() > CLOSED_CAPTION_LENGTH) {
                        ++lines;
                        if (!_long_ccap) {
index 408e791cd560952fd0ee673efe660e5138444e6c..68b3365ea5845eb9ddfce38a4c5ba622da4d880a 100644 (file)
@@ -745,13 +745,13 @@ Player::open_subtitles_for_frame (DCPTime time) const
                _active_texts[TEXT_OPEN_SUBTITLE].get_burnt(DCPTimePeriod(time, time + DCPTime::from_frames(1, vfr)), _always_burn_open_subtitles)
                ) {
 
-               /* Image subtitles */
-               list<PositionImage> c = transform_bitmap_texts (j.image);
+               /* Bitmap subtitles */
+               list<PositionImage> c = transform_bitmap_texts (j.bitmap);
                copy (c.begin(), c.end(), back_inserter (captions));
 
-               /* Text subtitles (rendered to an image) */
-               if (!j.text.empty ()) {
-                       list<PositionImage> s = render_text (j.text, j.fonts, _video_container_size, time, vfr);
+               /* String subtitles (rendered to an image) */
+               if (!j.string.empty ()) {
+                       list<PositionImage> s = render_text (j.string, j.fonts, _video_container_size, time, vfr);
                        copy (s.begin(), s.end(), back_inserter (captions));
                }
        }
@@ -940,7 +940,7 @@ Player::bitmap_text_start (weak_ptr<Piece> wp, weak_ptr<const TextContent> wc, C
        subtitle.sub.rectangle.height *= text->y_scale ();
 
        PlayerText ps;
-       ps.image.push_back (subtitle.sub);
+       ps.bitmap.push_back (subtitle.sub);
        DCPTime from (content_time_to_dcp (piece, subtitle.from()));
 
        _active_texts[subtitle.type()].add_from (wc, ps, from);
@@ -983,7 +983,7 @@ Player::plain_text_start (weak_ptr<Piece> wp, weak_ptr<const TextContent> wc, Co
                }
 
                s.set_in (dcp::Time(from.seconds(), 1000));
-               ps.text.push_back (StringText (s, text->outline_width()));
+               ps.string.push_back (StringText (s, text->outline_width()));
                ps.add_fonts (text->fonts ());
        }
 
index 5a8799116fff7510790ca577edcaf8a7cf3d823e..3f5066314cc256ae198a70290660134dce14ca71 100644 (file)
@@ -35,8 +35,8 @@ public:
        std::list<boost::shared_ptr<Font> > fonts;
 
        /** BitmapTexts, with their rectangles transformed as specified by their content */
-       std::list<BitmapText> image;
-       std::list<StringText> text;
+       std::list<BitmapText> bitmap;
+       std::list<StringText> string;
 };
 
 #endif
index 2561e556ad29450cc3b8efe05fd980ad9a759d3f..f9e3471a8a8d8a8cc40d1ba0e59ac45721f17ae3 100644 (file)
@@ -573,14 +573,14 @@ ReelWriter::write (PlayerText subs, TextType type, DCPTimePeriod period)
                }
        }
 
-       BOOST_FOREACH (StringText i, subs.text) {
+       BOOST_FOREACH (StringText i, subs.string) {
                /* 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 (BitmapText i, subs.image) {
+       BOOST_FOREACH (BitmapText i, subs.bitmap) {
                _caption_asset[type]->add (
                        shared_ptr<dcp::Subtitle>(
                                new dcp::SubtitleImage(
index ea7db88f02375ffb17bf29f993ece7f9038cf005..a504cade957a3496736b8679dfc9417659e4d4a4 100644 (file)
@@ -104,7 +104,7 @@ ClosedCaptionsDialog::update (DCPTime time)
        DCPOMATIC_ASSERT (player);
        list<StringText> to_show;
        BOOST_FOREACH (PlayerText i, player->closed_captions_for_frame(time)) {
-               BOOST_FOREACH (StringText j, i.text) {
+               BOOST_FOREACH (StringText j, i.string) {
                        to_show.push_back (j);
                }
        }