- bool _subtitles;
-
- /** Our decoders are ready to go; if this is false the decoders must be (re-)created before they are used */
- bool _have_valid_decoders;
- /** Video decoders in order of presentation */
- std::vector<boost::shared_ptr<VideoDecoder> > _video_decoders;
- /** Start positions of each video decoder in seconds*/
- std::vector<double> _video_start;
- /** Index of current video decoder */
- size_t _video_decoder;
- /** Audio decoders in order of presentation (if they are from FFmpeg) */
- std::vector<boost::shared_ptr<AudioDecoder> > _audio_decoders;
- /** Start positions of each audio decoder (if they are from FFmpeg) in seconds */
- std::vector<double> _audio_start;
- /** Current audio decoder index if we are running them sequentially; otherwise undefined */
- size_t _sequential_audio_decoder;
-
- boost::shared_ptr<AudioBuffers> _audio_buffers;
- boost::optional<double> _audio_time;
+
+ /** Our pieces are ready to go; if this is false the pieces must be (re-)created before they are used */
+ bool _have_valid_pieces;
+ std::list<boost::shared_ptr<Piece> > _pieces;
+
+ /** The time after the last video that we emitted */
+ DCPTime _video_position;
+ /** The time after the last audio that we emitted */
+ DCPTime _audio_position;
+
+ AudioMerger<DCPTime, AudioFrame> _audio_merger;
+
+ libdcp::Size _video_container_size;
+ boost::shared_ptr<PlayerImage> _black_frame;
+
+ struct {
+ boost::weak_ptr<Piece> piece;
+ boost::shared_ptr<DecodedImageSubtitle> subtitle;
+ } _image_subtitle;
+
+ struct {
+ boost::weak_ptr<Piece> piece;
+ boost::shared_ptr<DecodedTextSubtitle> subtitle;
+ } _text_subtitle;
+
+ struct {
+ Position<int> position;
+ boost::shared_ptr<Image> image;
+ DCPTime from;
+ DCPTime to;
+ } _out_subtitle;
+
+#ifdef DCPOMATIC_DEBUG
+ boost::shared_ptr<Content> _last_video;
+#endif
+
+ bool _last_emit_was_black;
+
+ struct {
+ boost::weak_ptr<Piece> weak_piece;
+ boost::shared_ptr<DecodedVideo> video;
+ } _last_incoming_video;
+
+ bool _just_did_inaccurate_seek;
+ bool _approximate_size;
+
+ PlayerStatistics _statistics;
+
+ boost::signals2::scoped_connection _playlist_changed_connection;
+ boost::signals2::scoped_connection _playlist_content_changed_connection;
+ boost::signals2::scoped_connection _film_changed_connection;