diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-02-17 02:17:12 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-02-17 02:17:12 +0100 |
| commit | 3c7e18dca8f7f5c331cc0d23f44abd01341b6ec9 (patch) | |
| tree | e2eba0a08363966c6f234f53d4c5c2ea4b80ba33 /src/lib/content.h | |
| parent | 410624e0548f65b795b192367f9272eb6f5d7bdb (diff) | |
White space: content.{cc,h}
Diffstat (limited to 'src/lib/content.h')
| -rw-r--r-- | src/lib/content.h | 110 |
1 files changed, 55 insertions, 55 deletions
diff --git a/src/lib/content.h b/src/lib/content.h index 1b4f2b40c..2c02f02e6 100644 --- a/src/lib/content.h +++ b/src/lib/content.h @@ -73,15 +73,15 @@ public: class Content : public std::enable_shared_from_this<Content>, public Signaller { public: - explicit Content (); - Content (dcpomatic::DCPTime); - Content (boost::filesystem::path); - Content (cxml::ConstNodePtr, boost::optional<boost::filesystem::path> directory); - Content (std::vector<std::shared_ptr<Content>>); - virtual ~Content () {} + Content() = default; + explicit Content(dcpomatic::DCPTime); + explicit Content(boost::filesystem::path); + Content(cxml::ConstNodePtr, boost::optional<boost::filesystem::path> directory); + explicit Content(std::vector<std::shared_ptr<Content>>); + virtual ~Content() {} - Content (Content const&) = delete; - Content& operator= (Content const&) = delete; + Content(Content const&) = delete; + Content& operator=(Content const&) = delete; /** Examine the content to establish digest, frame rates and any other * useful metadata. @@ -91,17 +91,17 @@ public: */ virtual void examine(std::shared_ptr<const Film> film, std::shared_ptr<Job> job, bool tolerant); - virtual void take_settings_from (std::shared_ptr<const Content> c); + virtual void take_settings_from(std::shared_ptr<const Content> c); /** @return Quick one-line summary of the content, as will be presented in the * film editor. */ - virtual std::string summary () const = 0; + virtual std::string summary() const = 0; /** @return Technical details of this content; these are written to logs to * help with debugging. */ - virtual std::string technical_summary () const; + virtual std::string technical_summary() const; virtual void as_xml( xmlpp::Element* element, @@ -110,77 +110,77 @@ public: boost::optional<boost::filesystem::path> film_directory ) const; - virtual dcpomatic::DCPTime full_length (std::shared_ptr<const Film>) const = 0; - virtual dcpomatic::DCPTime approximate_length () const = 0; - virtual std::string identifier () const; + virtual dcpomatic::DCPTime full_length(std::shared_ptr<const Film>) const = 0; + virtual dcpomatic::DCPTime approximate_length() const = 0; + virtual std::string identifier() const; /** @return points at which to split this content when * REELTYPE_BY_VIDEO_CONTENT is in use. */ - virtual std::list<dcpomatic::DCPTime> reel_split_points (std::shared_ptr<const Film>) const; + virtual std::list<dcpomatic::DCPTime> reel_split_points(std::shared_ptr<const Film>) const; - std::shared_ptr<Content> clone () const; + std::shared_ptr<Content> clone() const; - void set_paths (std::vector<boost::filesystem::path> paths); + void set_paths(std::vector<boost::filesystem::path> paths); - std::string path_summary () const; + std::string path_summary() const; - std::vector<boost::filesystem::path> paths () const { - boost::mutex::scoped_lock lm (_mutex); + std::vector<boost::filesystem::path> paths() const { + boost::mutex::scoped_lock lm(_mutex); return _paths; } - size_t number_of_paths () const { - boost::mutex::scoped_lock lm (_mutex); - return _paths.size (); + size_t number_of_paths() const { + boost::mutex::scoped_lock lm(_mutex); + return _paths.size(); } - boost::filesystem::path path (size_t i) const { - boost::mutex::scoped_lock lm (_mutex); + boost::filesystem::path path(size_t i) const { + boost::mutex::scoped_lock lm(_mutex); return _paths[i]; } - std::time_t last_write_time (size_t i) const { - boost::mutex::scoped_lock lm (_mutex); + std::time_t last_write_time(size_t i) const { + boost::mutex::scoped_lock lm(_mutex); return _last_write_times[i]; } - bool paths_valid () const; + bool paths_valid() const; /** @return Digest of the content's file(s). Note: this is * not a complete MD5-or-whatever hash, but a sort of poor - * man's version (see comments in examine()). + * man's version(see comments in examine()). */ - std::string digest () const { - boost::mutex::scoped_lock lm (_mutex); + std::string digest() const { + boost::mutex::scoped_lock lm(_mutex); return _digest; } - void set_position (std::shared_ptr<const Film> film, dcpomatic::DCPTime, bool force_emit = false); + void set_position(std::shared_ptr<const Film> film, dcpomatic::DCPTime, bool force_emit = false); /** dcpomatic::DCPTime that this content starts; i.e. the time that the first * bit of the content (trimmed or not) will happen. */ - dcpomatic::DCPTime position () const { - boost::mutex::scoped_lock lm (_mutex); + dcpomatic::DCPTime position() const { + boost::mutex::scoped_lock lm(_mutex); return _position; } void set_trim_start(std::shared_ptr<const Film> film, dcpomatic::ContentTime); - dcpomatic::ContentTime trim_start () const { - boost::mutex::scoped_lock lm (_mutex); + dcpomatic::ContentTime trim_start() const { + boost::mutex::scoped_lock lm(_mutex); return _trim_start; } - void set_trim_end (dcpomatic::ContentTime); + void set_trim_end(dcpomatic::ContentTime); - dcpomatic::ContentTime trim_end () const { - boost::mutex::scoped_lock lm (_mutex); + dcpomatic::ContentTime trim_end() const { + boost::mutex::scoped_lock lm(_mutex); return _trim_end; } /** @return Time immediately after the last thing in this content */ - dcpomatic::DCPTime end (std::shared_ptr<const Film> film) const { + dcpomatic::DCPTime end(std::shared_ptr<const Film> film) const { return position() + length_after_trim(film); } @@ -188,27 +188,27 @@ public: return { position(), end(film) }; } - dcpomatic::DCPTime length_after_trim (std::shared_ptr<const Film> film) const; + dcpomatic::DCPTime length_after_trim(std::shared_ptr<const Film> film) const; - boost::optional<double> video_frame_rate () const { - boost::mutex::scoped_lock lm (_mutex); + boost::optional<double> video_frame_rate() const { + boost::mutex::scoped_lock lm(_mutex); return _video_frame_rate; } void set_video_frame_rate(std::shared_ptr<const Film> film, double r); - void unset_video_frame_rate (); + void unset_video_frame_rate(); - double active_video_frame_rate (std::shared_ptr<const Film> film) const; + double active_video_frame_rate(std::shared_ptr<const Film> film) const; - void set_change_signals_frequent (bool f) { + void set_change_signals_frequent(bool f) { _change_signals_frequent = f; } - std::list<UserProperty> user_properties (std::shared_ptr<const Film> film) const; + std::list<UserProperty> user_properties(std::shared_ptr<const Film> film) const; - std::string calculate_digest () const; + std::string calculate_digest() const; - virtual bool can_be_played () const { + virtual bool can_be_played() const { return true; } @@ -222,22 +222,22 @@ public: std::vector<std::shared_ptr<TextContent>> text; std::shared_ptr<AtmosContent> atmos; - std::shared_ptr<TextContent> only_text () const; - std::shared_ptr<TextContent> text_of_original_type (TextType type) const; + std::shared_ptr<TextContent> only_text() const; + std::shared_ptr<TextContent> text_of_original_type(TextType type) const; /** @return true if this content has changed since it was last examined */ - bool changed () const; + bool changed() const; protected: - virtual void add_properties (std::shared_ptr<const Film> film, std::list<UserProperty> &) const; + virtual void add_properties(std::shared_ptr<const Film> film, std::list<UserProperty> &) const; /** _mutex which should be used to protect accesses, as examine * jobs can update content state in threads other than the main one. */ mutable boost::mutex _mutex; - void add_path (boost::filesystem::path p); + void add_path(boost::filesystem::path p); private: friend struct ffmpeg_pts_offset_test; @@ -247,7 +247,7 @@ private: friend struct subtitle_font_id_change_test2; template<class, class> friend class ChangeSignalDespatcher; - void signal_change (ChangeType, int); + void signal_change(ChangeType, int); /** Paths of our data files */ std::vector<boost::filesystem::path> _paths; |
