+/** @return true if this PlayerVideo is definitely the same as another, false if it is probably not */
+bool
+PlayerVideo::same (shared_ptr<const PlayerVideo> other) const
+{
+ if (_crop != other->_crop ||
+ _fade != other->_fade ||
+ _inter_size != other->_inter_size ||
+ _out_size != other->_out_size ||
+ _eyes != other->_eyes ||
+ _part != other->_part ||
+ _colour_conversion != other->_colour_conversion ||
+ _video_range != other->_video_range) {
+ return false;
+ }
+
+ if ((!_text && other->_text) || (_text && !other->_text)) {
+ /* One has a text and the other doesn't */
+ return false;
+ }
+
+ if (_text && other->_text && !_text->same (other->_text.get ())) {
+ /* They both have texts but they are different */
+ return false;
+ }
+
+ /* Now neither has subtitles */
+
+ return _in->same (other->_in);
+}
+
+AVPixelFormat
+PlayerVideo::force (AVPixelFormat, AVPixelFormat force_to)
+{
+ return force_to;
+}
+
+AVPixelFormat
+PlayerVideo::keep_xyz_or_rgb (AVPixelFormat p)
+{
+ return p == AV_PIX_FMT_XYZ12LE ? AV_PIX_FMT_XYZ12LE : AV_PIX_FMT_RGB48LE;
+}
+
+void
+PlayerVideo::prepare (function<AVPixelFormat (AVPixelFormat)> pixel_format, VideoRange video_range, bool aligned, bool fast, bool proxy_only)
+{
+ _in->prepare (_inter_size);
+ boost::mutex::scoped_lock lm (_mutex);
+ if (!_image && !proxy_only) {
+ make_image (pixel_format, video_range, aligned, fast);
+ }
+}
+
+size_t
+PlayerVideo::memory_used () const
+{
+ return _in->memory_used();
+}
+
+/** @return Shallow copy of this; _in and _text are shared between the original and the copy */
+shared_ptr<PlayerVideo>
+PlayerVideo::shallow_copy () const
+{
+ return std::make_shared<PlayerVideo>(
+ _in,
+ _crop,
+ _fade,
+ _inter_size,
+ _out_size,
+ _eyes,
+ _part,
+ _colour_conversion,
+ _video_range,
+ _content,
+ _video_frame,
+ _error
+ );
+}