Innocuous build fixes.
authorCarl Hetherington <cth@carlh.net>
Tue, 12 Apr 2016 15:43:45 +0000 (16:43 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 18 May 2016 10:50:29 +0000 (11:50 +0100)
src/lib/dcp_content.cc
src/lib/dcp_content.h
src/lib/dcp_decoder.cc
src/lib/ffmpeg_content.cc
src/lib/ffmpeg_content.h
src/lib/user_property.h
src/lib/video_content.h

index 5bd6e1e33a7c2627345848ebc268281f3a0949a7..3bc28598d8886ecbda7f007da2cdf8c405e2c894 100644 (file)
@@ -106,7 +106,7 @@ DCPContent::examine (shared_ptr<Job> job)
        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);
 
@@ -164,7 +164,7 @@ DCPContent::as_xml (xmlpp::Node* node) const
 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 ());
 }
 
@@ -217,7 +217,7 @@ void
 DCPContent::set_default_colour_conversion ()
 {
        /* Default to no colour conversion for DCPs */
-       unset_colour_conversion ();
+       video->unset_colour_conversion ();
 }
 
 void
@@ -344,3 +344,9 @@ DCPContent::can_reference_subtitle (list<string>& why_not) const
 
        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 ();
+}
index f4445ad53045cb5d733017b7e5ae3519cf6f2ad2..04352b269bb884e2a332187d90c70c357216dc9d 100644 (file)
@@ -77,9 +77,7 @@ public:
                return false;
        }
 
-       double subtitle_video_frame_rate () const {
-               return video_frame_rate ();
-       }
+       double subtitle_video_frame_rate () const;
 
        boost::filesystem::path directory () const;
 
@@ -123,6 +121,8 @@ public:
 
        bool can_reference_subtitle (std::list<std::string> &) const;
 
+       boost::shared_ptr<VideoContent> video;
+
 protected:
        void add_properties (std::list<UserProperty>& p) const;
 
index f58577c8c1388d9148e67b54a27e6dd2fbb1d4d9..873b3634fb18be9a2803d7b70d16c620c9b6605c 100644 (file)
@@ -43,7 +43,7 @@ using boost::shared_ptr;
 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)
@@ -73,7 +73,7 @@ DCPDecoder::pass (PassReason reason, bool)
                ++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);
@@ -156,8 +156,8 @@ DCPDecoder::seek (ContentTime t, bool accurate)
        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;
        }
 
@@ -177,7 +177,7 @@ DCPDecoder::text_subtitles_during (ContentTimePeriod period, bool starting) cons
        /* 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 ()) {
index 8d9aa195aadf4d561f57fd9512e2ec2ab4e0b9eb..54e0b470aa15ded1acc1dc93e762eef27b008b4a 100644 (file)
@@ -523,3 +523,9 @@ FFmpegContent::signal_subtitle_stream_changed ()
 {
        signal_changed (FFmpegContentProperty::SUBTITLE_STREAM);
 }
+
+double
+FFmpegContent::subtitle_video_frame_rate () const
+{
+       return video->video_frame_rate ();
+}
index 9f82be9c3751e18a404591a8ee900e318d1e63d2..f5bbbd31e27654ae1d5da742842ab0d07af4fd50 100644 (file)
@@ -33,7 +33,7 @@ class VideoContent;
 struct ffmpeg_pts_offset_test;
 struct audio_sampling_rate_test;
 
-class FFmpegContentProperty : public VideoContentProperty
+class FFmpegContentProperty
 {
 public:
        static int const SUBTITLE_STREAMS;
@@ -70,9 +70,7 @@ public:
        /* 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 &);
 
index c57cbef3e32d1d30fa9ea21e23cf5286528ea56c..b269c9a8ee58f25e335e644314dfa9298d6eeab3 100644 (file)
 
 */
 
+#ifndef DCPOMATIC_USER_PROPERTY_H
+#define DCPOMATIC_USER_PROPERTY_H
+
+#include "raw_convert.h"
+
 class UserProperty
 {
 public:
@@ -33,3 +38,5 @@ public:
        std::string value;
        std::string unit;
 };
+
+#endif
index 9577d2d850d7311d4d4cadda89fd39614b32173a..b93744053b1e9ff42383880ad757816bdbae5d8a 100644 (file)
 
 #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
 {
@@ -174,7 +179,7 @@ private:
        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;