projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Some improvements in progress reporting, especially for long jobs.
[dcpomatic.git]
/
src
/
lib
/
video_content.cc
diff --git
a/src/lib/video_content.cc
b/src/lib/video_content.cc
index af0c3e12c08022fed68969c97f817ada684f3cc4..3478368555b8139944144170b05ab67198134d4b 100644
(file)
--- 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)
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");
{
_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,
_("%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 ();
);
return s.str ();
@@
-226,7
+227,7
@@
string
VideoContent::identifier () const
{
stringstream s;
VideoContent::identifier () const
{
stringstream s;
- s << Content::
digest
()
+ s << Content::
identifier
()
<< "_" << crop().left
<< "_" << crop().right
<< "_" << crop().top
<< "_" << crop().left
<< "_" << crop().right
<< "_" << crop().top
@@
-281,3
+282,10
@@
VideoContent::set_colour_conversion (ColourConversion c)
signal_changed (VideoContentProperty::COLOUR_CONVERSION);
}
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 ());
+}