Express trims using ContentTime so that they do not change
[dcpomatic.git] / src / lib / content.h
index 4b6153a9d17929c555ccfe750c9fe04883428d67..b7f7987ef4fa0d79783df8a56d869f52fedfabf8 100644 (file)
@@ -69,21 +69,23 @@ public:
         *  @param job Job to use to report progress, or 0.
         */
        virtual void examine (boost::shared_ptr<Job> job);
-       
+
        /** @return Quick one-line summary of the content, as will be presented in the
         *  film editor.
         */
        virtual std::string summary () const = 0;
-       
+
        /** @return Technical details of this content; these are written to logs to
         *  help with debugging.
         */
        virtual std::string technical_summary () const;
-       
+
        virtual void as_xml (xmlpp::Node *) const;
        virtual DCPTime full_length () const = 0;
        virtual std::string identifier () const;
 
+       std::list<std::pair<std::string, std::string> > properties () const;
+
        boost::shared_ptr<Content> clone () const;
 
        void set_path (boost::filesystem::path);
@@ -104,7 +106,7 @@ public:
                boost::mutex::scoped_lock lm (_mutex);
                return _paths[i];
        }
-       
+
        bool paths_valid () const;
 
        /** @return Digest of the content's file(s).  Note: this is
@@ -126,16 +128,16 @@ public:
                return _position;
        }
 
-       void set_trim_start (DCPTime);
+       void set_trim_start (ContentTime);
 
-       DCPTime trim_start () const {
+       ContentTime trim_start () const {
                boost::mutex::scoped_lock lm (_mutex);
                return _trim_start;
        }
 
-       void set_trim_end (DCPTime);
-       
-       DCPTime trim_end () const {
+       void set_trim_end (ContentTime);
+
+       ContentTime trim_end () const {
                boost::mutex::scoped_lock lm (_mutex);
                return _trim_end;
        }
@@ -146,7 +148,7 @@ public:
        }
 
        DCPTime length_after_trim () const;
-       
+
        void set_change_signals_frequent (bool f) {
                _change_signals_frequent = f;
        }
@@ -159,6 +161,7 @@ public:
 
 protected:
        void signal_changed (int);
+       virtual void add_properties (std::list<std::pair<std::string, std::string> > &) const {}
 
        boost::weak_ptr<const Film> _film;
 
@@ -169,12 +172,12 @@ protected:
 
        /** Paths of our data files */
        std::vector<boost::filesystem::path> _paths;
-       
+
 private:
        std::string _digest;
        DCPTime _position;
-       DCPTime _trim_start;
-       DCPTime _trim_end;
+       ContentTime _trim_start;
+       ContentTime _trim_end;
        bool _change_signals_frequent;
 };