- void film_changed (Film::Property);
- void playlist_changed ();
- void playlist_content_changed (boost::weak_ptr<Content>, int, bool);
- std::list<PositionImage> transform_image_subtitles (std::list<ImageSubtitle>) const;
- Frame dcp_to_content_video (boost::shared_ptr<const Piece> piece, DCPTime t) const;
- DCPTime content_video_to_dcp (boost::shared_ptr<const Piece> piece, Frame f) const;
- Frame dcp_to_resampled_audio (boost::shared_ptr<const Piece> piece, DCPTime t) const;
- DCPTime resampled_audio_to_dcp (boost::shared_ptr<const Piece> piece, Frame f) const;
- ContentTime dcp_to_content_time (boost::shared_ptr<const Piece> piece, DCPTime t) const;
- DCPTime content_time_to_dcp (boost::shared_ptr<const Piece> piece, ContentTime t) const;
- boost::shared_ptr<PlayerVideo> black_player_video_frame () const;
- std::list<boost::shared_ptr<Piece> > overlaps (DCPTime from, DCPTime to, boost::function<bool (Content *)> valid);
- void video (boost::weak_ptr<Piece>, ContentVideo);
- void audio (boost::weak_ptr<Piece>, AudioStreamPtr, ContentAudio);
- void image_subtitle (boost::weak_ptr<Piece>, ContentImageSubtitle);
- void text_subtitle (boost::weak_ptr<Piece>, ContentTextSubtitle);
- boost::shared_ptr<Resampler> resampler (boost::shared_ptr<const AudioContent> content, AudioStreamPtr stream, bool create);
- DCPTime one_video_frame () const;
- void fill_video (DCPTimePeriod period);
- void fill_audio (DCPTimePeriod period);
-
- boost::shared_ptr<const Film> _film;
- boost::shared_ptr<const Playlist> _playlist;
-
- /** 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;
-
- /** Size of the image in the DCP (e.g. 1990x1080 for flat) */
+ void film_change (ChangeType, Film::Property);
+ void playlist_change (ChangeType);
+ void playlist_content_change (ChangeType, int, bool);
+ Frame dcp_to_content_video (std::shared_ptr<const Piece> piece, dcpomatic::DCPTime t) const;
+ dcpomatic::DCPTime content_video_to_dcp (std::shared_ptr<const Piece> piece, Frame f) const;
+ Frame dcp_to_resampled_audio (std::shared_ptr<const Piece> piece, dcpomatic::DCPTime t) const;
+ dcpomatic::DCPTime resampled_audio_to_dcp (std::shared_ptr<const Piece> piece, Frame f) const;
+ dcpomatic::ContentTime dcp_to_content_time (std::shared_ptr<const Piece> piece, dcpomatic::DCPTime t) const;
+ dcpomatic::DCPTime content_time_to_dcp (std::shared_ptr<const Piece> piece, dcpomatic::ContentTime t) const;
+ std::shared_ptr<PlayerVideo> black_player_video_frame (Eyes eyes) const;
+
+ void video (std::weak_ptr<Piece>, ContentVideo);
+ void audio (std::weak_ptr<Piece>, AudioStreamPtr, ContentAudio);
+ void bitmap_text_start (std::weak_ptr<Piece>, std::weak_ptr<const TextContent>, ContentBitmapText);
+ void plain_text_start (std::weak_ptr<Piece>, std::weak_ptr<const TextContent>, ContentStringText);
+ void subtitle_stop (std::weak_ptr<Piece>, std::weak_ptr<const TextContent>, dcpomatic::ContentTime);
+ void atmos (std::weak_ptr<Piece>, ContentAtmos);
+
+ dcpomatic::DCPTime one_video_frame () const;
+ void fill_audio (dcpomatic::DCPTimePeriod period);
+ std::pair<std::shared_ptr<AudioBuffers>, dcpomatic::DCPTime> discard_audio (
+ std::shared_ptr<const AudioBuffers> audio, dcpomatic::DCPTime time, dcpomatic::DCPTime discard_to
+ ) const;
+ boost::optional<PositionImage> open_subtitles_for_frame (dcpomatic::DCPTime time) const;
+ void emit_video (std::shared_ptr<PlayerVideo> pv, dcpomatic::DCPTime time);
+ void do_emit_video (std::shared_ptr<PlayerVideo> pv, dcpomatic::DCPTime time);
+ void emit_audio (std::shared_ptr<AudioBuffers> data, dcpomatic::DCPTime time);
+ std::shared_ptr<const Playlist> playlist () const;
+
+ /** Mutex to protect the whole Player state. When it's used for the preview we have
+ seek() and pass() called from the Butler thread and lots of other stuff called
+ from the GUI thread.
+ */
+ mutable boost::mutex _mutex;
+
+ std::shared_ptr<const Film> _film;
+ /** Playlist, or 0 if we are using the one from the _film */
+ std::shared_ptr<const Playlist> _playlist;
+
+ /** > 0 if we are suspended (i.e. pass() and seek() do nothing) */
+ boost::atomic<int> _suspended;
+ std::list<std::shared_ptr<Piece> > _pieces;
+
+ /** Size of the image we are rendering to; this may be the DCP frame size, or
+ * the size of preview in a window.
+ */