summaryrefslogtreecommitdiff
path: root/test/ffmpeg_examiner_test.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-06-21 18:48:46 +0100
committerCarl Hetherington <cth@carlh.net>2013-06-25 16:32:28 +0100
commit46cd0fe7b5b514f0d9456b25f670679cc584a218 (patch)
tree708a5d638fff8a143502a1820925d3e31d0a1d24 /test/ffmpeg_examiner_test.cc
parentf1bf21a9c2581591ab80bfc997a22b93046f8c56 (diff)
Basics of FFmpeg examiner works.
Diffstat (limited to 'test/ffmpeg_examiner_test.cc')
-rw-r--r--test/ffmpeg_examiner_test.cc31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/ffmpeg_examiner_test.cc b/test/ffmpeg_examiner_test.cc
new file mode 100644
index 000000000..6e73038f1
--- /dev/null
+++ b/test/ffmpeg_examiner_test.cc
@@ -0,0 +1,31 @@
+/*
+ Copyright (C) 2013 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 "ffmpeg_examiner.h"
+
+BOOST_AUTO_TEST_CASE (ffmpeg_examiner_test)
+{
+ shared_ptr<Film> film = new_test_film ("ffmpeg_examiner_test");
+ shared_ptr<FFmpegContent> content (new FFmpegContent (film, "test/data/count300bd24.m2ts"));
+ shared_ptr<FFmpegExaminer> examiner (new FFmpegExaminer (content));
+
+ BOOST_CHECK_EQUAL (examiner->first_video().get(), 57604000);
+ BOOST_CHECK_EQUAL (examiner->audio_streams().size(), 1);
+ BOOST_CHECK_EQUAL (examiner->audio_streams()[0]->start.get(), 57600000);
+}