X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Freel_writer.h;h=6e92e89230937bb2f8555b5e6c0695d6c6120462;hp=e578a481317b995984996f890536286e052ef2d4;hb=HEAD;hpb=5a820bb8fae34591be5ac6d19a73461b9dab532a diff --git a/src/lib/reel_writer.h b/src/lib/reel_writer.h index e578a4813..c9052c832 100644 --- a/src/lib/reel_writer.h +++ b/src/lib/reel_writer.h @@ -22,10 +22,11 @@ #include "atmos_metadata.h" #include "dcp_text_track.h" #include "dcpomatic_time.h" +#include "enum_indexed_vector.h" #include "font_id_map.h" #include "player_text.h" #include "referenced_reel_asset.h" -#include "types.h" +#include "render_text.h" #include "weak_film.h" #include #include @@ -71,19 +72,17 @@ public: void fake_write (int size); void repeat_write (Frame frame, Eyes eyes); void write (std::shared_ptr audio); - void write (PlayerText text, TextType type, boost::optional track, dcpomatic::DCPTimePeriod period, FontIdMap const& fonts); + void write(PlayerText text, TextType type, boost::optional track, dcpomatic::DCPTimePeriod period, FontIdMap const& fonts, std::shared_ptr chosen_interop_font); void write (std::shared_ptr atmos, AtmosMetadata metadata); void finish (boost::filesystem::path output_dcp); std::shared_ptr create_reel ( std::list const & refs, - FontIdMap const & fonts, - std::shared_ptr chosen_interop_font, boost::filesystem::path output_dcp, bool ensure_subtitles, std::set ensure_closed_captions ); - void calculate_digests (std::function set_progress); + void calculate_digests(std::function set_progress); Frame start () const; @@ -91,8 +90,8 @@ public: return _period; } - int first_nonexistant_frame () const { - return _first_nonexistant_frame; + int first_nonexistent_frame () const { + return _first_nonexistent_frame; } dcp::FrameInfo read_frame_info (std::shared_ptr info, Frame frame, Eyes eyes) const; @@ -112,20 +111,19 @@ private: void create_reel_text ( std::shared_ptr reel, std::list const & refs, - FontIdMap const& fonts, - std::shared_ptr chosen_interop_font, int64_t duration, boost::filesystem::path output_dcp, bool ensure_subtitles, std::set ensure_closed_captions ) const; void create_reel_markers (std::shared_ptr reel) const; + float convert_vertical_position(StringText const& subtitle, dcp::SubtitleStandard to) const; dcpomatic::DCPTimePeriod _period; /** the first picture frame index that does not already exist in our MXF */ - int _first_nonexistant_frame; + int _first_nonexistent_frame; /** the data of the last written frame, if there is one */ - std::shared_ptr _last_written[static_cast(Eyes::COUNT)]; + EnumIndexedVector, Eyes> _last_written; /** index of this reel within the DCP (starting from 0) */ int _reel_index; /** number of reels in the DCP */ @@ -146,5 +144,7 @@ private: std::shared_ptr _atmos_asset; std::shared_ptr _atmos_asset_writer; + mutable FontMetrics _font_metrics; + static int const _info_size; };