X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Factive_text.h;h=b54957b3ff270da744b6f6e29e4bb4a722f63277;hb=924f4edb20d14bc697956254951fb87513cf2e19;hp=1dab7a867540b38927bea08f29b315a1ca87866e;hpb=c380909d3dcac0809dbeedc6240c33d37118296d;p=dcpomatic.git diff --git a/src/lib/active_text.h b/src/lib/active_text.h index 1dab7a867..b54957b3f 100644 --- a/src/lib/active_text.h +++ b/src/lib/active_text.h @@ -24,7 +24,6 @@ #include "dcpomatic_time.h" #include "player_text.h" -#include #include #include #include @@ -34,16 +33,20 @@ class TextContent; /** @class ActiveText * @brief A class to maintain information on active subtitles for Player. */ -class ActiveText : public boost::noncopyable +class ActiveText { public: - std::list get (DCPTimePeriod period) const; - std::list get_burnt (DCPTimePeriod period, bool always_burn_captions) const; - void clear_before (DCPTime time); + ActiveText () {} + + ActiveText (ActiveText const&) = delete; + ActiveText& operator= (ActiveText const&) = delete; + + std::list get_burnt (dcpomatic::DCPTimePeriod period, bool always_burn_captions) const; + void clear_before (dcpomatic::DCPTime time); void clear (); - void add_from (boost::weak_ptr content, PlayerText ps, DCPTime from); - std::pair add_to (boost::weak_ptr content, DCPTime to); - bool have (boost::weak_ptr content) const; + void add_from (std::weak_ptr content, PlayerText ps, dcpomatic::DCPTime from); + std::pair add_to (std::weak_ptr content, dcpomatic::DCPTime to); + bool have (std::weak_ptr content) const; private: class Period @@ -51,19 +54,17 @@ private: public: Period () {} - Period (PlayerText s, DCPTime f) + Period (PlayerText s, dcpomatic::DCPTime f) : subs (s) , from (f) {} PlayerText subs; - DCPTime from; - boost::optional to; + dcpomatic::DCPTime from; + boost::optional to; }; - typedef std::map, std::list > Map; - - void add (DCPTimePeriod period, std::list& pc, std::list p) const; + typedef std::map, std::list, std::owner_less>> Map; mutable boost::mutex _mutex; Map _data;