summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2017-08-03 17:54:06 +0100
committerCarl Hetherington <cth@carlh.net>2017-08-14 21:07:49 +0100
commit0253b4e45c71a1c2e2a8bffaf1c3cb84a0a3e41a (patch)
tree85ca9af20c85ca04a221ca9023c0d2980ffeeca7 /src/tools
parente952a7b0681d1ad2fc6ebcd0cd7231bf59bbe043 (diff)
Basics of forced reduction of JPEG2000 decode resolution.
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/dcpomatic_player.cc23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/tools/dcpomatic_player.cc b/src/tools/dcpomatic_player.cc
index 3a7c18f02..567440f88 100644
--- a/src/tools/dcpomatic_player.cc
+++ b/src/tools/dcpomatic_player.cc
@@ -50,6 +50,10 @@ using boost::optional;
enum {
ID_file_open = 1,
+ ID_view_scale_appropriate,
+ ID_view_scale_full,
+ ID_view_scale_half,
+ ID_view_scale_quarter,
ID_help_report_a_problem,
ID_tools_check_for_updates,
};
@@ -77,6 +81,10 @@ public:
Bind (wxEVT_MENU, boost::bind (&DOMFrame::file_open, this), ID_file_open);
Bind (wxEVT_MENU, boost::bind (&DOMFrame::file_exit, this), wxID_EXIT);
+ Bind (wxEVT_MENU, boost::bind (&DOMFrame::set_decode_reduction, this, optional<int>()), ID_view_scale_appropriate);
+ Bind (wxEVT_MENU, boost::bind (&DOMFrame::set_decode_reduction, this, optional<int>(0)), ID_view_scale_full);
+ Bind (wxEVT_MENU, boost::bind (&DOMFrame::set_decode_reduction, this, optional<int>(1)), ID_view_scale_half);
+ Bind (wxEVT_MENU, boost::bind (&DOMFrame::set_decode_reduction, this, optional<int>(2)), ID_view_scale_quarter);
Bind (wxEVT_MENU, boost::bind (&DOMFrame::help_about, this), wxID_ABOUT);
Bind (wxEVT_MENU, boost::bind (&DOMFrame::help_report_a_problem, this), ID_help_report_a_problem);
Bind (wxEVT_MENU, boost::bind (&DOMFrame::tools_check_for_updates, this), ID_tools_check_for_updates);
@@ -96,6 +104,11 @@ public:
UpdateChecker::instance()->StateChanged.connect (boost::bind (&DOMFrame::update_checker_state_changed, this));
}
+ void set_decode_reduction (optional<int> reduction)
+ {
+ _viewer->set_dcp_decode_reduction (reduction);
+ }
+
void load_dcp (boost::filesystem::path dir)
{
_film.reset (new Film (optional<boost::filesystem::path>()));
@@ -146,6 +159,12 @@ private:
edit->Append (wxID_PREFERENCES, _("&Preferences...\tCtrl-P"));
#endif
+ wxMenu* view = new wxMenu;
+ view->AppendRadioItem (ID_view_scale_appropriate, _("Set decode resolution to match display"));
+ view->AppendRadioItem (ID_view_scale_full, _("Decode at full resolution"));
+ view->AppendRadioItem (ID_view_scale_half, _("Decode at half resolution"));
+ view->AppendRadioItem (ID_view_scale_quarter, _("Decode at quarter resolution"));
+
wxMenu* tools = new wxMenu;
tools->Append (ID_tools_check_for_updates, _("Check for updates"));
@@ -158,6 +177,10 @@ private:
help->Append (ID_help_report_a_problem, _("Report a problem..."));
m->Append (file, _("&File"));
+#ifndef __WXOSX__
+ m->Append (edit, _("&Edit"));
+#endif
+ m->Append (view, _("&View"));
m->Append (tools, _("&Tools"));
m->Append (help, _("&Help"));
}