diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-09-29 10:17:50 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-10-03 17:53:41 +0200 |
| commit | 380cda69c5806cd38906ae3bd144e71aa17c38f5 (patch) | |
| tree | 56f1a2fc63011ef54b6ff55cb957679c9d008190 /test/shuffler_test.cc | |
| parent | f1263cd43ad761e63047baf7c674f5de04c0139c (diff) | |
Change how video timing is done.v2.17.0
This commit changes the approach with video timing. Previously,
we would (more-or-less) try to use every video frame from the content
in the output, hoping that they come at a constant frame rate.
This is not always the case, however. Here we preserve the PTS
of video frames, and then when one arrives we output whatever
DCP video frames we can (at the regular DCP frame rate).
Hopefully this will solve a range of sync problems, but it
could also introduce new ones.
Diffstat (limited to 'test/shuffler_test.cc')
| -rw-r--r-- | test/shuffler_test.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/shuffler_test.cc b/test/shuffler_test.cc index d1c5b8533..018730056 100644 --- a/test/shuffler_test.cc +++ b/test/shuffler_test.cc @@ -10,14 +10,15 @@ using boost::optional; #if BOOST_VERSION >= 106100 using namespace boost::placeholders; #endif +using namespace dcpomatic; static void -push (Shuffler& s, int frame, Eyes eyes) +push(Shuffler& s, int frame, Eyes eyes) { shared_ptr<Piece> piece (new Piece (shared_ptr<Content>(), shared_ptr<Decoder>(), FrameRateChange(24, 24))); ContentVideo cv; - cv.frame = frame; + cv.time = ContentTime::from_frames(frame, 24); cv.eyes = eyes; s.video (piece, cv); } @@ -33,8 +34,9 @@ receive (weak_ptr<Piece>, ContentVideo cv) static void check (int frame, Eyes eyes, int line) { + auto const time = ContentTime::from_frames(frame, 24); BOOST_REQUIRE_MESSAGE (!pending_cv.empty(), "Check at " << line << " failed."); - BOOST_CHECK_MESSAGE (pending_cv.front().frame == frame, "Check at " << line << " failed."); + BOOST_CHECK_MESSAGE (pending_cv.front().time == time, "Check at " << line << " failed."); BOOST_CHECK_MESSAGE (pending_cv.front().eyes == eyes, "Check at " << line << " failed."); pending_cv.pop_front(); } |
