X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdcp_content.h;h=96ae09521fd53f4e1d46ae8bdd19ea5a69ef89ad;hb=refs%2Fheads%2F2404-assertion;hp=136c527a5c3d7bf84931ca3b2c3fc4b34483684d;hpb=8fedaaa75c4586a4cc7ffb393bd71d1fdb091dc8;p=dcpomatic.git diff --git a/src/lib/dcp_content.h b/src/lib/dcp_content.h index 136c527a5..96ae09521 100644 --- a/src/lib/dcp_content.h +++ b/src/lib/dcp_content.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2014-2018 Carl Hetherington + Copyright (C) 2014-2022 Carl Hetherington This file is part of DCP-o-matic. @@ -18,16 +18,25 @@ */ + #ifndef DCPOMATIC_DCP_CONTENT_H #define DCPOMATIC_DCP_CONTENT_H + /** @file src/lib/dcp_content.h * @brief DCPContent class. */ + #include "content.h" +#include "enum_indexed_vector.h" +#include "font.h" +#include "resolution.h" #include +#include #include +#include + class DCPContentProperty { @@ -42,7 +51,6 @@ public: static int const CPL; }; -class ContentPart; /** @class DCPContent * @brief An existing DCP used as input. @@ -61,18 +69,18 @@ public: return std::dynamic_pointer_cast (Content::shared_from_this ()); } - dcpomatic::DCPTime full_length (std::shared_ptr film) const; - dcpomatic::DCPTime approximate_length () const; + dcpomatic::DCPTime full_length (std::shared_ptr film) const override; + dcpomatic::DCPTime approximate_length () const override; - void examine (std::shared_ptr film, std::shared_ptr); - std::string summary () const; - std::string technical_summary () const; - void as_xml (xmlpp::Node *, bool with_paths) const; - std::string identifier () const; - void take_settings_from (std::shared_ptr c); + void examine (std::shared_ptr film, std::shared_ptr) override; + std::string summary () const override; + std::string technical_summary () const override; + void as_xml (xmlpp::Node *, bool with_paths) const override; + std::string identifier () const override; + void take_settings_from (std::shared_ptr c) override; void set_default_colour_conversion (); - std::list reel_split_points (std::shared_ptr film) const; + std::list reel_split_points (std::shared_ptr film) const override; std::vector directories () const; @@ -88,7 +96,7 @@ public: return _kdm; } - bool can_be_played () const; + bool can_be_played () const override; bool needs_kdm () const; bool needs_assets () const; @@ -117,7 +125,7 @@ public: */ bool reference_text (TextType type) const { boost::mutex::scoped_lock lm (_mutex); - return _reference_text[static_cast(type)]; + return _reference_text[type]; } bool can_reference_text (std::shared_ptr film, TextType type, std::string &) const; @@ -166,17 +174,19 @@ public: return _content_versions; } + void check_font_ids(); + private: friend struct reels_test5; - void add_properties (std::shared_ptr film, std::list& p) const; + void add_properties (std::shared_ptr film, std::list& p) const override; void read_directory (boost::filesystem::path); void read_sub_directory (boost::filesystem::path); std::list reels (std::shared_ptr film) const; bool can_reference ( std::shared_ptr film, - boost::function )>, + std::function )>, std::string overlapping, std::string& why_not ) const; @@ -201,7 +211,7 @@ private: * rather than by rewrapping. The types here are the original text types, * not what they are being used for. */ - bool _reference_text[static_cast(TextType::COUNT)]; + EnumIndexedVector _reference_text; boost::optional _standard; boost::optional _content_kind; @@ -217,4 +227,10 @@ private: std::vector _content_versions; }; + +extern std::string id_for_font_in_reel(std::string id, int reel); +extern void add_fonts_from_examiner(std::shared_ptr text, std::vector>> const& fonts); + + + #endif