summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-03-02 18:22:01 +0000
committerCarl Hetherington <cth@carlh.net>2013-03-02 18:22:01 +0000
commit53eb16342d492236aca77e4b73c0911a5d5eec9f (patch)
treeff0acccf003299600a42d7c803673b6e07e164dc /src/lib
parent324278cc8459e4d7d907b03e0748cf1b33f294f4 (diff)
Add explanation of the effect of changing frame rate.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/util.cc15
-rw-r--r--src/lib/util.h4
2 files changed, 18 insertions, 1 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc
index 85a04ed17..d1450ccc2 100644
--- a/src/lib/util.cc
+++ b/src/lib/util.cc
@@ -960,4 +960,19 @@ FrameRateConversion::FrameRateConversion (float source, int dcp)
}
change_speed = !about_equal (source * factor(), dcp);
+
+ if (!skip && !repeat && !change_speed) {
+ explanation = _("DCP and source have the same rate.\n");
+ } else {
+ if (skip) {
+ explanation = _("DCP will use every other frame of the source.\n");
+ } else if (repeat) {
+ explanation = _("Each source frame will be doubled in the DCP.\n");
+ }
+
+ if (change_speed) {
+ float const pc = (source * factor()) * 100 / dcp;
+ explanation += String::compose (_("DCP will run at %1%% of the source speed."), pc);
+ }
+ }
}
diff --git a/src/lib/util.h b/src/lib/util.h
index 103907151..b0f405890 100644
--- a/src/lib/util.h
+++ b/src/lib/util.h
@@ -78,7 +78,7 @@ struct FrameRateConversion
return 1;
}
-
+
/** true to skip every other frame */
bool skip;
/** true to repeat every frame once */
@@ -93,6 +93,8 @@ struct FrameRateConversion
* source is 12.50fps, DCP is 25fps)
*/
bool change_speed;
+
+ std::string explanation;
};
int best_dcp_frame_rate (float);