Emit no audio from DCPs if none is mapped
[dcpomatic.git] / src / lib / dcp_examiner.h
index 1a3615867b4c101ac944b623e66af97ed632388f..04fa31ea4281c611e16ed237616aff749d76e328 100644 (file)
@@ -48,10 +48,8 @@ public:
                return _video_frame_rate;
        }
 
-       dcp::Size video_size () const override {
-               DCPOMATIC_ASSERT (_has_video);
-               DCPOMATIC_ASSERT (_video_size);
-               return *_video_size;
+       boost::optional<dcp::Size> video_size() const override {
+               return _video_size;
        }
 
        Frame video_length () const override {
@@ -173,10 +171,7 @@ public:
                return _atmos_edit_rate;
        }
 
-       /** @return fonts in each reel */
-       std::vector<std::vector<std::shared_ptr<dcpomatic::Font>>> fonts() const {
-               return _fonts;
-       }
+       void add_fonts(std::shared_ptr<TextContent> content);
 
 private:
        boost::optional<double> _video_frame_rate;
@@ -211,5 +206,19 @@ private:
        bool _has_atmos = false;
        Frame _atmos_length = 0;
        dcp::Fraction _atmos_edit_rate;
-       std::vector<std::vector<std::shared_ptr<dcpomatic::Font>>> _fonts;
+
+       struct Font
+       {
+               Font(int reel_index_, std::string asset_id_, std::shared_ptr<dcpomatic::Font> font_)
+                       : reel_index(reel_index_)
+                       , asset_id(asset_id_)
+                       , font(font_)
+               {}
+
+               int reel_index;
+               std::string asset_id;
+               std::shared_ptr<dcpomatic::Font> font;
+       };
+
+       std::vector<Font> _fonts;
 };