X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdcp_examiner.h;h=6b88a3c0d412d13d2cf636b7ac49854a28dca682;hb=0a5d3c77247d3e68a144bfc077c29fbcf3819735;hp=757e3ff031a279724487b67c98662c021b4f2b8e;hpb=47d83b296248119d04b9226fd51a67e2fd3faac5;p=dcpomatic.git diff --git a/src/lib/dcp_examiner.h b/src/lib/dcp_examiner.h index 757e3ff03..6b88a3c0d 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,38 +35,38 @@ class DCPContent; -class DCPExaminer : public DCP, public VideoExaminer, public AudioExaminer +class DCPExaminer : public VideoExaminer, public AudioExaminer { public: explicit DCPExaminer (std::shared_ptr, bool tolerant); - bool has_video () const { + bool has_video () const override { return _has_video; } - boost::optional video_frame_rate () const { + boost::optional video_frame_rate () const override { return _video_frame_rate; } - dcp::Size video_size () const { + dcp::Size video_size () const override { DCPOMATIC_ASSERT (_has_video); DCPOMATIC_ASSERT (_video_size); return *_video_size; } - Frame video_length () const { + Frame video_length () const override { return _video_length; } - bool yuv () const { + bool yuv () const override { return false; } - VideoRange range () const { + VideoRange range () const override { return VideoRange::FULL; } - PixelQuanta pixel_quanta () const { + PixelQuanta pixel_quanta () const override { return {}; } @@ -83,19 +82,19 @@ public: return _needs_assets; } - bool has_audio () const { + bool has_audio () const override { return _has_audio; } - int audio_channels () const { + int audio_channels () const override { return _audio_channels.get_value_or (0); } - Frame audio_length () const { + Frame audio_length () const override { return _audio_length; } - int audio_frame_rate () const { + int audio_frame_rate () const override { return _audio_frame_rate.get_value_or (48000); } @@ -132,7 +131,8 @@ public: } dcp::ContentKind content_kind () const { - return _content_kind; + DCPOMATIC_ASSERT(_content_kind); + return *_content_kind; } std::string cpl () const { @@ -167,6 +167,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; @@ -190,7 +195,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 +204,5 @@ private: bool _has_atmos = false; Frame _atmos_length = 0; dcp::Fraction _atmos_edit_rate; + std::vector>> _fonts; };