X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=test%2Fffmpeg_decoder_seek_test.cc;h=c81b7389c418dcc95a932445a23a849177a9530a;hb=e60bb3e51bd1508b149e6b8f6608f09b5196ae26;hp=968c3bdf910eb0265441739ae4b07a7783cfb172;hpb=d2137ac5db409e686b4d9b3fa567935a5e416d41;p=dcpomatic.git diff --git a/test/ffmpeg_decoder_seek_test.cc b/test/ffmpeg_decoder_seek_test.cc index 968c3bdf9..c81b7389c 100644 --- a/test/ffmpeg_decoder_seek_test.cc +++ b/test/ffmpeg_decoder_seek_test.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2014 Carl Hetherington + Copyright (C) 2014-2015 Carl Hetherington This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -41,10 +41,10 @@ using boost::shared_ptr; using boost::optional; static void -check (FFmpegDecoder& decoder, int frame) +check (shared_ptr decoder, int frame) { list v; - v = decoder.get_video (frame, true); + v = decoder->get_video (frame, true); BOOST_CHECK (v.size() == 1); BOOST_CHECK_EQUAL (v.front().frame, frame); } @@ -59,11 +59,11 @@ test (boost::filesystem::path file, vector frames) } shared_ptr film = new_test_film ("ffmpeg_decoder_seek_test_" + file.string()); - shared_ptr content (new FFmpegContent (film, path)); + shared_ptr content (new FFmpegContent (film, path)); film->examine_and_add_content (content); wait_for_jobs (); shared_ptr log (new NullLog); - FFmpegDecoder decoder (content, log); + shared_ptr decoder (new FFmpegDecoder (content, log)); for (vector::const_iterator i = frames.begin(); i != frames.end(); ++i) { check (decoder, *i); @@ -73,7 +73,7 @@ test (boost::filesystem::path file, vector frames) BOOST_AUTO_TEST_CASE (ffmpeg_decoder_seek_test) { vector frames; - + frames.clear (); frames.push_back (0); frames.push_back (42); @@ -82,13 +82,13 @@ BOOST_AUTO_TEST_CASE (ffmpeg_decoder_seek_test) test ("boon_telly.mkv", frames); test ("Sintel_Trailer1.480p.DivX_Plus_HD.mkv", frames); - + frames.clear (); frames.push_back (15); frames.push_back (42); frames.push_back (999); frames.push_back (15); - + test ("prophet_clip.mkv", frames); }