Index: webrtc/video/vie_encoder.cc |
diff --git a/webrtc/video/vie_encoder.cc b/webrtc/video/vie_encoder.cc |
index ed645bc4fcb68a3e3496dbd981d0c4bf02c9f275..85596c449411f798b2d70b0fe88d77eb2348e771 100644 |
--- a/webrtc/video/vie_encoder.cc |
+++ b/webrtc/video/vie_encoder.cc |
@@ -190,30 +190,12 @@ void ViEEncoder::Restart() { |
encoder_paused_ = false; |
} |
-int32_t ViEEncoder::RegisterExternalEncoder(webrtc::VideoEncoder* encoder, |
- uint8_t pl_type, |
- bool internal_source) { |
- if (vcm_->RegisterExternalEncoder(encoder, pl_type, internal_source) != |
- VCM_OK) { |
- return -1; |
- } |
- return 0; |
-} |
- |
-int32_t ViEEncoder::DeRegisterExternalEncoder(uint8_t pl_type) { |
- if (vcm_->RegisterExternalEncoder(NULL, pl_type) != VCM_OK) { |
- return -1; |
- } |
- return 0; |
-} |
- |
-int32_t ViEEncoder::SetEncoder(const webrtc::VideoCodec& video_codec) { |
+void ViEEncoder::SetEncoder(const webrtc::VideoCodec& video_codec) { |
RTC_DCHECK(send_payload_router_ != NULL); |
// Setting target width and height for VPM. |
- if (vp_->SetTargetResolution(video_codec.width, video_codec.height, |
- video_codec.maxFramerate) != VPM_OK) { |
- return -1; |
- } |
+ RTC_CHECK_EQ(VPM_OK, |
+ vp_->SetTargetResolution(video_codec.width, video_codec.height, |
+ video_codec.maxFramerate)); |
// Cache codec before calling AddBitrateObserver (which calls OnNetworkChanged |
// that makes use of the number of simulcast streams configured). |
@@ -232,12 +214,13 @@ int32_t ViEEncoder::SetEncoder(const webrtc::VideoCodec& video_codec) { |
modified_video_codec.startBitrate = allocated_bitrate_bps / 1000; |
size_t max_data_payload_length = send_payload_router_->MaxPayloadLength(); |
- if (vcm_->RegisterSendCodec(&modified_video_codec, number_of_cores_, |
- static_cast<uint32_t>(max_data_payload_length)) != |
- VCM_OK) { |
- return -1; |
- } |
- return 0; |
+ RTC_CHECK_EQ(VCM_OK, vcm_->RegisterSendCodec( |
+ &modified_video_codec, number_of_cores_, |
+ static_cast<uint32_t>(max_data_payload_length))); |
+} |
+ |
+VideoCodingModule* ViEEncoder::vcm() const { |
+ return vcm_.get(); |
} |
int ViEEncoder::GetPaddingNeededBps() const { |
@@ -603,11 +586,6 @@ void ViEEncoder::OnNetworkChanged(uint32_t bitrate_bps, |
stats_proxy_->OnSuspendChange(video_is_suspended); |
} |
-void ViEEncoder::SuspendBelowMinBitrate() { |
- vcm_->SuspendBelowMinBitrate(); |
- bitrate_allocator_->EnforceMinBitrate(false); |
-} |
- |
void ViEEncoder::RegisterPostEncodeImageCallback( |
EncodedImageCallback* post_encode_callback) { |
vcm_->RegisterPostEncodeImageCallback(post_encode_callback); |