Mostly-merge master.
[dcpomatic.git] / test / long_ffmpeg_seek_test.cc
index 5285d448181b6379451001d2a95787c64fcaaaf8..58b039eeea8d88437bd2297907c4c49522842490 100644 (file)
@@ -54,7 +54,7 @@ static string
 print_time (DCPTime t, float fps)
 {
        stringstream s;
-       s << t << " " << (float(t) / TIME_HZ) << "s " << (float(t) * fps / TIME_HZ) << "f";
+       s << t << " " << t.seconds() << "s " << t.frames(fps) << "f";
        return s.str ();
 }
 
@@ -88,7 +88,7 @@ BOOST_AUTO_TEST_CASE (long_ffmpeg_seek_test)
        film->set_name ("long_ffmpeg_audio_test");
        film->set_container (Ratio::from_id ("185"));
        shared_ptr<FFmpegContent> c (new FFmpegContent (film, "test/long_data/dolby_aurora.vob"));
-       c->set_ratio (Ratio::from_id ("185"));
+       c->set_scale (VideoContentScale (Ratio::from_id ("185")));
        film->examine_and_add_content (c);
 
        wait_for_jobs ();
@@ -98,7 +98,7 @@ BOOST_AUTO_TEST_CASE (long_ffmpeg_seek_test)
        player->Audio.connect (boost::bind (&process_audio, _1, _2));
 
        for (float i = 0; i < 10; i += 0.1) {
-               check (player, i * TIME_HZ);
+               check (player, DCPTime::from_seconds (i));
        }
 }