Rename some caption -> text.
[dcpomatic.git] / src / lib / reel_writer.h
index edf6c081e955bfff863bda6286652404ce445bba..2e5ad8975f16e8a780245df7e453e64ead06d075 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2018 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
@@ -21,7 +21,7 @@
 #include "types.h"
 #include "dcpomatic_time.h"
 #include "referenced_reel_asset.h"
-#include "player_subtitles.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 (PlayerSubtitles subs);
+       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);
@@ -72,10 +72,6 @@ public:
                return _period;
        }
 
-       int total_written_audio_frames () const {
-               return _total_written_audio_frames;
-       }
-
        int last_written_video_frame () const {
                return _last_written_video_frame;
        }
@@ -107,8 +103,6 @@ private:
        /** the index of the last written video frame within the reel */
        int _last_written_video_frame;
        Eyes _last_written_eyes;
-       /** the number of audio frames that have been written to the reel */
-       int _total_written_audio_frames;
        /** index of this reel within the DCP (starting from 0) */
        int _reel_index;
        /** number of reels in the DCP */
@@ -119,7 +113,7 @@ private:
        boost::shared_ptr<dcp::PictureAssetWriter> _picture_asset_writer;
        boost::shared_ptr<dcp::SoundAsset> _sound_asset;
        boost::shared_ptr<dcp::SoundAssetWriter> _sound_asset_writer;
-       boost::shared_ptr<dcp::SubtitleAsset> _subtitle_asset;
+       boost::shared_ptr<dcp::SubtitleAsset> _text_asset[TEXT_COUNT];
 
        static int const _info_size;
 };