summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-05-10 13:50:47 +0100
committerCarl Hetherington <cth@carlh.net>2016-05-18 11:50:29 +0100
commit9423e02c37daba7f9e406929a1cfc1bb10fb4b62 (patch)
tree96a4fc5435652a913a5732907474fc11968deb04 /test
parent90becb40eb48467b6d31d6939bcfcf39c3c9652c (diff)
Partial work on using a no-video FFmpeg file.
Diffstat (limited to 'test')
-rw-r--r--test/ffmpeg_audio_only_test.cc37
-rw-r--r--test/wscript1
2 files changed, 38 insertions, 0 deletions
diff --git a/test/ffmpeg_audio_only_test.cc b/test/ffmpeg_audio_only_test.cc
new file mode 100644
index 000000000..a0c39b9c1
--- /dev/null
+++ b/test/ffmpeg_audio_only_test.cc
@@ -0,0 +1,37 @@
+/*
+ Copyright (C) 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
+ 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 "lib/film.h"
+#include "lib/ffmpeg_content.h"
+#include "test.h"
+#include <boost/test/unit_test.hpp>
+
+using boost::shared_ptr;
+
+/** Test the FFmpeg code with audio-only content */
+BOOST_AUTO_TEST_CASE (ffmpeg_audio_only_test)
+{
+ shared_ptr<Film> film = new_test_film ("ffmpeg_audio_only_test");
+ film->set_name ("test_film");
+ shared_ptr<FFmpegContent> c (new FFmpegContent (film, "test/data/sine_440.mp3"));
+ film->examine_and_add_content (c);
+ wait_for_jobs ();
+ film->write_metadata ();
+}
+
diff --git a/test/wscript b/test/wscript
index 7efe6e61c..a93eac661 100644
--- a/test/wscript
+++ b/test/wscript
@@ -51,6 +51,7 @@ def build(bld):
dcp_subtitle_test.cc
dcpomatic_time_test.cc
ffmpeg_audio_test.cc
+ ffmpeg_audio_only_test.cc
ffmpeg_dcp_test.cc
ffmpeg_decoder_seek_test.cc
ffmpeg_decoder_sequential_test.cc