X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdcp_content.h;h=78c97bec513026d3470640ea01b1c02075693a13;hb=dfa74533e1227a575286eb59e171a604d4ba940c;hp=5a0559df2212dd28d1a65a062c637bb62673990f;hpb=dd59755d86cdb1892bb0ba4d69af520cee4aa964;p=dcpomatic.git diff --git a/src/lib/dcp_content.h b/src/lib/dcp_content.h index 5a0559df2..78c97bec5 100644 --- a/src/lib/dcp_content.h +++ b/src/lib/dcp_content.h @@ -34,6 +34,9 @@ class DCPContentProperty { public: static int const CAN_BE_PLAYED; + static int const REFERENCE_VIDEO; + static int const REFERENCE_AUDIO; + static int const REFERENCE_SUBTITLE; }; /** @class DCPContent @@ -49,6 +52,10 @@ public: return boost::dynamic_pointer_cast (Content::shared_from_this ()); } + boost::shared_ptr shared_from_this () const { + return boost::dynamic_pointer_cast (Content::shared_from_this ()); + } + DCPTime full_length () const; void examine (boost::shared_ptr); @@ -58,6 +65,7 @@ public: std::string identifier () const; void set_default_colour_conversion (); + std::list reel_split_points () const; /* SubtitleContent */ @@ -70,6 +78,10 @@ public: return false; } + double subtitle_video_frame_rate () const { + return video_frame_rate (); + } + boost::filesystem::path directory () const; bool encrypted () const { @@ -85,26 +97,40 @@ public: bool can_be_played () const; + void set_reference_video (bool r); + bool reference_video () const { boost::mutex::scoped_lock lm (_mutex); return _reference_video; } + bool can_reference_video (std::list &) const; + + void set_reference_audio (bool r); + bool reference_audio () const { boost::mutex::scoped_lock lm (_mutex); return _reference_audio; } + bool can_reference_audio (std::list &) const; + + void set_reference_subtitle (bool r); + bool reference_subtitle () const { boost::mutex::scoped_lock lm (_mutex); return _reference_subtitle; } + bool can_reference_subtitle (std::list &) const; + protected: void add_properties (std::list >& p) const; private: void read_directory (boost::filesystem::path); + std::list reels () const; + template bool can_reference (std::string overlapping, std::list& why_not) const; std::string _name; bool _has_subtitles;