Rename ::same -> ::definitely_equal.
authorCarl Hetherington <cth@carlh.net>
Thu, 19 Dec 2019 13:29:18 +0000 (14:29 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 12 Jan 2020 21:28:59 +0000 (22:28 +0100)
14 files changed:
src/lib/dcp_video.cc
src/lib/dcp_video.h
src/lib/ffmpeg_image_proxy.cc
src/lib/ffmpeg_image_proxy.h
src/lib/image_proxy.h
src/lib/j2k_encoder.cc
src/lib/j2k_image_proxy.cc
src/lib/j2k_image_proxy.h
src/lib/player_video.cc
src/lib/player_video.h
src/lib/position_image.cc
src/lib/position_image.h
src/lib/raw_image_proxy.cc
src/lib/raw_image_proxy.h

index 6f32b6686dca1ac44eeeb4d8d7a575f4c1e004fe..f98df5dbda8aea66f5f6f77f6caf739644e45891 100644 (file)
@@ -208,7 +208,7 @@ DCPVideo::eyes () const
  *  (apart from the frame index), false if it is probably not.
  */
 bool
-DCPVideo::same (shared_ptr<const DCPVideo> other) const
+DCPVideo::definitely_equal (shared_ptr<const DCPVideo> other) const
 {
        if (_frames_per_second != other->_frames_per_second ||
            _j2k_bandwidth != other->_j2k_bandwidth ||
@@ -216,5 +216,5 @@ DCPVideo::same (shared_ptr<const DCPVideo> other) const
                return false;
        }
 
-       return _frame->same (other->_frame);
+       return _frame->definitely_equal (other->_frame);
 }
index 81ddc4470c9e748f81289262a3da382eae11ee68..17e7104dc253ff7cfe80de4449bad5531ebd64b9 100644 (file)
@@ -54,7 +54,7 @@ public:
 
        Eyes eyes () const;
 
-       bool same (boost::shared_ptr<const DCPVideo> other) const;
+       bool definitely_equal (boost::shared_ptr<const DCPVideo> other) const;
 
        static boost::shared_ptr<dcp::OpenJPEGImage> convert_to_xyz (boost::shared_ptr<const PlayerVideo> frame, dcp::NoteHandler note);
 
index 9c91d1d87d7d6c60eb883ee346acbb14876bf5ee..0c5f6dc0d41d1b85e44a3eee58173a4e5eb20376 100644 (file)
@@ -209,7 +209,7 @@ FFmpegImageProxy::send_binary (shared_ptr<Socket> socket) const
 }
 
 bool
