X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Fdcp_examiner.h;h=b51e7ae7a8e53d69cf406a05f2956599e5a22f89;hp=6b88a3c0d412d13d2cf636b7ac49854a28dca682;hb=458517981bbb6d8a76b2769ac824daa29c691d35;hpb=0a5d3c77247d3e68a144bfc077c29fbcf3819735 diff --git a/src/lib/dcp_examiner.h b/src/lib/dcp_examiner.h index 6b88a3c0d..b51e7ae7a 100644 --- a/src/lib/dcp_examiner.h +++ b/src/lib/dcp_examiner.h @@ -38,7 +38,7 @@ class DCPContent; 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; @@ -103,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 { @@ -186,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;