X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fplaylist.h;h=dc984aacf077d64f78ea37520d9162cbfdbad9f8;hb=001ba1644fc6aa54f91fcaaa62ae7e5de2313bc1;hp=d9140bdfb6d87ead55318bf8ffbac1a6c81dd92e;hpb=254b3044d72de6b033d7c584f5abd2b9aa70aad5;p=dcpomatic.git diff --git a/src/lib/playlist.h b/src/lib/playlist.h index d9140bdfb..dc984aacf 100644 --- a/src/lib/playlist.h +++ b/src/lib/playlist.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2013-2016 Carl Hetherington + Copyright (C) 2013-2018 Carl Hetherington This file is part of DCP-o-matic. @@ -23,6 +23,7 @@ #include "util.h" #include "frame_rate_change.h" +#include "atomicity_checker.h" #include #include #include @@ -58,15 +59,15 @@ public: std::string video_identifier () const; - DCPTime length (boost::shared_ptr film) const; - boost::optional start () const; + dcpomatic::DCPTime length (boost::shared_ptr film) const; + boost::optional start () const; int64_t required_disk_space (boost::shared_ptr film, int j2k_bandwidth, int audio_channels, int audio_frame_rate) const; int best_video_frame_rate () const; - DCPTime video_end (boost::shared_ptr film) const; - DCPTime text_end (boost::shared_ptr film) const; - FrameRateChange active_frame_rate_change (DCPTime, int dcp_frame_rate) const; - std::string content_summary (boost::shared_ptr film, DCPTimePeriod period) const; + dcpomatic::DCPTime video_end (boost::shared_ptr film) const; + dcpomatic::DCPTime text_end (boost::shared_ptr film) const; + FrameRateChange active_frame_rate_change (dcpomatic::DCPTime, int dcp_frame_rate) const; + std::string content_summary (boost::shared_ptr film, dcpomatic::DCPTimePeriod period) const; std::pair speed_up_range (int dcp_video_frame_rate) const; void set_sequence (bool); @@ -76,7 +77,9 @@ public: /** Emitted when content has been added to or removed from the playlist; implies OrderChanged */ mutable boost::signals2::signal Change; - mutable boost::signals2::signal OrderChanged; + mutable boost::signals2::signal OrderChange; + /** Emitted when the length might have changed; may sometimes be emitted when it has not */ + mutable boost::signals2::signal LengthChange; mutable boost::signals2::signal, int, bool)> ContentChange; @@ -85,11 +88,13 @@ private: void disconnect (); void reconnect (boost::shared_ptr film); + mutable boost::mutex _mutex; /** List of content. Kept sorted in position order. */ ContentList _content; bool _sequence; bool _sequencing; std::list _content_connections; + AtomicityChecker _checker; }; #endif