diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-04-12 22:10:54 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-05-18 11:50:29 +0100 |
| commit | 6f344b876689a1234a5eb75041882f06f5d9fe5c (patch) | |
| tree | 3a51f17cab8b8f31b21661b643aaed6a53326031 /src/lib/video_content.h | |
| parent | 36774ee2b48f0bfde43b743592e5816ff58bb7d2 (diff) | |
Reasonably straightforward stuff; main things are adding
a _parent to VideoContent (mainly, but not only, for signalling)
and moving the video shared_ptr into Content, which makes much
more sense to replace dynamic_cast tests for whether something
has video or whatever. Nearly builds.
Diffstat (limited to 'src/lib/video_content.h')
| -rw-r--r-- | src/lib/video_content.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/lib/video_content.h b/src/lib/video_content.h index b93744053..768f1897d 100644 --- a/src/lib/video_content.h +++ b/src/lib/video_content.h @@ -24,12 +24,15 @@ #include "video_content_scale.h" #include "dcpomatic_time.h" #include "user_property.h" +#include "types.h" #include <boost/thread/mutex.hpp> #include <boost/weak_ptr.hpp> +#include <boost/enable_shared_from_this.hpp> class VideoExaminer; class Ratio; class Film; +class Content; class VideoContentProperty { @@ -44,12 +47,12 @@ public: static int const VIDEO_FADE_OUT; }; -class VideoContent +class VideoContent : public boost::enable_shared_from_this<VideoContent> { public: - VideoContent (boost::shared_ptr<const Film>); - VideoContent (boost::shared_ptr<const Film>, cxml::ConstNodePtr, int); - VideoContent (boost::shared_ptr<const Film>, std::vector<boost::shared_ptr<Content> >); + VideoContent (Content* parent, boost::shared_ptr<const Film>); + VideoContent (Content* parent, boost::shared_ptr<const Film>, cxml::ConstNodePtr, int); + VideoContent (Content* parent, boost::shared_ptr<const Film>, std::vector<boost::shared_ptr<Content> >); void as_xml (xmlpp::Node *) const; std::string technical_summary () const; @@ -174,10 +177,14 @@ public: std::string processing_description () const; -private: + void set_video_length (Frame); + void take_from_video_examiner (boost::shared_ptr<VideoExaminer>); void add_properties (std::list<UserProperty> &) const; +private: + + Content* _parent; boost::weak_ptr<const Film> _film; mutable boost::mutex _mutex; Frame _video_length; |
