X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=test%2Fisdcf_name_test.cc;h=e3023f9f5e891cb8712561cb5b5c1f4eb59e1752;hb=5a5324ed3a381a86dfe0a6e3932c1d58fdcd596f;hp=a7c077643adb4db9058d4d509aa65208bbd00cb9;hpb=44bd1b75d21604b0b315373c37a51a495a1c945f;p=dcpomatic.git diff --git a/test/isdcf_name_test.cc b/test/isdcf_name_test.cc index a7c077643..e3023f9f5 100644 --- a/test/isdcf_name_test.cc +++ b/test/isdcf_name_test.cc @@ -1,19 +1,20 @@ /* - Copyright (C) 2014-2015 Carl Hetherington + Copyright (C) 2014-2016 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 . */ @@ -22,12 +23,17 @@ #include "lib/ratio.h" #include "lib/dcp_content_type.h" #include "lib/image_content.h" -#include "lib/sndfile_content.h" +#include "lib/video_content.h" +#include "lib/audio_mapping.h" +#include "lib/ffmpeg_content.h" +#include "lib/audio_content.h" #include "test.h" +#include #include using std::cout; using boost::shared_ptr; +using boost::make_shared; BOOST_AUTO_TEST_CASE (isdcf_name_test) { @@ -72,10 +78,10 @@ BOOST_AUTO_TEST_CASE (isdcf_name_test) /* Test interior aspect ratio: shouldn't be shown with trailers */ - shared_ptr content (new ImageContent (film, "test/data/simple_testcard_640x480.png")); + shared_ptr content = make_shared (film, "test/data/simple_testcard_640x480.png"); film->examine_and_add_content (content); wait_for_jobs (); - content->set_scale (VideoContentScale (Ratio::from_id ("133"))); + content->video->set_scale (VideoContentScale (Ratio::from_id ("133"))); film->set_container (Ratio::from_id ("185")); BOOST_CHECK_EQUAL (film->isdcf_name(false), "MyNiceFilmWith_TLR-2_F_DE-fr_US-R_4K_DI_20140704_PP_SMPTE_OV"); @@ -124,36 +130,36 @@ BOOST_AUTO_TEST_CASE (isdcf_name_test) /* Test audio channel markup */ film->set_audio_channels (6); - shared_ptr sound (new SndfileContent (film, "test/data/sine_440.wav")); + shared_ptr sound = make_shared (film, "test/data/sine_440.wav"); film->examine_and_add_content (sound); wait_for_jobs (); BOOST_CHECK_EQUAL (film->isdcf_name(false), "LikeShouting_XSN-2_F-133_DE-fr_US-R_10_4K_DI_20140704_PP_SMPTE_OV"); - AudioMapping mapping = sound->audio_mapping (); + AudioMapping mapping = sound->audio->mapping (); mapping.set (0, dcp::LEFT, 1.0); - sound->set_audio_mapping (mapping); + sound->audio->set_mapping (mapping); BOOST_CHECK_EQUAL (film->isdcf_name(false), "LikeShouting_XSN-2_F-133_DE-fr_US-R_20_4K_DI_20140704_PP_SMPTE_OV"); mapping.set (0, dcp::RIGHT, 1.0); - sound->set_audio_mapping (mapping); + sound->audio->set_mapping (mapping); BOOST_CHECK_EQUAL (film->isdcf_name(false), "LikeShouting_XSN-2_F-133_DE-fr_US-R_30_4K_DI_20140704_PP_SMPTE_OV"); mapping.set (0, dcp::LFE, 1.0); - sound->set_audio_mapping (mapping); + sound->audio->set_mapping (mapping); BOOST_CHECK_EQUAL (film->isdcf_name(false), "LikeShouting_XSN-2_F-133_DE-fr_US-R_31_4K_DI_20140704_PP_SMPTE_OV"); mapping.set (0, dcp::LS, 1.0); - sound->set_audio_mapping (mapping); + sound->audio->set_mapping (mapping); BOOST_CHECK_EQUAL (film->isdcf_name(false), "LikeShouting_XSN-2_F-133_DE-fr_US-R_41_4K_DI_20140704_PP_SMPTE_OV"); mapping.set (0, dcp::RS, 1.0); - sound->set_audio_mapping (mapping); + sound->audio->set_mapping (mapping); BOOST_CHECK_EQUAL (film->isdcf_name(false), "LikeShouting_XSN-2_F-133_DE-fr_US-R_51_4K_DI_20140704_PP_SMPTE_OV"); mapping.set (0, dcp::HI, 1.0); - sound->set_audio_mapping (mapping); + sound->audio->set_mapping (mapping); BOOST_CHECK_EQUAL (film->isdcf_name(false), "LikeShouting_XSN-2_F-133_DE-fr_US-R_51_4K_DI_20140704_PP_SMPTE_OV"); film->set_audio_channels (8); mapping.set (0, dcp::HI, 1.0); - sound->set_audio_mapping (mapping); + sound->audio->set_mapping (mapping); BOOST_CHECK_EQUAL (film->isdcf_name(false), "LikeShouting_XSN-2_F-133_DE-fr_US-R_61_4K_DI_20140704_PP_SMPTE_OV"); mapping.set (0, dcp::VI, 1.0); - sound->set_audio_mapping (mapping); + sound->audio->set_mapping (mapping); BOOST_CHECK_EQUAL (film->isdcf_name(false), "LikeShouting_XSN-2_F-133_DE-fr_US-R_71_4K_DI_20140704_PP_SMPTE_OV"); }