diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-10-15 15:26:04 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-10-15 15:26:04 +0100 |
| commit | 45f9912aa850546e319e32a4052517d67f4e3d8f (patch) | |
| tree | f92b43f73e82cd09bf6a3bea29147aafa9c59d79 /src/lib/video_content.cc | |
| parent | 708dacb8247c73c02b6192464325738203ca001a (diff) | |
Allow no-stretch scaling of video content.
Diffstat (limited to 'src/lib/video_content.cc')
| -rw-r--r-- | src/lib/video_content.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/video_content.cc b/src/lib/video_content.cc index af0c3e12c..23ef2cf89 100644 --- a/src/lib/video_content.cc +++ b/src/lib/video_content.cc @@ -66,6 +66,7 @@ VideoContent::VideoContent (shared_ptr<const Film> f, boost::filesystem::path p) VideoContent::VideoContent (shared_ptr<const Film> f, shared_ptr<const cxml::Node> node) : Content (f, node) + , _ratio (0) { _video_length = node->number_child<VideoContent::Frame> ("VideoLength"); _video_size.width = node->number_child<int> ("VideoWidth"); @@ -139,7 +140,7 @@ VideoContent::information () const _("%1x%2 pixels (%3:1)"), video_size().width, video_size().height, - setprecision (3), float (video_size().width) / video_size().height + setprecision (3), video_size().ratio () ); return s.str (); @@ -281,3 +282,10 @@ VideoContent::set_colour_conversion (ColourConversion c) signal_changed (VideoContentProperty::COLOUR_CONVERSION); } + +/** @return Video size after 3D split and crop */ +libdcp::Size +VideoContent::video_size_after_crop () const +{ + return crop().apply (video_size_after_3d_split ()); +} |
