X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fsubtitle_encoder.h;h=0815b1fffbca7e8e02487a8fdfd5664205a81214;hb=67cc6717aeb5f3b96448b206d1b85d68cbb26767;hp=b267c9bae0b620244d50bd9aff88f9078a2112e0;hpb=9f294327cb59fce307c3a439f044d79b081376b0;p=dcpomatic.git diff --git a/src/lib/subtitle_encoder.h b/src/lib/subtitle_encoder.h index b267c9bae..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,44 +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, bool include_font); + 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; };