, _audio_channels (MAX_AUDIO_CHANNELS)
, _three_d (false)
, _sequence_video (true)
+ , _interop (false)
, _dirty (false)
{
set_dci_date_today ();
<< "_" << scaler()->id()
<< "_" << j2k_bandwidth();
+ if (_interop) {
+ s << "_I";
+ } else {
+ s << "_S";
+ }
+
if (_three_d) {
s << "_3D";
}
root->add_child("AudioChannels")->add_child_text (lexical_cast<string> (_audio_channels));
root->add_child("ThreeD")->add_child_text (_three_d ? "1" : "0");
root->add_child("SequenceVideo")->add_child_text (_sequence_video ? "1" : "0");
+ root->add_child("Interop")->add_child_text (_interop ? "1" : "0");
_playlist->as_xml (root->add_child ("Playlist"));
doc.write_to_file_formatted (file ("metadata.xml"));
_audio_channels = f.number_child<int> ("AudioChannels");
_sequence_video = f.bool_child ("SequenceVideo");
_three_d = f.bool_child ("ThreeD");
+ _interop = f.bool_child ("Interop");
_playlist->set_from_xml (shared_from_this(), f.node_child ("Playlist"));
signal_changed (THREE_D);
}
+void
+Film::set_interop (bool i)
+{
+ _interop = i;
+ signal_changed (INTEROP);
+}
+
void
Film::signal_changed (Property p)
{
/** The setting of _three_d has been changed */
THREE_D,
SEQUENCE_VIDEO,
+ INTEROP,
};
bool sequence_video () const {
return _sequence_video;
}
+
+ bool interop () const {
+ return _interop;
+ }
/* SET */
void set_three_d (bool);
void set_dci_date_today ();
void set_sequence_video (bool);
+ void set_interop (bool);
/** Emitted when some property has of the Film has changed */
mutable boost::signals2::signal<void (Property)> Changed;
*/
bool _three_d;
bool _sequence_video;
+ bool _interop;
/** true if our state has changed since we last saved it */
mutable bool _dirty;
Magick::Image* magick_image = new Magick::Image (_still_image_content->path().string ());
_video_size = libdcp::Size (magick_image->columns(), magick_image->rows());
- _image.reset (new Image (PIX_FMT_RGB24, _video_size.get(), false));
+ _image.reset (new Image (PIX_FMT_RGB24, _video_size.get(), true));
using namespace MagickCore;
uint8_t* p = _image->data()[0];
for (int y = 0; y < _video_size->height; ++y) {
+ uint8_t* q = p;
for (int x = 0; x < _video_size->width; ++x) {
Magick::Color c = magick_image->pixelColor (x, y);
- *p++ = c.redQuantum() * 255 / QuantumRange;
- *p++ = c.greenQuantum() * 255 / QuantumRange;
- *p++ = c.blueQuantum() * 255 / QuantumRange;
+ *q++ = c.redQuantum() * 255 / QuantumRange;
+ *q++ = c.greenQuantum() * 255 / QuantumRange;
+ *q++ = c.blueQuantum() * 255 / QuantumRange;
}
+ p += _image->stride()[0];
}
delete magick_image;
}
- _picture_asset_writer = _picture_asset->start_write (_first_nonexistant_frame > 0);
+ _picture_asset_writer = _picture_asset->start_write (_first_nonexistant_frame > 0, _film->interop ());
_sound_asset.reset (
new libdcp::SoundAsset (
)
);
- _sound_asset_writer = _sound_asset->start_write ();
+ _sound_asset_writer = _sound_asset->start_write (_film->interop ());
_thread = new boost::thread (boost::bind (&Writer::thread, this));
}
libdcp::XMLMetadata meta = Config::instance()->dcp_metadata ();
meta.set_issue_date_now ();
- dcp.write_xml (meta);
+ dcp.write_xml (_film->interop (), meta);
_film->log()->log (String::compose (N_("Wrote %1 FULL, %2 FAKE, %3 REPEAT; %4 pushed to disk"), _full_written, _fake_written, _repeat_written, _pushed_to_disk));
}
}
++r;
+ add_label_to_grid_bag_sizer (grid, _dcp_panel, _("Standard"), true, wxGBPosition (r, 0));
+ _standard = new wxChoice (_dcp_panel, wxID_ANY);
+ grid->Add (_standard, wxGBPosition (r, 1), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
+ ++r;
+
add_label_to_grid_bag_sizer (grid, _dcp_panel, _("Scaler"), true, wxGBPosition (r, 0));
_scaler = new wxChoice (_dcp_panel, wxID_ANY);
grid->Add (_scaler, wxGBPosition (r, 1), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
_resolution->Append (_("2K"));
_resolution->Append (_("4K"));
+
+ _standard->Append (_("SMPTE"));
+ _standard->Append (_("Interop"));
}
void
_resolution->Bind (wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&FilmEditor::resolution_changed, this));
_sequence_video->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&FilmEditor::sequence_video_changed, this));
_three_d->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&FilmEditor::three_d_changed, this));
+ _standard->Bind (wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&FilmEditor::standard_changed, this));
}
void
_film->set_resolution (_resolution->GetSelection() == 0 ? RESOLUTION_2K : RESOLUTION_4K);
}
+void
+FilmEditor::standard_changed ()
+{
+ if (!_film) {
+ return;
+ }
+
+ _film->set_interop (_standard->GetSelection() == 1);
+}
/** Called when the metadata stored in the Film object has changed;
* so that we can update the GUI.
checked_set (_three_d, _film->three_d ());
setup_dcp_name ();
break;
+ case Film::INTEROP:
+ checked_set (_standard, _film->interop() ? 1 : 0);
+ break;
}
}
film_changed (Film::AUDIO_CHANNELS);
film_changed (Film::SEQUENCE_VIDEO);
film_changed (Film::THREE_D);
+ film_changed (Film::INTEROP);
if (!_film->content().empty ()) {
set_selection (_film->content().front ());
_resolution->Enable (s);
_scaler->Enable (s);
_three_d->Enable (s);
+ _standard->Enable (s);
/* Set the panels in the content notebook */
for (list<FilmEditorPanel*>::iterator i = _panels.begin(); i != _panels.end(); ++i) {
void sequence_video_changed ();
void content_right_click (wxListEvent &);
void three_d_changed ();
+ void standard_changed ();
/* Handle changes to the model */
void film_changed (Film::Property);
wxButton* _best_frame_rate;
wxCheckBox* _three_d;
wxChoice* _resolution;
+ wxChoice* _standard;
ContentMenu _menu;