/*
Copyright (C) 2014-2016 Carl Hetherington <cth@carlh.net>
- This program is free software; you can redistribute it and/or modify
+ This file is part of DCP-o-matic.
+
+ DCP-o-matic is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
- This program is distributed in the hope that it will be useful,
+ DCP-o-matic is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
*/
, _reference_video (false)
, _reference_audio (false)
, _reference_subtitle (false)
+ , _three_d (false)
{
video.reset (new VideoContent (this));
audio.reset (new AudioContent (this));
: Content (film, node)
{
video = VideoContent::from_xml (this, node, version);
- audio = AudioContent::from_xml (this, node);
+ audio = AudioContent::from_xml (this, node, version);
subtitle = SubtitleContent::from_xml (this, node, version);
audio->set_stream (
DCPOMATIC_ASSERT (false);
}
}
+ _three_d = node->optional_bool_child("ThreeD").get_value_or (false);
}
void
_encrypted = examiner->encrypted ();
_kdm_valid = examiner->kdm_valid ();
_standard = examiner->standard ();
+ _three_d = examiner->three_d ();
}
if (could_be_played != can_be_played ()) {
signal_changed (DCPContentProperty::CAN_BE_PLAYED);
}
+
+ video->set_frame_type (_three_d ? VIDEO_FRAME_TYPE_3D : VIDEO_FRAME_TYPE_2D);
}
string
DCPOMATIC_ASSERT (false);
}
}
+ node->add_child("ThreeD")->add_child_text (_three_d ? "1" : "0");
}
DCPTime
void
DCPContent::add_properties (list<UserProperty>& p) const
{
+ Content::add_properties (p);
+ video->add_properties (p);
audio->add_properties (p);
}