projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Adapt for libdcp use of enum class.
[dcpomatic.git]
/
src
/
tools
/
dcpomatic_create.cc
diff --git
a/src/tools/dcpomatic_create.cc
b/src/tools/dcpomatic_create.cc
index 66a1c0dab6407613d0042103951d5f39b9560723..a2d5c8e5d2a9f61cb316e6c2bb56de11c89d391a 100644
(file)
--- a/
src/tools/dcpomatic_create.cc
+++ b/
src/tools/dcpomatic_create.cc
@@
-34,10
+34,10
@@
#include "lib/dcp_content.h"
#include "lib/create_cli.h"
#include "lib/version.h"
#include "lib/dcp_content.h"
#include "lib/create_cli.h"
#include "lib/version.h"
+#include "lib/dcpomatic_log.h"
#include <dcp/exceptions.h>
#include <libxml++/libxml++.h>
#include <boost/filesystem.hpp>
#include <dcp/exceptions.h>
#include <libxml++/libxml++.h>
#include <boost/filesystem.hpp>
-#include <boost/foreach.hpp>
#include <getopt.h>
#include <string>
#include <iostream>
#include <getopt.h>
#include <string>
#include <iostream>
@@
-49,8
+49,8
@@
using std::cout;
using std::cerr;
using std::list;
using std::exception;
using std::cerr;
using std::list;
using std::exception;
-using
boost
::shared_ptr;
-using
boost
::dynamic_pointer_cast;
+using
std
::shared_ptr;
+using
std
::dynamic_pointer_cast;
using boost::optional;
class SimpleSignalManager : public SignalManager
using boost::optional;
class SimpleSignalManager : public SignalManager
@@
-75,12
+75,12
@@
main (int argc, char* argv[])
}
if (cc.version) {
}
if (cc.version) {
- c
err
<< "dcpomatic version " << dcpomatic_version << " " << dcpomatic_git_commit << "\n";
- exit (
1
);
+ c
out
<< "dcpomatic version " << dcpomatic_version << " " << dcpomatic_git_commit << "\n";
+ exit (
EXIT_SUCCESS
);
}
if (cc.config_dir) {
}
if (cc.config_dir) {
-
Config
::override_path = *cc.config_dir;
+
State
::override_path = *cc.config_dir;
}
signal_manager = new SimpleSignalManager ();
}
signal_manager = new SimpleSignalManager ();
@@
-88,20
+88,29
@@
main (int argc, char* argv[])
try {
shared_ptr<Film> film (new Film(cc.output_dir));
try {
shared_ptr<Film> film (new Film(cc.output_dir));
+ dcpomatic_log = film->log ();
+ dcpomatic_log->set_types (Config::instance()->log_types());
if (cc.template_name) {
film->use_template (cc.template_name.get());
}
film->set_name (cc.name);
if (cc.template_name) {
film->use_template (cc.template_name.get());
}
film->set_name (cc.name);
- film->set_container (cc.container_ratio);
+ if (cc.container_ratio) {
+ film->set_container (cc.container_ratio);
+ }
film->set_dcp_content_type (cc.dcp_content_type);
film->set_dcp_content_type (cc.dcp_content_type);
- film->set_interop (cc.standard == dcp::INTEROP);
+ film->set_interop (cc.standard == dcp::
Standard::
INTEROP);
film->set_use_isdcf_name (!cc.no_use_isdcf_name);
film->set_use_isdcf_name (!cc.no_use_isdcf_name);
- film->set_signed (!cc.no_sign);
film->set_encrypted (cc.encrypt);
film->set_three_d (cc.threed);
film->set_encrypted (cc.encrypt);
film->set_three_d (cc.threed);
+ if (cc.fourk) {
+ film->set_resolution (RESOLUTION_4K);
+ }
+ if (cc.j2k_bandwidth) {
+ film->set_j2k_bandwidth (*cc.j2k_bandwidth);
+ }
-
BOOST_FOREACH (CreateCLI::Content i,
cc.content) {
+
for (auto i:
cc.content) {
boost::filesystem::path const can = boost::filesystem::canonical (i.path);
list<shared_ptr<Content> > content;
boost::filesystem::path const can = boost::filesystem::canonical (i.path);
list<shared_ptr<Content> > content;
@@
-112,19
+121,18
@@
main (int argc, char* argv[])
content = content_factory (can);
}
content = content_factory (can);
}
-
BOOST_FOREACH (shared_ptr<Content> j,
content) {
+
for (auto j:
content) {
film->examine_and_add_content (j);
}
while (jm->work_to_do ()) {
film->examine_and_add_content (j);
}
while (jm->work_to_do ()) {
- dcpomatic_sleep (1);
+ dcpomatic_sleep
_seconds
(1);
}
while (signal_manager->ui_idle() > 0) {}
}
while (signal_manager->ui_idle() > 0) {}
-
BOOST_FOREACH (shared_ptr<Content> j,
content) {
+
for (auto j:
content) {
if (j->video) {
if (j->video) {
- j->video->set_scale (VideoContentScale(cc.content_ratio));
j->video->set_frame_type (i.frame_type);
}
}
j->video->set_frame_type (i.frame_type);
}
}
@@
-134,7
+142,7
@@
main (int argc, char* argv[])
film->set_video_frame_rate (*cc.dcp_frame_rate);
}
film->set_video_frame_rate (*cc.dcp_frame_rate);
}
-
BOOST_FOREACH (shared_ptr<Content> i,
film->content()) {
+
for (auto i:
film->content()) {
shared_ptr<ImageContent> ic = dynamic_pointer_cast<ImageContent> (i);
if (ic && ic->still()) {
ic->video->set_length (cc.still_length * 24);
shared_ptr<ImageContent> ic = dynamic_pointer_cast<ImageContent> (i);
if (ic && ic->still()) {
ic->video->set_length (cc.still_length * 24);
@@
-142,7
+150,7
@@
main (int argc, char* argv[])
}
if (jm->errors ()) {
}
if (jm->errors ()) {
-
BOOST_FOREACH (shared_ptr<Job> i,
jm->get()) {
+
for (auto i:
jm->get()) {
if (i->finished_in_error()) {
cerr << i->error_summary() << "\n"
<< i->error_details() << "\n";
if (i->finished_in_error()) {
cerr << i->error_summary() << "\n"
<< i->error_details() << "\n";