X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Fsubtitle_encoder.h;h=0815b1fffbca7e8e02487a8fdfd5664205a81214;hp=50485750d2ee146da8b0f57430aa52d2635eabfd;hb=7c020de6dc47b75a3b589420b30b6768eb5c0106;hpb=2cdf3d9f461b12d0925cc54368105bbd177bbbb3 diff --git a/src/lib/subtitle_encoder.h b/src/lib/subtitle_encoder.h index 50485750d..0815b1fff 100644 --- a/src/lib/subtitle_encoder.h +++ b/src/lib/subtitle_encoder.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2019 Carl Hetherington + Copyright (C) 2019-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -18,43 +18,47 @@ */ -#include "types.h" -#include "player_text.h" + #include "dcp_text_track.h" -#include "encoder.h" #include "dcpomatic_time.h" -#include +#include "encoder.h" +#include "player_text.h" + namespace dcp { class SubtitleAsset; } + class Film; + /** @class SubtitleEncoder. * @brief An `encoder' which extracts a film's subtitles to DCP XML format. */ class SubtitleEncoder : public Encoder { public: - SubtitleEncoder (boost::shared_ptr film, boost::shared_ptr job, boost::filesystem::path output, bool split_reels); + SubtitleEncoder (std::shared_ptr film, std::shared_ptr job, boost::filesystem::path output, std::string initial_name, bool split_reels, bool include_font); - void go (); + void go () override; /** @return the number of frames that are done */ - Frame frames_done () const; + Frame frames_done () const override; - bool finishing () const { + bool finishing () const override { return false; } private: void text (PlayerText subs, TextType type, boost::optional track, dcpomatic::DCPTimePeriod period); - std::vector, boost::filesystem::path> > _assets; + std::vector, boost::filesystem::path>> _assets; std::vector _reels; bool _split_reels; + bool _include_font; int _reel_index; boost::optional _last; dcpomatic::DCPTime _length; + dcp::ArrayData _default_font; };