, _kdm_valid (false)
{
read_directory (p);
+ /* Default to no colour conversion for DCPs */
+ unset_colour_conversion (false);
}
DCPContent::DCPContent (shared_ptr<const Film> f, cxml::ConstNodePtr node, int version)
take_from_video_examiner (examiner);
take_from_audio_examiner (examiner);
- boost::mutex::scoped_lock lm (_mutex);
- _name = examiner->name ();
- _has_subtitles = examiner->has_subtitles ();
- _encrypted = examiner->encrypted ();
- _kdm_valid = examiner->kdm_valid ();
+ {
+ boost::mutex::scoped_lock lm (_mutex);
+ _name = examiner->name ();
+ _has_subtitles = examiner->has_subtitles ();
+ _encrypted = examiner->encrypted ();
+ _kdm_valid = examiner->kdm_valid ();
+ }
if (could_be_played != can_be_played ()) {
signal_changed (DCPContentProperty::CAN_BE_PLAYED);
{
shared_ptr<const Film> film = _film.lock ();
DCPOMATIC_ASSERT (film);
- return DCPTime (video_length (), FrameRateChange (video_frame_rate (), film->video_frame_rate ()));
+ FrameRateChange const frc (video_frame_rate (), film->video_frame_rate ());
+ return DCPTime::from_frames (rint (video_length () * frc.factor ()), film->video_frame_rate ());
}
string
bool
DCPContent::can_be_played () const
{
+ boost::mutex::scoped_lock lm (_mutex);
return !_encrypted || _kdm_valid;
}