X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Fplayer.h;h=c0e0f9f70f3aa0daa996e4224354f3d06b45b018;hp=cb3403c3d5ae4c9cabe90f865d38bbe3032e5fe5;hb=de2af791bdfdcd653752cba970e59efc7bf810c7;hpb=06152300e69e8faca44ff8d7f12a6fd354848b9a diff --git a/src/lib/player.h b/src/lib/player.h index cb3403c3d..c0e0f9f70 100644 --- a/src/lib/player.h +++ b/src/lib/player.h @@ -26,6 +26,9 @@ #include "content.h" #include "position_image.h" #include "piece.h" +#include "content_video.h" +#include "content_audio.h" +#include "content_subtitle.h" #include #include #include @@ -48,9 +51,9 @@ class Player : public boost::enable_shared_from_this, public boost::nonc public: Player (boost::shared_ptr, boost::shared_ptr playlist); - std::list > get_video (DCPTime time, bool accurate); - boost::shared_ptr get_audio (DCPTime time, DCPTime length, bool accurate); - PlayerSubtitles get_subtitles (DCPTime time, DCPTime length, bool starting, bool burnt, bool accurate); + bool pass (); + void seek (DCPTime time, bool accurate); + std::list > get_subtitle_fonts (); std::list get_reel_assets (); @@ -70,6 +73,10 @@ public: */ boost::signals2::signal Changed; + boost::signals2::signal)> Video; + boost::signals2::signal, DCPTime)> Audio; + boost::signals2::signal Subtitle; + private: friend class PlayerWrapper; friend class Piece; @@ -79,7 +86,6 @@ private: friend struct player_time_calculation_test3; void setup_pieces (); - void reset_pieces (); void flush (); void film_changed (Film::Property); void playlist_changed (); @@ -93,6 +99,10 @@ private: DCPTime content_subtitle_to_dcp (boost::shared_ptr piece, ContentTime t) const; boost::shared_ptr black_player_video_frame (DCPTime) const; std::list > overlaps (DCPTime from, DCPTime to, boost::function valid); + void video (boost::weak_ptr, ContentVideo); + void audio (boost::weak_ptr, ContentAudio); + void image_subtitle (boost::weak_ptr, ContentImageSubtitle); + void text_subtitle (boost::weak_ptr, ContentTextSubtitle); boost::shared_ptr _film; boost::shared_ptr _playlist; @@ -118,6 +128,8 @@ private: /** true if we should `play' (i.e output) referenced DCP data (e.g. for preview) */ bool _play_referenced; + DCPTime _last_video; + boost::shared_ptr _audio_processor; boost::signals2::scoped_connection _film_changed_connection;