ImageContent::ImageContent (shared_ptr<const Film> film, boost::filesystem::path p)
: Content (film)
- , video (new VideoContent (film))
{
+ video.reset (new VideoContent (this, film));
+
if (boost::filesystem::is_regular_file (p) && valid_image_file (p)) {
_paths.push_back (p);
} else {
ImageContent::ImageContent (shared_ptr<const Film> film, cxml::ConstNodePtr node, int version)
: Content (film, node)
- , video (new VideoContent (film, node, version))
{
-
+ video.reset (new VideoContent (this, film, node, version));
}
string
DCPOMATIC_ASSERT (film);
shared_ptr<ImageExaminer> examiner (new ImageExaminer (film, shared_from_this(), job));
- take_from_video_examiner (examiner);
+ video->take_from_video_examiner (examiner);
set_default_colour_conversion ();
}
-void
-ImageContent::set_video_length (Frame len)
-{
- {
- boost::mutex::scoped_lock lm (_mutex);
- _video_length = len;
- }
-
- signal_changed (ContentProperty::LENGTH);
-}
-
DCPTime
ImageContent::full_length () const
{
shared_ptr<const Film> film = _film.lock ();
DCPOMATIC_ASSERT (film);
- FrameRateChange const frc (video_frame_rate(), film->video_frame_rate());
- return DCPTime::from_frames (llrint (video_length_after_3d_combine() * frc.factor ()), film->video_frame_rate ());
+ FrameRateChange const frc (video->video_frame_rate(), film->video_frame_rate());
+ return DCPTime::from_frames (llrint (video->video_length_after_3d_combine() * frc.factor ()), film->video_frame_rate ());
}
string
SafeStringStream s;
s << Content::identifier();
s << "_" << video->identifier ();
- s << "_" << video_length();
+ s << "_" << video->video_length();
return s.str ();
}
BOOST_FOREACH (boost::filesystem::path i, _paths) {
if (valid_j2k_file (i)) {
/* We default to no colour conversion if we have JPEG2000 files */
- unset_colour_conversion ();
+ video->unset_colour_conversion ();
return;
}
}
boost::mutex::scoped_lock lm (_mutex);
if (s) {
- _colour_conversion = PresetColourConversion::from_id ("srgb").conversion;
+ video->set_colour_conversion (PresetColourConversion::from_id ("srgb").conversion);
} else {
- _colour_conversion = PresetColourConversion::from_id ("rec709").conversion;
+ video->set_colour_conversion (PresetColourConversion::from_id ("rec709").conversion);
}
}