- /* User-specified stuff */
- if (k == N_("name")) {
- _name = v;
- } else if (k == N_("use_dci_name")) {
- _use_dci_name = (v == N_("1"));
- } else if (k == N_("content")) {
- _content = v;
- } else if (k == N_("trust_content_header")) {
- _trust_content_header = (v == N_("1"));
- } else if (k == N_("dcp_content_type")) {
- if (version < 3) {
- _dcp_content_type = DCPContentType::from_pretty_name (v);
- } else {
- _dcp_content_type = DCPContentType::from_dci_name (v);
- }
- } else if (k == N_("format")) {
- _format = Format::from_metadata (v);
- } else if (k == N_("left_crop")) {
- _crop.left = atoi (v.c_str ());
- } else if (k == N_("right_crop")) {
- _crop.right = atoi (v.c_str ());
- } else if (k == N_("top_crop")) {
- _crop.top = atoi (v.c_str ());
- } else if (k == N_("bottom_crop")) {
- _crop.bottom = atoi (v.c_str ());
- } else if (k == N_("filter")) {
- _filters.push_back (Filter::from_id (v));
- } else if (k == N_("scaler")) {
- _scaler = Scaler::from_id (v);
- } else if ( ((!version || version < 2) && k == N_("dcp_trim_start")) || k == N_("trim_start")) {
- _trim_start = atoi (v.c_str ());
- } else if ( ((!version || version < 2) && k == N_("dcp_trim_end")) || k == N_("trim_end")) {
- _trim_end = atoi (v.c_str ());
- } else if (k == N_("dcp_ab")) {
- _dcp_ab = (v == N_("1"));
- } else if (k == N_("selected_content_audio_stream") || (!version && k == N_("selected_audio_stream"))) {
- if (!version) {
- audio_stream_index = atoi (v.c_str ());
- } else {
- _content_audio_stream = audio_stream_factory (v, version);
- }
- } else if (k == N_("external_audio")) {
- _external_audio.push_back (v);
- } else if (k == N_("use_content_audio")) {
- _use_content_audio = (v == N_("1"));
- } else if (k == N_("audio_gain")) {
- _audio_gain = atof (v.c_str ());
- } else if (k == N_("audio_delay")) {
- _audio_delay = atoi (v.c_str ());
- } else if (k == N_("still_duration")) {
- _still_duration = atoi (v.c_str ());
- } else if (k == N_("selected_subtitle_stream")) {
- if (!version) {
- subtitle_stream_index = atoi (v.c_str ());
- } else {
- _subtitle_stream = subtitle_stream_factory (v, version);
- }
- } else if (k == N_("with_subtitles")) {
- _with_subtitles = (v == N_("1"));
- } else if (k == N_("subtitle_offset")) {
- _subtitle_offset = atoi (v.c_str ());
- } else if (k == N_("subtitle_scale")) {
- _subtitle_scale = atof (v.c_str ());
- } else if (k == N_("colour_lut")) {
- _colour_lut = atoi (v.c_str ());
- } else if (k == N_("j2k_bandwidth")) {
- _j2k_bandwidth = atoi (v.c_str ());
- } else if (k == N_("dci_date")) {
- _dci_date = boost::gregorian::from_undelimited_string (v);
- } else if (k == "dcp_frame_rate") {
- _dcp_frame_rate = atoi (v.c_str ());