X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Factive_text.h;h=b54957b3ff270da744b6f6e29e4bb4a722f63277;hb=d5a23469a72d4ed995394e8da9768a23859dc43c;hp=90b6b533bfe761d6bc205d6bfc93effe202ee259;hpb=c4403784febdbdd42e9c32e67fadb147f11fe566;p=dcpomatic.git diff --git a/src/lib/active_text.h b/src/lib/active_text.h index 90b6b533b..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,15 +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: + 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, dcpomatic::DCPTime from); - std::pair add_to (boost::weak_ptr content, dcpomatic::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 @@ -60,7 +64,7 @@ private: boost::optional to; }; - typedef std::map, std::list > Map; + typedef std::map, std::list, std::owner_less>> Map; mutable boost::mutex _mutex; Map _data;