/*
- Copyright (C) 2017 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2017-2018 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
FFmpegEncoder encoder (film, job, "build/test/ffmpeg_encoder_basic_test_mixdown.mp4", FFmpegEncoder::FORMAT_H264, true);
encoder.go ();
- /* Skip the first video packet when checking as it contains x264 options which can vary between machines
- (e.g. number of threads used for encoding).
- */
- check_ffmpeg ("build/test/ffmpeg_encoder_basic_test_mixdown.mp4", "test/data/ffmpeg_encoder_basic_test_mixdown.mp4");
+ check_ffmpeg ("build/test/ffmpeg_encoder_basic_test_mixdown.mp4", "test/data/ffmpeg_encoder_basic_test_mixdown.mp4", 1);
}
/*
- Copyright (C) 2012-2017 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2018 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
#include "lib/ratio.h"
#include "lib/dcp_content_type.h"
#include "lib/log_entry.h"
+#include "lib/compose.hpp"
+#include "test.h"
#include <dcp/dcp.h>
#include <dcp/cpl.h>
#include <dcp/reel.h>
}
void
-check_ffmpeg (boost::filesystem::path ref, boost::filesystem::path check)
+check_ffmpeg (boost::filesystem::path ref, boost::filesystem::path check, int audio_tolerance)
{
- int const r = system (string("ffcmp " + ref.string() + " " + check.string()).c_str());
+ int const r = system (String::compose("ffcmp -t %1 %2 %3", audio_tolerance, ref.string(), check.string()).c_str());
BOOST_REQUIRE_EQUAL (WEXITSTATUS(r), 0);
}
extern void check_mxf_audio_file (boost::filesystem::path ref, boost::filesystem::path check);
extern void check_xml (boost::filesystem::path, boost::filesystem::path, std::list<std::string>);
extern void check_file (boost::filesystem::path, boost::filesystem::path);
-extern void check_ffmpeg (boost::filesystem::path, boost::filesystem::path);
+extern void check_ffmpeg (boost::filesystem::path, boost::filesystem::path, int audio_tolerance);
extern void check_image (boost::filesystem::path, boost::filesystem::path);
extern boost::filesystem::path test_film_dir (std::string);
extern void write_image (boost::shared_ptr<const Image> image, boost::filesystem::path file, std::string format);