X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fplayer.h;h=8142f8e7f7df29cac429cb1042dad67c2cfa1d86;hb=24ba224ab4871e453df50fde94b5b32649a3d47b;hp=7cc3b0ef704ded47bd596fbb21cc3a30eb1746d6;hpb=598483f71fabde104250296ab4bfe4ec70d82d66;p=dcpomatic.git diff --git a/src/lib/player.h b/src/lib/player.h index 7cc3b0ef7..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); @@ -105,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); @@ -118,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; @@ -146,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; @@ -155,6 +159,8 @@ private: LastVideoMap _last_video; AudioMerger _audio_merger; + Shuffler* _shuffler; + std::list, DCPTime> > _delay; class StreamState {