#include "audio_examiner.h"
#include "dcp_text_track.h"
#include "dcpomatic_assert.h"
+#include "font_id_allocator.h"
#include "video_examiner.h"
#include <dcp/dcp_time.h>
#include <dcp/rating.h>
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;
}
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;
boost::optional<dcp::Size> _video_size;
Frame _video_length = 0;
boost::optional<int> _audio_channels;
+ boost::optional<int> _active_audio_channels;
boost::optional<int> _audio_frame_rate;
Frame _audio_length = 0;
std::string _name;
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;
+ FontIDAllocator _font_id_allocator;
};