2 Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 #include "transcode_job.h"
27 #include "make_mxf_job.h"
28 #include "make_dcp_job.h"
29 #include "job_manager.h"
30 #include "ab_transcode_job.h"
35 using namespace boost;
40 cerr << "Syntax: " << n << " [--help] [--deps] [--film <film>]\n";
44 main (int argc, char* argv[])
49 static struct option long_options[] = {
50 { "help", no_argument, 0, 'h'},
51 { "deps", no_argument, 0, 'd'},
52 { "film", required_argument, 0, 'f'},
57 int c = getopt_long (argc, argv, "hdf:", long_options, &option_index);
68 cout << dependency_version_summary () << "\n";
76 if (film_dir.empty ()) {
85 film = new Film (film_dir, true);
86 } catch (std::exception& e) {
87 cerr << argv[0] << ": error reading film `" << film_dir << "' (" << e.what() << ")\n";
92 if (film->dcp_ab ()) {
95 cout << "DCP for " << film->name() << "\n";
96 cout << "Content: " << film->content() << "\n";
97 pair<string, string> const f = Filter::ffmpeg_strings (film->filters ());
98 cout << "Filters: " << f.first << " " << f.second << "\n";
100 film->make_dcp (true);
102 list<shared_ptr<Job> > jobs = JobManager::instance()->get ();
104 bool all_done = false;
111 cout << "\033[" << jobs.size() << "A";
118 for (list<shared_ptr<Job> >::iterator i = jobs.begin(); i != jobs.end(); ++i) {
119 cout << (*i)->name() << ": ";
121 float const p = (*i)->overall_progress ();
124 cout << (*i)->status() << " \n";
126 cout << ": Running \n";
129 if (!(*i)->finished ()) {