X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdcp_examiner.h;h=54e283548a49f031a030df4b8b4e823f31bab33b;hb=095f151405f0e9ab512928db0b6860fd196531d7;hp=b51e7ae7a8e53d69cf406a05f2956599e5a22f89;hpb=458517981bbb6d8a76b2769ac824daa29c691d35;p=dcpomatic.git diff --git a/src/lib/dcp_examiner.h b/src/lib/dcp_examiner.h index b51e7ae7a..54e283548 100644 --- a/src/lib/dcp_examiner.h +++ b/src/lib/dcp_examiner.h @@ -27,6 +27,7 @@ #include "audio_examiner.h" #include "dcp_text_track.h" #include "dcpomatic_assert.h" +#include "font_id_allocator.h" #include "video_examiner.h" #include #include @@ -90,6 +91,10 @@ public: return _audio_channels.get_value_or (0); } + int active_audio_channels() const { + return _active_audio_channels.get_value_or(0); + } + Frame audio_length () const override { return _audio_length; } @@ -169,16 +174,14 @@ public: return _atmos_edit_rate; } - /** @return fonts in each reel */ - std::vector>> fonts() const { - return _fonts; - } + void add_fonts(std::shared_ptr content); private: boost::optional _video_frame_rate; boost::optional _video_size; Frame _video_length = 0; boost::optional _audio_channels; + boost::optional _active_audio_channels; boost::optional _audio_frame_rate; Frame _audio_length = 0; std::string _name; @@ -206,5 +209,20 @@ private: bool _has_atmos = false; Frame _atmos_length = 0; dcp::Fraction _atmos_edit_rate; - std::vector>> _fonts; + + struct Font + { + Font(int reel_index_, std::string asset_id_, std::shared_ptr font_) + : reel_index(reel_index_) + , asset_id(asset_id_) + , font(font_) + {} + + int reel_index; + std::string asset_id; + std::shared_ptr font; + }; + + std::vector _fonts; + FontIDAllocator _font_id_allocator; };