/** Construct a Film object in a given directory.
*
- * @param d Film directory.
+ * @param dir Film directory.
*/
-Film::Film (string d)
+Film::Film (boost::filesystem::path dir)
: _playlist (new Playlist)
, _use_dci_name (true)
, _dcp_content_type (Config::instance()->default_dcp_content_type ())
, _audio_channels (MAX_AUDIO_CHANNELS)
, _three_d (false)
, _sequence_video (true)
+ , _interop (false)
, _dirty (false)
{
set_dci_date_today ();
(Code swiped from Adam Bowen on stackoverflow)
*/
- boost::filesystem::path p (boost::filesystem::system_complete (d));
+ boost::filesystem::path p (boost::filesystem::system_complete (dir));
boost::filesystem::path result;
for (boost::filesystem::path::iterator i = p.begin(); i != p.end(); ++i) {
if (*i == "..") {
<< "_" << 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"));
throw StringError (_("This film was created with an older version of DCP-o-matic, and unfortunately it cannot be loaded into this version. You will need to create a new Film, re-add your content and set it up again. Sorry!"));
}
- cxml::File f (file ("metadata.xml"), "Metadata");
+ cxml::Document f ("Metadata");
+ f.read_file (file ("metadata.xml"));
_name = f.string_child ("Name");
_use_dci_name = f.bool_child ("UseDCIName");
_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"));
if (dcp_content_type()) {
d << "_" << dcp_content_type()->dci_name();
+ d << "-" << dci_metadata().content_version;
}
if (three_d ()) {
signal_changed (THREE_D);
}
+void
+Film::set_interop (bool i)
+{
+ _interop = i;
+ signal_changed (INTEROP);
+}
+
void
Film::signal_changed (Property p)
{