Move parsing of trusted rate controller to RateControlSettings
Bug: webrtc:10223 Change-Id: Iadf46e278e0f994ed95ff1a240c1f39a0421ab7c Reviewed-on: https://webrtc-review.googlesource.com/c/119261 Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> Commit-Queue: Erik Språng <sprang@webrtc.org> Cr-Commit-Position: refs/heads/master@{#26371}
This commit is contained in:
@ -31,6 +31,7 @@
|
||||
#include "modules/video_coding/utility/simulcast_utility.h"
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/experiments/field_trial_parser.h"
|
||||
#include "rtc_base/experiments/rate_control_settings.h"
|
||||
#include "rtc_base/scoped_ref_ptr.h"
|
||||
#include "rtc_base/trace_event.h"
|
||||
#include "system_wrappers/include/field_trial.h"
|
||||
@ -39,8 +40,6 @@
|
||||
|
||||
namespace webrtc {
|
||||
namespace {
|
||||
const char kVp8TrustedRateControllerFieldTrial[] =
|
||||
"WebRTC-LibvpxVp8TrustedRateController";
|
||||
#if defined(WEBRTC_IOS)
|
||||
const char kVP8IosMaxNumberOfThreadFieldTrial[] =
|
||||
"WebRTC-VP8IosMaxNumberOfThread";
|
||||
@ -162,8 +161,8 @@ LibvpxVp8Encoder::LibvpxVp8Encoder()
|
||||
LibvpxVp8Encoder::LibvpxVp8Encoder(std::unique_ptr<LibvpxInterface> interface)
|
||||
: libvpx_(std::move(interface)),
|
||||
experimental_cpu_speed_config_arm_(CpuSpeedExperiment::GetConfigs()),
|
||||
trusted_rate_controller_(
|
||||
field_trial::IsEnabled(kVp8TrustedRateControllerFieldTrial)),
|
||||
trusted_rate_controller_(RateControlSettings::ParseFromFieldTrials()
|
||||
.LibvpxVp8TrustedRateController()),
|
||||
encoded_complete_callback_(nullptr),
|
||||
inited_(false),
|
||||
timestamp_(0),
|
||||
|
||||
@ -30,6 +30,7 @@
|
||||
#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
|
||||
#include "modules/video_coding/codecs/vp9/svc_rate_allocator.h"
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/experiments/rate_control_settings.h"
|
||||
#include "rtc_base/keep_ref_until_done.h"
|
||||
#include "rtc_base/logging.h"
|
||||
#include "rtc_base/time_utils.h"
|
||||
@ -39,9 +40,6 @@
|
||||
namespace webrtc {
|
||||
|
||||
namespace {
|
||||
const char kVp9TrustedRateControllerFieldTrial[] =
|
||||
"WebRTC-LibvpxVp9TrustedRateController";
|
||||
|
||||
// Maps from gof_idx to encoder internal reference frame buffer index. These
|
||||
// maps work for 1,2 and 3 temporal layers with GOF length of 1,2 and 4 frames.
|
||||
uint8_t kRefBufIdx[4] = {0, 0, 0, 1};
|
||||
@ -170,8 +168,8 @@ VP9EncoderImpl::VP9EncoderImpl(const cricket::VideoCodec& codec)
|
||||
is_svc_(false),
|
||||
inter_layer_pred_(InterLayerPredMode::kOn),
|
||||
external_ref_control_(false), // Set in InitEncode because of tests.
|
||||
trusted_rate_controller_(
|
||||
field_trial::IsEnabled(kVp9TrustedRateControllerFieldTrial)),
|
||||
trusted_rate_controller_(RateControlSettings::ParseFromFieldTrials()
|
||||
.LibvpxVp9TrustedRateController()),
|
||||
full_superframe_drop_(true),
|
||||
first_frame_in_picture_(true),
|
||||
ss_info_needed_(false),
|
||||
|
||||
Reference in New Issue
Block a user