Reland of move deprected functions from EncodedImageCallback and RtpRtcp (patchset #2 id:240001 of https://codereview.webrtc.org/2474433008/ )

Reason for revert:
Breaks everything

Original issue's description:
> Revert of Remove deprected functions from EncodedImageCallback and RtpRtcp (patchset #4 id:100001 of https://codereview.webrtc.org/2405173006/ )
>
> Reason for revert:
> This might be breaking projects downstream.
>
> Original issue's description:
> > 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/fa565842718ad178a7562721b25d916fbabc2b92
> > Cr-Commit-Position: refs/heads/master@{#14902}
>
> TBR=mflodman@webrtc.org,stefan@webrtc.org,sergeyu@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=chromium:621691
>
> Committed: https://crrev.com/6c78307a21252c2dbd704f6d5e92a220fb722ed4
> Cr-Commit-Position: refs/heads/master@{#14914}

TBR=mflodman@webrtc.org,stefan@webrtc.org,sergeyu@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:621691

Review-Url: https://codereview.webrtc.org/2467373003
Cr-Commit-Position: refs/heads/master@{#14915}
This commit is contained in:
ehmaldonado
2016-11-03 07:38:59 -07:00
committed by Commit bot
parent 6c78307a21
commit a1d6cd6408
15 changed files with 64 additions and 74 deletions

View File

@ -377,8 +377,8 @@ int32_t H264EncoderImpl::Encode(const VideoFrame& input_frame,
// 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,

View File

@ -650,9 +650,10 @@ void H264VideoToolboxEncoder::OnEncodedFrame(
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);

View File

@ -116,7 +116,8 @@ int I420Encoder::Encode(const VideoFrame& inputImage,
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;
}

View File

@ -152,9 +152,9 @@ class MockVideoEncoder : public VideoEncoder {
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) {

View File

@ -1024,8 +1024,8 @@ int VP8EncoderImpl::GetEncodedPartitions(const VideoFrame& input_image,
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;
}

View File

@ -705,8 +705,8 @@ int VP9EncoderImpl::GetEncodedLayerFrame(const vpx_codec_cx_pkt* pkt) {
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;
}