X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Factive_text.h;h=90b6b533bfe761d6bc205d6bfc93effe202ee259;hb=f06c5136e7d3cd0a8e1814763c7774859998efe4;hp=09ef1cdaf80460df48a1280a7d7eb3ad4467c22d;hpb=0ab83642f0c96ae2681beae04873b3226338a570;p=dcpomatic.git diff --git a/src/lib/active_text.h b/src/lib/active_text.h index 09ef1cdaf..90b6b533b 100644 --- a/src/lib/active_text.h +++ b/src/lib/active_text.h @@ -18,17 +18,18 @@ */ -/** @file src/lib/active_text.h +/** @file src/lib/active_captions.h * @brief ActiveText class. */ #include "dcpomatic_time.h" #include "player_text.h" #include +#include #include #include -class Piece; +class TextContent; /** @class ActiveText * @brief A class to maintain information on active subtitles for Player. @@ -36,12 +37,12 @@ class Piece; class ActiveText : public boost::noncopyable { public: - std::list get_burnt (DCPTimePeriod period, bool always_burn_subtitles) const; - void clear_before (DCPTime time); + 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 piece, PlayerText ps, DCPTime from); - std::pair add_to (boost::weak_ptr piece, DCPTime to); - bool have (boost::weak_ptr piece) const; + 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; private: class Period @@ -49,17 +50,18 @@ 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; + typedef std::map, std::list > Map; + mutable boost::mutex _mutex; Map _data; };