#include "audio_buffers.h"
#include "content.h"
#include "film.h"
+#include "rect.h"
class Job;
class Film;
class Piece;
class Image;
class Resampler;
-class TimedSubtitle;
/** @class Player
* @brief A class which can `play' a Playlist; emitting its audio and video.
void process_video (boost::weak_ptr<Piece>, boost::shared_ptr<const Image>, bool, VideoContent::Frame);
void process_audio (boost::weak_ptr<Piece>, boost::shared_ptr<const AudioBuffers>, AudioContent::Frame);
- void process_subtitle (boost::weak_ptr<Piece>, boost::shared_ptr<TimedSubtitle>);
+ void process_subtitle (boost::weak_ptr<Piece>, boost::shared_ptr<Image>, dcpomatic::Rect<double>, Time, Time);
void setup_pieces ();
void playlist_changed ();
void content_changed (boost::weak_ptr<Content>, int);
void emit_silence (OutputAudioFrame);
boost::shared_ptr<Resampler> resampler (boost::shared_ptr<AudioContent>);
void film_changed (Film::Property);
+ void update_subtitle ();
boost::shared_ptr<const Film> _film;
boost::shared_ptr<const Playlist> _playlist;
libdcp::Size _video_container_size;
boost::shared_ptr<Image> _black_frame;
std::map<boost::shared_ptr<AudioContent>, boost::shared_ptr<Resampler> > _resamplers;
-
- boost::shared_ptr<TimedSubtitle> _subtitle;
- Time _subtitle_content_time;
- int _subtitle_offset;
- float _subtitle_scale;
+ boost::shared_ptr<Resampler> _last_resampler;
+
+ struct {
+ boost::weak_ptr<Piece> piece;
+ boost::shared_ptr<Image> image;
+ dcpomatic::Rect<double> rect;
+ Time from;
+ Time to;
+ } _in_subtitle;
+
+ struct {
+ boost::shared_ptr<Image> image;
+ Position<int> position;
+ Time from;
+ Time to;
+ } _out_subtitle;
};
#endif