diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-09-11 23:35:57 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-09-11 23:35:57 +0100 |
| commit | 88065ad7e9070c7c6a0f9b15202c392084e9e8ba (patch) | |
| tree | 95aa18859010fb3b534a1a860f38b0b62368e98d /src/lib/player_video.cc | |
| parent | 61ae2097c03bc287d654a9bab72280312a21d577 (diff) | |
Spot repeated frames from single-image sources and optimise encoding.
Diffstat (limited to 'src/lib/player_video.cc')
| -rw-r--r-- | src/lib/player_video.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/lib/player_video.cc b/src/lib/player_video.cc index 8fd966e5f..aab90a806 100644 --- a/src/lib/player_video.cc +++ b/src/lib/player_video.cc @@ -176,4 +176,23 @@ PlayerVideo::inter_position () const return Position<int> ((_out_size.width - _inter_size.width) / 2, (_out_size.height - _inter_size.height) / 2); } +/** @return true if this PlayerVideo is definitely the same as another + * (apart from _time), false if it is probably not + */ +bool +PlayerVideo::same (shared_ptr<const PlayerVideo> other) const +{ + if (_in != other->_in || + _crop != other->_crop || + _inter_size != other->_inter_size || + _out_size != other->_out_size || + _scaler != other->_scaler || + _eyes != other->_eyes || + _part != other->_part || + _colour_conversion != other->_colour_conversion || + !_subtitle.same (other->_subtitle)) { + return false; + } + return _in->same (other->_in); +} |
