Remove unused method.
authorCarl Hetherington <cth@carlh.net>
Sat, 16 Jul 2016 00:26:19 +0000 (01:26 +0100)
committerCarl Hetherington <cth@carlh.net>
Sat, 16 Jul 2016 00:26:19 +0000 (01:26 +0100)
12 files changed:
src/lib/dcp_content_type.cc
src/lib/dcp_content_type.h
test/audio_processor_test.cc
test/ffmpeg_audio_only_test.cc
test/ffmpeg_audio_test.cc
test/ffmpeg_dcp_test.cc
test/film_metadata_test.cc
test/reels_test.cc
test/repeat_frame_test.cc
test/seek_zero_test.cc
test/skip_frame_test.cc
test/threed_test.cc

index 03c1bf59ff207638f4ce018297ddfe68a7e5f891..b2455ba21b8f6f316524b976e12116262e44e2f9 100644 (file)
@@ -55,18 +55,6 @@ DCPContentType::setup_dcp_content_types ()
        _dcp_content_types.push_back (new DCPContentType (_("Advertisement"), dcp::ADVERTISEMENT, N_("ADV")));
 }
 
-DCPContentType const *
-DCPContentType::from_pretty_name (string n)
-{
-       for (vector<DCPContentType const *>::const_iterator i = _dcp_content_types.begin(); i != _dcp_content_types.end(); ++i) {
-               if ((*i)->pretty_name() == n) {
-                       return *i;
-               }
-       }
-
-       return 0;
-}
-
 DCPContentType const *
 DCPContentType::from_isdcf_name (string n)
 {
index 5607475c07b26d3b5e19ab0022e11eed0438c7ca..2685e6edfd20b8857060ef1735fae36c74160754 100644 (file)
@@ -50,7 +50,6 @@ public:
                return _isdcf_name;
        }
 
-       static DCPContentType const * from_pretty_name (std::string);
        static DCPContentType const * from_isdcf_name (std::string);
        static DCPContentType const * from_index (int);
        static int as_index (DCPContentType const *);
index 8357cff78a367cd78736b9f001475edf9d29bf65..82ae9e563bf12a77bdd430b213f55aa794be2162 100644 (file)
@@ -39,7 +39,7 @@ BOOST_AUTO_TEST_CASE (audio_processor_test)
        wait_for_jobs ();
 
        film->set_audio_channels (6);
-       film->set_dcp_content_type (DCPContentType::from_pretty_name ("Test"));
+       film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST"));
        film->set_audio_processor (AudioProcessor::from_id ("mid-side-decoder"));
 
        /* Analyse the audio and check it doesn't crash */
