X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Flib%2Fplayer.h;h=b3eadd7c07e25521506bf6fcc29bc251262e811f;hb=bb917533ad5beaded24ed56c7c4dc71d50e76263;hp=32ef25d47142a1e1489f7e49250164b08f2babdb;hpb=f0d79f2ee79becbcb7bc9065155eaa0963a6aa99;p=dcpomatic.git diff --git a/src/lib/player.h b/src/lib/player.h index 32ef25d47..b3eadd7c0 100644 --- a/src/lib/player.h +++ b/src/lib/player.h @@ -27,6 +27,7 @@ #include "audio_buffers.h" #include "content.h" #include "film.h" +#include "rect.h" class Job; class Film; @@ -35,7 +36,6 @@ class AudioContent; class Piece; class Image; class Resampler; -class TimedSubtitle; /** @class Player * @brief A class which can `play' a Playlist; emitting its audio and video. @@ -78,7 +78,7 @@ private: void process_video (boost::weak_ptr, boost::shared_ptr, bool, VideoContent::Frame); void process_audio (boost::weak_ptr, boost::shared_ptr, AudioContent::Frame); - void process_subtitle (boost::weak_ptr, boost::shared_ptr); + void process_subtitle (boost::weak_ptr, boost::shared_ptr, dcpomatic::Rect, Time, Time); void setup_pieces (); void playlist_changed (); void content_changed (boost::weak_ptr, int); @@ -88,6 +88,7 @@ private: void emit_silence (OutputAudioFrame); boost::shared_ptr resampler (boost::shared_ptr); void film_changed (Film::Property); + void update_subtitle (); boost::shared_ptr _film; boost::shared_ptr _playlist; @@ -109,11 +110,22 @@ private: libdcp::Size _video_container_size; boost::shared_ptr _black_frame; std::map, boost::shared_ptr > _resamplers; - - boost::shared_ptr _subtitle; - Time _subtitle_content_time; - int _subtitle_offset; - float _subtitle_scale; + boost::shared_ptr _last_resampler; + + struct { + boost::weak_ptr piece; + boost::shared_ptr image; + dcpomatic::Rect rect; + Time from; + Time to; + } _in_subtitle; + + struct { + boost::shared_ptr image; + Position position; + Time from; + Time to; + } _out_subtitle; }; #endif