X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fcontent.h;h=550b3cd9cf52770e7a9acb7786a86dac3829130d;hb=a5a71d047e9ebe7db34c27457cf178c541fe9147;hp=8a28762d3faf10078f893a02e6a942e9d41774a6;hpb=dd9be86db6cde0afa5da0d1d1ac43b42e05dca26;p=dcpomatic.git diff --git a/src/lib/content.h b/src/lib/content.h index 8a28762d3..550b3cd9c 100644 --- a/src/lib/content.h +++ b/src/lib/content.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2013-2018 Carl Hetherington + Copyright (C) 2013-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -18,10 +18,12 @@ */ + /** @file src/lib/content.h * @brief Content class. */ + #ifndef DCPOMATIC_CONTENT_H #define DCPOMATIC_CONTENT_H @@ -59,19 +61,23 @@ public: static int const VIDEO_FRAME_RATE; }; + /** @class Content * @brief A piece of content represented by one or more files on disk. */ -class Content : public std::enable_shared_from_this, public Signaller, public boost::noncopyable +class Content : public std::enable_shared_from_this, public Signaller { public: explicit Content (); Content (dcpomatic::DCPTime); Content (boost::filesystem::path); Content (cxml::ConstNodePtr); - Content (std::vector >); + Content (std::vector>); virtual ~Content () {} + Content (Content const&) = delete; + Content& operator= (Content const&) = delete; + /** Examine the content to establish digest, frame rates and any other * useful metadata. * @param job Job to use to report progress, or 0. @@ -185,12 +191,12 @@ public: std::string calculate_digest () const; - /* CHANGE_TYPE_PENDING and CHANGE_TYPE_CANCELLED may be emitted from any thread; CHANGE_TYPE_DONE always from GUI thread */ + /* ChangeType::PENDING and ChangeType::CANCELLED may be emitted from any thread; ChangeType::DONE always from GUI thread */ boost::signals2::signal, int, bool)> Change; std::shared_ptr video; std::shared_ptr audio; - std::list > text; + std::list> text; std::shared_ptr atmos; std::shared_ptr only_text () const; @@ -212,7 +218,7 @@ private: friend struct best_dcp_frame_rate_test_single; friend struct best_dcp_frame_rate_test_double; friend struct audio_sampling_rate_test; - template friend class ChangeSignaller; + template friend class ChangeSignaller; void signal_change (ChangeType, int); @@ -232,4 +238,8 @@ private: bool _change_signals_frequent; }; + +typedef ChangeSignaller ContentChangeSignaller; + + #endif