X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Flib%2Fplayer.h;h=22701cb2ca452c486746f643063c7bb7affa1250;hb=HEAD;hp=45dcd9900c256bce1996e3b92f4ec4699dfe83bd;hpb=7d0cd227fa8cf13b04504af22301521dc231c0c7;p=dcpomatic.git diff --git a/src/lib/player.h b/src/lib/player.h index 45dcd9900..48f6f97ca 100644 --- a/src/lib/player.h +++ b/src/lib/player.h @@ -31,9 +31,10 @@ #include "content_audio.h" #include "content_text.h" #include "content_video.h" +#include "dcp_text_track.h" #include "empty.h" #include "enum_indexed_vector.h" -#include "film.h" +#include "film_property.h" #include "image.h" #include "player_text.h" #include "position_image.h" @@ -49,6 +50,7 @@ namespace dcp { class AtmosContent; class AudioBuffers; class Content; +class Film; class PlayerVideo; class Playlist; class ReferencedReelAsset; @@ -88,6 +90,8 @@ public: bool pass (); void seek (dcpomatic::DCPTime time, bool accurate); + Frame frames_done() const; + float progress() const; std::vector> get_subtitle_fonts (); @@ -103,6 +107,7 @@ public: void set_fast (); void set_play_referenced (); void set_dcp_decode_reduction (boost::optional reduction); + void set_disable_audio_processor(); boost::optional content_time_to_dcp (std::shared_ptr content, dcpomatic::ContentTime t) const; boost::optional dcp_to_content_time (std::shared_ptr content, dcpomatic::DCPTime t) const; @@ -142,7 +147,7 @@ private: void construct (); void connect(); void setup_pieces (); - void film_change (ChangeType, Film::Property); + void film_change(ChangeType, FilmProperty); void playlist_change (ChangeType); void playlist_content_change (ChangeType, int, bool); Frame dcp_to_content_video (std::shared_ptr piece, dcpomatic::DCPTime t) const; @@ -152,6 +157,7 @@ private: dcpomatic::ContentTime dcp_to_content_time (std::shared_ptr piece, dcpomatic::DCPTime t) const; dcpomatic::DCPTime content_time_to_dcp (std::shared_ptr piece, dcpomatic::ContentTime t) const; std::shared_ptr black_player_video_frame (Eyes eyes) const; + std::pair, boost::optional> earliest_piece_and_time() const; void video (std::weak_ptr, ContentVideo); void audio (std::weak_ptr, AudioStreamPtr, ContentAudio); @@ -183,7 +189,7 @@ private: /** > 0 if we are suspended (i.e. pass() and seek() do nothing) */ boost::atomic _suspended; - std::list> _pieces; + std::vector> _pieces; /** Size of the image we are rendering to; this may be the DCP frame size, or * the size of preview in a window. @@ -241,6 +247,7 @@ private: EnumIndexedVector _active_texts; std::shared_ptr _audio_processor; + bool _disable_audio_processor = false; boost::atomic _playback_length;