11b5bf6229b8713dffde89a777cd5181335136f6 from master; default colour conversions...
[dcpomatic.git] / src / lib / video_content.h
index e88fb022720d0c91e13d875b36ff6589c1eec0ce..ccc61b1f9eba3f15b7cc4521609642545874be45 100644 (file)
@@ -43,8 +43,6 @@ public:
 class VideoContent : public virtual Content
 {
 public:
-       typedef int Frame;
-
        VideoContent (boost::shared_ptr<const Film>);
        VideoContent (boost::shared_ptr<const Film>, DCPTime, ContentTime);
        VideoContent (boost::shared_ptr<const Film>, boost::filesystem::path);
@@ -53,9 +51,10 @@ public:
 
        void as_xml (xmlpp::Node *) const;
        std::string technical_summary () const;
-       virtual std::string information () const;
        virtual std::string identifier () const;
 
+       virtual void set_default_colour_conversion ();
+       
        ContentTime video_length () const {
                boost::mutex::scoped_lock lm (_mutex);
                return _video_length;
@@ -89,6 +88,7 @@ public:
        void set_bottom_crop (int);
 
        void set_scale (VideoContentScale);
+       void unset_colour_conversion (bool signal = true);
        void set_colour_conversion (ColourConversion);
 
        void set_fade_in (ContentTime);
@@ -130,11 +130,16 @@ public:
                return _scale;
        }
 
-       ColourConversion colour_conversion () const {
+       boost::optional<ColourConversion> colour_conversion () const {
                boost::mutex::scoped_lock lm (_mutex);
                return _colour_conversion;
        }
 
+       boost::optional<float> sample_aspect_ratio () const {
+               boost::mutex::scoped_lock lm (_mutex);
+               return _sample_aspect_ratio;
+       }
+
        ContentTime fade_in () const {
                boost::mutex::scoped_lock lm (_mutex);
                return _fade_in;
@@ -155,11 +160,14 @@ public:
        void scale_and_crop_to_fit_width ();
        void scale_and_crop_to_fit_height ();
 
+       std::string processing_description () const;
+
 protected:
        void take_from_video_examiner (boost::shared_ptr<VideoExaminer>);
 
        ContentTime _video_length;
        float _video_frame_rate;
+       boost::optional<ColourConversion> _colour_conversion;
 
 private:
        friend struct ffmpeg_pts_offset_test;
@@ -173,7 +181,10 @@ private:
        VideoFrameType _video_frame_type;
        Crop _crop;
        VideoContentScale _scale;
-       ColourConversion _colour_conversion;
+       /** Sample aspect ratio obtained from the content file's header,
+           if there is one.
+       */
+       boost::optional<float> _sample_aspect_ratio;
        ContentTime _fade_in;
        ContentTime _fade_out;
 };