Content::examine (job);
shared_ptr<DCPExaminer> examiner (new DCPExaminer (shared_from_this ()));
- take_from_video_examiner (examiner);
+ video->take_from_video_examiner (examiner);
set_default_colour_conversion ();
take_from_audio_examiner (examiner);
DCPTime
DCPContent::full_length () const
{
- FrameRateChange const frc (video_frame_rate (), film()->video_frame_rate ());
+ FrameRateChange const frc (video->video_frame_rate (), film()->video_frame_rate ());
return DCPTime::from_frames (llrint (video_length () * frc.factor ()), film()->video_frame_rate ());
}
DCPContent::set_default_colour_conversion ()
{
/* Default to no colour conversion for DCPs */
- unset_colour_conversion ();
+ video->unset_colour_conversion ();
}
void
return can_reference<SubtitleContent> (_("There is other subtitle content overlapping this DCP; remove it."), why_not);
}
+
+double
+DCPContent::subtitle_video_frame_rate () const
+{
+ return video->video_frame_rate ();
+}
return false;
}
- double subtitle_video_frame_rate () const {
- return video_frame_rate ();
- }
+ double subtitle_video_frame_rate () const;
boost::filesystem::path directory () const;
bool can_reference_subtitle (std::list<std::string> &) const;
+ boost::shared_ptr<VideoContent> video;
+
protected:
void add_properties (std::list<UserProperty>& p) const;
using boost::dynamic_pointer_cast;
DCPDecoder::DCPDecoder (shared_ptr<const DCPContent> c, bool fast)
- : VideoDecoder (c)
+ : VideoDecoder (c->video)
, AudioDecoder (c, fast)
, SubtitleDecoder (c)
, _dcp_content (c)
++i;
}
- double const vfr = _dcp_content->video_frame_rate ();
+ double const vfr = _dcp_content->video->video_frame_rate ();
/* Frame within the (played part of the) reel that is coming up next */
int64_t const frame = _next.frames_round (vfr);
SubtitleDecoder::seek (t, accurate);
_reel = _reels.begin ();
- while (_reel != _reels.end() && t >= ContentTime::from_frames ((*_reel)->main_picture()->duration(), _dcp_content->video_frame_rate ())) {
- t -= ContentTime::from_frames ((*_reel)->main_picture()->duration(), _dcp_content->video_frame_rate ());
+ while (_reel != _reels.end() && t >= ContentTime::from_frames ((*_reel)->main_picture()->duration(), _dcp_content->video->video_frame_rate ())) {
+ t -= ContentTime::from_frames ((*_reel)->main_picture()->duration(), _dcp_content->video->video_frame_rate ());
++_reel;
}
/* XXX: inefficient */
list<ContentTimePeriod> ctp;
- double const vfr = _dcp_content->video_frame_rate ();
+ double const vfr = _dcp_content->video->video_frame_rate ();
BOOST_FOREACH (shared_ptr<dcp::Reel> r, _reels) {
if (!r->main_subtitle ()) {
{
signal_changed (FFmpegContentProperty::SUBTITLE_STREAM);
}
+
+double
+FFmpegContent::subtitle_video_frame_rate () const
+{
+ return video->video_frame_rate ();
+}
struct ffmpeg_pts_offset_test;
struct audio_sampling_rate_test;
-class FFmpegContentProperty : public VideoContentProperty
+class FFmpegContentProperty
{
public:
static int const SUBTITLE_STREAMS;
/* SubtitleContent */
bool has_text_subtitles () const;
bool has_image_subtitles () const;
- double subtitle_video_frame_rate () const {
- return video_frame_rate ();
- }
+ double subtitle_video_frame_rate () const;
void set_filters (std::vector<Filter const *> const &);
*/
+#ifndef DCPOMATIC_USER_PROPERTY_H
+#define DCPOMATIC_USER_PROPERTY_H
+
+#include "raw_convert.h"
+
class UserProperty
{
public:
std::string value;
std::string unit;
};
+
+#endif
#include "colour_conversion.h"
#include "video_content_scale.h"
+#include "dcpomatic_time.h"
+#include "user_property.h"
+#include <boost/thread/mutex.hpp>
+#include <boost/weak_ptr.hpp>
class VideoExaminer;
class Ratio;
+class Film;
class VideoContentProperty
{
void add_properties (std::list<UserProperty> &) const;
boost::weak_ptr<const Film> _film;
- boost::mutex _mutex;
+ mutable boost::mutex _mutex;
Frame _video_length;
/** Video frame rate, or not set if this content should use the DCP's frame rate */
boost::optional<double> _video_frame_rate;