diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-01-31 03:14:24 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-01-31 03:14:24 +0100 |
| commit | 8fedaaa75c4586a4cc7ffb393bd71d1fdb091dc8 (patch) | |
| tree | f8b25b13ac3732838be259e469d045438d999e7b /src/tools | |
| parent | 4985d87750c87019dfe5dc7ef44e12c45326dd0e (diff) | |
More enum class additions.
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/dcpomatic.cc | 4 | ||||
| -rw-r--r-- | src/tools/dcpomatic_cli.cc | 2 | ||||
| -rw-r--r-- | src/tools/dcpomatic_create.cc | 2 | ||||
| -rw-r--r-- | src/tools/dcpomatic_player.cc | 22 | ||||
| -rw-r--r-- | src/tools/server_test.cc | 4 |
5 files changed, 17 insertions, 17 deletions
diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index 78466d25b..a670af7db 100644 --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@ -512,7 +512,7 @@ private: void film_change (ChangeType type) { - if (type == CHANGE_TYPE_DONE) { + if (type == ChangeType::DONE) { set_menu_sensitivity (); } } @@ -1118,7 +1118,7 @@ private: } list<string> to = { "carl@dcpomatic.com" }; Emailer emailer (d->email(), to, "DCP-o-matic translations", body); - emailer.send ("main.carlh.net", 2525, EMAIL_PROTOCOL_STARTTLS); + emailer.send ("main.carlh.net", 2525, EmailProtocol::STARTTLS); } d->Destroy (); diff --git a/src/tools/dcpomatic_cli.cc b/src/tools/dcpomatic_cli.cc index 46ae790cc..d1b8f4ef3 100644 --- a/src/tools/dcpomatic_cli.cc +++ b/src/tools/dcpomatic_cli.cc @@ -76,7 +76,7 @@ static void print_dump (shared_ptr<Film> film) { cout << film->dcp_name (true) << "\n" - << film->container()->container_nickname() << " at " << ((film->resolution() == RESOLUTION_2K) ? "2K" : "4K") << "\n" + << film->container()->container_nickname() << " at " << ((film->resolution() == Resolution::TWO_K) ? "2K" : "4K") << "\n" << (film->j2k_bandwidth() / 1000000) << "Mbit/s" << "\n" << "Output " << film->video_frame_rate() << "fps " << (film->three_d() ? "3D" : "2D") << " " << (film->audio_frame_rate() / 1000) << "kHz\n" << (film->interop() ? "Inter-Op" : "SMPTE") << " " << (film->encrypted() ? "encrypted" : "unencrypted") << "\n"; diff --git a/src/tools/dcpomatic_create.cc b/src/tools/dcpomatic_create.cc index a2d5c8e5d..14eae6b3e 100644 --- a/src/tools/dcpomatic_create.cc +++ b/src/tools/dcpomatic_create.cc @@ -104,7 +104,7 @@ main (int argc, char* argv[]) film->set_encrypted (cc.encrypt); film->set_three_d (cc.threed); if (cc.fourk) { - film->set_resolution (RESOLUTION_4K); + film->set_resolution (Resolution::FOUR_K); } if (cc.j2k_bandwidth) { film->set_j2k_bandwidth (*cc.j2k_bandwidth); diff --git a/src/tools/dcpomatic_player.cc b/src/tools/dcpomatic_player.cc index c6c4c0878..539b58504 100644 --- a/src/tools/dcpomatic_player.cc +++ b/src/tools/dcpomatic_player.cc @@ -404,7 +404,7 @@ public: void film_changed (ChangeType type, Film::Property property) { - if (type != CHANGE_TYPE_DONE || property != Film::CONTENT) { + if (type != ChangeType::DONE || property != Film::CONTENT) { return; } @@ -416,14 +416,14 @@ public: _film->set_container (Ratio::from_id("185")); for (auto i: _film->content()) { - shared_ptr<DCPContent> dcp = dynamic_pointer_cast<DCPContent>(i); + auto dcp = dynamic_pointer_cast<DCPContent>(i); for (auto j: i->text) { j->set_use (true); } if (i->video) { - Ratio const * r = Ratio::nearest_from_ratio(i->video->size().ratio()); + auto const r = Ratio::nearest_from_ratio(i->video->size().ratio()); if (r->id() == "239") { /* Any scope content means we use scope */ _film->set_container(r); @@ -431,7 +431,7 @@ public: } /* Any 3D content means we use 3D mode */ - if (i->video && i->video->frame_type() != VIDEO_FRAME_TYPE_2D) { + if (i->video && i->video->frame_type() != VideoFrameType::TWO_D) { _film->set_three_d (true); } } @@ -441,19 +441,19 @@ public: set_menu_sensitivity (); - wxMenuItemList old = _cpl_menu->GetMenuItems(); - for (wxMenuItemList::iterator i = old.begin(); i != old.end(); ++i) { - _cpl_menu->Remove (*i); + auto old = _cpl_menu->GetMenuItems(); + for (auto const& i: old) { + _cpl_menu->Remove (i); } if (_film->content().size() == 1) { /* Offer a CPL menu */ - shared_ptr<DCPContent> first = dynamic_pointer_cast<DCPContent>(_film->content().front()); + auto first = dynamic_pointer_cast<DCPContent>(_film->content().front()); if (first) { DCPExaminer ex (first, true); int id = ID_view_cpl; for (auto i: ex.cpls()) { - wxMenuItem* j = _cpl_menu->AppendRadioItem( + auto j = _cpl_menu->AppendRadioItem( id, wxString::Format("%s (%s)", std_to_wx(i->annotation_text().get_value_or("")).data(), std_to_wx(i->id()).data()) ); @@ -473,11 +473,11 @@ private: bool report_errors_from_last_job (wxWindow* parent) const { - JobManager* jm = JobManager::instance (); + auto jm = JobManager::instance (); DCPOMATIC_ASSERT (!jm->get().empty()); - shared_ptr<Job> last = jm->get().back(); + auto last = jm->get().back(); if (last->finished_in_error()) { error_dialog(parent, wxString::Format(_("Could not load DCP.\n\n%s."), std_to_wx(last->error_summary()).data()), std_to_wx(last->error_details())); return false; diff --git a/src/tools/server_test.cc b/src/tools/server_test.cc index e3375b988..8e4496799 100644 --- a/src/tools/server_test.cc +++ b/src/tools/server_test.cc @@ -55,8 +55,8 @@ static int frame_count = 0; void process_video (shared_ptr<PlayerVideo> pvf) { - shared_ptr<DCPVideo> local (new DCPVideo (pvf, frame_count, film->video_frame_rate(), 250000000, RESOLUTION_2K)); - shared_ptr<DCPVideo> remote (new DCPVideo (pvf, frame_count, film->video_frame_rate(), 250000000, RESOLUTION_2K)); + shared_ptr<DCPVideo> local (new DCPVideo (pvf, frame_count, film->video_frame_rate(), 250000000, Resolution::TWO_K)); + shared_ptr<DCPVideo> remote (new DCPVideo (pvf, frame_count, film->video_frame_rate(), 250000000, Resolution::TWO_K)); cout << "Frame " << frame_count << ": "; cout.flush (); |
