* (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 ||
return false;
}
- return _frame->same (other->_frame);
+ return _frame->definitely_equal (other->_frame);
}
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);
}
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) {
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);
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.
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 {
}
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) {
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 {
/** @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 ||
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
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;
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;
boost::shared_ptr<Image> image;
Position<int> position;
- bool same (PositionImage const & other) const;
+ bool definitely_equal (PositionImage const & other) const;
};
#endif
}
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) {
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: