}
if (a == "-e" || a == "--encrypt") {
- encrypt = claimed = true;
+ _encrypt = claimed = true;
} else if (a == "--no-use-isdcf-name") {
- no_use_isdcf_name = claimed = true;
+ _no_use_isdcf_name = claimed = true;
} else if (a == "--threed") {
- threed = claimed = true;
+ _threed = claimed = true;
} else if (a == "--left-eye") {
next_frame_type = VideoFrameType::THREE_D_LEFT;
claimed = true;
next_frame_type = VideoFrameType::THREE_D_RIGHT;
claimed = true;
} else if (a == "--twok") {
- twok = true;
+ _twok = true;
claimed = true;
} else if (a == "--fourk") {
- fourk = true;
+ _fourk = true;
claimed = true;
}
return boost::optional<int>(value);
};
- argument_option(i, argc, argv, "-n", "--name", &claimed, &error, &name);
+ argument_option(i, argc, argv, "-n", "--name", &claimed, &error, &_name);
argument_option(i, argc, argv, "-t", "--template", &claimed, &error, &template_name_string);
argument_option(i, argc, argv, "-c", "--dcp-content-type", &claimed, &error, &dcp_content_type_string);
argument_option(i, argc, argv, "-f", "--dcp-frame-rate", &claimed, &error, &dcp_frame_rate_int);
}
if (!template_name_string.empty()) {
- template_name = template_name_string;
+ _template_name = template_name_string;
}
if (dcp_frame_rate_int) {
}
if (j2k_bandwidth_int) {
- j2k_bandwidth = j2k_bandwidth_int * 1000000;
+ _j2k_bandwidth = j2k_bandwidth_int * 1000000;
}
- dcp_content_type = DCPContentType::from_isdcf_name(dcp_content_type_string);
- if (!dcp_content_type) {
+ _dcp_content_type = DCPContentType::from_isdcf_name(dcp_content_type_string);
+ if (!_dcp_content_type) {
error = String::compose("%1: unrecognised DCP content type '%2'", argv[0], dcp_content_type_string);
return;
}
if (!container_ratio_string.empty()) {
- container_ratio = Ratio::from_id (container_ratio_string);
- if (!container_ratio) {
+ _container_ratio = Ratio::from_id (container_ratio_string);
+ if (!_container_ratio) {
error = String::compose("%1: unrecognised container ratio %2", argv[0], container_ratio_string);
return;
}
}
if (standard_string == "interop") {
- standard = dcp::Standard::INTEROP;
+ _standard = dcp::Standard::INTEROP;
}
if (content.empty()) {
return;
}
- if (name.empty()) {
- name = content[0].path.leaf().string();
+ if (_name.empty()) {
+ _name = content[0].path.leaf().string();
}
- if (j2k_bandwidth && (*j2k_bandwidth < 10000000 || *j2k_bandwidth > Config::instance()->maximum_j2k_bandwidth())) {
+ if (_j2k_bandwidth && (*_j2k_bandwidth < 10000000 || *_j2k_bandwidth > Config::instance()->maximum_j2k_bandwidth())) {
error = String::compose("%1: j2k-bandwidth must be between 10 and %2 Mbit/s", argv[0], (Config::instance()->maximum_j2k_bandwidth() / 1000000));
return;
}
auto film = std::make_shared<Film>(output_dir);
dcpomatic_log = film->log();
dcpomatic_log->set_types(Config::instance()->log_types());
- if (template_name) {
- film->use_template(template_name.get());
+ if (_template_name) {
+ film->use_template(_template_name.get());
}
- film->set_name(name);
+ film->set_name(_name);
- if (container_ratio) {
- film->set_container(container_ratio);
+ if (_container_ratio) {
+ film->set_container(_container_ratio);
}
- film->set_dcp_content_type(dcp_content_type);
- film->set_interop(standard == dcp::Standard::INTEROP);
- film->set_use_isdcf_name(!no_use_isdcf_name);
- film->set_encrypted(encrypt);
- film->set_three_d(threed);
- if (twok) {
+ film->set_dcp_content_type(_dcp_content_type);
+ film->set_interop(_standard == dcp::Standard::INTEROP);
+ film->set_use_isdcf_name(!_no_use_isdcf_name);
+ film->set_encrypted(_encrypt);
+ film->set_three_d(_threed);
+ if (_twok) {
film->set_resolution(Resolution::TWO_K);
}
- if (fourk) {
+ if (_fourk) {
film->set_resolution(Resolution::FOUR_K);
}
- if (j2k_bandwidth) {
- film->set_j2k_bandwidth(*j2k_bandwidth);
+ if (_j2k_bandwidth) {
+ film->set_j2k_bandwidth(*_j2k_bandwidth);
}
int channels = 6;
cc = run ("dcpomatic2_create x --name frobozz --template bar");
BOOST_CHECK (!cc.error);
- BOOST_CHECK_EQUAL (cc.name, "frobozz");
- BOOST_REQUIRE (cc.template_name);
- BOOST_CHECK_EQUAL (*cc.template_name, "bar");
+ BOOST_CHECK_EQUAL(cc._name, "frobozz");
+ BOOST_REQUIRE(cc._template_name);
+ BOOST_CHECK_EQUAL(*cc._template_name, "bar");
cc = run ("dcpomatic2_create x --dcp-content-type FTR");
BOOST_CHECK (!cc.error);
- BOOST_CHECK_EQUAL (cc.dcp_content_type, DCPContentType::from_isdcf_name("FTR"));
+ BOOST_CHECK_EQUAL(cc._dcp_content_type, DCPContentType::from_isdcf_name("FTR"));
cc = run ("dcpomatic2_create x --dcp-frame-rate 30");
BOOST_CHECK (!cc.error);
cc = run ("dcpomatic2_create x --container-ratio 185");
BOOST_CHECK (!cc.error);
- BOOST_CHECK_EQUAL (cc.container_ratio, Ratio::from_id("185"));
+ BOOST_CHECK_EQUAL(cc._container_ratio, Ratio::from_id("185"));
cc = run ("dcpomatic2_create x --container-ratio XXX");
BOOST_CHECK (cc.error);
cc = run ("dcpomatic2_create x --standard SMPTE");
BOOST_CHECK (!cc.error);
- BOOST_CHECK_EQUAL (cc.standard, dcp::Standard::SMPTE);
+ BOOST_CHECK_EQUAL(cc._standard, dcp::Standard::SMPTE);
cc = run ("dcpomatic2_create x --standard interop");
BOOST_CHECK (!cc.error);
- BOOST_CHECK_EQUAL (cc.standard, dcp::Standard::INTEROP);
+ BOOST_CHECK_EQUAL(cc._standard, dcp::Standard::INTEROP);
cc = run ("dcpomatic2_create x --standard SMPTEX");
BOOST_CHECK (cc.error);
BOOST_CHECK_EQUAL (cc.content[0].frame_type, VideoFrameType::THREE_D_LEFT);
BOOST_CHECK_EQUAL (cc.content[1].path, "right.mp4");
BOOST_CHECK_EQUAL (cc.content[1].frame_type, VideoFrameType::THREE_D_RIGHT);
- BOOST_CHECK_EQUAL (cc.fourk, false);
+ BOOST_CHECK_EQUAL(cc._fourk, false);
cc = run ("dcpomatic2_create --twok foo.mp4");
BOOST_REQUIRE_EQUAL (cc.content.size(), 1U);
BOOST_CHECK_EQUAL (cc.content[0].path, "foo.mp4");
- BOOST_CHECK_EQUAL (cc.twok, true);
+ BOOST_CHECK_EQUAL(cc._twok, true);
BOOST_CHECK (!cc.error);
cc = run ("dcpomatic2_create --fourk foo.mp4");
BOOST_REQUIRE_EQUAL (cc.content.size(), 1U);
BOOST_CHECK_EQUAL (cc.content[0].path, "foo.mp4");
- BOOST_CHECK_EQUAL (cc.fourk, true);
+ BOOST_CHECK_EQUAL(cc._fourk, true);
BOOST_CHECK (!cc.error);
cc = run ("dcpomatic2_create --j2k-bandwidth 120 foo.mp4");
BOOST_REQUIRE_EQUAL (cc.content.size(), 1U);
BOOST_CHECK_EQUAL (cc.content[0].path, "foo.mp4");
- BOOST_REQUIRE (cc.j2k_bandwidth);
- BOOST_CHECK_EQUAL (*cc.j2k_bandwidth, 120000000);
+ BOOST_REQUIRE(cc._j2k_bandwidth);
+ BOOST_CHECK_EQUAL(*cc._j2k_bandwidth, 120000000);
BOOST_CHECK (!cc.error);
cc = run ("dcpomatic2_create --channel L fred.wav --channel R jim.wav sheila.wav");