std::shared_ptr
[dcpomatic.git] / test / ffmpeg_audio_only_test.cc
index e3c90cba984e25700189ead6752899142662eeaa..020c2cc13aa7e292c2ad7de1b01174329ab417aa 100644 (file)
@@ -20,7 +20,7 @@
 
 /** @file  test/ffmpeg_audio_only_test.cc
  *  @brief Test FFmpeg content with audio but no video.
- *  @ingroup specific
+ *  @ingroup feature
  */
 
 #include "lib/film.h"
 #include <iostream>
 
 using std::min;
-using boost::shared_ptr;
+#if BOOST_VERSION >= 106100
+using namespace boost::placeholders;
+#endif
+using std::shared_ptr;
 
 static SNDFILE* ref = 0;
 static int ref_buffer_size = 0;
 static float* ref_buffer = 0;
 
 static void
-audio (boost::shared_ptr<AudioBuffers> audio, int channels)
+audio (std::shared_ptr<AudioBuffers> audio, int channels)
 {
        /* Check that we have a big enough buffer */
        BOOST_CHECK (audio->frames() * audio->channels() < ref_buffer_size);
@@ -72,14 +75,14 @@ test (boost::filesystem::path file)
        shared_ptr<Film> film = new_test_film ("ffmpeg_audio_only_test");
        film->set_name ("test_film");
        film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST"));
-       shared_ptr<FFmpegContent> c (new FFmpegContent (film, file));
+       shared_ptr<FFmpegContent> c (new FFmpegContent(file));
        film->examine_and_add_content (c);
-       wait_for_jobs ();
+       BOOST_REQUIRE (!wait_for_jobs());
        film->write_metadata ();
 
        /* See if can make a DCP without any errors */
        film->make_dcp ();
-       wait_for_jobs ();
+       BOOST_REQUIRE (!wait_for_jobs());
        BOOST_CHECK (!JobManager::instance()->errors());
 
        /* Compare the audio data player reads with what libsndfile reads */
@@ -92,7 +95,7 @@ test (boost::filesystem::path file)
        ref_buffer_size = info.samplerate * info.channels;
        ref_buffer = new float[ref_buffer_size];
 
-       shared_ptr<Player> player (new Player (film, film->playlist ()));
+       shared_ptr<Player> player (new Player(film));
 
        player->Audio.connect (bind (&audio, _1, info.channels));
        while (!player->pass ()) {}