From: Carl Hetherington Date: Thu, 19 Dec 2019 13:29:18 +0000 (+0100) Subject: Rename ::same -> ::definitely_equal. X-Git-Url: https://git.carlh.net/gitweb/?a=commitdiff_plain;h=2645b6ae99397e46fa25f694ef8c194e4ea1fd21;p=dcpomatic.git Rename ::same -> ::definitely_equal. --- diff --git a/src/lib/dcp_video.cc b/src/lib/dcp_video.cc index 6f32b6686..f98df5dbd 100644 --- a/src/lib/dcp_video.cc +++ b/src/lib/dcp_video.cc @@ -208,7 +208,7 @@ DCPVideo::eyes () const * (apart from the frame index), false if it is probably not. */ bool -DCPVideo::same (shared_ptr other) const +DCPVideo::definitely_equal (shared_ptr other) const { if (_frames_per_second != other->_frames_per_second || _j2k_bandwidth != other->_j2k_bandwidth || @@ -216,5 +216,5 @@ DCPVideo::same (shared_ptr other) const return false; } - return _frame->same (other->_frame); + return _frame->definitely_equal (other->_frame); } diff --git a/src/lib/dcp_video.h b/src/lib/dcp_video.h index 81ddc4470..17e7104dc 100644 --- a/src/lib/dcp_video.h +++ b/src/lib/dcp_video.h @@ -54,7 +54,7 @@ public: Eyes eyes () const; - bool same (boost::shared_ptr other) const; + bool definitely_equal (boost::shared_ptr other) const; static boost::shared_ptr convert_to_xyz (boost::shared_ptr frame, dcp::NoteHandler note); diff --git a/src/lib/ffmpeg_image_proxy.cc b/src/lib/ffmpeg_image_proxy.cc index 9c91d1d87..0c5f6dc0d 100644 --- a/src/lib/ffmpeg_image_proxy.cc +++ b/src/lib/ffmpeg_image_proxy.cc @@ -209,7 +209,7 @@ FFmpegImageProxy::send_binary (shared_ptr socket) const } bool -FFmpegImageProxy::same (shared_ptr other) const +FFmpegImageProxy::definitely_equal (shared_ptr other) const { shared_ptr mp = dynamic_pointer_cast (other); if (!mp) { diff --git a/src/lib/ffmpeg_image_proxy.h b/src/lib/ffmpeg_image_proxy.h index 5f9b3b131..87862a8b1 100644 --- a/src/lib/ffmpeg_image_proxy.h +++ b/src/lib/ffmpeg_image_proxy.h @@ -36,7 +36,7 @@ public: void add_metadata (xmlpp::Node *) const; void send_binary (boost::shared_ptr) const; - bool same (boost::shared_ptr other) const; + bool definitely_equal (boost::shared_ptr other) const; size_t memory_used () const; int avio_read (uint8_t* buffer, int const amount); diff --git a/src/lib/image_proxy.h b/src/lib/image_proxy.h index b6fe87732..82d1a9a3a 100644 --- a/src/lib/image_proxy.h +++ b/src/lib/image_proxy.h @@ -74,7 +74,7 @@ public: virtual void add_metadata (xmlpp::Node *) const = 0; virtual void send_binary (boost::shared_ptr) const = 0; /** @return true if our image is definitely the same as another, false if it is probably not */ - virtual bool same (boost::shared_ptr) const = 0; + virtual bool definitely_equal (boost::shared_ptr) const = 0; /** Do any useful work that would speed up a subsequent call to ::image(). * This method may be called in a different thread to image(). * @return log2 of any scaling down that will be applied to the image. diff --git a/src/lib/j2k_encoder.cc b/src/lib/j2k_encoder.cc index 5c3fd477e..ae31e2b17 100644 --- a/src/lib/j2k_encoder.cc +++ b/src/lib/j2k_encoder.cc @@ -217,7 +217,7 @@ J2KEncoder::encode (shared_ptr pv, DCPTime time) LOG_DEBUG_ENCODE("Frame @ %1 J2K", to_string(time)); /* This frame already has J2K data, so just write it */ _writer->write (pv->j2k(), position, pv->eyes ()); - } else if (_last_player_video[pv->eyes()] && _writer->can_repeat(position) && pv->same (_last_player_video[pv->eyes()])) { + } else if (_last_player_video[pv->eyes()] && _writer->can_repeat(position) && pv->definitely_equal(_last_player_video[pv->eyes()])) { LOG_DEBUG_ENCODE("Frame @ %1 REPEAT", to_string(time)); _writer->repeat (position, pv->eyes ()); } else { diff --git a/src/lib/j2k_image_proxy.cc b/src/lib/j2k_image_proxy.cc index 31fda2510..14c2f69fe 100644 --- a/src/lib/j2k_image_proxy.cc +++ b/src/lib/j2k_image_proxy.cc @@ -196,7 +196,7 @@ J2KImageProxy::send_binary (shared_ptr socket) const } bool -J2KImageProxy::same (shared_ptr other) const +J2KImageProxy::definitely_equal (shared_ptr other) const { shared_ptr jp = dynamic_pointer_cast (other); if (!jp) { diff --git a/src/lib/j2k_image_proxy.h b/src/lib/j2k_image_proxy.h index 510c0ff25..c56bdc025 100644 --- a/src/lib/j2k_image_proxy.h +++ b/src/lib/j2k_image_proxy.h @@ -57,7 +57,7 @@ public: void add_metadata (xmlpp::Node *) const; void send_binary (boost::shared_ptr) const; /** @return true if our image is definitely the same as another, false if it is probably not */ - bool same (boost::shared_ptr) const; + bool definitely_equal (boost::shared_ptr) const; int prepare (boost::optional = boost::optional()) const; dcp::Data j2k () const { diff --git a/src/lib/player_video.cc b/src/lib/player_video.cc index 75479136f..8284c79ab 100644 --- a/src/lib/player_video.cc +++ b/src/lib/player_video.cc @@ -245,7 +245,7 @@ PlayerVideo::inter_position () const /** @return true if this PlayerVideo is definitely the same as another, false if it is probably not */ bool -PlayerVideo::same (shared_ptr other) const +PlayerVideo::definitely_equal (shared_ptr other) const { if (_crop != other->_crop || _fade != other->_fade || @@ -263,14 +263,14 @@ PlayerVideo::same (shared_ptr other) const return false; } - if (_text && other->_text && !_text->same (other->_text.get ())) { + if (_text && other->_text && !_text->definitely_equal(other->_text.get())) { /* They both have texts but they are different */ return false; } /* Now neither has subtitles */ - return _in->same (other->_in); + return _in->definitely_equal (other->_in); } AVPixelFormat diff --git a/src/lib/player_video.h b/src/lib/player_video.h index 3cd559409..5e579a705 100644 --- a/src/lib/player_video.h +++ b/src/lib/player_video.h @@ -99,7 +99,7 @@ public: return _inter_size; } - bool same (boost::shared_ptr other) const; + bool definitely_equal (boost::shared_ptr other) const; size_t memory_used () const; diff --git a/src/lib/position_image.cc b/src/lib/position_image.cc index c342e1866..fa65a14e5 100644 --- a/src/lib/position_image.cc +++ b/src/lib/position_image.cc @@ -25,7 +25,7 @@ using std::cout; bool -PositionImage::same (PositionImage const & other) const +PositionImage::definitely_equal (PositionImage const & other) const { if ((!image && other.image) || (image && !other.image) || position != other.position) { return false; diff --git a/src/lib/position_image.h b/src/lib/position_image.h index 3e6d833e7..4ab90d39f 100644 --- a/src/lib/position_image.h +++ b/src/lib/position_image.h @@ -39,7 +39,7 @@ public: boost::shared_ptr image; Position position; - bool same (PositionImage const & other) const; + bool definitely_equal (PositionImage const & other) const; }; #endif diff --git a/src/lib/raw_image_proxy.cc b/src/lib/raw_image_proxy.cc index 21201faa6..ed6f1f289 100644 --- a/src/lib/raw_image_proxy.cc +++ b/src/lib/raw_image_proxy.cc @@ -76,7 +76,7 @@ RawImageProxy::send_binary (shared_ptr socket) const } bool -RawImageProxy::same (shared_ptr other) const +RawImageProxy::definitely_equal (shared_ptr other) const { shared_ptr rp = dynamic_pointer_cast (other); if (!rp) { diff --git a/src/lib/raw_image_proxy.h b/src/lib/raw_image_proxy.h index dcd107a9e..769520187 100644 --- a/src/lib/raw_image_proxy.h +++ b/src/lib/raw_image_proxy.h @@ -35,7 +35,7 @@ public: void add_metadata (xmlpp::Node *) const; void send_binary (boost::shared_ptr) const; - bool same (boost::shared_ptr) const; + bool definitely_equal (boost::shared_ptr) const; size_t memory_used () const; private: