X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fplayer.h;h=8142f8e7f7df29cac429cb1042dad67c2cfa1d86;hb=24ba224ab4871e453df50fde94b5b32649a3d47b;hp=9dd5afd26ae3114e66b5a2121936702c5ab97014;hpb=efa79a3db4a041cda3d93dde444e5dca9b84b976;p=dcpomatic.git diff --git a/src/lib/player.h b/src/lib/player.h index 9dd5afd26..8142f8e7f 100644 --- a/src/lib/player.h +++ b/src/lib/player.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2013-2015 Carl Hetherington + Copyright (C) 2013-2018 Carl Hetherington This file is part of DCP-o-matic. @@ -46,6 +46,7 @@ class Playlist; class Font; class AudioBuffers; class ReferencedReelAsset; +class Shuffler; /** @class Player * @brief A class which can `play' a Playlist. @@ -54,6 +55,7 @@ class Player : public boost::enable_shared_from_this, public boost::nonc { public: Player (boost::shared_ptr, boost::shared_ptr playlist); + ~Player (); bool pass (); void seek (DCPTime time, bool accurate); @@ -77,6 +79,7 @@ public: */ boost::signals2::signal Changed; + /** Emitted when a video frame is ready. These emissions happen in the correct order. */ boost::signals2::signal, DCPTime)> Video; boost::signals2::signal, DCPTime)> Audio; /** Emitted when a subtitle is ready. This signal may be emitted considerably @@ -104,7 +107,7 @@ private: DCPTime resampled_audio_to_dcp (boost::shared_ptr piece, Frame f) const; ContentTime dcp_to_content_time (boost::shared_ptr piece, DCPTime t) const; DCPTime content_time_to_dcp (boost::shared_ptr piece, ContentTime t) const; - boost::shared_ptr black_player_video_frame () const; + boost::shared_ptr black_player_video_frame (Eyes eyes) const; void video (boost::weak_ptr, ContentVideo); void audio (boost::weak_ptr, AudioStreamPtr, ContentAudio); void image_subtitle_start (boost::weak_ptr, ContentImageSubtitle); @@ -117,6 +120,7 @@ private: ) const; boost::optional subtitles_for_frame (DCPTime time) const; void emit_video (boost::shared_ptr pv, DCPTime time); + void do_emit_video (boost::shared_ptr pv, DCPTime time); void emit_audio (boost::shared_ptr data, DCPTime time); boost::shared_ptr _film; @@ -145,6 +149,7 @@ private: /** Time just after the last video frame we emitted, or the time of the last accurate seek */ boost::optional _last_video_time; + boost::optional _last_video_eyes; /** Time just after the last audio frame we emitted, or the time of the last accurate seek */ boost::optional _last_audio_time; @@ -154,6 +159,8 @@ private: LastVideoMap _last_video; AudioMerger _audio_merger; + Shuffler* _shuffler; + std::list, DCPTime> > _delay; class StreamState {