Add NamedChannel and use it to hide the never-used channels
[dcpomatic.git] / test / isdcf_name_test.cc
index 3315833b066aacef969af863a013163cfe97a161..e298114fcecc0bd377087fcc5723dbbf4ec5ae38 100644 (file)
@@ -97,7 +97,7 @@ BOOST_AUTO_TEST_CASE (isdcf_name_test)
        shared_ptr<ImageContent> content (new ImageContent ("test/data/simple_testcard_640x480.png"));
        film->examine_and_add_content (content);
        BOOST_REQUIRE (!wait_for_jobs());
-       content->video->set_scale (VideoContentScale (Ratio::from_id ("133")));
+       content->video->set_custom_ratio (1.33);
        film->set_container (Ratio::from_id ("185"));
        BOOST_CHECK_EQUAL (film->isdcf_name(false), "MyNiceFilmWith_TLR-2_F_DE-fr_US-R_MOS_4K_DI_20140704_PP_SMPTE_OV");
 
@@ -108,12 +108,12 @@ BOOST_AUTO_TEST_CASE (isdcf_name_test)
 
        /* And it should always be numeric */
 
-       content->video->set_scale (VideoContentScale (Ratio::from_id ("239")));
+       content->video->set_custom_ratio (2.39);
        BOOST_CHECK_EQUAL (film->isdcf_name(false), "MyNiceFilmWith_XSN-2_F-239_DE-fr_US-R_MOS_4K_DI_20140704_PP_SMPTE_OV");
 
-       content->video->set_scale (VideoContentScale (Ratio::from_id ("190")));
+       content->video->set_custom_ratio (1.9);
        BOOST_CHECK_EQUAL (film->isdcf_name(false), "MyNiceFilmWith_XSN-2_F-190_DE-fr_US-R_MOS_4K_DI_20140704_PP_SMPTE_OV");
-       content->video->set_scale (VideoContentScale (Ratio::from_id ("133")));
+       content->video->set_custom_ratio (1.33);
 
        /* Test 3D */
 
@@ -190,8 +190,6 @@ BOOST_AUTO_TEST_CASE (isdcf_name_test)
        BOOST_CHECK_EQUAL (film->isdcf_name(false), "LikeShouting_XSN-2_F-133_DE-fr_US-R_51-HI-VI_4K_DI_20140704_PP_SMPTE_OV");
 
        film->set_audio_channels(10);
-       mapping.set (0, dcp::LC, 1.0);
-       mapping.set (0, dcp::RC, 1.0);
        mapping.set (0, dcp::HI, 0.0);
        mapping.set (0, dcp::VI, 0.0);
        sound->audio->set_mapping (mapping);
@@ -204,8 +202,6 @@ BOOST_AUTO_TEST_CASE (isdcf_name_test)
        BOOST_CHECK_EQUAL (film->isdcf_name(false), "LikeShouting_XSN-2_F-133_DE-fr_US-R_71-HI-VI_4K_DI_20140704_PP_SMPTE_OV");
 
        film->set_audio_channels(12);
-       mapping.set (0, dcp::LC, 0.0);
-       mapping.set (0, dcp::RC, 0.0);
        mapping.set (0, dcp::BSL, 1.0);
        mapping.set (0, dcp::BSR, 1.0);
        mapping.set (0, dcp::HI, 0.0);