X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdcp_examiner.h;h=3fedaca06aded36f75f4beacd85de8ef2fd954ee;hb=8fedaaa75c4586a4cc7ffb393bd71d1fdb091dc8;hp=c1ba54deed3c34f29d52ed980a6f68c6f5a704ea;hpb=736745c86cefc6d5d4d8098799efc86f0f639061;p=dcpomatic.git diff --git a/src/lib/dcp_examiner.h b/src/lib/dcp_examiner.h index c1ba54dee..3fedaca06 100644 --- a/src/lib/dcp_examiner.h +++ b/src/lib/dcp_examiner.h @@ -25,6 +25,8 @@ #include "video_examiner.h" #include "audio_examiner.h" #include "dcp.h" +#include "dcp_text_track.h" +#include "dcpomatic_assert.h" #include class DCPContent; @@ -32,7 +34,7 @@ class DCPContent; class DCPExaminer : public DCP, public VideoExaminer, public AudioExaminer { public: - explicit DCPExaminer (boost::shared_ptr, bool tolerant); + explicit DCPExaminer (std::shared_ptr, bool tolerant); bool has_video () const { return _has_video; @@ -57,7 +59,7 @@ public: } VideoRange range () const { - return VIDEO_RANGE_FULL; + return VideoRange::FULL; } std::string name () const { @@ -92,7 +94,12 @@ public: * @return Number of assets of this type in this DCP. */ int text_count (TextType type) const { - return _text_count[type]; + return _text_count[static_cast(type)]; + } + + DCPTextTrack dcp_text_track (int i) const { + DCPOMATIC_ASSERT (i >= 0 && i < static_cast(_dcp_text_tracks.size())); + return _dcp_text_tracks[i]; } bool kdm_valid () const { @@ -123,27 +130,54 @@ public: return _markers; } + std::vector ratings () const { + return _ratings; + } + + std::vector content_versions () const { + return _content_versions; + } + + bool has_atmos () const { + return _has_atmos; + } + + Frame atmos_length () const { + return _atmos_length; + } + + dcp::Fraction atmos_edit_rate () const { + return _atmos_edit_rate; + } + private: boost::optional _video_frame_rate; boost::optional _video_size; - Frame _video_length; + Frame _video_length = 0; boost::optional _audio_channels; boost::optional _audio_frame_rate; - Frame _audio_length; + Frame _audio_length = 0; std::string _name; /** true if this DCP has video content (but false if it has unresolved references to video content) */ - bool _has_video; + bool _has_video = false; /** true if this DCP has audio content (but false if it has unresolved references to audio content) */ - bool _has_audio; + bool _has_audio = false; /** number of different assets of each type (OCAP/CCAP) */ - int _text_count[TEXT_COUNT]; - bool _encrypted; - bool _needs_assets; - bool _kdm_valid; + int _text_count[static_cast(TextType::COUNT)]; + /** the DCPTextTracks for each of our CCAPs */ + std::vector _dcp_text_tracks; + bool _encrypted = false; + bool _needs_assets = false; + bool _kdm_valid = false; boost::optional _standard; - bool _three_d; + bool _three_d = false; dcp::ContentKind _content_kind; std::string _cpl; std::list _reel_lengths; std::map _markers; + std::vector _ratings; + std::vector _content_versions; + bool _has_atmos = false; + Frame _atmos_length = 0; + dcp::Fraction _atmos_edit_rate; };