summaryrefslogtreecommitdiff
path: root/test/ffmpeg_transcoder_test.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2017-05-09 15:21:30 +0100
committerCarl Hetherington <cth@carlh.net>2017-05-09 15:22:20 +0100
commit837a54744277a5252a1a69b0690305e9a669124d (patch)
treee391cc061022e211a68a48eba37fbde4970f61e7 /test/ffmpeg_transcoder_test.cc
parentbb6b53bdb63754fe0cea1368f69f39a3c3cbbdfd (diff)
Basic video transcoding working.
Diffstat (limited to 'test/ffmpeg_transcoder_test.cc')
-rw-r--r--test/ffmpeg_transcoder_test.cc45
1 files changed, 45 insertions, 0 deletions
diff --git a/test/ffmpeg_transcoder_test.cc b/test/ffmpeg_transcoder_test.cc
new file mode 100644
index 000000000..c97287cb7
--- /dev/null
+++ b/test/ffmpeg_transcoder_test.cc
@@ -0,0 +1,45 @@
+/*
+ Copyright (C) 2017 Carl Hetherington <cth@carlh.net>
+
+ This file is part of DCP-o-matic.
+
+ DCP-o-matic 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.
+
+ DCP-o-matic 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 DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+#include "lib/ffmpeg_transcoder.h"
+#include "lib/film.h"
+#include "lib/ffmpeg_content.h"
+#include "lib/ratio.h"
+#include "lib/transcode_job.h"
+#include "test.h"
+#include <boost/test/unit_test.hpp>
+
+using boost::shared_ptr;
+
+BOOST_AUTO_TEST_CASE (ffmpeg_transcoder_basic_test)
+{
+ shared_ptr<Film> film = new_test_film ("ffmpeg_transcoder_basic_test");
+ film->set_name ("ffmpeg_transcoder_basic_test");
+ shared_ptr<FFmpegContent> c (new FFmpegContent (film, "test/data/test.mp4"));
+ film->set_container (Ratio::from_id ("185"));
+ film->set_audio_channels (6);
+
+ film->examine_and_add_content (c);
+ wait_for_jobs ();
+
+ shared_ptr<Job> job (new TranscodeJob (film));
+ FFmpegTranscoder transcoder (film, job);
+ transcoder.go ();
+}