/*
- Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-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
obj = bld(features = 'cxx cxxshlib')
obj.name = 'libdcpomatic'
- obj.export_includes = ['.']
+ obj.export_includes = ['..']
obj.uselib = """
AVCODEC AVUTIL AVFORMAT AVFILTER SWSCALE SWRESAMPLE
BOOST_FILESYSTEM BOOST_THREAD BOOST_DATETIME BOOST_SIGNALS2
#include <iomanip>
#include <getopt.h>
#include <libdcp/version.h>
-#include "film.h"
-#include "filter.h"
-#include "transcode_job.h"
-#include "job_manager.h"
-#include "util.h"
-#include "scaler.h"
-#include "version.h"
-#include "cross.h"
-#include "config.h"
-#include "log.h"
+#include "lib/film.h"
+#include "lib/filter.h"
+#include "lib/transcode_job.h"
+#include "lib/job_manager.h"
+#include "lib/util.h"
+#include "lib/scaler.h"
+#include "lib/version.h"
+#include "lib/cross.h"
+#include "lib/config.h"
+#include "lib/log.h"
using std::string;
using std::cerr;
#include <boost/thread.hpp>
#include <wx/taskbar.h>
#include <wx/icon.h>
-#include "wx_util.h"
+#include "wx/wx_util.h"
#include "lib/util.h"
#include "lib/server.h"
#include "lib/config.h"
#include <boost/thread.hpp>
#include <boost/thread/mutex.hpp>
#include <boost/thread/condition.hpp>
-#include "config.h"
-#include "dcp_video_frame.h"
-#include "exceptions.h"
-#include "util.h"
-#include "config.h"
-#include "scaler.h"
-#include "image.h"
-#include "log.h"
-#include "version.h"
+#include "lib/config.h"
+#include "lib/dcp_video_frame.h"
+#include "lib/exceptions.h"
+#include "lib/util.h"
+#include "lib/config.h"
+#include "lib/scaler.h"
+#include "lib/image.h"
+#include "lib/log.h"
+#include "lib/version.h"
using std::cerr;
using std::string;
#include <vector>
#include <boost/shared_ptr.hpp>
#include <wx/wx.h>
-#include "util.h"
-#include "audio_analysis.h"
+#include "lib/util.h"
+#include "lib/audio_analysis.h"
class AudioPlot : public wxPanel
{
*/
#include <wx/sizer.h>
+#include "lib/film.h"
#include "dci_metadata_dialog.h"
#include "wx_util.h"
-#include "film.h"
using boost::shared_ptr;
#include <wx/dialog.h>
#include <wx/textctrl.h>
#include <boost/shared_ptr.hpp>
-#include "dci_metadata.h"
+#include "lib/dci_metadata.h"
class Film;
#include "lib/imagemagick_content.h"
#include "lib/sndfile_content.h"
#include "lib/dcp_content_type.h"
+#include "lib/sound_processor.h"
+#include "lib/scaler.h"
+#include "timecode.h"
#include "filter_dialog.h"
#include "wx_util.h"
#include "film_editor.h"
#include "gain_calculator_dialog.h"
-#include "sound_processor.h"
#include "dci_metadata_dialog.h"
-#include "scaler.h"
#include "audio_dialog.h"
#include "imagemagick_content_dialog.h"
#include "timeline_dialog.h"
#include "audio_mapping_view.h"
-#include "timecode.h"
using std::string;
using std::cout;
#include "lib/video_content.h"
#include "lib/ffmpeg_content.h"
#include "lib/imagemagick_content.h"
+#include "lib/video_decoder.h"
#include "film_viewer.h"
#include "wx_util.h"
-#include "video_decoder.h"
using std::string;
using std::pair;
#include <list>
#include <wx/graphics.h>
#include <boost/weak_ptr.hpp>
-#include "film.h"
+#include "lib/film.h"
+#include "lib/playlist.h"
#include "film_editor.h"
#include "timeline.h"
#include "wx_util.h"
-#include "lib/playlist.h"
using std::list;
using std::cout;
#include <boost/weak_ptr.hpp>
#include <boost/signals2.hpp>
#include <wx/wx.h>
-#include "util.h"
-#include "rect.h"
+#include "lib/util.h"
+#include "lib/rect.h"
class Film;
class View;
#include <list>
#include <wx/graphics.h>
+#include "lib/playlist.h"
#include "film_editor.h"
#include "timeline_dialog.h"
#include "wx_util.h"
-#include "playlist.h"
using std::list;
using std::cout;
obj = bld(features = 'cxx cxxshlib')
obj.name = 'libdcpomatic-wx'
- obj.includes = [ '..' ]
- obj.export_includes = ['.']
+# obj.includes = [ '..' ]
+ obj.export_includes = ['..']
obj.uselib = 'WXWIDGETS'
if bld.env.TARGET_LINUX:
obj.uselib += ' GTK'
*/
-#include "ui_signaller.h"
+#include "lib/ui_signaller.h"
class wxEvtHandler;
#include <boost/thread.hpp>
#include <wx/filepicker.h>
#include <wx/spinctrl.h>
+#include "lib/config.h"
+#include "lib/util.h"
#include "wx_util.h"
-#include "config.h"
-#include "util.h"
using namespace std;
using namespace boost;
*/
+#include <boost/test/unit_test.hpp>
#include <libdcp/sound_frame.h>
#include <libdcp/cpl.h>
#include <libdcp/reel.h>
#include <libdcp/sound_asset.h>
-#include "sndfile_content.h"
+#include "lib/sndfile_content.h"
+#include "lib/dcp_content_type.h"
+#include "lib/ratio.h"
+#include "lib/film.h"
+#include "test.h"
+using std::string;
using boost::lexical_cast;
+using boost::shared_ptr;
static
void test_audio_delay (int delay_in_ms)
*/
-#include "imagemagick_content.h"
+#include <boost/test/unit_test.hpp>
+#include "lib/imagemagick_content.h"
+#include "lib/dcp_content_type.h"
+#include "lib/film.h"
+#include "lib/ratio.h"
+#include "test.h"
/** @file test/black_fill_test.cc
* @brief Test insertion of black frames between video content.
*/
+#include <boost/test/unit_test.hpp>
+#include <boost/thread.hpp>
+#include "lib/server.h"
+#include "lib/image.h"
+#include "lib/cross.h"
+#include "lib/dcp_video_frame.h"
+
+using std::list;
+using boost::shared_ptr;
+using boost::thread;
+
void
do_remote_encode (shared_ptr<DCPVideoFrame> frame, ServerDescription* description, shared_ptr<EncodedData> locally_encoded)
{
*/
+#include <boost/test/unit_test.hpp>
+#include <boost/filesystem.hpp>
+#include "lib/film.h"
+#include "lib/ffmpeg_content.h"
+#include "lib/ratio.h"
+#include "lib/dcp_content_type.h"
+#include "test.h"
+
+using boost::shared_ptr;
+
/** @file test/ffmpeg_dcp_test.cc
* @brief Test scaling and black-padding of images from a still-image source.
*/
*/
-#include "ffmpeg_examiner.h"
+#include <boost/test/unit_test.hpp>
+#include "lib/ffmpeg_examiner.h"
+#include "lib/ffmpeg_content.h"
+#include "test.h"
+
+using boost::shared_ptr;
BOOST_AUTO_TEST_CASE (ffmpeg_examiner_test)
{
*/
+#include <boost/test/unit_test.hpp>
+#include "lib/film.h"
+#include "lib/ffmpeg_decoder.h"
+#include "test.h"
+
+using boost::shared_ptr;
+
BOOST_AUTO_TEST_CASE (ffmpeg_pts_offset_test)
{
shared_ptr<Film> film = new_test_film ("ffmpeg_pts_offset_test");
*/
+#include <sstream>
+#include <boost/test/unit_test.hpp>
+#include <boost/filesystem.hpp>
+#include <boost/date_time.hpp>
+#include "lib/film.h"
+#include "lib/dcp_content_type.h"
+#include "lib/ratio.h"
+
+using std::string;
+using std::stringstream;
+using boost::shared_ptr;
+
BOOST_AUTO_TEST_CASE (film_metadata_test)
{
string const test_film = "build/test/film_metadata_test";
*/
+#include <boost/test/unit_test.hpp>
+#include "lib/film.h"
+#include "lib/config.h"
+#include "test.h"
+
+using boost::shared_ptr;
+
/* Test Playlist::best_dcp_frame_rate and FrameRateConversion
with a single piece of content.
*/
*/
+#include <boost/test/unit_test.hpp>
+#include "lib/image.h"
+#include "lib/scaler.h"
+
+using boost::shared_ptr;
+
BOOST_AUTO_TEST_CASE (aligned_image_test)
{
Image* s = new Image (PIX_FMT_RGB24, libdcp::Size (50, 50), true);
*/
+#include <boost/test/unit_test.hpp>
+#include "lib/job.h"
+#include "lib/job_manager.h"
+#include "lib/cross.h"
+
+using std::string;
+using boost::shared_ptr;
+
class TestJob : public Job
{
public:
*/
+#include <boost/test/unit_test.hpp>
+#include <libdcp/util.h>
+extern "C" {
+#include <libavutil/pixfmt.h>
+}
+#include "lib/image.h"
+#include "lib/scaler.h"
+
+using std::list;
+
/* Check that Image::make_black works, and doesn't use values which crash
sws_scale().
*/
*/
+#include <boost/test/unit_test.hpp>
+#include <list>
+extern "C" {
+#include <libavutil/pixfmt.h>
+#include <libavcodec/avcodec.h>
+}
+#include "lib/image.h"
+
using std::list;
using std::cout;
*/
-#include "player.h"
+#include <boost/test/unit_test.hpp>
+#include "lib/player.h"
+#include "lib/ratio.h"
+#include "lib/dcp_content_type.h"
+#include "test.h"
/* This test needs stuff in Player that is only included in debug mode */
#ifdef DCPOMATIC_DEBUG
+using std::cout;
using boost::optional;
+using boost::shared_ptr;
struct Video
{
*/
+#include <iostream>
+#include <boost/test/unit_test.hpp>
+#include <libdcp/util.h>
+#include "lib/ratio.h"
+
using std::ostream;
namespace libdcp {
*/
-#include "imagemagick_content.h"
+#include <boost/test/unit_test.hpp>
+#include "lib/imagemagick_content.h"
+#include "lib/ratio.h"
+#include "lib/film.h"
+#include "lib/dcp_content_type.h"
+#include "test.h"
/** @file test/scaling_test.cc
* @brief Test scaling and black-padding of images from a still-image source.
*/
+using std::string;
using boost::shared_ptr;
static void scaling_test_for (shared_ptr<Film> film, shared_ptr<VideoContent> content, string image, string container)
*/
+#include <boost/test/unit_test.hpp>
#include <libdcp/cpl.h>
#include <libdcp/dcp.h>
#include <libdcp/sound_asset.h>
#include <libdcp/sound_frame.h>
#include <libdcp/reel.h>
-#include "sndfile_content.h"
+#include "lib/sndfile_content.h"
+#include "lib/film.h"
+#include "lib/dcp_content_type.h"
+#include "lib/ratio.h"
+#include "test.h"
+using std::string;
using boost::lexical_cast;
+using boost::shared_ptr;
static void test_silence_padding (int channels)
{
*/
+#include <boost/test/unit_test.hpp>
+#include <libxml++/libxml++.h>
#include <libcxml/cxml.h>
+#include "lib/ffmpeg_content.h"
using std::pair;
+using std::list;
+using boost::shared_ptr;
BOOST_AUTO_TEST_CASE (stream_test)
{
*/
-#include <fstream>
-#include <iostream>
-#include <boost/filesystem.hpp>
-#include <boost/algorithm/string/predicate.hpp>
-#include <boost/date_time.hpp>
+#include <vector>
+#include <list>
#include <libdcp/dcp.h>
-#include "ratio.h"
-#include "film.h"
-#include "filter.h"
-#include "job_manager.h"
-#include "util.h"
-#include "exceptions.h"
-#include "image.h"
-#include "log.h"
-#include "dcp_video_frame.h"
-#include "config.h"
-#include "server.h"
-#include "cross.h"
-#include "job.h"
-#include "scaler.h"
-#include "ffmpeg_decoder.h"
-#include "sndfile_decoder.h"
-#include "dcp_content_type.h"
-#include "ui_signaller.h"
-#include "ratio.h"
+#include "lib/config.h"
+#include "lib/util.h"
+#include "lib/ui_signaller.h"
+#include "lib/film.h"
+#include "lib/job_manager.h"
+#include "lib/job.h"
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MODULE dcpomatic_test
#include <boost/test/unit_test.hpp>
using std::string;
-using std::list;
-using std::stringstream;
using std::vector;
using std::min;
using std::cout;
using std::cerr;
+using std::list;
using boost::shared_ptr;
-using boost::thread;
-using boost::dynamic_pointer_cast;
struct TestConfig
{
BOOST_GLOBAL_FIXTURE (TestConfig);
-static boost::filesystem::path
+boost::filesystem::path
test_film_dir (string name)
{
boost::filesystem::path p;
return p;
}
-static shared_ptr<Film>
+shared_ptr<Film>
new_test_film (string name)
{
boost::filesystem::path p = test_film_dir (name);
cout << n << "\n";
}
-static void
+void
check_dcp (string ref, string check)
{
libdcp::DCP ref_dcp (ref);
BOOST_CHECK (!jm->errors());
}
-
-#include "play_test.cc"
-#include "frame_rate_test.cc"
-#include "silence_padding_test.cc"
-#include "audio_delay_test.cc"
-#include "ffmpeg_pts_offset.cc"
-#include "ffmpeg_examiner_test.cc"
-#include "black_fill_test.cc"
-#include "scaling_test.cc"
-#include "ratio_test.cc"
-#include "pixel_formats_test.cc"
-#include "make_black_test.cc"
-#include "film_metadata_test.cc"
-#include "stream_test.cc"
-#include "util_test.cc"
-#include "ffmpeg_dcp_test.cc"
-#include "job_test.cc"
-#include "client_server_test.cc"
-#include "image_test.cc"
--- /dev/null
+/*
+ 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.
+
+*/
+
+extern void wait_for_jobs ();
+extern boost::shared_ptr<Film> new_test_film (std::string);
+extern void check_dcp (std::string, std::string);
+extern boost::filesystem::path test_film_dir (std::string);
*/
+#include <boost/test/unit_test.hpp>
+#include "lib/util.h"
+#include "lib/exceptions.h"
+
+using std::string;
+using std::vector;
+
BOOST_AUTO_TEST_CASE (util_test)
{
string t = "Hello this is a string \"with quotes\" and indeed without them";
obj.name = 'unit-tests'
obj.uselib = 'BOOST_TEST DCP OPENJPEG AVFORMAT AVFILTER AVCODEC AVUTIL SWSCALE POSTPROC CXML'
obj.use = 'libdcpomatic'
- obj.source = 'test.cc'
+ obj.source = """
+ test.cc
+ play_test.cc
+ frame_rate_test.cc
+ silence_padding_test.cc
+ audio_delay_test.cc
+ ffmpeg_pts_offset.cc
+ ffmpeg_examiner_test.cc
+ black_fill_test.cc
+ scaling_test.cc
+ ratio_test.cc
+ pixel_formats_test.cc
+ make_black_test.cc
+ film_metadata_test.cc
+ stream_test.cc
+ util_test.cc
+ ffmpeg_dcp_test.cc
+ job_test.cc
+ client_server_test.cc
+ image_test.cc
+ """
obj.target = 'unit-tests'
obj.install_path = ''