Revert "Add ability to specify if rate controller of video encoder is trusted."

This reverts commit 3e335d1423cab06cca8cdb4f1fadb0b16c9e7d38.

Reason for revert: breaks downstream project

Original change's description:
> Add ability to specify if rate controller of video encoder is trusted.
>
> If rate controller is trusted, we disable the frame dropper in the
> media optimization module.
>
> Bug: webrtc:9722
> Change-Id: I821f21fd74a400ee9d5aa3f6b42d4e569033acbe
> Reviewed-on: https://webrtc-review.googlesource.com/c/105020
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Per Kjellander <perkj@webrtc.org>
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25107}

TBR=brandtr@webrtc.org,ilnik@webrtc.org,nisse@webrtc.org,sprang@webrtc.org,perkj@webrtc.org

Change-Id: Ifdb0aae684894854a184ec1e7423a7c62e7ba237
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9722
Reviewed-on: https://webrtc-review.googlesource.com/c/105360
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25117}
This commit is contained in:
Oleh Prypin
2018-10-11 14:33:39 +00:00
committed by Commit Bot
parent cdc959fb42
commit a1d9ca47f9
31 changed files with 42 additions and 406 deletions

View File

@ -93,7 +93,6 @@ class VideoEncoderSoftwareFallbackWrapper final : public VideoEncoder {
bool SupportsNativeHandle() const override;
ScalingSettings GetScalingSettings() const override;
const char* ImplementationName() const override;
bool HasTrustedRateController() const override;
private:
bool InitFallbackEncoder();
@ -143,8 +142,6 @@ class VideoEncoderSoftwareFallbackWrapper final : public VideoEncoder {
bool forced_fallback_possible_;
ForcedFallbackParams forced_fallback_;
const bool trust_rate_controller_;
};
VideoEncoderSoftwareFallbackWrapper::VideoEncoderSoftwareFallbackWrapper(
@ -161,11 +158,7 @@ VideoEncoderSoftwareFallbackWrapper::VideoEncoderSoftwareFallbackWrapper(
encoder_(std::move(hw_encoder)),
fallback_encoder_(std::move(sw_encoder)),
callback_(nullptr),
forced_fallback_possible_(EnableForcedFallback()),
trust_rate_controller_(
(encoder_ ? encoder_->HasTrustedRateController() : true) &&
(fallback_encoder_ ? fallback_encoder_->HasTrustedRateController()
: true)) {
forced_fallback_possible_(EnableForcedFallback()) {
if (forced_fallback_possible_) {
GetForcedFallbackParamsFromFieldTrialGroup(
&forced_fallback_.min_pixels_, &forced_fallback_.max_pixels_,
@ -326,10 +319,6 @@ const char* VideoEncoderSoftwareFallbackWrapper::ImplementationName() const {
: encoder_->ImplementationName();
}
bool VideoEncoderSoftwareFallbackWrapper::HasTrustedRateController() const {
return trust_rate_controller_;
}
bool VideoEncoderSoftwareFallbackWrapper::IsForcedFallbackActive() const {
return (forced_fallback_possible_ && use_fallback_encoder_ &&
forced_fallback_.active_);