From: Carl Hetherington Date: Sat, 16 Jul 2016 00:26:19 +0000 (+0100) Subject: Remove unused method. X-Git-Tag: v2.9.4~6 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=0a3de908ae0f62dd8d7d5aaaa96e2ddab891b5a8 Remove unused method. --- diff --git a/src/lib/dcp_content_type.cc b/src/lib/dcp_content_type.cc index 03c1bf59f..b2455ba21 100644 --- a/src/lib/dcp_content_type.cc +++ b/src/lib/dcp_content_type.cc @@ -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::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) { diff --git a/src/lib/dcp_content_type.h b/src/lib/dcp_content_type.h index 5607475c0..2685e6edf 100644 --- a/src/lib/dcp_content_type.h +++ b/src/lib/dcp_content_type.h @@ -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 *); diff --git a/test/audio_processor_test.cc b/test/audio_processor_test.cc index 8357cff78..82ae9e563 100644 --- a/test/audio_processor_test.cc +++ b/test/audio_processor_test.cc @@ -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 */ diff --git a/test/ffmpeg_audio_only_test.cc b/test/ffmpeg_audio_only_test.cc index bad800e57..b0606ab0f 100644 --- a/test/ffmpeg_audio_only_test.cc +++ b/test/ffmpeg_audio_only_test.cc @@ -36,7 +36,7 @@ test (boost::filesystem::path file) { shared_ptr 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 c (new FFmpegContent (film, file)); film->examine_and_add_content (c); wait_for_jobs (); diff --git a/test/ffmpeg_audio_test.cc b/test/ffmpeg_audio_test.cc index cfbaf46c3..1e9048584 100644 --- a/test/ffmpeg_audio_test.cc +++ b/test/ffmpeg_audio_test.cc @@ -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 (); diff --git a/test/ffmpeg_dcp_test.cc b/test/ffmpeg_dcp_test.cc index 18decee95..a28119110 100644 --- a/test/ffmpeg_dcp_test.cc +++ b/test/ffmpeg_dcp_test.cc @@ -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 (); diff --git a/test/film_metadata_test.cc b/test/film_metadata_test.cc index 970c6526d..b59de23c6 100644 --- a/test/film_metadata_test.cc +++ b/test/film_metadata_test.cc @@ -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 (); diff --git a/test/reels_test.cc b/test/reels_test.cc index 6178c88ac..50b4622e2 100644 --- a/test/reels_test.cc +++ b/test/reels_test.cc @@ -84,7 +84,7 @@ BOOST_AUTO_TEST_CASE (reels_test2) shared_ptr 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 c (new ImageContent (film, "test/data/flat_red.png")); @@ -118,7 +118,7 @@ BOOST_AUTO_TEST_CASE (reels_test2) shared_ptr 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 c (new DCPContent (film2, film->dir (film->dcp_name ()))); @@ -152,7 +152,7 @@ BOOST_AUTO_TEST_CASE (reels_test3) shared_ptr 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 dcp (new DCPContent (film, "test/data/reels_test2")); @@ -185,7 +185,7 @@ BOOST_AUTO_TEST_CASE (reels_test4) shared_ptr 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 */ diff --git a/test/repeat_frame_test.cc b/test/repeat_frame_test.cc index d145ccb18..5e6da83e1 100644 --- a/test/repeat_frame_test.cc +++ b/test/repeat_frame_test.cc @@ -40,7 +40,7 @@ BOOST_AUTO_TEST_CASE (repeat_frame_test) shared_ptr 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 c (new FFmpegContent (film, "test/data/red_24.mp4")); film->examine_and_add_content (c); diff --git a/test/seek_zero_test.cc b/test/seek_zero_test.cc index a176339e7..faf4c9eac 100644 --- a/test/seek_zero_test.cc +++ b/test/seek_zero_test.cc @@ -48,7 +48,7 @@ BOOST_AUTO_TEST_CASE (seek_zero_test) shared_ptr 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 content (new FFmpegContent (film, "test/data/count300bd48.m2ts")); film->examine_and_add_content (content); wait_for_jobs (); diff --git a/test/skip_frame_test.cc b/test/skip_frame_test.cc index 8ff43a4ca..535efacdf 100644 --- a/test/skip_frame_test.cc +++ b/test/skip_frame_test.cc @@ -40,7 +40,7 @@ BOOST_AUTO_TEST_CASE (skip_frame_test) shared_ptr 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 c (new FFmpegContent (film, "test/data/count300bd48.m2ts")); film->examine_and_add_content (c); diff --git a/test/threed_test.cc b/test/threed_test.cc index ab94cf8e5..5a28122c0 100644 --- a/test/threed_test.cc +++ b/test/threed_test.cc @@ -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 ();