projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge master.
[dcpomatic.git]
/
src
/
lib
/
frame_rate_change.cc
diff --git
a/src/lib/frame_rate_change.cc
b/src/lib/frame_rate_change.cc
index 3e9c4b50528c4bf0fb3e4fe2fc786015d32c4a43..31fce6b6d71182625ebc0a43bc4609d1e7f5ab8c 100644
(file)
--- a/
src/lib/frame_rate_change.cc
+++ b/
src/lib/frame_rate_change.cc
@@
-23,6
+23,8
@@
#include "i18n.h"
#include "i18n.h"
+using std::string;
+
static bool
about_equal (float a, float b)
{
static bool
about_equal (float a, float b)
{
@@
-51,8
+53,10
@@
about_equal (float a, float b)
}
}
-FrameRateChange::FrameRateChange (float source, int dcp)
- : skip (false)
+FrameRateChange::FrameRateChange (float source_, int dcp_)
+ : source (source_)
+ , dcp (dcp_)
+ , skip (false)
, repeat (1)
, change_speed (false)
{
, repeat (1)
, change_speed (false)
{
@@
-71,7
+75,13
@@
FrameRateChange::FrameRateChange (float source, int dcp)
speed_up = dcp / (source * factor());
change_speed = !about_equal (speed_up, 1.0);
speed_up = dcp / (source * factor());
change_speed = !about_equal (speed_up, 1.0);
+}
+string
+FrameRateChange::description () const
+{
+ string description;
+
if (!skip && repeat == 1 && !change_speed) {
description = _("Content and DCP have the same rate.\n");
} else {
if (!skip && repeat == 1 && !change_speed) {
description = _("Content and DCP have the same rate.\n");
} else {
@@
-88,4
+98,6
@@
FrameRateChange::FrameRateChange (float source, int dcp)
description += String::compose (_("DCP will run at %1%% of the content speed.\n"), pc);
}
}
description += String::compose (_("DCP will run at %1%% of the content speed.\n"), pc);
}
}
+
+ return description;
}
}