Clean up access to stuff from Film.
[dcpomatic.git] / src / lib / film.h
index 4c45c4ffc70efc1a22cbd1edf464c2c704c08112..c722518805855732bda05fcc06c94427997a6cdb 100644 (file)
@@ -239,7 +239,8 @@ public:
                UPLOAD_AFTER_MAKE_DCP,
                REENCODE_J2K,
                MARKERS,
-               RATINGS
+               RATINGS,
+               CONTENT_VERSION
        };
 
 
@@ -344,6 +345,10 @@ public:
                return _ratings;
        }
 
+       std::string content_version () const {
+               return _content_version;
+       }
+
        /* SET */
 
        void set_directory (boost::filesystem::path);
@@ -377,6 +382,7 @@ public:
        void set_marker (dcp::Marker type, dcpomatic::DCPTime time);
        void unset_marker (dcp::Marker type);
        void set_ratings (std::vector<dcp::Rating> r);
+       void set_content_version (std::string v);
 
        /** Emitted when some property has of the Film is about to change or has changed */
        mutable boost::signals2::signal<void (ChangeType, Property)> Change;
@@ -384,6 +390,11 @@ public:
        /** Emitted when some property of our content has changed */
        mutable boost::signals2::signal<void (ChangeType, boost::weak_ptr<Content>, int, bool)> ContentChange;
 
+       /** Emitted when the film's length might have changed; this is not like a normal
+           property as its value is derived from the playlist, so it has its own signal.
+       */
+       mutable boost::signals2::signal<void ()> LengthChange;
+
        /** Emitted when we have something important to tell the user */
        boost::signals2::signal<void (std::string)> Message;
 
@@ -403,6 +414,7 @@ private:
        void playlist_change (ChangeType);
        void playlist_order_changed ();
        void playlist_content_change (ChangeType type, boost::weak_ptr<Content>, int, bool frequent);
+       void playlist_length_change ();
        void maybe_add_content (boost::weak_ptr<Job>, boost::weak_ptr<Content>, bool disable_audio_analysis);
        void audio_analysis_finished ();
        void check_settings_consistency ();
@@ -461,6 +473,7 @@ private:
        bool _user_explicit_video_frame_rate;
        std::map<dcp::Marker, dcpomatic::DCPTime> _markers;
        std::vector<dcp::Rating> _ratings;
+       std::string _content_version;
 
        int _state_version;
 
@@ -479,6 +492,7 @@ private:
        boost::signals2::scoped_connection _playlist_change_connection;
        boost::signals2::scoped_connection _playlist_order_changed_connection;
        boost::signals2::scoped_connection _playlist_content_change_connection;
+       boost::signals2::scoped_connection _playlist_length_change_connection;
        std::list<boost::signals2::connection> _job_connections;
        std::list<boost::signals2::connection> _audio_analysis_connections;