summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-06-21 01:15:32 +0100
committerCarl Hetherington <cth@carlh.net>2015-06-21 01:15:32 +0100
commite60bb3e51bd1508b149e6b8f6608f09b5196ae26 (patch)
treea7a5b937c9ae138d4eebca8d5130d308bf9ae420 /src/tools
parentf07d5125a7b609320682689abe40781f096ca25e (diff)
No-op: remove all trailing whitespace.
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/dcpomatic.cc118
-rw-r--r--src/tools/dcpomatic_batch.cc16
-rw-r--r--src/tools/dcpomatic_cli.cc14
-rw-r--r--src/tools/dcpomatic_create.cc8
-rw-r--r--src/tools/dcpomatic_kdm.cc10
-rw-r--r--src/tools/dcpomatic_server.cc16
-rw-r--r--src/tools/dcpomatic_server_cli.cc4
-rw-r--r--src/tools/server_test.cc6
8 files changed, 96 insertions, 96 deletions
diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc
index 5fea90504..0a105fa6b 100644
--- a/src/tools/dcpomatic.cc
+++ b/src/tools/dcpomatic.cc
@@ -113,7 +113,7 @@ public:
private:
/* Not defined */
FilmChangedDialog (FilmChangedDialog const &);
-
+
wxMessageDialog* _dialog;
};
@@ -124,7 +124,7 @@ private:
#define NEEDS_SELECTED_VIDEO_CONTENT 0x8
map<wxMenuItem*, int> menu_items;
-
+
enum {
ID_file_new = 1,
ID_file_open,
@@ -163,13 +163,13 @@ public:
#if defined(DCPOMATIC_WINDOWS)
if (Config::instance()->win32_console ()) {
AllocConsole();
-
+
HANDLE handle_out = GetStdHandle(STD_OUTPUT_HANDLE);
int hCrt = _open_osfhandle((intptr_t) handle_out, _O_TEXT);
FILE* hf_out = _fdopen(hCrt, "w");
setvbuf(hf_out, NULL, _IONBF, 1);
*stdout = *hf_out;
-
+
HANDLE handle_in = GetStdHandle(STD_INPUT_HANDLE);
hCrt = _open_osfhandle((intptr_t) handle_in, _O_TEXT);
FILE* hf_in = _fdopen(hCrt, "r");
@@ -257,7 +257,7 @@ public:
try
{
maybe_save_then_delete_film ();
-
+
shared_ptr<Film> film (new Film (file));
list<string> const notes = film->read_metadata ();
@@ -268,11 +268,11 @@ public:
"in this version. Please check the film's settings carefully.")
);
}
-
+
for (list<string>::const_iterator i = notes.begin(); i != notes.end(); ++i) {
error_dialog (0, std_to_wx (*i));
}
-
+
set_film (film);
}
catch (std::exception& e) {
@@ -293,7 +293,7 @@ public:
shared_ptr<Film> film () const {
return _film;
}
-
+
private:
void file_changed (boost::filesystem::path f)
@@ -302,15 +302,15 @@ private:
if (!f.empty ()) {
s += " - " + f.string ();
}
-
+
SetTitle (std_to_wx (s));
}
-
+
void file_new ()
{
NewFilmDialog* d = new NewFilmDialog (this);
int const r = d->ShowModal ();
-
+
if (r == wxID_OK) {
if (boost::filesystem::is_directory (d->get_path()) && !boost::filesystem::is_empty(d->get_path())) {
@@ -331,11 +331,11 @@ private:
);
return;
}
-
+
maybe_save_then_delete_film ();
new_film (d->get_path ());
}
-
+
d->Destroy ();
}
@@ -347,7 +347,7 @@ private:
std_to_wx (Config::instance()->default_directory_or (wx_to_std (wxStandardPaths::Get().GetDocumentsDir())).string ()),
wxDEFAULT_DIALOG_STYLE | wxDD_DIR_MUST_EXIST
);
-
+
int r;
while (true) {
r = c->ShowModal ();
@@ -357,7 +357,7 @@ private:
break;
}
}
-
+
if (r == wxID_OK) {
load_film (wx_to_std (c->GetPath ()));
}
@@ -385,7 +385,7 @@ private:
load_film (history[n]);
}
}
-
+
void file_exit ()
{
/* false here allows the close handler to veto the close request */
@@ -441,7 +441,7 @@ private:
if (!_film) {
return;
}
-
+
KDMDialog* d = new KDMDialog (this, _film);
if (d->ShowModal () != wxID_OK) {
d->Destroy ();
@@ -463,7 +463,7 @@ private:
} catch (...) {
error_dialog (this, _("An unknown exception occurred."));
}
-
+
d->Destroy ();
}
@@ -482,7 +482,7 @@ private:
(*i)->scale_and_crop_to_fit_height ();
}
}
-
+
void jobs_send_dcp_to_tms ()
{
_film->send_dcp_to_tms ();
@@ -512,14 +512,14 @@ private:
}
}
}
-#endif
+#endif
#ifdef DCPOMATIC_OSX
int r = system (string ("open -R " + _film->dir (_film->dcp_name (false)).string ()).c_str ());
if (WEXITSTATUS (r)) {
error_dialog (this, _("Could not show DCP"));
}
-#endif
+#endif
}
void tools_hints ()
@@ -578,7 +578,7 @@ private:
d->Destroy ();
return r;
}
-
+
void close (wxCloseEvent& ev)
{
if (!should_close ()) {
@@ -591,7 +591,7 @@ private:
now (without, as far as I can see, any way for us to find out).
*/
_config_changed_connection.disconnect ();
-
+
maybe_save_then_delete_film ();
ev.Skip ();
}
@@ -606,27 +606,27 @@ private:
bool const dcp_creation = (i != jobs.end ()) && !(*i)->finished ();
bool const have_cpl = _film && !_film->cpls().empty ();
bool const have_selected_video_content = !_film_editor->content_panel()->selected_video().empty();
-
+
for (map<wxMenuItem*, int>::iterator j = menu_items.begin(); j != menu_items.end(); ++j) {
-
+
bool enabled = true;
-
+
if ((j->second & NEEDS_FILM) && !_film) {
enabled = false;
}
-
+
if ((j->second & NOT_DURING_DCP_CREATION) && dcp_creation) {
enabled = false;
}
-
+
if ((j->second & NEEDS_CPL) && !have_cpl) {
enabled = false;
}
-
+
if ((j->second & NEEDS_SELECTED_VIDEO_CONTENT) && !have_selected_video_content) {
enabled = false;
}
-
+
j->first->Enable (enabled);
}
}
@@ -636,7 +636,7 @@ private:
if (!_film) {
return;
}
-
+
if (_film->dirty ()) {
FilmChangedDialog d (_film->name ());
switch (d.run ()) {
@@ -647,7 +647,7 @@ private:
break;
}
}
-
+
_film.reset ();
}
@@ -656,7 +656,7 @@ private:
wxMenuItem* item = menu->Append (id, text);
menu_items.insert (make_pair (item, sens));
}
-
+
void setup_menu (wxMenuBar* m)
{
_file_menu = new wxMenu;
@@ -669,17 +669,17 @@ private:
_history_position = _file_menu->GetMenuItems().GetCount();
-#ifndef __WXOSX__
+#ifndef __WXOSX__
_file_menu->AppendSeparator ();
#endif
-
-#ifdef __WXOSX__
+
+#ifdef __WXOSX__
add_item (_file_menu, _("&Exit"), wxID_EXIT, ALWAYS);
#else
add_item (_file_menu, _("&Quit"), wxID_EXIT, ALWAYS);
-#endif
-
-#ifdef __WXOSX__
+#endif
+
+#ifdef __WXOSX__
add_item (_file_menu, _("&Preferences...\tCtrl-P"), wxID_PREFERENCES, ALWAYS);
#else
wxMenu* edit = new wxMenu;
@@ -689,7 +689,7 @@ private:
wxMenu* content = new wxMenu;
add_item (content, _("Scale to fit &width"), ID_content_scale_to_fit_width, NEEDS_FILM | NEEDS_SELECTED_VIDEO_CONTENT);
add_item (content, _("Scale to fit &height"), ID_content_scale_to_fit_height, NEEDS_FILM | NEEDS_SELECTED_VIDEO_CONTENT);
-
+
wxMenu* jobs_menu = new wxMenu;
add_item (jobs_menu, _("&Make DCP\tCtrl-M"), ID_jobs_make_dcp, NEEDS_FILM | NOT_DURING_DCP_CREATION);
add_item (jobs_menu, _("Make &KDMs...\tCtrl-K"), ID_jobs_make_kdms, NEEDS_FILM);
@@ -702,17 +702,17 @@ private:
add_item (tools, _("Check for updates"), ID_tools_check_for_updates, 0);
tools->AppendSeparator ();
add_item (tools, _("Restore default preferences"), ID_tools_restore_default_preferences, ALWAYS);
-
+
wxMenu* help = new wxMenu;
-#ifdef __WXOSX__
+#ifdef __WXOSX__
add_item (help, _("About DCP-o-matic"), wxID_ABOUT, ALWAYS);
-#else
+#else
add_item (help, _("About"), wxID_ABOUT, ALWAYS);
-#endif
+#endif
add_item (help, _("Report a problem..."), ID_help_report_a_problem, ALWAYS);
-
+
m->Append (_file_menu, _("&File"));
-#ifndef __WXOSX__
+#ifndef __WXOSX__
m->Append (edit, _("&Edit"));
#endif
m->Append (content, _("&Content"));
@@ -732,15 +732,15 @@ private:
}
delete _history_separator;
_history_separator = 0;
-
+
int pos = _history_position;
-
+
vector<boost::filesystem::path> history = Config::instance()->history ();
-
+
if (!history.empty ()) {
_history_separator = _file_menu->InsertSeparator (pos++);
}
-
+
for (size_t i = 0; i < history.size(); ++i) {
SafeStringStream s;
if (i < 9) {
@@ -752,7 +752,7 @@ private:
_history_items = history.size ();
}
-
+
FilmEditor* _film_editor;
FilmViewer* _film_viewer;
HintsDialog* _hints_dialog;
@@ -784,26 +784,26 @@ public:
, _frame (0)
{}
-private:
-
+private:
+
bool OnInit ()
try
{
SetAppName (_("DCP-o-matic"));
-
+
if (!wxApp::OnInit()) {
return false;
}
-
-#ifdef DCPOMATIC_LINUX
+
+#ifdef DCPOMATIC_LINUX
unsetenv ("UBUNTU_MENUPROXY");
#endif
-#ifdef __WXOSX__
+#ifdef __WXOSX__
ProcessSerialNumber serial;
GetCurrentProcess (&serial);
TransformProcessType (&serial, kProcessTransformToForegroundApplication);
-#endif
+#endif
wxInitAllImageHandlers ();
@@ -905,7 +905,7 @@ private:
/* This will terminate the program */
return false;
}
-
+
void OnUnhandledException ()
{
error_dialog (0, _("An unknown exception occurred.") + " " + REPORT_PROBLEM);
diff --git a/src/tools/dcpomatic_batch.cc b/src/tools/dcpomatic_batch.cc
index 60c5e697d..48ef8f798 100644
--- a/src/tools/dcpomatic_batch.cc
+++ b/src/tools/dcpomatic_batch.cc
@@ -99,7 +99,7 @@ private:
_sizer->Layout ();
ev.Skip ();
}
-
+
bool should_close ()
{
if (!JobManager::instance()->work_to_do ()) {
@@ -117,7 +117,7 @@ private:
d->Destroy ();
return r;
}
-
+
void close (wxCloseEvent& ev)
{
if (!should_close ()) {
@@ -132,7 +132,7 @@ private:
{
add_film ();
}
-
+
void file_quit ()
{
if (should_close ()) {
@@ -153,7 +153,7 @@ private:
if (_last_parent) {
c->SetPath (std_to_wx (_last_parent.get().string ()));
}
-
+
int r;
while (true) {
r = c->ShowModal ();
@@ -163,7 +163,7 @@ private:
break;
}
}
-
+
if (r == wxID_OK) {
try {
shared_ptr<Film> film (new Film (wx_to_std (c->GetPath ())));
@@ -197,10 +197,10 @@ class App : public wxApp
if (!wxApp::OnInit()) {
return false;
}
-
-#ifdef DCPOMATIC_LINUX
+
+#ifdef DCPOMATIC_LINUX
unsetenv ("UBUNTU_MENUPROXY");
-#endif
+#endif
/* Enable i18n; this will create a Config object
to look for a force-configured language. This Config
diff --git a/src/tools/dcpomatic_cli.cc b/src/tools/dcpomatic_cli.cc
index 54e196fe0..f885412ef 100644
--- a/src/tools/dcpomatic_cli.cc
+++ b/src/tools/dcpomatic_cli.cc
@@ -100,7 +100,7 @@ print_dump (shared_ptr<Film> film)
} else {
cout << "\tno colour conversion\n";
}
-
+
}
shared_ptr<AudioContent> audio = dynamic_pointer_cast<AudioContent> (c);
@@ -176,10 +176,10 @@ main (int argc, char* argv[])
}
film_dir = argv[optind];
-
+
dcpomatic_setup ();
signal_manager = new SignalManager ();
-
+
if (no_remote) {
ServerFinder::instance()->disable ();
}
@@ -201,7 +201,7 @@ main (int argc, char* argv[])
print_dump (film);
exit (EXIT_SUCCESS);
}
-
+
ContentList content = film->content ();
for (ContentList::const_iterator i = content.begin(); i != content.end(); ++i) {
vector<boost::filesystem::path> paths = (*i)->paths ();
@@ -241,7 +241,7 @@ main (int argc, char* argv[])
for (list<shared_ptr<Job> >::iterator i = jobs.begin(); i != jobs.end(); ++i) {
if (progress) {
cout << (*i)->name() << ": ";
-
+
if ((*i)->progress ()) {
cout << (*i)->status() << " \n";
} else {
@@ -283,8 +283,8 @@ main (int argc, char* argv[])
JobManager::drop ();
ServerFinder::drop ();
-
+
return error ? EXIT_FAILURE : EXIT_SUCCESS;
}
-
+
diff --git a/src/tools/dcpomatic_create.cc b/src/tools/dcpomatic_create.cc
index a826a1071..d4d4df29b 100644
--- a/src/tools/dcpomatic_create.cc
+++ b/src/tools/dcpomatic_create.cc
@@ -79,7 +79,7 @@ main (int argc, char* argv[])
Ratio const * content_ratio = 0;
int still_length = 10;
boost::filesystem::path output;
-
+
int option_index = 0;
while (true) {
static struct option long_options[] = {
@@ -171,7 +171,7 @@ main (int argc, char* argv[])
film->set_container (container_ratio);
film->set_dcp_content_type (dcp_content_type);
-
+
for (int i = optind; i < argc; ++i) {
shared_ptr<Content> c = content_factory (film, argv[i]);
shared_ptr<VideoContent> vc = dynamic_pointer_cast<VideoContent> (c);
@@ -180,7 +180,7 @@ main (int argc, char* argv[])
}
film->examine_and_add_content (c);
}
-
+
JobManager* jm = JobManager::instance ();
while (jm->work_to_do ()) {}
@@ -214,6 +214,6 @@ main (int argc, char* argv[])
cerr << argv[0] << ": " << e.what() << "\n";
exit (EXIT_FAILURE);
}
-
+
return 0;
}
diff --git a/src/tools/dcpomatic_kdm.cc b/src/tools/dcpomatic_kdm.cc
index ae7d97f4f..345b90545 100644
--- a/src/tools/dcpomatic_kdm.cc
+++ b/src/tools/dcpomatic_kdm.cc
@@ -116,7 +116,7 @@ int main (int argc, char* argv[])
dcp::Formulation formulation = dcp::MODIFIED_TRANSITIONAL_1;
program_name = argv[0];
-
+
int option_index = 0;
while (true) {
static struct option long_options[] = {
@@ -215,7 +215,7 @@ int main (int argc, char* argv[])
}
string const film_dir = argv[optind];
-
+
dcpomatic_setup ();
shared_ptr<Film> film;
@@ -249,7 +249,7 @@ int main (int argc, char* argv[])
if (output.empty ()) {
error ("you must specify --output");
}
-
+
dcp::Certificate certificate (dcp::file_to_string (certificate_file));
dcp::EncryptedKDM kdm = film->make_kdm (certificate, cpl, valid_from.get(), valid_to.get(), formulation);
kdm.as_xml (output);
@@ -278,7 +278,7 @@ int main (int argc, char* argv[])
write_kdm_zip_files (
film, (*i)->screens(), cpl, dcp::LocalTime (valid_from.get()), dcp::LocalTime (valid_to.get()), formulation, output
);
-
+
if (verbose) {
cout << "Wrote ZIP files to " << output << "\n";
}
@@ -286,7 +286,7 @@ int main (int argc, char* argv[])
write_kdm_files (
film, (*i)->screens(), cpl, dcp::LocalTime (valid_from.get()), dcp::LocalTime (valid_to.get()), formulation, output
);
-
+
if (verbose) {
cout << "Wrote KDM files to " << output << "\n";
}
diff --git a/src/tools/dcpomatic_server.cc b/src/tools/dcpomatic_server.cc
index 8107949f5..37eeb1e8e 100644
--- a/src/tools/dcpomatic_server.cc
+++ b/src/tools/dcpomatic_server.cc
@@ -61,7 +61,7 @@ private:
_log = m;
}
- string _log;
+ string _log;
};
static shared_ptr<MemoryLog> memory_log (new MemoryLog);
@@ -103,7 +103,7 @@ class TaskBarIcon : public wxTaskBarIcon
public:
TaskBarIcon ()
{
-#ifdef __WXMSW__
+#ifdef __WXMSW__
wxIcon icon (std_to_wx ("taskbar_icon"));
#endif
#ifdef __WXGTK__
@@ -115,12 +115,12 @@ public:
#ifndef __WXOSX__
/* XXX: fix this for OS X */
SetIcon (icon, std_to_wx ("DCP-o-matic encode server"));
-#endif
+#endif
Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&TaskBarIcon::status, this), ID_status);
Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&TaskBarIcon::quit, this), ID_quit);
}
-
+
wxMenu* CreatePopupMenu ()
{
wxMenu* menu = new wxMenu;
@@ -151,14 +151,14 @@ public:
, _icon (0)
{}
-private:
-
+private:
+
bool OnInit ()
{
if (!wxApp::OnInit ()) {
return false;
}
-
+
dcpomatic_setup ();
_icon = new TaskBarIcon;
@@ -167,7 +167,7 @@ private:
Bind (wxEVT_TIMER, boost::bind (&App::check, this));
_timer.reset (new wxTimer (this));
_timer->Start (1000);
-
+
return true;
}
diff --git a/src/tools/dcpomatic_server_cli.cc b/src/tools/dcpomatic_server_cli.cc
index 847c1fa1b..efcfdc40e 100644
--- a/src/tools/dcpomatic_server_cli.cc
+++ b/src/tools/dcpomatic_server_cli.cc
@@ -105,9 +105,9 @@ main (int argc, char* argv[])
} else {
log.reset (new NullLog);
}
-
+
Server server (log, verbose);
-
+
try {
server.run (num_threads);
} catch (boost::system::system_error& e) {
diff --git a/src/tools/server_test.cc b/src/tools/server_test.cc
index 6f7a43569..02f4e6673 100644
--- a/src/tools/server_test.cc
+++ b/src/tools/server_test.cc
@@ -76,7 +76,7 @@ process_video (shared_ptr<PlayerVideo> pvf)
cout << "\033[0;31msizes differ\033[0m\n";
return;
}
-
+
uint8_t* p = local_encoded.data().get ();
uint8_t* q = remote_encoded.data().get ();
for (int i = 0; i < local_encoded.size(); ++i) {
@@ -129,7 +129,7 @@ main (int argc, char* argv[])
break;
}
}
-
+
if (server_host.empty() || film_dir.empty()) {
help (argv[0]);
exit (EXIT_FAILURE);
@@ -141,7 +141,7 @@ main (int argc, char* argv[])
server = new ServerDescription (server_host, 1);
film.reset (new Film (film_dir));
film->read_metadata ();
-
+
shared_ptr<Player> player (new Player (film));
DCPTime const frame = DCPTime::from_frames (1, film->video_frame_rate ());