};
/** @class Player
- * @brief A class which can `play' a Film.
+ * @brief A class which can `play' a Playlist.
*/
class Player : public boost::enable_shared_from_this<Player>, public boost::noncopyable
{
public:
- Player (boost::shared_ptr<const Film>);
+ Player (boost::shared_ptr<const Film>, boost::shared_ptr<const Playlist> playlist);
std::list<boost::shared_ptr<PlayerVideo> > get_video (DCPTime time, bool accurate);
boost::shared_ptr<AudioBuffers> get_audio (DCPTime time, DCPTime length, bool accurate);
friend class PlayerWrapper;
friend class Piece;
friend struct player_overlaps_test;
+ friend struct player_time_calculation_test1;
+ friend struct player_time_calculation_test2;
+ friend struct player_time_calculation_test3;
void setup_pieces ();
- void content_changed (boost::weak_ptr<Content>, int, bool);
void flush ();
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 update_subtitle_from_text ();
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_content_audio (boost::shared_ptr<const Piece> piece, DCPTime t) const;
+ Frame dcp_to_resampled_audio (boost::shared_ptr<const Piece> piece, DCPTime t) const;
ContentTime dcp_to_content_subtitle (boost::shared_ptr<const Piece> piece, DCPTime t) const;
boost::shared_ptr<PlayerVideo> black_player_video_frame (DCPTime) const;
}
boost::shared_ptr<const Film> _film;
+ boost::shared_ptr<const Playlist> _playlist;
/** Our pieces are ready to go; if this is false the pieces must be (re-)created before they are used */
bool _have_valid_pieces;
PlayerStatistics _statistics;
- boost::signals2::scoped_connection _film_content_changed_connection;
boost::signals2::scoped_connection _film_changed_connection;
+ boost::signals2::scoped_connection _playlist_changed_connection;
+ boost::signals2::scoped_connection _playlist_content_changed_connection;
};
#endif