X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fframe_rate_change.cc;h=31fce6b6d71182625ebc0a43bc4609d1e7f5ab8c;hb=91f71a29f894c382a7f92cf5fdcb75d9849e2aa7;hp=454938ada3d5043de1e983b28b40be7c2a057dd5;hpb=b60186064405914b41780021f74dd7830f2ffecb;p=dcpomatic.git diff --git a/src/lib/frame_rate_change.cc b/src/lib/frame_rate_change.cc index 454938ada..31fce6b6d 100644 --- a/src/lib/frame_rate_change.cc +++ b/src/lib/frame_rate_change.cc @@ -23,6 +23,8 @@ #include "i18n.h" +using std::string; + static bool about_equal (float a, float b) { @@ -73,7 +75,13 @@ FrameRateChange::FrameRateChange (float source_, int dcp_) 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 { @@ -90,4 +98,6 @@ FrameRateChange::FrameRateChange (float source_, int dcp_) description += String::compose (_("DCP will run at %1%% of the content speed.\n"), pc); } } + + return description; }