summaryrefslogtreecommitdiff
path: root/src/wx
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-03-22 16:00:15 +0000
committerCarl Hetherington <cth@carlh.net>2014-03-22 16:00:15 +0000
commit604ef9902b6b2256adea97a20195cdb68b3a4aa6 (patch)
tree92ef8c2e9f9934ae872fb47c43c04016529142c4 /src/wx
parentf4e435f24a6832f54727e4898901db7de3e21460 (diff)
Allow up to 500MB/s J2K bitrate.
Requested-by: Jonathan Jensen
Diffstat (limited to 'src/wx')
-rw-r--r--src/wx/config_dialog.cc14
-rw-r--r--src/wx/film_editor.cc30
-rw-r--r--src/wx/film_editor.h3
-rw-r--r--src/wx/kdm_dialog.cc12
4 files changed, 42 insertions, 17 deletions
diff --git a/src/wx/config_dialog.cc b/src/wx/config_dialog.cc
index 8938c84f9..545ba80b8 100644
--- a/src/wx/config_dialog.cc
+++ b/src/wx/config_dialog.cc
@@ -104,6 +104,10 @@ public:
add_label_to_sizer (table, panel, _("Threads to use for encoding on this host"), true);
_num_local_encoding_threads = new wxSpinCtrl (panel);
table->Add (_num_local_encoding_threads, 1);
+
+ add_label_to_sizer (table, panel, _("Maximum JPEG2000 bandwidth"), true);
+ _maximum_j2k_bandwidth = new wxSpinCtrl (panel);
+ table->Add (_maximum_j2k_bandwidth, 1);
add_label_to_sizer (table, panel, _("Outgoing mail server"), true);
_mail_server = new wxTextCtrl (panel, wxID_ANY);
@@ -159,6 +163,10 @@ public:
_num_local_encoding_threads->SetRange (1, 128);
_num_local_encoding_threads->SetValue (config->num_local_encoding_threads ());
_num_local_encoding_threads->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, boost::bind (&GeneralPage::num_local_encoding_threads_changed, this));
+
+ _maximum_j2k_bandwidth->SetRange (1, 500);
+ _maximum_j2k_bandwidth->SetValue (config->maximum_j2k_bandwidth() / 1000000);
+ _maximum_j2k_bandwidth->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, boost::bind (&GeneralPage::maximum_j2k_bandwidth_changed, this));
_mail_server->SetValue (std_to_wx (config->mail_server ()));
_mail_server->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&GeneralPage::mail_server_changed, this));
@@ -250,10 +258,16 @@ private:
{
Config::instance()->set_num_local_encoding_threads (_num_local_encoding_threads->GetValue ());
}
+
+ void maximum_j2k_bandwidth_changed ()
+ {
+ Config::instance()->set_maximum_j2k_bandwidth (_maximum_j2k_bandwidth->GetValue() * 1000000);
+ }
wxCheckBox* _set_language;
wxChoice* _language;
wxSpinCtrl* _num_local_encoding_threads;
+ wxSpinCtrl* _maximum_j2k_bandwidth;
wxTextCtrl* _mail_server;
wxTextCtrl* _mail_user;
wxTextCtrl* _mail_password;
diff --git a/src/wx/film_editor.cc b/src/wx/film_editor.cc
index d16d5fc26..31b9b8368 100644
--- a/src/wx/film_editor.cc
+++ b/src/wx/film_editor.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2012-2013 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -92,6 +92,8 @@ FilmEditor::FilmEditor (shared_ptr<Film> f, wxWindow* parent)
JobManager::instance()->ActiveJobsChanged.connect (
bind (&FilmEditor::active_jobs_changed, this, _1)
);
+
+ Config::instance()->Changed.connect (boost::bind (&FilmEditor::config_changed, this));
SetSizerAndFit (s);
}
@@ -213,7 +215,7 @@ FilmEditor::make_dcp_panel ()
}
_audio_channels->SetRange (0, MAX_AUDIO_CHANNELS);
- _j2k_bandwidth->SetRange (1, 250);
+ _j2k_bandwidth->SetRange (1, Config::instance()->maximum_j2k_bandwidth() / 1000000);
_resolution->Append (_("2K"));
_resolution->Append (_("4K"));
@@ -268,19 +270,25 @@ FilmEditor::make_content_panel ()
_content->InsertColumn (0, wxT(""));
_content->SetColumnWidth (0, 512);
+#ifdef DCPOMATIC_OSX
+ int const pad = 2;
+#else
+ int const pad = 0;
+#endif
+
wxBoxSizer* b = new wxBoxSizer (wxVERTICAL);
_content_add_file = new wxButton (_content_panel, wxID_ANY, _("Add file(s)..."));
- b->Add (_content_add_file, 1, wxEXPAND | wxALL, 2);
+ b->Add (_content_add_file, 1, wxEXPAND | wxALL, pad);
_content_add_folder = new wxButton (_content_panel, wxID_ANY, _("Add folder..."));
- b->Add (_content_add_folder, 1, wxEXPAND | wxALL, 2);
+ b->Add (_content_add_folder, 1, wxEXPAND | wxALL, pad);
_content_remove = new wxButton (_content_panel, wxID_ANY, _("Remove"));
- b->Add (_content_remove, 1, wxEXPAND | wxALL, 2);
+ b->Add (_content_remove, 1, wxEXPAND | wxALL, pad);
_content_earlier = new wxButton (_content_panel, wxID_ANY, _("Up"));
- b->Add (_content_earlier, 1, wxEXPAND | wxALL, 2);
+ b->Add (_content_earlier, 1, wxEXPAND | wxALL, pad);
_content_later = new wxButton (_content_panel, wxID_ANY, _("Down"));
- b->Add (_content_later, 1, wxEXPAND | wxALL, 2);
+ b->Add (_content_later, 1, wxEXPAND | wxALL, pad);
_content_timeline = new wxButton (_content_panel, wxID_ANY, _("Timeline..."));
- b->Add (_content_timeline, 1, wxEXPAND | wxALL, 2);
+ b->Add (_content_timeline, 1, wxEXPAND | wxALL, pad);
s->Add (b, 0, wxALL, 4);
@@ -998,3 +1006,9 @@ FilmEditor::content_later_clicked ()
content_selection_changed ();
}
}
+
+void
+FilmEditor::config_changed ()
+{
+ _j2k_bandwidth->SetRange (1, Config::instance()->maximum_j2k_bandwidth() / 1000000);
+}
diff --git a/src/wx/film_editor.h b/src/wx/film_editor.h
index 23c87e678..a1336ec90 100644
--- a/src/wx/film_editor.h
+++ b/src/wx/film_editor.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2012-2013 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -110,6 +110,7 @@ private:
void setup_content_sensitivity ();
void active_jobs_changed (bool);
+ void config_changed ();
FilmEditorPanel* _video_panel;
FilmEditorPanel* _audio_panel;
diff --git a/src/wx/kdm_dialog.cc b/src/wx/kdm_dialog.cc
index 1f4d62bde..cc643c8ef 100644
--- a/src/wx/kdm_dialog.cc
+++ b/src/wx/kdm_dialog.cc
@@ -263,8 +263,6 @@ KDMDialog::add_cinema_clicked ()
Config::instance()->add_cinema (c);
add_cinema (c);
- Config::instance()->write ();
-
d->Destroy ();
}
@@ -284,7 +282,7 @@ KDMDialog::edit_cinema_clicked ()
c.second->email = d->email ();
_targets->SetItemText (c.first, std_to_wx (d->name()));
- Config::instance()->write ();
+ Config::instance()->changed ();
d->Destroy ();
}
@@ -300,8 +298,6 @@ KDMDialog::remove_cinema_clicked ()
Config::instance()->remove_cinema (c.second);
_targets->Delete (c.first);
-
- Config::instance()->write ();
}
void
@@ -322,7 +318,7 @@ KDMDialog::add_screen_clicked ()
c->add_screen (s);
add_screen (c, s);
- Config::instance()->write ();
+ Config::instance()->changed ();
d->Destroy ();
}
@@ -343,7 +339,7 @@ KDMDialog::edit_screen_clicked ()
s.second->certificate = d->certificate ();
_targets->SetItemText (s.first, std_to_wx (d->name()));
- Config::instance()->write ();
+ Config::instance()->changed ();
d->Destroy ();
}
@@ -370,7 +366,7 @@ KDMDialog::remove_screen_clicked ()
i->second->remove_screen (s.second);
_targets->Delete (s.first);
- Config::instance()->write ();
+ Config::instance()->changed ();
}
list<shared_ptr<Screen> >