index bad800e57823a21fd2874442ff2d61304a25ce82..b0606ab0f5b19dc5a01a7153c91e772338648d4a 100644 (file)
@@ -36,7 +36,7 @@ test (boost::filesystem::path file)
 {
        shared_ptr<Film> film = new_test_film ("ffmpeg_audio_only_test");
        film->set_name ("test_film");
-       film->set_dcp_content_type (DCPContentType::from_pretty_name ("Test"));
+       film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST"));
        shared_ptr<FFmpegContent> c (new FFmpegContent (film, file));
        film->examine_and_add_content (c);
        wait_for_jobs ();
index cfbaf46c30aaa8d064458551ce1ea1d551b7ccfb..1e9048584de40d9d0dee5e7ba7c69ccc7a6b99c1 100644 (file)
@@ -54,7 +54,7 @@ BOOST_AUTO_TEST_CASE (ffmpeg_audio_test)
 
        film->set_container (Ratio::from_id ("185"));
        film->set_audio_channels (6);
-       film->set_dcp_content_type (DCPContentType::from_pretty_name ("Test"));
+       film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST"));
        film->make_dcp ();
        film->write_metadata ();
 
index 18decee95a1e15a3441a5aa7bc0006ab64e18794..a28119110f874bd3b728641447577ca4286bef51 100644 (file)
@@ -48,7 +48,7 @@ BOOST_AUTO_TEST_CASE (ffmpeg_dcp_test)
        c->video->set_scale (VideoContentScale (Ratio::from_id ("185")));
 
        film->set_container (Ratio::from_id ("185"));
-       film->set_dcp_content_type (DCPContentType::from_pretty_name ("Test"));
+       film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST"));
        film->make_dcp ();
        film->write_metadata ();
 
index 970c6526d764ae3d609390e3ffca458e564a99a1..b59de23c607183c162f866a8a626d8f146a5b599 100644 (file)
@@ -44,7 +44,7 @@ BOOST_AUTO_TEST_CASE (film_metadata_test)
        BOOST_CHECK (film->dcp_content_type() == 0);
 
        film->set_name ("fred");
-       film->set_dcp_content_type (DCPContentType::from_pretty_name ("Short"));
+       film->set_dcp_content_type (DCPContentType::from_isdcf_name ("SHR"));
        film->set_container (Ratio::from_id ("185"));
        film->set_j2k_bandwidth (200000000);
        film->write_metadata ();
@@ -57,7 +57,7 @@ BOOST_AUTO_TEST_CASE (film_metadata_test)
        g->read_metadata ();
 
        BOOST_CHECK_EQUAL (g->name(), "fred");
-       BOOST_CHECK_EQUAL (g->dcp_content_type(), DCPContentType::from_pretty_name ("Short"));
+       BOOST_CHECK_EQUAL (g->dcp_content_type(), DCPContentType::from_isdcf_name ("SHR"));
        BOOST_CHECK_EQUAL (g->container(), Ratio::from_id ("185"));
 
        g->write_metadata ();
index 6178c88ac71f2d2eccdb9b4082fe7ff1a17daeb2..50b4622e2a33f6c6a0bd509ada4ce1bd87778220 100644 (file)
@@ -84,7 +84,7 @@ BOOST_AUTO_TEST_CASE (reels_test2)
        shared_ptr<Film> film = new_test_film ("reels_test2");
        film->set_name ("reels_test2");
        film->set_container (Ratio::from_id ("185"));
-       film->set_dcp_content_type (DCPContentType::from_pretty_name ("Test"));
+       film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST"));
 
        {
                shared_ptr<ImageContent> c (new ImageContent (film, "test/data/flat_red.png"));
@@ -118,7 +118,7 @@ BOOST_AUTO_TEST_CASE (reels_test2)
        shared_ptr<Film> film2 = new_test_film ("reels_test2b");
        film2->set_name ("reels_test2b");
        film2->set_container (Ratio::from_id ("185"));
-       film2->set_dcp_content_type (DCPContentType::from_pretty_name ("Test"));
+       film2->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST"));
        film2->set_reel_type (REELTYPE_BY_VIDEO_CONTENT);
 
        shared_ptr<DCPContent> c (new DCPContent (film2, film->dir (film->dcp_name ())));
@@ -152,7 +152,7 @@ BOOST_AUTO_TEST_CASE (reels_test3)
        shared_ptr<Film> film = new_test_film ("reels_test3");
        film->set_name ("reels_test3");
        film->set_container (Ratio::from_id ("185"));
-       film->set_dcp_content_type (DCPContentType::from_pretty_name ("Test"));
+       film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST"));
        film->set_reel_type (REELTYPE_BY_VIDEO_CONTENT);
 
        shared_ptr<Content> dcp (new DCPContent (film, "test/data/reels_test2"));
@@ -185,7 +185,7 @@ BOOST_AUTO_TEST_CASE (reels_test4)
        shared_ptr<Film> film = new_test_film ("reels_test4");
        film->set_name ("reels_test4");
        film->set_container (Ratio::from_id ("185"));
-       film->set_dcp_content_type (DCPContentType::from_pretty_name ("Test"));
+       film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST"));
        film->set_reel_type (REELTYPE_BY_VIDEO_CONTENT);
 
        /* 4 piece of 1s-long content */
index d145ccb18f48591ba2242998b4dcd61a7578e449..5e6da83e1c6b20a815bebaf3c94c12889beee249 100644 (file)
@@ -40,7 +40,7 @@ BOOST_AUTO_TEST_CASE (repeat_frame_test)
        shared_ptr<Film> film = new_test_film ("repeat_frame_test");
        film->set_name ("repeat_frame_test");
        film->set_container (Ratio::from_id ("185"));
-       film->set_dcp_content_type (DCPContentType::from_pretty_name ("Test"));
+       film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST"));
        shared_ptr<FFmpegContent> c (new FFmpegContent (film, "test/data/red_24.mp4"));
        film->examine_and_add_content (c);
 
index a176339e715515817aca7e80342785500967e374..faf4c9eac7c35ad5521d5ebb7e7a609446369761 100644 (file)
@@ -48,7 +48,7 @@ BOOST_AUTO_TEST_CASE (seek_zero_test)
        shared_ptr<Film> film = new_test_film ("seek_zero_test");
        film->set_name ("seek_zero_test");
        film->set_container (Ratio::from_id ("185"));
-       film->set_dcp_content_type (DCPContentType::from_pretty_name ("Test"));
+       film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST"));
        shared_ptr<FFmpegContent> content (new FFmpegContent (film, "test/data/count300bd48.m2ts"));
        film->examine_and_add_content (content);
        wait_for_jobs ();
index 8ff43a4ca6d8cf8b22945403520168e92b8f34e1..535efacdfac79a29785084b434693a847139a8b3 100644 (file)
@@ -40,7 +40,7 @@ BOOST_AUTO_TEST_CASE (skip_frame_test)
        shared_ptr<Film> film = new_test_film ("skip_frame_test");
        film->set_name ("skip_frame_test");
        film->set_container (Ratio::from_id ("185"));
-       film->set_dcp_content_type (DCPContentType::from_pretty_name ("Test"));
+       film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST"));
        shared_ptr<FFmpegContent> c (new FFmpegContent (film, "test/data/count300bd48.m2ts"));
        film->examine_and_add_content (c);
 
index ab94cf8e5b888a562b2612ce5a38006a17d0cfc8..5a28122c0aa63a3b3e561d00acb10488b64dd6a2 100644 (file)
@@ -46,7 +46,7 @@ BOOST_AUTO_TEST_CASE (threed_test)
        c->video->set_scale (VideoContentScale (Ratio::from_id ("185")));
 
        film->set_container (Ratio::from_id ("185"));
-       film->set_dcp_content_type (DCPContentType::from_pretty_name ("Test"));
+       film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TST"));
        film->set_three_d (true);
        film->make_dcp ();
        film->write_metadata ();