summaryrefslogtreecommitdiff
path: root/src/lib/reel_writer.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-06-01 13:03:38 +0200
committerCarl Hetherington <cth@carlh.net>2022-06-07 17:01:06 +0200
commit5a820bb8fae34591be5ac6d19a73461b9dab532a (patch)
tree098e2dc959b6df0fefa62b2976976afc9f81b96b /src/lib/reel_writer.h
parent9a7b67aee32a40539f29bc2d7017edd4a4f65f11 (diff)
Rearrange subtitle font management.
With this change each subtitle coming out of the player has a reference to a dcpomatic::Font that belongs to the TextContent. This hopefully solves a few problems which all basically stemmed from the fact that previously the decoders/player were deciding what the font ID in the output DCP would be - they can't do that properly.
Diffstat (limited to 'src/lib/reel_writer.h')
-rw-r--r--src/lib/reel_writer.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/lib/reel_writer.h b/src/lib/reel_writer.h
index d08b5b1f0..e578a4813 100644
--- a/src/lib/reel_writer.h
+++ b/src/lib/reel_writer.h
@@ -22,6 +22,7 @@
#include "atmos_metadata.h"
#include "dcp_text_track.h"
#include "dcpomatic_time.h"
+#include "font_id_map.h"
#include "player_text.h"
#include "referenced_reel_asset.h"
#include "types.h"
@@ -31,10 +32,6 @@
#include <dcp/picture_asset_writer.h>
-namespace dcpomatic {
- class FontData;
-}
-
class AudioBuffers;
class Film;
class InfoFileHandle;
@@ -74,13 +71,14 @@ public:
void fake_write (int size);
void repeat_write (Frame frame, Eyes eyes);
void write (std::shared_ptr<const AudioBuffers> audio);
- void write (PlayerText text, TextType type, boost::optional<DCPTextTrack> track, dcpomatic::DCPTimePeriod period);
+ void write (PlayerText text, TextType type, boost::optional<DCPTextTrack> track, dcpomatic::DCPTimePeriod period, FontIdMap const& fonts);
void write (std::shared_ptr<const dcp::AtmosFrame> atmos, AtmosMetadata metadata);
void finish (boost::filesystem::path output_dcp);
std::shared_ptr<dcp::Reel> create_reel (
std::list<ReferencedReelAsset> const & refs,
- std::vector<dcpomatic::FontData> const & fonts,
+ FontIdMap const & fonts,
+ std::shared_ptr<dcpomatic::Font> chosen_interop_font,
boost::filesystem::path output_dcp,
bool ensure_subtitles,
std::set<DCPTextTrack> ensure_closed_captions
@@ -114,7 +112,8 @@ private:
void create_reel_text (
std::shared_ptr<dcp::Reel> reel,
std::list<ReferencedReelAsset> const & refs,
- std::vector<dcpomatic::FontData> const& fonts,
+ FontIdMap const& fonts,
+ std::shared_ptr<dcpomatic::Font> chosen_interop_font,
int64_t duration,
boost::filesystem::path output_dcp,
bool ensure_subtitles,