diff options
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/util.cc | 15 | ||||
| -rw-r--r-- | src/lib/util.h | 4 |
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); |
