X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=test%2Fplay_test.cc;h=54fe2699f7fd47b19ad9ac666a70857e309d4567;hb=f58d9e44302151dea9f594acd9fc27a331fa77fb;hp=c1dabe620b503024b626a5625261d3d8b286d7f5;hpb=bc5c75faaf37f8a3fd4132922c1a496ddb263f36;p=dcpomatic.git diff --git a/test/play_test.cc b/test/play_test.cc index c1dabe620..54fe2699f 100644 --- a/test/play_test.cc +++ b/test/play_test.cc @@ -34,7 +34,7 @@ struct Video { boost::shared_ptr content; boost::shared_ptr image; - Time time; + DCPTime time; }; class PlayerWrapper @@ -43,14 +43,14 @@ public: PlayerWrapper (shared_ptr p) : _player (p) { - _player->Video.connect (bind (&PlayerWrapper::process_video, this, _1, _2, _4)); + _player->Video.connect (bind (&PlayerWrapper::process_video, this, _1, _2, _5)); } - void process_video (shared_ptr i, bool, Time t) + void process_video (shared_ptr i, bool, DCPTime t) { Video v; v.content = _player->_last_video; - v.image = i; + v.image = i->image (PIX_FMT_RGB24, false); v.time = t; _queue.push_front (v); } @@ -67,7 +67,7 @@ public: return v; } - void seek (Time t, bool ac) + void seek (DCPTime t, bool ac) { _player->seek (t, ac); _queue.clear (); @@ -98,16 +98,14 @@ BOOST_AUTO_TEST_CASE (play_test) BOOST_CHECK_EQUAL (B->video_length(), 16); /* Film should have been set to 25fps */ - BOOST_CHECK_EQUAL (film->dcp_video_frame_rate(), 25); + BOOST_CHECK_EQUAL (film->video_frame_rate(), 25); - BOOST_CHECK_EQUAL (A->start(), 0); + BOOST_CHECK_EQUAL (A->position(), 0); /* A is 16 frames long at 25 fps */ - BOOST_CHECK_EQUAL (B->start(), 16 * TIME_HZ / 25); + BOOST_CHECK_EQUAL (B->position(), 16 * TIME_HZ / 25); shared_ptr player = film->make_player (); PlayerWrapper wrap (player); - /* Seek and audio don't get on at the moment */ - player->disable_audio (); for (int i = 0; i < 32; ++i) { optional