diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-05-16 23:46:51 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-05-18 11:50:29 +0100 |
| commit | d60b9d006fee94fab80ee86fe1149de7f2e76750 (patch) | |
| tree | e7821dc323ec6e3b53bf25266350e355c4de0fc0 /test | |
| parent | 3ce77bc8f0f047725f40a5f1725833fce5f8db63 (diff) | |
Remove Sndfile code and use FFmpeg instead.
Diffstat (limited to 'test')
| -rw-r--r-- | test/audio_analysis_test.cc | 6 | ||||
| -rw-r--r-- | test/audio_delay_test.cc | 6 | ||||
| -rw-r--r-- | test/audio_processor_test.cc | 4 | ||||
| -rw-r--r-- | test/ffmpeg_audio_test.cc | 4 | ||||
| -rw-r--r-- | test/isdcf_name_test.cc | 4 | ||||
| -rw-r--r-- | test/silence_padding_test.cc | 4 | ||||
| -rw-r--r-- | test/upmixer_a_test.cc | 4 | ||||
| -rw-r--r-- | test/wscript | 12 |
8 files changed, 23 insertions, 21 deletions
diff --git a/test/audio_analysis_test.cc b/test/audio_analysis_test.cc index 4069471db..ee40baf58 100644 --- a/test/audio_analysis_test.cc +++ b/test/audio_analysis_test.cc @@ -25,7 +25,7 @@ #include "lib/audio_analysis.h" #include "lib/analyse_audio_job.h" #include "lib/film.h" -#include "lib/sndfile_content.h" +#include "lib/ffmpeg_content.h" #include "lib/dcp_content_type.h" #include "lib/ffmpeg_content.h" #include "lib/ratio.h" @@ -96,7 +96,7 @@ BOOST_AUTO_TEST_CASE (audio_analysis_test) film->set_name ("audio_analysis_test"); boost::filesystem::path p = private_data / "betty_L.wav"; - shared_ptr<SndfileContent> c (new SndfileContent (film, p)); + shared_ptr<FFmpegContent> c (new FFmpegContent (film, p)); film->examine_and_add_content (c); wait_for_jobs (); @@ -157,7 +157,7 @@ BOOST_AUTO_TEST_CASE (audio_analysis_test3) film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TLR")); film->set_name ("frobozz"); - shared_ptr<SndfileContent> content (new SndfileContent (film, "test/data/white.wav")); + shared_ptr<FFmpegContent> content (new FFmpegContent (film, "test/data/white.wav")); film->examine_and_add_content (content); wait_for_jobs (); diff --git a/test/audio_delay_test.cc b/test/audio_delay_test.cc index f1b804830..a538da4ed 100644 --- a/test/audio_delay_test.cc +++ b/test/audio_delay_test.cc @@ -18,7 +18,7 @@ */ /** @file test/audio_delay_test.cc - * @brief Test encode using some SndfileContents which have audio delays. + * @brief Test encode using some FFmpegContents which have audio delays. * * The output is checked algorithmically using knowledge of the input. */ @@ -29,7 +29,7 @@ #include <dcp/reel.h> #include <dcp/sound_asset.h> #include <dcp/reel_sound_asset.h> -#include "lib/sndfile_content.h" +#include "lib/ffmpeg_content.h" #include "lib/dcp_content_type.h" #include "lib/ratio.h" #include "lib/film.h" @@ -53,7 +53,7 @@ void test_audio_delay (int delay_in_ms) film->set_container (Ratio::from_id ("185")); film->set_name (film_name); - shared_ptr<SndfileContent> content (new SndfileContent (film, "test/data/staircase.wav")); + shared_ptr<FFmpegContent> content (new FFmpegContent (film, "test/data/staircase.wav")); content->audio->set_delay (delay_in_ms); film->examine_and_add_content (content); wait_for_jobs (); diff --git a/test/audio_processor_test.cc b/test/audio_processor_test.cc index a668a7e09..652c3dc5f 100644 --- a/test/audio_processor_test.cc +++ b/test/audio_processor_test.cc @@ -21,7 +21,7 @@ #include "lib/analyse_audio_job.h" #include "lib/dcp_content_type.h" #include "lib/job_manager.h" -#include "lib/sndfile_content.h" +#include "lib/ffmpeg_content.h" #include "lib/film.h" #include "test.h" #include <boost/test/unit_test.hpp> @@ -33,7 +33,7 @@ BOOST_AUTO_TEST_CASE (audio_processor_test) { shared_ptr<Film> film = new_test_film ("audio_processor_test"); film->set_name ("audio_processor_test"); - shared_ptr<SndfileContent> c (new SndfileContent (film, "test/data/white.wav")); + shared_ptr<FFmpegContent> c (new FFmpegContent (film, "test/data/white.wav")); film->examine_and_add_content (c); wait_for_jobs (); diff --git a/test/ffmpeg_audio_test.cc b/test/ffmpeg_audio_test.cc index 4d6200d78..5fe5ea7c7 100644 --- a/test/ffmpeg_audio_test.cc +++ b/test/ffmpeg_audio_test.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net> + Copyright (C) 2013-2016 Carl Hetherington <cth@carlh.net> 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 @@ -28,7 +28,7 @@ #include <dcp/sound_frame.h> #include <dcp/reel_sound_asset.h> #include <dcp/reel.h> -#include "lib/sndfile_content.h" +#include "lib/ffmpeg_content.h" #include "lib/film.h" #include "lib/dcp_content_type.h" #include "lib/video_content.h" diff --git a/test/isdcf_name_test.cc b/test/isdcf_name_test.cc index bdd9c0313..3341cc862 100644 --- a/test/isdcf_name_test.cc +++ b/test/isdcf_name_test.cc @@ -22,9 +22,9 @@ #include "lib/ratio.h" #include "lib/dcp_content_type.h" #include "lib/image_content.h" -#include "lib/sndfile_content.h" #include "lib/video_content.h" #include "lib/audio_mapping.h" +#include "lib/ffmpeg_content.h" #include "lib/audio_content.h" #include "test.h" #include <iostream> @@ -127,7 +127,7 @@ BOOST_AUTO_TEST_CASE (isdcf_name_test) /* Test audio channel markup */ film->set_audio_channels (6); - shared_ptr<SndfileContent> sound (new SndfileContent (film, "test/data/sine_440.wav")); + shared_ptr<FFmpegContent> sound (new FFmpegContent (film, "test/data/sine_440.wav")); film->examine_and_add_content (sound); wait_for_jobs (); BOOST_CHECK_EQUAL (film->isdcf_name(false), "LikeShouting_XSN-2_F-133_DE-fr_US-R_10_4K_DI_20140704_PP_SMPTE_OV"); diff --git a/test/silence_padding_test.cc b/test/silence_padding_test.cc index 30f7e106e..b06852812 100644 --- a/test/silence_padding_test.cc +++ b/test/silence_padding_test.cc @@ -28,7 +28,7 @@ #include <dcp/sound_frame.h> #include <dcp/reel.h> #include <dcp/reel_sound_asset.h> -#include "lib/sndfile_content.h" +#include "lib/ffmpeg_content.h" #include "lib/film.h" #include "lib/dcp_content_type.h" #include "lib/ratio.h" @@ -47,7 +47,7 @@ test_silence_padding (int channels) film->set_container (Ratio::from_id ("185")); film->set_name (film_name); - shared_ptr<SndfileContent> content (new SndfileContent (film, "test/data/staircase.wav")); + shared_ptr<FFmpegContent> content (new FFmpegContent (film, "test/data/staircase.wav")); film->examine_and_add_content (content); wait_for_jobs (); diff --git a/test/upmixer_a_test.cc b/test/upmixer_a_test.cc index 5b7cff7d2..904fe797a 100644 --- a/test/upmixer_a_test.cc +++ b/test/upmixer_a_test.cc @@ -22,7 +22,7 @@ #include "lib/film.h" #include "lib/ratio.h" #include "lib/dcp_content_type.h" -#include "lib/sndfile_content.h" +#include "lib/ffmpeg_content.h" #include "lib/player.h" #include "lib/audio_buffers.h" #include "lib/upmixer_a.h" @@ -37,7 +37,7 @@ BOOST_AUTO_TEST_CASE (upmixer_a_test) film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TLR")); film->set_name ("frobozz"); film->set_audio_processor (AudioProcessor::from_id ("stereo-5.1-upmix-a")); - shared_ptr<SndfileContent> content (new SndfileContent (film, "test/data/white.wav")); + shared_ptr<FFmpegContent> content (new FFmpegContent (film, "test/data/white.wav")); film->examine_and_add_content (content); wait_for_jobs (); diff --git a/test/wscript b/test/wscript index a93eac661..1ddc25d70 100644 --- a/test/wscript +++ b/test/wscript @@ -21,11 +21,13 @@ def configure(conf): if conf.env.TARGET_WINDOWS: boost_test_suffix='-mt' - conf.check_cxx(fragment = """ - #define BOOST_TEST_MODULE Config test\n - #include <boost/test/unit_test.hpp>\n - int main() {} - """, msg = 'Checking for boost unit testing library', lib = 'boost_unit_test_framework%s' % boost_test_suffix, uselib_store = 'BOOST_TEST') + conf.check_cfg(package='sndfile', args='--cflags --libs', uselib_store='SNDFILE', mandatory=True) + + conf.check_cxx(fragment=""" + #define BOOST_TEST_MODULE Config test\n + #include <boost/test/unit_test.hpp>\n + int main() {} + """, msg = 'Checking for boost unit testing library', lib = 'boost_unit_test_framework%s' % boost_test_suffix, uselib_store = 'BOOST_TEST') def build(bld): obj = bld(features='cxx cxxprogram') |
