projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "Use make_shared<>."
[dcpomatic.git]
/
test
/
isdcf_name_test.cc
diff --git
a/test/isdcf_name_test.cc
b/test/isdcf_name_test.cc
index a7c077643adb4db9058d4d509aa65208bbd00cb9..bb47fa9c0134e0e4061a0d5cc16871889b61a93a 100644
(file)
--- a/
test/isdcf_name_test.cc
+++ b/
test/isdcf_name_test.cc
@@
-1,19
+1,20
@@
/*
/*
- Copyright (C) 2014-201
5
Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2014-201
6
Carl Hetherington <cth@carlh.net>
- 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.
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
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 <http://www.gnu.org/licenses/>.
*/
*/
@@
-22,7
+23,10
@@
#include "lib/ratio.h"
#include "lib/dcp_content_type.h"
#include "lib/image_content.h"
#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 <iostream>
#include "test.h"
#include <iostream>
@@
-75,7
+79,7
@@
BOOST_AUTO_TEST_CASE (isdcf_name_test)
shared_ptr<ImageContent> content (new ImageContent (film, "test/data/simple_testcard_640x480.png"));
film->examine_and_add_content (content);
wait_for_jobs ();
shared_ptr<ImageContent> content (new ImageContent (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");
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
+128,36
@@
BOOST_AUTO_TEST_CASE (isdcf_name_test)
/* Test audio channel markup */
film->set_audio_channels (6);
/* Test audio channel markup */
film->set_audio_channels (6);
- shared_ptr<
SndfileContent> sound (new Sndfile
Content (film, "test/data/sine_440.wav"));
+ shared_ptr<
FFmpegContent> sound (new FFmpeg
Content (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");
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);
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);
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);
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);
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);
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);
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);
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);
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");
}
BOOST_CHECK_EQUAL (film->isdcf_name(false), "LikeShouting_XSN-2_F-133_DE-fr_US-R_71_4K_DI_20140704_PP_SMPTE_OV");
}