return max (ContentTime (), ContentTime (s, piece->frc) + piece->content->trim_start());
}
-void
-PlayerStatistics::dump (shared_ptr<Log> log) const
-{
- log->log (String::compose ("Video: %1 good %2 skipped %3 black %4 repeat", video.good, video.skip, video.black, video.repeat), Log::TYPE_GENERAL);
- log->log (String::compose ("Audio: %1 good %2 skipped %3 silence", audio.good, audio.skip, audio.silence.seconds()), Log::TYPE_GENERAL);
-}
-
-PlayerStatistics const &
-Player::statistics () const
-{
- return _statistics;
-}
-
/** @param burnt true to return only subtitles to be burnt, false to return only
* subtitles that should not be burnt. This parameter will be ignored if
* _always_burn_subtitles is true; in this case, all subtitles will be returned.
class ImageProxy;
class Font;
-class PlayerStatistics
-{
-public:
- struct Video {
- Video ()
- : black (0)
- , repeat (0)
- , good (0)
- , skip (0)
- {}
-
- int black;
- int repeat;
- int good;
- int skip;
- } video;
-
- struct Audio {
- Audio ()
- : silence (0)
- , good (0)
- , skip (0)
- {}
-
- DCPTime silence;
- int64_t good;
- int64_t skip;
- } audio;
-
- void dump (boost::shared_ptr<Log>) const;
-};
-
/** @class Player
* @brief A class which can `play' a Playlist.
*/
void set_enable_subtitles (bool enable);
void set_always_burn_subtitles (bool burn);
- PlayerStatistics const & statistics () const;
-
/** 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.
boost::shared_ptr<AudioProcessor> _audio_processor;
- PlayerStatistics _statistics;
-
boost::signals2::scoped_connection _film_changed_connection;
boost::signals2::scoped_connection _playlist_changed_connection;
boost::signals2::scoped_connection _playlist_content_changed_connection;