X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Fdcp_examiner.h;h=b51e7ae7a8e53d69cf406a05f2956599e5a22f89;hp=68508847f4125dce5c33936bd11072085cb1d9db;hb=458517981bbb6d8a76b2769ac824daa29c691d35;hpb=12656ad09708bb5b6b16fb2b3b44896e2a09a349 diff --git a/src/lib/dcp_examiner.h b/src/lib/dcp_examiner.h index 68508847f..b51e7ae7a 100644 --- a/src/lib/dcp_examiner.h +++ b/src/lib/dcp_examiner.h @@ -25,7 +25,6 @@ #include "audio_examiner.h" -#include "dcp.h" #include "dcp_text_track.h" #include "dcpomatic_assert.h" #include "video_examiner.h" @@ -36,10 +35,10 @@ class DCPContent; -class DCPExaminer : public DCP, public VideoExaminer, public AudioExaminer +class DCPExaminer : public VideoExaminer, public AudioExaminer { public: - explicit DCPExaminer (std::shared_ptr, bool tolerant); + DCPExaminer(std::shared_ptr, bool tolerant); bool has_video () const override { return _has_video; @@ -104,10 +103,12 @@ public: } /** @param type TEXT_OPEN_SUBTITLE or TEXT_CLOSED_CAPTION. - * @return Number of assets of this type in this DCP. + * @return the number of "streams" of this type in the DCP. + * Reels do not affect the return value of this method: if a DCP + * has any subtitles, type=TEXT_OPEN_SUBTITLE will return 1. */ int text_count (TextType type) const { - return _text_count[static_cast(type)]; + return _text_count[type]; } boost::optional open_subtitle_language () const { @@ -132,7 +133,8 @@ public: } dcp::ContentKind content_kind () const { - return _content_kind; + DCPOMATIC_ASSERT(_content_kind); + return *_content_kind; } std::string cpl () const { @@ -167,6 +169,11 @@ public: return _atmos_edit_rate; } + /** @return fonts in each reel */ + std::vector>> fonts() const { + return _fonts; + } + private: boost::optional _video_frame_rate; boost::optional _video_size; @@ -181,7 +188,7 @@ private: bool _has_audio = false; boost::optional _audio_language; /** number of different assets of each type (OCAP/CCAP) */ - int _text_count[static_cast(TextType::COUNT)]; + EnumIndexedVector _text_count; boost::optional _open_subtitle_language; /** the DCPTextTracks for each of our CCAPs */ std::vector _dcp_text_tracks; @@ -190,7 +197,7 @@ private: bool _kdm_valid = false; boost::optional _standard; bool _three_d = false; - dcp::ContentKind _content_kind; + boost::optional _content_kind; std::string _cpl; std::list _reel_lengths; std::map _markers; @@ -199,4 +206,5 @@ private: bool _has_atmos = false; Frame _atmos_length = 0; dcp::Fraction _atmos_edit_rate; + std::vector>> _fonts; };