Fix font_id_map errors when importing DCP subtitles that have no
[dcpomatic.git] / src / lib / dcp_examiner.h
index a5bf2434e8d23ca28a510bc762a4409cb65c105f..6b88a3c0d412d13d2cf636b7ac49854a28dca682 100644 (file)
@@ -131,7 +131,8 @@ public:
        }
 
        dcp::ContentKind content_kind () const {
-               return _content_kind;
+               DCPOMATIC_ASSERT(_content_kind);
+               return *_content_kind;
        }
 
        std::string cpl () const {
@@ -166,6 +167,11 @@ public:
                return _atmos_edit_rate;
        }
 
+       /** @return fonts in each reel */
+       std::vector<std::vector<std::shared_ptr<dcpomatic::Font>>> fonts() const {
+               return _fonts;
+       }
+
 private:
        boost::optional<double> _video_frame_rate;
        boost::optional<dcp::Size> _video_size;
@@ -189,7 +195,7 @@ private:
        bool _kdm_valid = false;
        boost::optional<dcp::Standard> _standard;
        bool _three_d = false;
-       dcp::ContentKind _content_kind;
+       boost::optional<dcp::ContentKind> _content_kind;
        std::string _cpl;
        std::list<int64_t> _reel_lengths;
        std::map<dcp::Marker, dcp::Time> _markers;
@@ -198,4 +204,5 @@ private:
        bool _has_atmos = false;
        Frame _atmos_length = 0;
        dcp::Fraction _atmos_edit_rate;
+       std::vector<std::vector<std::shared_ptr<dcpomatic::Font>>> _fonts;
 };