X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fvideo_content.h;h=9f6cc105ea42155fec19d9776ff016a368e96280;hb=37b29fdf9028e6848470a19d189697fc58278990;hp=c1e1dbeec5b05345f96730b56bd6871da6c4dead;hpb=3339d3bce70afe9ae2ca10e9fcfc4b54b748fbf4;p=dcpomatic.git diff --git a/src/lib/video_content.h b/src/lib/video_content.h index c1e1dbeec..9f6cc105e 100644 --- a/src/lib/video_content.h +++ b/src/lib/video_content.h @@ -25,9 +25,13 @@ #include "colour_conversion.h" #include "content_part.h" +#include "crop.h" #include "dcpomatic_time.h" -#include "types.h" +#include "pixel_quanta.h" #include "user_property.h" +#include "video_frame_type.h" +#include "video_range.h" +#include "types.h" #include #include @@ -45,7 +49,6 @@ public: static int const SIZE; static int const FRAME_TYPE; static int const CROP; - static int const SCALE; static int const COLOUR_CONVERSION; static int const FADE_IN; static int const FADE_OUT; @@ -60,7 +63,7 @@ class VideoContent : public ContentPart, public std::enable_shared_from_this>); void as_xml (xmlpp::Node *) const; @@ -89,6 +92,7 @@ public: void set_frame_type (VideoFrameType); + void set_crop (Crop crop); void set_left_crop (int); void set_right_crop (int); void set_top_crop (int); @@ -113,27 +117,29 @@ public: return _frame_type; } - Crop crop () const { + Crop actual_crop () const; + + Crop requested_crop () const { boost::mutex::scoped_lock lm (_mutex); return _crop; } - int left_crop () const { + int requested_left_crop () const { boost::mutex::scoped_lock lm (_mutex); return _crop.left; } - int right_crop () const { + int requested_right_crop () const { boost::mutex::scoped_lock lm (_mutex); return _crop.right; } - int top_crop () const { + int requested_top_crop () const { boost::mutex::scoped_lock lm (_mutex); return _crop.top; } - int bottom_crop () const { + int requested_bottom_crop () const { boost::mutex::scoped_lock lm (_mutex); return _crop.bottom; } @@ -181,6 +187,11 @@ public: return _range; } + PixelQuanta pixel_quanta () const { + boost::mutex::scoped_lock lm (_mutex); + return _pixel_quanta; + } + bool use () const { boost::mutex::scoped_lock lm (_mutex); return _use; @@ -203,13 +214,13 @@ public: void set_length (Frame); - void take_from_examiner (std::shared_ptr); + void take_from_examiner(std::shared_ptr film, std::shared_ptr); void add_properties (std::list &) const; void modify_position (std::shared_ptr film, dcpomatic::DCPTime& pos) const; void modify_trim_start (dcpomatic::ContentTime& pos) const; - static std::shared_ptr from_xml (Content* parent, cxml::ConstNodePtr, int); + static std::shared_ptr from_xml (Content* parent, cxml::ConstNodePtr node, int version, VideoRange video_range_hint); private: @@ -246,6 +257,7 @@ private: /** fade out time in content frames */ Frame _fade_out; VideoRange _range; + PixelQuanta _pixel_quanta; boost::optional _burnt_subtitle_language; };