X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=test%2Fvideo_content_scale_test.cc;h=f1edce04150fb1997fe1fc622d8a535761d9e532;hb=5a5324ed3a381a86dfe0a6e3932c1d58fdcd596f;hp=78f3bf9b0519be8ecda0e4a25b89d2c3dcbae905;hpb=65b331d32c383f3a9049f29bf03ab3fe3193b31a;p=dcpomatic.git diff --git a/test/video_content_scale_test.cc b/test/video_content_scale_test.cc index 78f3bf9b0..f1edce041 100644 --- a/test/video_content_scale_test.cc +++ b/test/video_content_scale_test.cc @@ -1,31 +1,34 @@ /* Copyright (C) 2015 Carl Hetherington - This program is free software; you can redistribute it and/or modify + 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. - This program is distributed in the hope that it will be useful, + 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 this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with DCP-o-matic. If not, see . */ -#include #include "lib/ffmpeg_content.h" #include "lib/ratio.h" #include "lib/video_content.h" +#include +#include using std::list; using std::string; using std::cerr; using boost::shared_ptr; +using boost::make_shared; using boost::optional; static @@ -85,11 +88,11 @@ test (dcp::Size content_size, dcp::Size display_size, dcp::Size film_size, Crop "0" ""; - shared_ptr doc (new cxml::Document ()); + shared_ptr doc = make_shared (); doc->read_string(s.str ()); list notes; - shared_ptr vc (new FFmpegContent (film, doc, 10, notes)); + shared_ptr vc = boost::make_shared (film, doc, 10, notes); optional sc; if (ratio) { @@ -100,7 +103,7 @@ test (dcp::Size content_size, dcp::Size display_size, dcp::Size film_size, Crop dcp::Size answer = sc.get().size (vc->video, display_size, film_size); if (answer != correct) { - cerr << "Testing " << vc->video->video_size().width << "x" << vc->video->video_size().height << "\n"; + cerr << "Testing " << vc->video->size().width << "x" << vc->video->size().height << "\n"; cerr << "Testing " << display_size.width << "x" << display_size.height << "\n"; cerr << answer.width << "x" << answer.height << " instead of " << correct.width << "x" << correct.height << "\n"; }