X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fffmpeg_content.h;h=4c612cd3ee00eb62720fc35fe1759f5fd2cf1451;hb=673ba43fb66eb0dee43807501753749f144254a7;hp=21f5d4680f06be421d6d413488045933c70ab1ff;hpb=bd5e8b83a3a18787241982efdae809d4db21f65d;p=dcpomatic.git diff --git a/src/lib/ffmpeg_content.h b/src/lib/ffmpeg_content.h index 21f5d4680..4c612cd3e 100644 --- a/src/lib/ffmpeg_content.h +++ b/src/lib/ffmpeg_content.h @@ -46,19 +46,25 @@ public: class FFmpegContent : public Content { public: - FFmpegContent (boost::shared_ptr, boost::filesystem::path); - FFmpegContent (boost::shared_ptr, cxml::ConstNodePtr, int version, std::list &); + FFmpegContent (boost::filesystem::path); + FFmpegContent (cxml::ConstNodePtr, int version, std::list &); + FFmpegContent (std::vector >); boost::shared_ptr shared_from_this () { return boost::dynamic_pointer_cast (Content::shared_from_this ()); } - void examine (boost::shared_ptr); + boost::shared_ptr shared_from_this () const { + return boost::dynamic_pointer_cast (Content::shared_from_this ()); + } + + void examine (boost::shared_ptr film, boost::shared_ptr); void take_settings_from (boost::shared_ptr c); std::string summary () const; std::string technical_summary () const; void as_xml (xmlpp::Node *, bool with_paths) const; - DCPTime full_length () const; + DCPTime full_length (boost::shared_ptr film) const; + DCPTime approximate_length () const; std::string identifier () const; @@ -92,8 +98,18 @@ public: void signal_subtitle_stream_changed (); + boost::optional decryption_key () const { + boost::mutex::scoped_lock lm (_mutex); + return _decryption_key; + } + + bool encrypted () const { + boost::mutex::scoped_lock lm (_mutex); + return _encrypted; + } + private: - void add_properties (std::list &) const; + void add_properties (boost::shared_ptr film, std::list &) const; friend struct ffmpeg_pts_offset_test; friend struct audio_sampling_rate_test; @@ -109,6 +125,8 @@ private: boost::optional _color_trc; boost::optional _colorspace; boost::optional _bits_per_pixel; + boost::optional _decryption_key; + bool _encrypted; }; #endif