CCAP doc tweaks.
[dcpomatic.git] / src / lib / subtitle_decoder.h
index f44766393c4d889d8f4604a656a8905ac4aacd38..c1f171b1fbb799ebe0a128ff606b1932df5f0e68 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013-2016 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2017 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
@@ -38,34 +38,37 @@ class Image;
 class SubtitleDecoder : public DecoderPart
 {
 public:
-       /** Second parameter to the _during functions is true if we
-        *  want only subtitles that start during the period,
-        *  otherwise we want subtitles that overlap the period.
-        */
        SubtitleDecoder (
                Decoder* parent,
                boost::shared_ptr<const SubtitleContent>,
-               boost::shared_ptr<Log> log
+               boost::shared_ptr<Log> log,
+               ContentTime first
                );
 
-       boost::optional<ContentTime> position () const {
+       ContentTime position () const {
                return _position;
        }
 
-       void emit_image (ContentTimePeriod period, boost::shared_ptr<Image>, dcpomatic::Rect<double>);
-       void emit_text (ContentTimePeriod period, std::list<dcp::SubtitleString>);
+       void emit_image_start (ContentTime from, boost::shared_ptr<Image> image, dcpomatic::Rect<double> rect);
+       void emit_text_start (ContentTime from, std::list<dcp::SubtitleString> s);
+       void emit_text_start (ContentTime from, sub::Subtitle const & subtitle);
+       void emit_text (ContentTimePeriod period, std::list<dcp::SubtitleString> s);
        void emit_text (ContentTimePeriod period, sub::Subtitle const & subtitle);
+       void emit_stop (ContentTime to);
+
+       void seek ();
 
        boost::shared_ptr<const SubtitleContent> content () const {
                return _content;
        }
 
-       boost::signals2::signal<void (ContentImageSubtitle)> ImageData;
-       boost::signals2::signal<void (ContentTextSubtitle)> TextData;
+       boost::signals2::signal<void (ContentImageSubtitle)> ImageStart;
+       boost::signals2::signal<void (ContentTextSubtitle)> TextStart;
+       boost::signals2::signal<void (ContentTime)> Stop;
 
 private:
        boost::shared_ptr<const SubtitleContent> _content;
-       boost::optional<ContentTime> _position;
+       ContentTime _position;
 };
 
 #endif