_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)
{
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 *);
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 */
{
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 ();
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 ();
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 ();
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 ();
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 ();
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"));
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 ())));
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"));
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 */
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);
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 ();
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);
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 ();