From d60b9d006fee94fab80ee86fe1149de7f2e76750 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 16 May 2016 23:46:51 +0100 Subject: [PATCH] Remove Sndfile code and use FFmpeg instead. --- src/lib/content_factory.cc | 27 +++++++-- src/lib/ffmpeg_audio_stream.h | 5 ++ src/lib/player.cc | 32 +---------- src/lib/playlist.cc | 2 - src/lib/sndfile_base.cc | 54 ------------------ src/lib/sndfile_base.h | 40 ------------- src/lib/sndfile_content.h | 48 ---------------- src/lib/sndfile_decoder.cc | 103 ---------------------------------- src/lib/sndfile_decoder.h | 38 ------------- src/lib/sndfile_examiner.cc | 46 --------------- src/lib/sndfile_examiner.h | 31 ---------- src/lib/wscript | 6 +- test/audio_analysis_test.cc | 6 +- test/audio_delay_test.cc | 6 +- test/audio_processor_test.cc | 4 +- test/ffmpeg_audio_test.cc | 4 +- test/isdcf_name_test.cc | 4 +- test/silence_padding_test.cc | 4 +- test/upmixer_a_test.cc | 4 +- test/wscript | 12 ++-- wscript | 3 - 21 files changed, 53 insertions(+), 426 deletions(-) delete mode 100644 src/lib/sndfile_base.cc delete mode 100644 src/lib/sndfile_base.h delete mode 100644 src/lib/sndfile_content.h delete mode 100644 src/lib/sndfile_decoder.cc delete mode 100644 src/lib/sndfile_decoder.h delete mode 100644 src/lib/sndfile_examiner.cc delete mode 100644 src/lib/sndfile_examiner.h diff --git a/src/lib/content_factory.cc b/src/lib/content_factory.cc index c3278e30e..e21a4c0d0 100644 --- a/src/lib/content_factory.cc +++ b/src/lib/content_factory.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2013-2014 Carl Hetherington + Copyright (C) 2013-2016 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 @@ -22,12 +22,13 @@ */ #include "ffmpeg_content.h" +#include "audio_content.h" #include "image_content.h" -#include "sndfile_content.h" #include "text_subtitle_content.h" #include "dcp_content.h" #include "dcp_subtitle_content.h" #include "util.h" +#include "ffmpeg_audio_stream.h" #include "film.h" #include "log_entry.h" #include "log.h" @@ -57,11 +58,29 @@ content_factory (shared_ptr film, cxml::NodePtr node, int version, l boost::shared_ptr content; if (type == "FFmpeg") { + /* SndfileContent is now handled by the FFmpeg code rather than by + separate libsndfile-based code. + */ content.reset (new FFmpegContent (film, node, version, notes)); } else if (type == "Image") { content.reset (new ImageContent (film, node, version)); } else if (type == "Sndfile") { - content.reset (new SndfileContent (film, node, version)); + /* SndfileContent is now handled by the FFmpeg code rather than by + separate libsndfile-based code. + */ + content.reset (new FFmpegContent (film, node, version, notes)); + + content->audio->set_stream ( + AudioStreamPtr ( + new FFmpegAudioStream ( + "Stream", 0, + node->number_child ("AudioFrameRate"), + node->number_child ("AudioLength"), + AudioMapping (node->node_child ("AudioMapping"), version) + ) + ) + ); + } else if (type == "SubRip" || type == "TextSubtitle") { content.reset (new TextSubtitleContent (film, node, version)); } else if (type == "DCP") { @@ -137,8 +156,6 @@ content_factory (shared_ptr film, boost::filesystem::path path) if (valid_image_file (path)) { content.reset (new ImageContent (film, path)); - } else if (SndfileContent::valid_file (path)) { - content.reset (new SndfileContent (film, path)); } else if (ext == ".srt" || ext == ".ssa") { content.reset (new TextSubtitleContent (film, path)); } else if (ext == ".xml") { diff --git a/src/lib/ffmpeg_audio_stream.h b/src/lib/ffmpeg_audio_stream.h index 8de43c632..984d8ccad 100644 --- a/src/lib/ffmpeg_audio_stream.h +++ b/src/lib/ffmpeg_audio_stream.h @@ -31,6 +31,11 @@ public: , AudioStream (frame_rate, length, channels) {} + FFmpegAudioStream (std::string name, int id, int frame_rate, Frame length, AudioMapping mapping) + : FFmpegStream (name, id) + , AudioStream (frame_rate, length, mapping) + {} + FFmpegAudioStream (cxml::ConstNodePtr, int); void as_xml (xmlpp::Node *) const; diff --git a/src/lib/player.cc b/src/lib/player.cc index 801e145af..cd841d1ce 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -21,13 +21,13 @@ #include "film.h" #include "ffmpeg_decoder.h" #include "video_decoder.h" +#include "audio_decoder.h" #include "audio_buffers.h" #include "audio_content.h" #include "ffmpeg_content.h" #include "image_decoder.h" +#include "content_audio.h" #include "image_content.h" -#include "sndfile_decoder.h" -#include "sndfile_content.h" #include "subtitle_content.h" #include "text_subtitle_decoder.h" #include "text_subtitle_content.h" @@ -160,34 +160,6 @@ Player::setup_pieces () frc = FrameRateChange (ic->active_video_frame_rate(), _film->video_frame_rate()); } - /* SndfileContent */ - shared_ptr sc = dynamic_pointer_cast (i); - if (sc) { - decoder.reset (new SndfileDecoder (sc, _fast, _film->log())); - - /* Work out a FrameRateChange for the best overlap video for this content */ - DCPTime best_overlap_t; - shared_ptr best_overlap; - BOOST_FOREACH (shared_ptr j, _playlist->content ()) { - if (!j->video) { - continue; - } - - DCPTime const overlap = min (j->end(), i->end()) - max (j->position(), i->position()); - if (overlap > best_overlap_t) { - best_overlap = j; - best_overlap_t = overlap; - } - } - - if (best_overlap) { - frc = FrameRateChange (best_overlap->active_video_frame_rate(), _film->video_frame_rate ()); - } else { - /* No video overlap; e.g. if the DCP is just audio */ - frc = FrameRateChange (_film->video_frame_rate(), _film->video_frame_rate ()); - } - } - /* It's questionable whether subtitle content should have a video frame rate; perhaps it should be assumed that any subtitle content has been prepared at the same rate as simultaneous video content (like we do with audio). diff --git a/src/lib/playlist.cc b/src/lib/playlist.cc index bd6abc31d..41ce862b5 100644 --- a/src/lib/playlist.cc +++ b/src/lib/playlist.cc @@ -18,8 +18,6 @@ */ #include "playlist.h" -#include "sndfile_content.h" -#include "sndfile_decoder.h" #include "video_content.h" #include "subtitle_content.h" #include "ffmpeg_decoder.h" diff --git a/src/lib/sndfile_base.cc b/src/lib/sndfile_base.cc deleted file mode 100644 index 712df7bda..000000000 --- a/src/lib/sndfile_base.cc +++ /dev/null @@ -1,54 +0,0 @@ -/* - Copyright (C) 2012-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 - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifdef DCPOMATIC_WINDOWS -#include -#define ENABLE_SNDFILE_WINDOWS_PROTOTYPES 1 -#endif -#include - -#include "sndfile_base.h" -#include "sndfile_content.h" -#include "exceptions.h" - -#include "i18n.h" - -using boost::shared_ptr; - -Sndfile::Sndfile (shared_ptr c) - : _sndfile_content (c) -{ - _info.format = 0; - - /* Here be monsters. See fopen_boost for similar shenanigans */ -#ifdef DCPOMATIC_WINDOWS - _sndfile = sf_wchar_open (_sndfile_content->path(0).c_str(), SFM_READ, &_info); -#else - _sndfile = sf_open (_sndfile_content->path(0).string().c_str(), SFM_READ, &_info); -#endif - - if (!_sndfile) { - throw DecodeError (_("could not open audio file for reading")); - } -} - -Sndfile::~Sndfile () -{ - sf_close (_sndfile); -} diff --git a/src/lib/sndfile_base.h b/src/lib/sndfile_base.h deleted file mode 100644 index 4b7a50fc7..000000000 --- a/src/lib/sndfile_base.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - Copyright (C) 2012-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 - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef DCPOMATIC_SNDFILE_BASE_H -#define DCPOMATIC_SNDFILE_BASE_H - -#include -#include - -class SndfileContent; - -class Sndfile -{ -public: - Sndfile (boost::shared_ptr content); - virtual ~Sndfile (); - -protected: - boost::shared_ptr _sndfile_content; - SNDFILE* _sndfile; - SF_INFO _info; -}; - -#endif diff --git a/src/lib/sndfile_content.h b/src/lib/sndfile_content.h deleted file mode 100644 index cdb842c04..000000000 --- a/src/lib/sndfile_content.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - Copyright (C) 2013-2016 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 - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef DCPOMATIC_SNDFILE_CONTENT_H -#define DCPOMATIC_SNDFILE_CONTENT_H - -#include "content.h" - -class AudioExaminer; - -class SndfileContent : public Content -{ -public: - SndfileContent (boost::shared_ptr, boost::filesystem::path); - SndfileContent (boost::shared_ptr, cxml::ConstNodePtr, int); - - boost::shared_ptr shared_from_this () { - return boost::dynamic_pointer_cast (Content::shared_from_this ()); - } - - DCPTime full_length () const; - - void examine (boost::shared_ptr); - std::string summary () const; - std::string technical_summary () const; - std::string information () const; - void as_xml (xmlpp::Node *) const; - - static bool valid_file (boost::filesystem::path); -}; - -#endif diff --git a/src/lib/sndfile_decoder.cc b/src/lib/sndfile_decoder.cc deleted file mode 100644 index 2a2b3fe4a..000000000 --- a/src/lib/sndfile_decoder.cc +++ /dev/null @@ -1,103 +0,0 @@ -/* - Copyright (C) 2012-2016 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 - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include -#include -#include "audio_content.h" -#include "sndfile_content.h" -#include "sndfile_decoder.h" -#include "exceptions.h" -#include "audio_buffers.h" - -#include "i18n.h" - -using std::vector; -using std::string; -using std::min; -using std::cout; -using boost::shared_ptr; - -SndfileDecoder::SndfileDecoder (shared_ptr c, bool fast, shared_ptr log) - : Sndfile (c) - , _done (0) - , _remaining (_info.frames) - , _deinterleave_buffer (0) -{ - audio.reset (new AudioDecoder (this, c->audio, fast, log)); -} - -SndfileDecoder::~SndfileDecoder () -{ - delete[] _deinterleave_buffer; -} - -bool -SndfileDecoder::pass (PassReason, bool) -{ - if (_remaining == 0) { - return true; - } - - /* Do things in half second blocks as I think there may be limits - to what FFmpeg (and in particular the resampler) can cope with. - */ - sf_count_t const block = _sndfile_content->audio->stream()->frame_rate() / 2; - sf_count_t const this_time = min (block, _remaining); - - int const channels = _sndfile_content->audio->stream()->channels (); - - shared_ptr data (new AudioBuffers (channels, this_time)); - - if (_sndfile_content->audio->stream()->channels() == 1) { - /* No de-interleaving required */ - sf_read_float (_sndfile, data->data(0), this_time); - } else { - /* Deinterleave */ - if (!_deinterleave_buffer) { - _deinterleave_buffer = new float[block * channels]; - } - sf_readf_float (_sndfile, _deinterleave_buffer, this_time); - vector out_ptr (channels); - for (int i = 0; i < channels; ++i) { - out_ptr[i] = data->data(i); - } - float* in_ptr = _deinterleave_buffer; - for (int i = 0; i < this_time; ++i) { - for (int j = 0; j < channels; ++j) { - *out_ptr[j]++ = *in_ptr++; - } - } - } - - data->set_frames (this_time); - audio->give (_sndfile_content->audio->stream (), data, ContentTime::from_frames (_done, _info.samplerate)); - _done += this_time; - _remaining -= this_time; - - return _remaining == 0; -} - -void -SndfileDecoder::seek (ContentTime t, bool accurate) -{ - audio->seek (t, accurate); - - _done = t.frames_round (_info.samplerate); - _remaining = _info.frames - _done; -} diff --git a/src/lib/sndfile_decoder.h b/src/lib/sndfile_decoder.h deleted file mode 100644 index d3f9342b3..000000000 --- a/src/lib/sndfile_decoder.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - Copyright (C) 2012-2016 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 - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include "audio_decoder.h" -#include "sndfile_base.h" - -class SndfileContent; - -class SndfileDecoder : public Sndfile, public Decoder -{ -public: - SndfileDecoder (boost::shared_ptr c, bool fast, boost::shared_ptr log); - ~SndfileDecoder (); - -private: - bool pass (PassReason, bool); - void seek (ContentTime, bool); - - int64_t _done; - int64_t _remaining; - float* _deinterleave_buffer; -}; diff --git a/src/lib/sndfile_examiner.cc b/src/lib/sndfile_examiner.cc deleted file mode 100644 index 5f2338ab8..000000000 --- a/src/lib/sndfile_examiner.cc +++ /dev/null @@ -1,46 +0,0 @@ -/* - Copyright (C) 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 - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include "sndfile_examiner.h" - -using boost::shared_ptr; - -SndfileExaminer::SndfileExaminer (shared_ptr content) - : Sndfile (content) -{ - -} - -int -SndfileExaminer::audio_channels () const -{ - return _info.channels; -} - -Frame -SndfileExaminer::audio_length () const -{ - return _info.frames; -} - -int -SndfileExaminer::audio_frame_rate () const -{ - return _info.samplerate; -} diff --git a/src/lib/sndfile_examiner.h b/src/lib/sndfile_examiner.h deleted file mode 100644 index c64ceae6e..000000000 --- a/src/lib/sndfile_examiner.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - Copyright (C) 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 - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include "sndfile_base.h" -#include "audio_examiner.h" - -class SndfileExaminer : public Sndfile, public AudioExaminer -{ -public: - SndfileExaminer (boost::shared_ptr content); - - int audio_channels () const; - Frame audio_length () const; - int audio_frame_rate () const; -}; diff --git a/src/lib/wscript b/src/lib/wscript index 4b6754b2e..fe4eac114 100644 --- a/src/lib/wscript +++ b/src/lib/wscript @@ -114,10 +114,6 @@ sources = """ send_kdm_email_job.cc send_problem_report_job.cc server.cc - sndfile_base.cc - sndfile_content.cc - sndfile_decoder.cc - sndfile_examiner.cc string_log_entry.cc text_subtitle.cc text_subtitle_content.cc @@ -153,7 +149,7 @@ def build(bld): obj.uselib = """ AVCODEC AVUTIL AVFORMAT AVFILTER SWSCALE BOOST_FILESYSTEM BOOST_THREAD BOOST_DATETIME BOOST_SIGNALS2 BOOST_REGEX - SNDFILE SAMPLERATE POSTPROC TIFF MAGICK SSH DCP CXML GLIB LZMA XML++ + SAMPLERATE POSTPROC TIFF MAGICK SSH DCP CXML GLIB LZMA XML++ CURL ZIP FONTCONFIG PANGOMM CAIROMM XMLSEC SUB ICU """ 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 c (new SndfileContent (film, p)); + shared_ptr 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 content (new SndfileContent (film, "test/data/white.wav")); + shared_ptr 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 #include #include -#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 content (new SndfileContent (film, "test/data/staircase.wav")); + shared_ptr 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 @@ -33,7 +33,7 @@ BOOST_AUTO_TEST_CASE (audio_processor_test) { shared_ptr film = new_test_film ("audio_processor_test"); film->set_name ("audio_processor_test"); - shared_ptr c (new SndfileContent (film, "test/data/white.wav")); + shared_ptr 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 + Copyright (C) 2013-2016 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 @@ -28,7 +28,7 @@ #include #include #include -#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 @@ -127,7 +127,7 @@ BOOST_AUTO_TEST_CASE (isdcf_name_test) /* Test audio channel markup */ film->set_audio_channels (6); - shared_ptr sound (new SndfileContent (film, "test/data/sine_440.wav")); + shared_ptr 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 #include #include -#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 content (new SndfileContent (film, "test/data/staircase.wav")); + shared_ptr 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 content (new SndfileContent (film, "test/data/white.wav")); + shared_ptr 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 \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 \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') diff --git a/wscript b/wscript index 1bcc66c46..95ead6e50 100644 --- a/wscript +++ b/wscript @@ -176,9 +176,6 @@ def configure(conf): lib=['icuio', 'icui18n', 'icudata', 'icuuc'], uselib_store='ICU') - # libsndfile - conf.check_cfg(package='sndfile', args='--cflags --libs', uselib_store='SNDFILE', mandatory=True) - # libsamplerate conf.check_cfg(package='samplerate', args='--cflags --libs', uselib_store='SAMPLERATE', mandatory=True) -- 2.30.2