X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fframe_interval_checker.cc;h=e40958a427bd866006684e571d5e98af6a8cb606;hb=182b9d2e2feb6545592868606aaf0f0146095481;hp=27c0224ec80d0e50ace7996a0dafd3b90843348a;hpb=1679c3dc40262733f46dda9f4151367bf93f2b76;p=dcpomatic.git diff --git a/src/lib/frame_interval_checker.cc b/src/lib/frame_interval_checker.cc index 27c0224ec..e40958a42 100644 --- a/src/lib/frame_interval_checker.cc +++ b/src/lib/frame_interval_checker.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2020 Carl Hetherington + Copyright (C) 2020-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -18,12 +18,16 @@ */ + #include "frame_interval_checker.h" + using namespace dcpomatic; + int const FrameIntervalChecker::_frames = 16; + void FrameIntervalChecker::feed (ContentTime time, double frame_rate) { @@ -39,6 +43,7 @@ FrameIntervalChecker::feed (ContentTime time, double frame_rate) _last = time; } + FrameIntervalChecker::Guess FrameIntervalChecker::guess () const { @@ -46,7 +51,7 @@ FrameIntervalChecker::guess () const /* How soon can you land? * I can't tell. * You can tell me, I'm a doctor. - * Nom I mean I'm just not sure. + * No I mean I'm just not sure. * Can't you take a guess? * Well, not for another two hours. * You can't take a guess for another two hours? @@ -55,7 +60,7 @@ FrameIntervalChecker::guess () const } int near_1 = 0; - BOOST_FOREACH (double i, _intervals) { + for (auto i: _intervals) { if (i > 0.5) { ++near_1; }