diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-01-09 16:29:21 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-01-09 16:29:21 +0100 |
| commit | 92b7d1cffbd0d457f8b4b23cc72937bcf8e5ed5e (patch) | |
| tree | b175db682422765468991702e8563bcd89713b70 /src/lib/video_content.cc | |
| parent | 7392cb8383c9b857edad5f99eaf917ed70da237d (diff) | |
Tidying.
Diffstat (limited to 'src/lib/video_content.cc')
| -rw-r--r-- | src/lib/video_content.cc | 57 |
1 files changed, 41 insertions, 16 deletions
diff --git a/src/lib/video_content.cc b/src/lib/video_content.cc index c6574fce3..27eb04fe0 100644 --- a/src/lib/video_content.cc +++ b/src/lib/video_content.cc @@ -18,19 +18,20 @@ */ -#include "video_content.h" -#include "content.h" -#include "video_examiner.h" + +#include "colour_conversion.h" #include "compose.hpp" -#include "ratio.h" #include "config.h" -#include "colour_conversion.h" -#include "util.h" -#include "film.h" +#include "content.h" +#include "dcpomatic_log.h" #include "exceptions.h" +#include "film.h" #include "frame_rate_change.h" #include "log.h" -#include "dcpomatic_log.h" +#include "ratio.h" +#include "util.h" +#include "video_content.h" +#include "video_examiner.h" #include <dcp/raw_convert.h> #include <libcxml/cxml.h> #include <libxml++/libxml++.h> @@ -39,6 +40,7 @@ #include "i18n.h" + int const VideoContentProperty::USE = 0; int const VideoContentProperty::SIZE = 1; int const VideoContentProperty::FRAME_TYPE = 2; @@ -51,23 +53,25 @@ int const VideoContentProperty::CUSTOM_RATIO = 8; int const VideoContentProperty::CUSTOM_SIZE = 9; int const VideoContentProperty::BURNT_SUBTITLE_LANGUAGE = 10; -using std::string; -using std::setprecision; + using std::cout; -using std::vector; -using std::min; -using std::max; +using std::dynamic_pointer_cast; using std::fixed; -using std::setprecision; using std::list; +using std::make_shared; +using std::max; +using std::min; using std::pair; +using std::setprecision; +using std::setprecision; using std::shared_ptr; -using std::make_shared; +using std::string; +using std::vector; using boost::optional; -using std::dynamic_pointer_cast; using dcp::raw_convert; using namespace dcpomatic; + VideoContent::VideoContent (Content* parent) : ContentPart (parent) , _use (true) @@ -81,6 +85,7 @@ VideoContent::VideoContent (Content* parent) } + shared_ptr<VideoContent> VideoContent::from_xml (Content* parent, cxml::ConstNodePtr node, int version) { @@ -91,6 +96,7 @@ VideoContent::from_xml (Content* parent, cxml::ConstNodePtr node, int version) return make_shared<VideoContent>(parent, node, version); } + VideoContent::VideoContent (Content* parent, cxml::ConstNodePtr node, int version) : ContentPart (parent) { @@ -297,6 +303,7 @@ VideoContent::as_xml (xmlpp::Node* node) const } } + void VideoContent::take_from_examiner (shared_ptr<VideoExaminer> d) { @@ -329,6 +336,7 @@ VideoContent::take_from_examiner (shared_ptr<VideoExaminer> d) } } + /** @return string which includes everything about how this content looks */ string VideoContent::identifier () const @@ -359,6 +367,7 @@ VideoContent::identifier () const return s; } + string VideoContent::technical_summary () const { @@ -376,6 +385,7 @@ VideoContent::technical_summary () const return s; } + dcp::Size VideoContent::size_after_3d_split () const { @@ -396,6 +406,7 @@ VideoContent::size_after_3d_split () const DCPOMATIC_ASSERT (false); } + /** @return Video size after 3D split and crop */ dcp::Size VideoContent::size_after_crop () const @@ -427,6 +438,7 @@ VideoContent::fade (shared_ptr<const Film> film, Frame f) const return optional<double> (); } + string VideoContent::processing_description (shared_ptr<const Film> film) { @@ -503,6 +515,7 @@ VideoContent::processing_description (shared_ptr<const Film> film) return d; } + void VideoContent::add_properties (list<UserProperty>& p) const { @@ -510,30 +523,35 @@ VideoContent::add_properties (list<UserProperty>& p) const p.push_back (UserProperty (UserProperty::VIDEO, _("Size"), String::compose ("%1x%2", size().width, size().height))); } + void VideoContent::set_length (Frame len) { maybe_set (_length, len, ContentProperty::LENGTH); } + void VideoContent::set_left_crop (int c) { maybe_set (_crop.left, c, VideoContentProperty::CROP); } + void VideoContent::set_right_crop (int c) { maybe_set (_crop.right, c, VideoContentProperty::CROP); } + void VideoContent::set_top_crop (int c) { maybe_set (_crop.top, c, VideoContentProperty::CROP); } + void VideoContent::set_bottom_crop (int c) { @@ -547,36 +565,42 @@ VideoContent::set_frame_type (VideoFrameType t) maybe_set (_frame_type, t, VideoContentProperty::FRAME_TYPE); } + void VideoContent::unset_colour_conversion () { maybe_set (_colour_conversion, boost::optional<ColourConversion> (), VideoContentProperty::COLOUR_CONVERSION); } + void VideoContent::set_colour_conversion (ColourConversion c) { maybe_set (_colour_conversion, c, VideoContentProperty::COLOUR_CONVERSION); } + void VideoContent::set_fade_in (Frame t) { maybe_set (_fade_in, t, VideoContentProperty::FADE_IN); } + void VideoContent::set_fade_out (Frame t) { maybe_set (_fade_out, t, VideoContentProperty::FADE_OUT); } + void VideoContent::set_range (VideoRange r) { maybe_set (_range, r, VideoContentProperty::RANGE); } + void VideoContent::set_use (bool u) { @@ -619,6 +643,7 @@ VideoContent::modify_position (shared_ptr<const Film> film, DCPTime& pos) const pos = pos.round (film->video_frame_rate()); } + void VideoContent::modify_trim_start (ContentTime& trim) const { |
