Remove deprected functions from EncodedImageCallback and RtpRtcp
Removed EncodedImageCallback::Encoded() and RtpRtcp::SendOutgoingData().
These methods should no longer be used anywhere and it's safe to remove
them.
BUG=chromium:621691
Committed: https://crrev.com/c681250aaa2025836db7669694e323898e5c2ca7
Review-Url: https://codereview.webrtc.org/2405173006
Cr-Original-Commit-Position: refs/heads/master@{#14923}
Cr-Commit-Position: refs/heads/master@{#14935}
diff --git a/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc b/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc
index e32a2ca..5c0aa1b 100644
--- a/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc
+++ b/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc
@@ -377,8 +377,8 @@
// Deliver encoded image.
CodecSpecificInfo codec_specific;
codec_specific.codecType = kVideoCodecH264;
- encoded_image_callback_->Encoded(encoded_image_, &codec_specific,
- &frag_header);
+ encoded_image_callback_->OnEncodedImage(encoded_image_, &codec_specific,
+ &frag_header);
// Parse and report QP.
h264_bitstream_parser_.ParseBitstream(encoded_image_._buffer,
diff --git a/webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_encoder.mm b/webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_encoder.mm
index 8276448..538734b 100644
--- a/webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_encoder.mm
+++ b/webrtc/modules/video_coding/codecs/h264/h264_video_toolbox_encoder.mm
@@ -650,9 +650,10 @@
quality_scaler_.ReportQP(qp);
}
- int result = callback_->Encoded(frame, &codec_specific_info, header.get());
- if (result != 0) {
- LOG(LS_ERROR) << "Encode callback failed: " << result;
+ EncodedImageCallback::Result result =
+ callback_->OnEncodedImage(frame, &codec_specific_info, header.get());
+ if (result.error != EncodedImageCallback::Result::OK) {
+ LOG(LS_ERROR) << "Encode callback failed: " << result.error;
return;
}
bitrate_adjuster_.Update(frame._size);
diff --git a/webrtc/modules/video_coding/codecs/i420/i420.cc b/webrtc/modules/video_coding/codecs/i420/i420.cc
index d0c8d0c..ad4a8a1 100644
--- a/webrtc/modules/video_coding/codecs/i420/i420.cc
+++ b/webrtc/modules/video_coding/codecs/i420/i420.cc
@@ -116,7 +116,8 @@
return WEBRTC_VIDEO_CODEC_MEMORY;
_encodedImage._length = ret_length + kI420HeaderSize;
- _encodedCompleteCallback->Encoded(_encodedImage, NULL, NULL);
+ _encodedCompleteCallback->OnEncodedImage(_encodedImage, nullptr, nullptr);
+
return WEBRTC_VIDEO_CODEC_OK;
}
diff --git a/webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter_unittest.cc b/webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter_unittest.cc
index 8bc3b48..9a06c0a 100644
--- a/webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter_unittest.cc
+++ b/webrtc/modules/video_coding/codecs/vp8/simulcast_encoder_adapter_unittest.cc
@@ -152,9 +152,9 @@
EncodedImage image;
image._encodedWidth = width;
image._encodedHeight = height;
- CodecSpecificInfo codecSpecificInfo;
- memset(&codecSpecificInfo, 0, sizeof(codecSpecificInfo));
- callback_->Encoded(image, &codecSpecificInfo, NULL);
+ CodecSpecificInfo codec_specific_info;
+ memset(&codec_specific_info, 0, sizeof(codec_specific_info));
+ callback_->OnEncodedImage(image, &codec_specific_info, NULL);
}
void set_supports_native_handle(bool enabled) {
diff --git a/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc b/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
index 0e70c06..2e510ec 100644
--- a/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
+++ b/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
@@ -1025,8 +1025,8 @@
vpx_codec_control(&encoders_[encoder_idx], VP8E_GET_LAST_QUANTIZER,
&qp_128);
encoded_images_[encoder_idx].qp_ = qp_128;
- encoded_complete_callback_->Encoded(encoded_images_[encoder_idx],
- &codec_specific, &frag_info);
+ encoded_complete_callback_->OnEncodedImage(encoded_images_[encoder_idx],
+ &codec_specific, &frag_info);
} else if (codec_.mode == kScreensharing) {
result = WEBRTC_VIDEO_CODEC_TARGET_BITRATE_OVERSHOOT;
}
diff --git a/webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc b/webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc
index 3a4efb3..8c798db 100644
--- a/webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc
+++ b/webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc
@@ -705,8 +705,8 @@
int qp = -1;
vpx_codec_control(encoder_, VP8E_GET_LAST_QUANTIZER, &qp);
encoded_image_.qp_ = qp;
- encoded_complete_callback_->Encoded(encoded_image_, &codec_specific,
- &frag_info);
+ encoded_complete_callback_->OnEncodedImage(encoded_image_, &codec_specific,
+ &frag_info);
}
return WEBRTC_VIDEO_CODEC_OK;
}
diff --git a/webrtc/modules/video_coding/video_receiver.cc b/webrtc/modules/video_coding/video_receiver.cc
index 8b61524..475f686 100644
--- a/webrtc/modules/video_coding/video_receiver.cc
+++ b/webrtc/modules/video_coding/video_receiver.cc
@@ -270,8 +270,8 @@
if (qp_parser_.GetQp(*frame, &qp)) {
encoded_image.qp_ = qp;
}
- pre_decode_image_callback_->Encoded(encoded_image, frame->CodecSpecific(),
- nullptr);
+ pre_decode_image_callback_->OnEncodedImage(encoded_image,
+ frame->CodecSpecific(), nullptr);
}
rtc::CritScope cs(&receive_crit_);