Update to test/data.
[dcpomatic.git] / src / lib / active_captions.h
index 28ddcad52c5939867be6cda3fad77b282073e8f7..8e38564f5b0f37acaeeb86b00ba029ef9d4a822e 100644 (file)
@@ -36,12 +36,13 @@ class CaptionContent;
 class ActiveCaptions : public boost::noncopyable
 {
 public:
+       std::list<PlayerCaption> get (DCPTimePeriod period) const;
        std::list<PlayerCaption> get_burnt (DCPTimePeriod period, bool always_burn_captions) const;
        void clear_before (DCPTime time);
        void clear ();
-       void add_from (boost::weak_ptr<CaptionContent> content, PlayerCaption ps, DCPTime from);
-       std::pair<PlayerCaption, DCPTime> add_to (boost::weak_ptr<CaptionContent> content, DCPTime to);
-       bool have (boost::weak_ptr<CaptionContent> content) const;
+       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;
 
 private:
        class Period
@@ -59,7 +60,9 @@ private:
                boost::optional<DCPTime> to;
        };
 
-       typedef std::map<boost::weak_ptr<CaptionContent>, std::list<Period> > Map;
+       typedef std::map<boost::weak_ptr<const CaptionContent>, std::list<Period> > Map;
+
+       void add (DCPTimePeriod period, std::list<PlayerCaption>& pc, std::list<Period> p) const;
 
        Map _data;
 };