X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fplayer.h;h=6cefbe2323bc6363ba59ca424d1cd1846ecee7cc;hb=924f4edb20d14bc697956254951fb87513cf2e19;hp=ce49af14848e8d5aa8a7be8121ac67a011b08da0;hpb=39fce9acb7869c551fded172aa070d75c7a9bc50;p=dcpomatic.git diff --git a/src/lib/player.h b/src/lib/player.h index ce49af148..6cefbe232 100644 --- a/src/lib/player.h +++ b/src/lib/player.h @@ -18,26 +18,30 @@ */ + #ifndef DCPOMATIC_PLAYER_H #define DCPOMATIC_PLAYER_H -#include "atmos_metadata.h" -#include "player_text.h" + #include "active_text.h" -#include "content_text.h" -#include "film.h" +#include "atmos_metadata.h" +#include "audio_merger.h" +#include "audio_stream.h" #include "content.h" #include "content_atmos.h" -#include "position_image.h" -#include "piece.h" -#include "content_video.h" #include "content_audio.h" -#include "audio_stream.h" -#include "audio_merger.h" +#include "content_text.h" +#include "content_video.h" #include "empty.h" +#include "film.h" +#include "piece.h" +#include "player_text.h" +#include "position_image.h" +#include "shuffler.h" #include #include + namespace dcp { class ReelAsset; } @@ -53,6 +57,7 @@ class AudioBuffers; class ReferencedReelAsset; class Shuffler; + class PlayerProperty { public: @@ -64,6 +69,7 @@ public: static int const PLAYBACK_LENGTH; }; + /** @class Player * @brief A class which can play a Playlist. */ @@ -72,10 +78,10 @@ class Player : public std::enable_shared_from_this public: Player (std::shared_ptr); Player (std::shared_ptr, std::shared_ptr playlist); - ~Player (); Player (Player const& Player) = delete; Player& operator= (Player const& Player) = delete; + bool pass (); void seek (dcpomatic::DCPTime time, bool accurate); @@ -101,6 +107,9 @@ public: /** Emitted when a video frame is ready. These emissions happen in the correct order. */ boost::signals2::signal, dcpomatic::DCPTime)> Video; + /** Emitted when audio data is ready. First parameter is the audio data, second its time, + * third the frame rate. + */ boost::signals2::signal, dcpomatic::DCPTime, int)> Audio; /** Emitted when a text is ready. This signal may be emitted considerably * after the corresponding Video. @@ -118,6 +127,7 @@ private: friend struct empty_test1; friend struct empty_test2; friend struct check_reuse_old_data_test; + friend struct overlap_video_test1; void construct (); void setup_pieces (); @@ -197,7 +207,7 @@ private: LastVideoMap _last_video; AudioMerger _audio_merger; - Shuffler* _shuffler = nullptr; + std::unique_ptr _shuffler; std::list, dcpomatic::DCPTime> > _delay; class StreamState @@ -228,4 +238,5 @@ private: boost::signals2::scoped_connection _playlist_content_change_connection; }; + #endif