-FFmpegImageProxy::same (shared_ptr<const ImageProxy> other) const
+FFmpegImageProxy::definitely_equal (shared_ptr<const ImageProxy> other) const
 {
        shared_ptr<const FFmpegImageProxy> mp = dynamic_pointer_cast<const FFmpegImageProxy> (other);
        if (!mp) {
index 5f9b3b1313935d6fcfbd754f2f4f7a7d80eedb05..87862a8b13a9562b6d38ebb19b046240b03ff183 100644 (file)
@@ -36,7 +36,7 @@ public:
 
        void add_metadata (xmlpp::Node *) const;
        void send_binary (boost::shared_ptr<Socket>) const;
-       bool same (boost::shared_ptr<const ImageProxy> other) const;
+       bool definitely_equal (boost::shared_ptr<const ImageProxy> other) const;
        size_t memory_used () const;
 
        int avio_read (uint8_t* buffer, int const amount);
index b6fe877321ecc06d460faf283522997d4a22c8dc..82d1a9a3a61d272ca0916b35504964ea736c85ce 100644 (file)
@@ -74,7 +74,7 @@ public:
        virtual void add_metadata (xmlpp::Node *) const = 0;
        virtual void send_binary (boost::shared_ptr<Socket>) 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 ImageProxy>) const = 0;
+       virtual bool definitely_equal (boost::shared_ptr<const ImageProxy>) 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.
index 5c3fd477ef16dfeefb63d90bdb13bdbdd156bd0a..ae31e2b17b509bc470ec4578e26464ffbd38f2f0 100644 (file)
@@ -217,7 +217,7 @@ J2KEncoder::encode (shared_ptr<PlayerVideo> 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 {
index 31fda2510492d9285f8987c73a41acd9551a5435..14c2f69fef44004b18488f420187b0d517e0b689 100644 (file)
@@ -196,7 +196,7 @@ J2KImageProxy::send_binary (shared_ptr<Socket> socket) const
 }
 
 bool
-J2KImageProxy::same (shared_ptr<const ImageProxy> other) const
+J2KImageProxy::definitely_equal (shared_ptr<const ImageProxy> other) const
 {
        shared_ptr<const J2KImageProxy> jp = dynamic_pointer_cast<const J2KImageProxy> (other);
        if (!jp) {
index 510c0ff2599a2143abbcdf8595d2f31e4f66660b..c56bdc0257e5f16fcdd6a1ecc80a58289912132e 100644 (file)
@@ -57,7 +57,7 @@ public:
        void add_metadata (xmlpp::Node *) const;
        void send_binary (boost::shared_ptr<Socket>) const;
        /** @return true if our image is definitely the same as another, false if it is probably not */
-       bool same (boost::shared_ptr<const ImageProxy>) const;
+       bool definitely_equal (boost::shared_ptr<const ImageProxy>) const;
        int prepare (boost::optional<dcp::Size> = boost::optional<dcp::Size>()) const;
 
        dcp::Data j2k () const {
index 75479136f0682bea3be97bf9e1debc8bf4bb390b..8284c79ab322849c4d501efa8134f7ff1e4b48b2 100644 (file)
@@ -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<const PlayerVideo> other) const
+PlayerVideo::definitely_equal (shared_ptr<const PlayerVideo> other) const
 {
        if (_crop != other->_crop ||
            _fade != other->_fade ||
@@ -263,14 +263,14 @@ PlayerVideo::same (shared_ptr<const PlayerVideo> 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
index 3cd5594097baa42e7a3727ba59c83d6ae0544d18..5e579a705423d4f5b75f304a33a6df974a59e90a 100644 (file)
@@ -99,7 +99,7 @@ public:
                return _inter_size;
        }
 
-       bool same (boost::shared_ptr<const PlayerVideo> other) const;
+       bool definitely_equal (boost::shared_ptr<const PlayerVideo> other) const;
 
        size_t memory_used () const;
 
index c342e1866a8e9312cb87b9e050d1c19a9b0c98cd..fa65a14e5c4f081d4c4fe3d247b91defdd8de725 100644 (file)
@@ -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;
index 3e6d833e78a996a32b301df7446d0d85f0aa3313..4ab90d39f73ecba22f0e3cf1f92b90f029e6ab9c 100644 (file)
@@ -39,7 +39,7 @@ public:
        boost::shared_ptr<Image> image;
        Position<int> position;
 
-       bool same (PositionImage const & other) const;
+       bool definitely_equal (PositionImage const & other) const;
 };
 
 #endif
index 21201faa69264826db4129b7db3eaccb931e10c1..ed6f1f2899a4aae8b1c8b7cfa4761c16fd0a380b 100644 (file)
@@ -76,7 +76,7 @@ RawImageProxy::send_binary (shared_ptr<Socket> socket) const
 }
 
 bool
-RawImageProxy::same (shared_ptr<const ImageProxy> other) const
+RawImageProxy::definitely_equal (shared_ptr<const ImageProxy> other) const
 {
        shared_ptr<const RawImageProxy> rp = dynamic_pointer_cast<const RawImageProxy> (other);
        if (!rp) {
index dcd107a9ebc4f9255c226228681d25a41bcc029c..76952018710865b515ce5713c1efae28a571a661 100644 (file)
@@ -35,7 +35,7 @@ public:
 
        void add_metadata (xmlpp::Node *) const;
        void send_binary (boost::shared_ptr<Socket>) const;
-       bool same (boost::shared_ptr<const ImageProxy>) const;
+       bool definitely_equal (boost::shared_ptr<const ImageProxy>) const;
        size_t memory_used () const;
 
 private: