-#include "player_subtitles.h"
-#include "active_subtitles.h"
+#include "player_text.h"
+#include "active_text.h"
+#include "content_text.h"
#include "film.h"
#include "content.h"
#include "position_image.h"
#include "piece.h"
#include "content_video.h"
#include "content_audio.h"
#include "film.h"
#include "content.h"
#include "position_image.h"
#include "piece.h"
#include "content_video.h"
#include "content_audio.h"
+class Shuffler;
+
+class PlayerProperty
+{
+public:
+ static int const VIDEO_CONTAINER_SIZE;
+ static int const PLAYLIST;
+ static int const FILM_CONTAINER;
+ static int const FILM_VIDEO_FRAME_RATE;
+ static int const DCP_DECODE_REDUCTION;
+};
*/
class Player : public boost::enable_shared_from_this<Player>, public boost::noncopyable
{
public:
Player (boost::shared_ptr<const Film>, boost::shared_ptr<const Playlist> playlist);
*/
class Player : public boost::enable_shared_from_this<Player>, public boost::noncopyable
{
public:
Player (boost::shared_ptr<const Film>, boost::shared_ptr<const Playlist> playlist);
bool pass ();
void seek (DCPTime time, bool accurate);
std::list<boost::shared_ptr<Font> > get_subtitle_fonts ();
std::list<ReferencedReelAsset> get_reel_assets ();
bool pass ();
void seek (DCPTime time, bool accurate);
std::list<boost::shared_ptr<Font> > get_subtitle_fonts ();
std::list<ReferencedReelAsset> get_reel_assets ();
- void set_ignore_subtitle ();
- void set_always_burn_subtitles (bool burn);
+ void set_ignore_audio ();
+ void set_ignore_text ();
+ void set_always_burn_open_subtitles ();
- /** Emitted when something has changed such that if we went back and emitted
- * the last frame again it would look different. This is not emitted after
- * a seek.
- *
- * The parameter is true if these signals are currently likely to be frequent.
- */
- boost::signals2::signal<void (bool)> Changed;
+ boost::optional<DCPTime> content_time_to_dcp (boost::shared_ptr<Content> content, ContentTime t);
boost::signals2::signal<void (boost::shared_ptr<PlayerVideo>, DCPTime)> Video;
boost::signals2::signal<void (boost::shared_ptr<AudioBuffers>, DCPTime)> Audio;
boost::signals2::signal<void (boost::shared_ptr<PlayerVideo>, DCPTime)> Video;
boost::signals2::signal<void (boost::shared_ptr<AudioBuffers>, DCPTime)> Audio;
friend struct player_time_calculation_test2;
friend struct player_time_calculation_test3;
friend struct player_subframe_test;
friend struct player_time_calculation_test2;
friend struct player_time_calculation_test3;
friend struct player_subframe_test;
- void film_changed (Film::Property);
- void playlist_changed ();
- void playlist_content_changed (boost::weak_ptr<Content>, int, bool);
- std::list<PositionImage> transform_image_subtitles (std::list<ImageSubtitle>) const;
+ void film_change (ChangeType, Film::Property);
+ void playlist_change (ChangeType);
+ void playlist_content_change (ChangeType, int, bool);
Frame dcp_to_content_video (boost::shared_ptr<const Piece> piece, DCPTime t) const;
DCPTime content_video_to_dcp (boost::shared_ptr<const Piece> piece, Frame f) const;
Frame dcp_to_resampled_audio (boost::shared_ptr<const Piece> piece, DCPTime t) const;
DCPTime resampled_audio_to_dcp (boost::shared_ptr<const Piece> piece, Frame f) const;
ContentTime dcp_to_content_time (boost::shared_ptr<const Piece> piece, DCPTime t) const;
DCPTime content_time_to_dcp (boost::shared_ptr<const Piece> piece, ContentTime t) const;
Frame dcp_to_content_video (boost::shared_ptr<const Piece> piece, DCPTime t) const;
DCPTime content_video_to_dcp (boost::shared_ptr<const Piece> piece, Frame f) const;
Frame dcp_to_resampled_audio (boost::shared_ptr<const Piece> piece, DCPTime t) const;
DCPTime resampled_audio_to_dcp (boost::shared_ptr<const Piece> piece, Frame f) const;
ContentTime dcp_to_content_time (boost::shared_ptr<const Piece> piece, DCPTime t) const;
DCPTime content_time_to_dcp (boost::shared_ptr<const Piece> piece, ContentTime t) const;
void video (boost::weak_ptr<Piece>, ContentVideo);
void audio (boost::weak_ptr<Piece>, AudioStreamPtr, ContentAudio);
void video (boost::weak_ptr<Piece>, ContentVideo);
void audio (boost::weak_ptr<Piece>, AudioStreamPtr, ContentAudio);
- void image_subtitle_start (boost::weak_ptr<Piece>, ContentImageSubtitle);
- void text_subtitle_start (boost::weak_ptr<Piece>, ContentTextSubtitle);
- void subtitle_stop (boost::weak_ptr<Piece>, ContentTime);
+ void bitmap_text_start (boost::weak_ptr<Piece>, boost::weak_ptr<const TextContent>, ContentBitmapText);
+ void plain_text_start (boost::weak_ptr<Piece>, boost::weak_ptr<const TextContent>, ContentStringText);
+ void subtitle_stop (boost::weak_ptr<Piece>, boost::weak_ptr<const TextContent>, ContentTime);
DCPTime one_video_frame () const;
void fill_audio (DCPTimePeriod period);
std::pair<boost::shared_ptr<AudioBuffers>, DCPTime> discard_audio (
boost::shared_ptr<const AudioBuffers> audio, DCPTime time, DCPTime discard_to
) const;
DCPTime one_video_frame () const;
void fill_audio (DCPTimePeriod period);
std::pair<boost::shared_ptr<AudioBuffers>, DCPTime> discard_audio (
boost::shared_ptr<const AudioBuffers> audio, DCPTime time, DCPTime discard_to
) const;
std::list<boost::shared_ptr<Piece> > _pieces;
/** Size of the image in the DCP (e.g. 1990x1080 for flat) */
std::list<boost::shared_ptr<Piece> > _pieces;
/** Size of the image in the DCP (e.g. 1990x1080 for flat) */
- /** true if the player should ignore all audio; i.e. never produce any */
- bool _ignore_subtitle;
- /** true if the player should always burn subtitles into the video regardless
- of content settings
- */
- bool _always_burn_subtitles;
+ bool _ignore_audio;
+ /** true if the player should ignore all text; i.e. never produce any */
+ bool _ignore_text;
+ bool _always_burn_open_subtitles;
/** true if we should try to be fast rather than high quality */
bool _fast;
/** true if we should `play' (i.e output) referenced DCP data (e.g. for preview) */
/** true if we should try to be fast rather than high quality */
bool _fast;
/** true if we should `play' (i.e output) referenced DCP data (e.g. for preview) */
/** Time just after the last video frame we emitted, or the time of the last accurate seek */
boost::optional<DCPTime> _last_video_time;
/** Time just after the last video frame we emitted, or the time of the last accurate seek */
boost::optional<DCPTime> _last_video_time;
/** Time just after the last audio frame we emitted, or the time of the last accurate seek */
boost::optional<DCPTime> _last_audio_time;
/** Time just after the last audio frame we emitted, or the time of the last accurate seek */
boost::optional<DCPTime> _last_audio_time;
boost::shared_ptr<AudioProcessor> _audio_processor;
boost::signals2::scoped_connection _film_changed_connection;
boost::shared_ptr<AudioProcessor> _audio_processor;
boost::signals2::scoped_connection _film_changed_connection;
- boost::signals2::scoped_connection _playlist_changed_connection;
- boost::signals2::scoped_connection _playlist_content_changed_connection;
+ boost::signals2::scoped_connection _playlist_change_connection;
+ boost::signals2::scoped_connection _playlist_content_change_connection;