diff options
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/frame_rate_change.cc | 22 | ||||
| -rw-r--r-- | src/lib/frame_rate_change.h | 12 |
2 files changed, 17 insertions, 17 deletions
diff --git a/src/lib/frame_rate_change.cc b/src/lib/frame_rate_change.cc index 69296c970..363858688 100644 --- a/src/lib/frame_rate_change.cc +++ b/src/lib/frame_rate_change.cc @@ -31,13 +31,13 @@ using std::shared_ptr; using std::string; -FrameRateChange::FrameRateChange () +FrameRateChange::FrameRateChange() { } -FrameRateChange::FrameRateChange (double source_, int dcp_) +FrameRateChange::FrameRateChange(double source_, int dcp_) { source = source_; dcp = dcp_; @@ -52,35 +52,35 @@ FrameRateChange::FrameRateChange (double source_, int dcp_) if we repeated each frame once; it may be better still if we repeated more than once. Work out the required repeat. */ - repeat = round (dcp / source); + repeat = round(dcp / source); } speed_up = dcp / (source * factor()); auto about_equal = [](double a, double b) { - return (fabs (a - b) < VIDEO_FRAME_RATE_EPSILON); + return fabs(a - b) < VIDEO_FRAME_RATE_EPSILON; }; - change_speed = !about_equal (speed_up, 1.0); + change_speed = !about_equal(speed_up, 1.0); } -FrameRateChange::FrameRateChange (shared_ptr<const Film> film, shared_ptr<const Content> content) - : FrameRateChange (content->active_video_frame_rate(film), film->video_frame_rate()) +FrameRateChange::FrameRateChange(shared_ptr<const Film> film, shared_ptr<const Content> content) + : FrameRateChange(content->active_video_frame_rate(film), film->video_frame_rate()) { } -FrameRateChange::FrameRateChange (shared_ptr<const Film> film, Content const * content) - : FrameRateChange (content->active_video_frame_rate(film), film->video_frame_rate()) +FrameRateChange::FrameRateChange(shared_ptr<const Film> film, Content const * content) + : FrameRateChange(content->active_video_frame_rate(film), film->video_frame_rate()) { } string -FrameRateChange::description () const +FrameRateChange::description() const { string description; @@ -98,7 +98,7 @@ FrameRateChange::description () const if (change_speed) { double const pc = dcp * 100 / (source * factor()); char buffer[256]; - snprintf (buffer, sizeof(buffer), _("DCP will run at %.1f%% of the content speed.\n"), pc); + snprintf(buffer, sizeof(buffer), _("DCP will run at %.1f%% of the content speed.\n"), pc); description += buffer; } } diff --git a/src/lib/frame_rate_change.h b/src/lib/frame_rate_change.h index c28342e92..84c4c340d 100644 --- a/src/lib/frame_rate_change.h +++ b/src/lib/frame_rate_change.h @@ -34,15 +34,15 @@ class Content; class FrameRateChange { public: - FrameRateChange (); - FrameRateChange (double, int); - FrameRateChange (std::shared_ptr<const Film> film, std::shared_ptr<const Content> content); - FrameRateChange (std::shared_ptr<const Film> film, Content const * content); + FrameRateChange(); + FrameRateChange(double, int); + FrameRateChange(std::shared_ptr<const Film> film, std::shared_ptr<const Content> content); + FrameRateChange(std::shared_ptr<const Film> film, Content const * content); /** @return factor by which to multiply a source frame rate to get the effective rate after any skip or repeat has happened. */ - double factor () const { + double factor() const { if (skip) { return 0.5; } @@ -73,7 +73,7 @@ public: */ double speed_up = 1.0; - std::string description () const; + std::string description() const; }; |
