+ 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.container_ratio) {
+ film->set_container (cc.container_ratio);
+ }
+ film->set_dcp_content_type (cc.dcp_content_type);
+ film->set_interop (cc.standard == dcp::INTEROP);
+ 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);
+ 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) {
+ boost::filesystem::path const can = boost::filesystem::canonical (i.path);
+ list<shared_ptr<Content> > content;
+
+ if (boost::filesystem::exists (can / "ASSETMAP") || (boost::filesystem::exists (can / "ASSETMAP.xml"))) {
+ content.push_back (shared_ptr<DCPContent>(new DCPContent(can)));
+ } else {
+ /* I guess it's not a DCP */
+ content = content_factory (can);
+ }
+
+ BOOST_FOREACH (shared_ptr<Content> j, content) {
+ film->examine_and_add_content (j);
+ }
+
+ while (jm->work_to_do ()) {
+ dcpomatic_sleep_seconds (1);
+ }
+
+ while (signal_manager->ui_idle() > 0) {}
+
+ BOOST_FOREACH (shared_ptr<Content> j, content) {
+ if (j->video) {
+ j->video->set_frame_type (i.frame_type);
+ }
+ }