diff options
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/dcpomatic.cc (renamed from src/tools/dvdomatic.cc) | 96 | ||||
| -rw-r--r-- | src/tools/dcpomatic_batch.cc (renamed from src/tools/dvdomatic_batch.cc) | 21 | ||||
| -rw-r--r-- | src/tools/dcpomatic_cli.cc (renamed from src/tools/makedcp.cc) | 31 | ||||
| -rw-r--r-- | src/tools/dcpomatic_server.cc (renamed from src/tools/servomatic_gui.cc) | 6 | ||||
| -rw-r--r-- | src/tools/dcpomatic_server_cli.cc (renamed from src/tools/servomatic_cli.cc) | 4 | ||||
| -rw-r--r-- | src/tools/po/es_ES.po | 14 | ||||
| -rw-r--r-- | src/tools/po/fr_FR.po | 2 | ||||
| -rw-r--r-- | src/tools/po/sv_SE.po | 12 | ||||
| -rw-r--r-- | src/tools/servomatictest.cc | 19 | ||||
| -rw-r--r-- | src/tools/wscript | 18 |
10 files changed, 99 insertions, 124 deletions
diff --git a/src/tools/dvdomatic.cc b/src/tools/dcpomatic.cc index e0629bb98..ac39d4fed 100644 --- a/src/tools/dvdomatic.cc +++ b/src/tools/dcpomatic.cc @@ -40,12 +40,9 @@ #include "wx/wx_ui_signaller.h" #include "wx/about_dialog.h" #include "lib/film.h" -#include "lib/format.h" #include "lib/config.h" -#include "lib/filter.h" #include "lib/util.h" -#include "lib/scaler.h" -#include "lib/exceptions.h" +#include "lib/version.h" #include "lib/ui_signaller.h" #include "lib/log.h" @@ -64,6 +61,7 @@ static FilmViewer* film_viewer = 0; static shared_ptr<Film> film; static std::string log_level; static std::string film_to_load; +static std::string film_to_create; static wxMenu* jobs_menu = 0; static void set_menu_sensitivity (); @@ -151,7 +149,6 @@ enum { ID_jobs_make_dcp, ID_jobs_send_dcp_to_tms, ID_jobs_show_dcp, - ID_jobs_analyse_audio, }; void @@ -180,12 +177,10 @@ setup_menu (wxMenuBar* m) add_item (jobs_menu, _("&Make DCP"), ID_jobs_make_dcp, NEEDS_FILM); add_item (jobs_menu, _("&Send DCP to TMS"), ID_jobs_send_dcp_to_tms, NEEDS_FILM); add_item (jobs_menu, _("S&how DCP"), ID_jobs_show_dcp, NEEDS_FILM); - jobs_menu->AppendSeparator (); - add_item (jobs_menu, _("&Analyse audio"), ID_jobs_analyse_audio, NEEDS_FILM); wxMenu* help = new wxMenu; #ifdef __WXOSX__ - add_item (help, _("About DVD-o-matic"), wxID_ABOUT, ALWAYS); + add_item (help, _("About DCP-o-matic"), wxID_ABOUT, ALWAYS); #else add_item (help, _("About"), wxID_ABOUT, ALWAYS); #endif @@ -224,34 +219,24 @@ public: Connect (ID_jobs_make_dcp, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler (Frame::jobs_make_dcp)); Connect (ID_jobs_send_dcp_to_tms, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler (Frame::jobs_send_dcp_to_tms)); Connect (ID_jobs_show_dcp, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler (Frame::jobs_show_dcp)); - Connect (ID_jobs_analyse_audio, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler (Frame::jobs_analyse_audio)); Connect (wxID_ABOUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler (Frame::help_about)); Connect (wxID_ANY, wxEVT_MENU_OPEN, wxMenuEventHandler (Frame::menu_opened)); - wxPanel* panel = new wxPanel (this); - wxSizer* s = new wxBoxSizer (wxHORIZONTAL); - s->Add (panel, 1, wxEXPAND); - SetSizer (s); + film_editor = new FilmEditor (film, this); + film_viewer = new FilmViewer (film, this); + JobManagerView* job_manager_view = new JobManagerView (this, static_cast<JobManagerView::Buttons> (0)); - film_editor = new FilmEditor (film, panel); - film_viewer = new FilmViewer (film, panel); - JobManagerView* job_manager_view = new JobManagerView (panel, static_cast<JobManagerView::Buttons> (0)); + wxBoxSizer* right_sizer = new wxBoxSizer (wxVERTICAL); + right_sizer->Add (film_viewer, 2, wxEXPAND | wxALL, 6); + right_sizer->Add (job_manager_view, 1, wxEXPAND | wxALL, 6); - _top_sizer = new wxBoxSizer (wxHORIZONTAL); - _top_sizer->Add (film_editor, 0, wxALL, 6); - _top_sizer->Add (film_viewer, 1, wxEXPAND | wxALL, 6); - - wxBoxSizer* main_sizer = new wxBoxSizer (wxVERTICAL); - main_sizer->Add (_top_sizer, 2, wxEXPAND | wxALL, 6); - main_sizer->Add (job_manager_view, 1, wxEXPAND | wxALL, 6); - panel->SetSizer (main_sizer); + wxBoxSizer* main_sizer = new wxBoxSizer (wxHORIZONTAL); + main_sizer->Add (film_editor, 1, wxEXPAND | wxALL, 6); + main_sizer->Add (right_sizer, 2, wxEXPAND | wxALL, 6); set_menu_sensitivity (); - /* XXX: calling these here is a bit of a hack */ - film_editor->setup_visibility (); - film_editor->FileChanged.connect (bind (&Frame::file_changed, this, _1)); if (film) { file_changed (film->directory ()); @@ -260,22 +245,11 @@ public: } set_film (); - - film_editor->Connect (wxID_ANY, wxEVT_SIZE, wxSizeEventHandler (Frame::film_editor_sized), 0, this); + SetSizer (main_sizer); } private: - void film_editor_sized (wxSizeEvent &) - { - static bool in_layout = false; - if (!in_layout) { - in_layout = true; - _top_sizer->Layout (); - in_layout = false; - } - } - void menu_opened (wxMenuEvent& ev) { if (ev.GetMenu() != jobs_menu) { @@ -297,7 +271,7 @@ private: void file_changed (string f) { stringstream s; - s << wx_to_std (_("DVD-o-matic")); + s << wx_to_std (_("DCP-o-matic")); if (!f.empty ()) { s << " - " << f; } @@ -326,7 +300,8 @@ private: } maybe_save_then_delete_film (); - film.reset (new Film (d->get_path (), false)); + film.reset (new Film (d->get_path ())); + film->write_metadata (); film->log()->set_level (log_level); film->set_name (boost::filesystem::path (d->get_path()).filename().generic_string()); set_film (); @@ -420,31 +395,26 @@ private: #endif } - void jobs_analyse_audio (wxCommandEvent &) - { - film->analyse_audio (); - } - void help_about (wxCommandEvent &) { AboutDialog* d = new AboutDialog (this); d->ShowModal (); d->Destroy (); } - - wxSizer* _top_sizer; }; #if wxMINOR_VERSION == 9 static const wxCmdLineEntryDesc command_line_description[] = { { wxCMD_LINE_OPTION, "l", "log", "set log level (silent, verbose or timing)", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL }, - { wxCMD_LINE_PARAM, 0, 0, "film to load", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE | wxCMD_LINE_PARAM_OPTIONAL }, + { wxCMD_LINE_SWITCH, "n", "new", "create new film", wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL }, + { wxCMD_LINE_PARAM, 0, 0, "film to load or create", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE | wxCMD_LINE_PARAM_OPTIONAL }, { wxCMD_LINE_NONE, "", "", "", wxCmdLineParamType (0), 0 } }; #else static const wxCmdLineEntryDesc command_line_description[] = { { wxCMD_LINE_OPTION, wxT("l"), wxT("log"), wxT("set log level (silent, verbose or timing)"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL }, - { wxCMD_LINE_PARAM, 0, 0, wxT("film to load"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE | wxCMD_LINE_PARAM_OPTIONAL }, + { wxCMD_LINE_SWITCH, wxT("n"), wxT("new"), wxT("create new film"), wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL }, + { wxCMD_LINE_PARAM, 0, 0, wxT("film to load or create"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE | wxCMD_LINE_PARAM_OPTIONAL }, { wxCMD_LINE_NONE, wxT(""), wxT(""), wxT(""), wxCmdLineParamType (0), 0 } }; #endif @@ -457,7 +427,7 @@ class App : public wxApp return false; } -#ifdef DVDOMATIC_LINUX +#ifdef DCPOMATIC_LINUX unsetenv ("UBUNTU_MENUPROXY"); #endif @@ -471,16 +441,16 @@ class App : public wxApp /* Enable i18n; this will create a Config object to look for a force-configured language. This Config - object will be wrong, however, because dvdomatic_setup + object will be wrong, however, because dcpomatic_setup hasn't yet been called and there aren't any scalers, filters etc. set up yet. */ - dvdomatic_setup_i18n (); + dcpomatic_setup_i18n (); /* Set things up, including scalers / filters etc. which will now be internationalised correctly. */ - dvdomatic_setup (); + dcpomatic_setup (); /* Force the configuration to be re-loaded correctly next time it is needed. @@ -490,13 +460,21 @@ class App : public wxApp if (!film_to_load.empty() && boost::filesystem::is_directory (film_to_load)) { try { film.reset (new Film (film_to_load)); + film->read_metadata (); film->log()->set_level (log_level); } catch (exception& e) { error_dialog (0, std_to_wx (String::compose (wx_to_std (_("Could not load film %1 (%2)")), film_to_load, e.what()))); } } - Frame* f = new Frame (_("DVD-o-matic")); + if (!film_to_create.empty ()) { + film.reset (new Film (film_to_create)); + film->write_metadata (); + film->log()->set_level (log_level); + film->set_name (boost::filesystem::path (film_to_create).filename().generic_string ()); + } + + Frame* f = new Frame (_("DCP-o-matic")); SetTopWindow (f); f->Maximize (); f->Show (); @@ -516,11 +494,15 @@ class App : public wxApp bool OnCmdLineParsed (wxCmdLineParser& parser) { if (parser.GetParamCount() > 0) { - film_to_load = wx_to_std (parser.GetParam(0)); + if (parser.Found (wxT ("new"))) { + film_to_create = wx_to_std (parser.GetParam (0)); + } else { + film_to_load = wx_to_std (parser.GetParam(0)); + } } wxString log; - if (parser.Found(wxT("log"), &log)) { + if (parser.Found (wxT ("log"), &log)) { log_level = wx_to_std (log); } diff --git a/src/tools/dvdomatic_batch.cc b/src/tools/dcpomatic_batch.cc index d9ddb9d46..b4ab054fd 100644 --- a/src/tools/dvdomatic_batch.cc +++ b/src/tools/dcpomatic_batch.cc @@ -132,11 +132,11 @@ private: void help_about (wxCommandEvent &) { wxAboutDialogInfo info; - info.SetName (_("DVD-o-matic Batch Converter")); - if (strcmp (dvdomatic_git_commit, "release") == 0) { - info.SetVersion (std_to_wx (String::compose ("version %1", dvdomatic_version))); + info.SetName (_("DCP-o-matic Batch Converter")); + if (strcmp (dcpomatic_git_commit, "release") == 0) { + info.SetVersion (std_to_wx (String::compose ("version %1", dcpomatic_version))); } else { - info.SetVersion (std_to_wx (String::compose ("version %1 git %2", dvdomatic_version, dvdomatic_git_commit))); + info.SetVersion (std_to_wx (String::compose ("version %1 git %2", dcpomatic_version, dcpomatic_git_commit))); } info.SetDescription (_("Free, open-source DCP generation from almost anything.")); info.SetCopyright (_("(C) 2012-2013 Carl Hetherington, Terrence Meiczinger, Paul Davis, Ole Laursen")); @@ -157,7 +157,7 @@ private: translators.Add (wxT ("Adam Klotblixt")); info.SetTranslators (translators); - info.SetWebSite (wxT ("http://carlh.net/software/dvdomatic")); + info.SetWebSite (wxT ("http://carlh.net/software/dcpomatic")); wxAboutBox (info); } @@ -177,6 +177,7 @@ private: if (r == wxID_OK) { try { shared_ptr<Film> film (new Film (wx_to_std (c->GetPath ()))); + film->read_metadata (); film->make_dcp (); } catch (std::exception& e) { wxString p = c->GetPath (); @@ -197,29 +198,29 @@ class App : public wxApp return false; } -#ifdef DVDOMATIC_LINUX +#ifdef DCPOMATIC_LINUX unsetenv ("UBUNTU_MENUPROXY"); #endif /* Enable i18n; this will create a Config object to look for a force-configured language. This Config - object will be wrong, however, because dvdomatic_setup + object will be wrong, however, because dcpomatic_setup hasn't yet been called and there aren't any scalers, filters etc. set up yet. */ - dvdomatic_setup_i18n (); + dcpomatic_setup_i18n (); /* Set things up, including scalers / filters etc. which will now be internationalised correctly. */ - dvdomatic_setup (); + dcpomatic_setup (); /* Force the configuration to be re-loaded correctly next time it is needed. */ Config::drop (); - Frame* f = new Frame (_("DVD-o-matic Batch Converter")); + Frame* f = new Frame (_("DCP-o-matic Batch Converter")); SetTopWindow (f); f->Maximize (); f->Show (); diff --git a/src/tools/makedcp.cc b/src/tools/dcpomatic_cli.cc index 1cd5145ed..ee9e2cdc0 100644 --- a/src/tools/makedcp.cc +++ b/src/tools/dcpomatic_cli.cc @@ -21,12 +21,10 @@ #include <iomanip> #include <getopt.h> #include <libdcp/version.h> -#include "format.h" #include "film.h" #include "filter.h" #include "transcode_job.h" #include "job_manager.h" -#include "ab_transcode_job.h" #include "util.h" #include "scaler.h" #include "version.h" @@ -46,9 +44,9 @@ static void help (string n) { cerr << "Syntax: " << n << " [OPTION] <FILM>\n" - << " -v, --version show DVD-o-matic version\n" + << " -v, --version show DCP-o-matic version\n" << " -h, --help show this help\n" - << " -d, --deps list DVD-o-matic dependency details\n" + << " -d, --deps list DCP-o-matic dependency details and quit\n" << " -f, --flags show flags passed to C++ compiler on build\n" << " -n, --no-progress do not print progress to stdout\n" << " -r, --no-remote do not use any remote servers\n" @@ -85,7 +83,7 @@ main (int argc, char* argv[]) switch (c) { case 'v': - cout << "dvdomatic version " << dvdomatic_version << " " << dvdomatic_git_commit << "\n"; + cout << "dcpomatic version " << dcpomatic_version << " " << dcpomatic_git_commit << "\n"; exit (EXIT_SUCCESS); case 'h': help (argv[0]); @@ -94,7 +92,7 @@ main (int argc, char* argv[]) cout << dependency_version_summary () << "\n"; exit (EXIT_SUCCESS); case 'f': - cout << dvdomatic_cxx_flags << "\n"; + cout << dcpomatic_cxx_flags << "\n"; exit (EXIT_SUCCESS); case 'n': progress = false; @@ -115,13 +113,13 @@ main (int argc, char* argv[]) film_dir = argv[optind]; - dvdomatic_setup (); + dcpomatic_setup (); if (no_remote) { Config::instance()->set_servers (vector<ServerDescription*> ()); } - cout << "DVD-o-matic " << dvdomatic_version << " git " << dvdomatic_git_commit; + cout << "DCP-o-matic " << dcpomatic_version << " git " << dcpomatic_git_commit; char buf[256]; if (gethostname (buf, 256) == 0) { cout << " on " << buf; @@ -130,7 +128,8 @@ main (int argc, char* argv[]) shared_ptr<Film> film; try { - film.reset (new Film (film_dir, true)); + film.reset (new Film (film_dir)); + film->read_metadata (); } catch (std::exception& e) { cerr << argv[0] << ": error reading film `" << film_dir << "' (" << e.what() << ")\n"; exit (EXIT_FAILURE); @@ -138,14 +137,10 @@ main (int argc, char* argv[]) film->log()->set_level ((Log::Level) log_level); - cout << "\nMaking "; - if (film->dcp_ab()) { - cout << "A/B "; - } - cout << "DCP for " << film->name() << "\n"; - cout << "Content: " << film->content() << "\n"; - pair<string, string> const f = Filter::ffmpeg_strings (film->filters ()); - cout << "Filters: " << f.first << " " << f.second << "\n"; + cout << "\nMaking DCP for " << film->name() << "\n"; +// cout << "Content: " << film->content() << "\n"; +// pair<string, string> const f = Filter::ffmpeg_strings (film->filters ()); +// cout << "Filters: " << f.first << " " << f.second << "\n"; film->make_dcp (); @@ -154,7 +149,7 @@ main (int argc, char* argv[]) bool error = false; while (!should_stop) { - dvdomatic_sleep (5); + dcpomatic_sleep (5); list<shared_ptr<Job> > jobs = JobManager::instance()->get (); diff --git a/src/tools/servomatic_gui.cc b/src/tools/dcpomatic_server.cc index 000c2019f..d3a353154 100644 --- a/src/tools/servomatic_gui.cc +++ b/src/tools/dcpomatic_server.cc @@ -61,7 +61,7 @@ class StatusDialog : public wxDialog { public: StatusDialog () - : wxDialog (0, wxID_ANY, _("DVD-o-matic encode server"), wxDefaultPosition, wxSize (600, 80), wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) + : wxDialog (0, wxID_ANY, _("DCP-o-matic encode server"), wxDefaultPosition, wxSize (600, 80), wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) , _timer (this, ID_timer) { _sizer = new wxFlexGridSizer (1, 6, 6); @@ -105,7 +105,7 @@ public: #endif #ifndef __WXOSX__ /* XXX: fix this for OS X */ - SetIcon (icon, std_to_wx ("DVD-o-matic encode server")); + SetIcon (icon, std_to_wx ("DCP-o-matic encode server")); #endif Connect (ID_status, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler (TaskBarIcon::status)); @@ -150,7 +150,7 @@ private: return false; } - dvdomatic_setup (); + dcpomatic_setup (); _icon = new TaskBarIcon; _thread = new thread (bind (&App::main_thread, this)); diff --git a/src/tools/servomatic_cli.cc b/src/tools/dcpomatic_server_cli.cc index 6626d45b9..76d085034 100644 --- a/src/tools/servomatic_cli.cc +++ b/src/tools/dcpomatic_server_cli.cc @@ -51,7 +51,7 @@ static void help (string n) { cerr << "Syntax: " << n << " [OPTION]\n" - << " -v, --version show DVD-o-matic version\n" + << " -v, --version show DCP-o-matic version\n" << " -h, --help show this help\n" << " -t, --threads number of parallel encoding threads to use\n"; } @@ -78,7 +78,7 @@ main (int argc, char* argv[]) switch (c) { case 'v': - cout << "dvdomatic version " << dvdomatic_version << " " << dvdomatic_git_commit << "\n"; + cout << "dcpomatic version " << dcpomatic_version << " " << dcpomatic_git_commit << "\n"; exit (EXIT_SUCCESS); case 'h': help (argv[0]); diff --git a/src/tools/po/es_ES.po b/src/tools/po/es_ES.po index bbae550d7..43c9b12f1 100644 --- a/src/tools/po/es_ES.po +++ b/src/tools/po/es_ES.po @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: DVDOMATIC\n" +"Project-Id-Version: DCPOMATIC\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-06-04 23:59+0100\n" "PO-Revision-Date: 2013-03-23 21:08-0500\n" @@ -90,16 +90,16 @@ msgstr "No se pudo cargar la película %s (%s)" msgid "Could not open film at %s (%s)" msgstr "No se pudo cargar la película en %s (%s)" -#: src/tools/dvdomatic.cc:300 src/tools/dvdomatic.cc:431 -#: src/tools/dvdomatic.cc:524 -msgid "DVD-o-matic" -msgstr "DVD-o-matic" +#: src/tools/dcpomatic.cc:287 src/tools/dcpomatic.cc:410 +#: src/tools/dcpomatic.cc:531 +msgid "DCP-o-matic" +msgstr "DCP-o-matic" -#: src/tools/dvdomatic.cc:79 +#: src/tools/dcpomatic.cc:75 msgid "Film changed" msgstr "Película cambiada" -#: src/tools/dvdomatic.cc:437 +#: src/tools/dvdomatic.cc:425 msgid "Free, open-source DCP generation from almost anything." msgstr "" "Generación de DCP a partir de casi cualquier fuente, libre y de código " diff --git a/src/tools/po/fr_FR.po b/src/tools/po/fr_FR.po index 8a28a0e01..b9e39b392 100644 --- a/src/tools/po/fr_FR.po +++ b/src/tools/po/fr_FR.po @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: DVD-o-matic FRENCH\n" +"Project-Id-Version: DCP-o-matic FRENCH\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-06-04 23:59+0100\n" "PO-Revision-Date: 2013-05-10 14:09+0100\n" diff --git a/src/tools/po/sv_SE.po b/src/tools/po/sv_SE.po index 662b74bb3..157b1fb19 100644 --- a/src/tools/po/sv_SE.po +++ b/src/tools/po/sv_SE.po @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: DVD-o-matic\n" +"Project-Id-Version: DCP-o-matic\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-06-04 23:59+0100\n" "PO-Revision-Date: 2013-04-09 10:12+0100\n" @@ -89,10 +89,10 @@ msgstr "Kunde inte öppna filmen %1 (%2)" msgid "Could not open film at %s (%s)" msgstr "Kunde inte öppna filmen vid %s (%s)" -#: src/tools/dvdomatic.cc:300 src/tools/dvdomatic.cc:431 -#: src/tools/dvdomatic.cc:524 -msgid "DVD-o-matic" -msgstr "DVD-o-matic" +#: src/tools/dvdomatic.cc:288 src/tools/dvdomatic.cc:419 +#: src/tools/dvdomatic.cc:506 +msgid "DCP-o-matic" +msgstr "DCP-o-matic" #: src/tools/dvdomatic.cc:79 msgid "Film changed" @@ -114,7 +114,7 @@ msgstr "&Visa DCP" #: src/tools/dvdomatic.cc:78 #, fuzzy, c-format msgid "Save changes to film \"%s\" before closing?" -msgstr "Spara ändringarna till filmen \"%1\" före avslut?" +msgstr "Spara ändringarna till filmen \"%s\" före avslut?" #: src/tools/dvdomatic.cc:340 msgid "Select film to open" diff --git a/src/tools/servomatictest.cc b/src/tools/servomatictest.cc index 5e1cf49b4..88974eed7 100644 --- a/src/tools/servomatictest.cc +++ b/src/tools/servomatictest.cc @@ -28,13 +28,12 @@ #include "scaler.h" #include "server.h" #include "dcp_video_frame.h" -#include "options.h" #include "decoder.h" #include "exceptions.h" #include "scaler.h" #include "log.h" -#include "decoder_factory.h" #include "video_decoder.h" +#include "player.h" using std::cout; using std::cerr; @@ -146,22 +145,20 @@ main (int argc, char* argv[]) exit (EXIT_FAILURE); } - dvdomatic_setup (); + dcpomatic_setup (); server = new ServerDescription (server_host, 1); - shared_ptr<Film> film (new Film (film_dir, true)); + shared_ptr<Film> film (new Film (film_dir)); + film->read_metadata (); - DecodeOptions opt; - opt.decode_audio = false; - opt.decode_subtitles = true; - opt.video_sync = true; + shared_ptr<Player> player = film->player (); + player->disable_audio (); - Decoders decoders = decoder_factory (film, opt); try { - decoders.video->Video.connect (boost::bind (process_video, _1, _2, _3)); + player->Video.connect (boost::bind (process_video, _1, _2, _3)); bool done = false; while (!done) { - done = decoders.video->pass (); + done = player->pass (); } } catch (std::exception& e) { cerr << "Error: " << e.what() << "\n"; diff --git a/src/tools/wscript b/src/tools/wscript index 20a92cad2..c7ab44604 100644 --- a/src/tools/wscript +++ b/src/tools/wscript @@ -4,31 +4,31 @@ from waflib import Logs import i18n def build(bld): - for t in ['makedcp', 'servomatic_cli', 'servomatictest']: + for t in ['dcpomatic_cli', 'dcpomatic_server_cli']: obj = bld(features = 'cxx cxxprogram') - obj.uselib = 'BOOST_THREAD OPENJPEG DCP AVFORMAT AVFILTER AVCODEC AVUTIL SWSCALE POSTPROC CXML WXWIDGETS' + obj.uselib = 'BOOST_THREAD OPENJPEG DCP CXML AVFORMAT AVFILTER AVCODEC AVUTIL SWSCALE POSTPROC WXWIDGETS' obj.includes = ['..'] - obj.use = ['libdvdomatic'] + obj.use = ['libdcpomatic'] obj.source = '%s.cc' % t obj.target = t if not bld.env.DISABLE_GUI: - for t in ['dvdomatic', 'dvdomatic_batch', 'servomatic_gui']: + for t in ['dcpomatic', 'dcpomatic_batch', 'dcpomatic_server']: obj = bld(features = 'cxx cxxprogram') obj.uselib = 'DCP OPENJPEG AVFORMAT AVFILTER AVCODEC AVUTIL SWSCALE POSTPROC CXML WXWIDGETS' if bld.env.STATIC: obj.uselib += ' GTK' obj.includes = ['..'] - obj.use = ['libdvdomatic', 'libdvdomatic-wx'] + obj.use = ['libdcpomatic', 'libdcpomatic-wx'] obj.source = '%s.cc' % t if bld.env.TARGET_WINDOWS: - obj.source += ' ../../platform/windows/dvdomatic.rc' + obj.source += ' ../../platform/windows/dcpomatic.rc' obj.target = t - i18n.po_to_mo(os.path.join('src', 'tools'), 'dvdomatic', bld) + i18n.po_to_mo(os.path.join('src', 'tools'), 'dcpomatic', bld) def pot(bld): - i18n.pot(os.path.join('src', 'tools'), 'dvdomatic.cc', 'dvdomatic') + i18n.pot(os.path.join('src', 'tools'), 'dcpomatic.cc', 'dcpomatic') def pot_merge(bld): - i18n.pot_merge(os.path.join('src', 'tools'), 'dvdomatic') + i18n.pot_merge(os.path.join('src', 'tools'), 'dcpomatic') |
