New DCPTime/ContentTime types.
[dcpomatic.git] / test / play_test.cc
index 7beee6f43df86453e316e052a8fc3e83bb32a7c5..5ffc55a8ee8e3b7488044a1319b3da2137d20c8a 100644 (file)
@@ -50,7 +50,7 @@ public:
        {
                Video v;
                v.content = _player->_last_video;
-               v.image = i->image ();
+               v.image = i->image (PIX_FMT_RGB24, false);
                v.time = t;
                _queue.push_front (v);
        }
@@ -102,7 +102,7 @@ BOOST_AUTO_TEST_CASE (play_test)
 
        BOOST_CHECK_EQUAL (A->position(), 0);
        /* A is 16 frames long at 25 fps */
-       BOOST_CHECK_EQUAL (B->position(), 16 * TIME_HZ / 25);
+       BOOST_CHECK_EQUAL (B->position(), DCPTime::from_frames (16, 25));
 
        shared_ptr<Player> player = film->make_player ();
        PlayerWrapper wrap (player);
@@ -117,10 +117,10 @@ BOOST_AUTO_TEST_CASE (play_test)
                }
        }
 
-       player->seek (6 * TIME_HZ / 25, true);
+       player->seek (DCPTime::from_frames (6, 25), true);
        optional<Video> v = wrap.get_video ();
        BOOST_CHECK (v);
-       BOOST_CHECK_EQUAL (v.get().time, 6 * TIME_HZ / 25);
+       BOOST_CHECK_EQUAL (v.get().time, DCPTime::from_frames (6, 25));
 }
 
 #endif