Make screenshare target bitrate experiment always on
BUG=4083 R=mflodman@webrtc.org, stefan@webrtc.org Review URL: https://webrtc-codereview.appspot.com/44699004 Patch from sprang@webrtc.org <sprang@webrtc.org>. Cr-Commit-Position: refs/heads/master@{#8806} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8806 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
d9c5024ee7
commit
8904290aca
@ -14,7 +14,6 @@
|
||||
#include "vpx/vpx_encoder.h"
|
||||
#include "vpx/vp8cx.h"
|
||||
#include "webrtc/modules/video_coding/codecs/interface/video_codec_interface.h"
|
||||
#include "webrtc/system_wrappers/interface/field_trial.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -96,13 +95,13 @@ bool ScreenshareLayers::ConfigureBitrates(int bitrate_kbit,
|
||||
int max_bitrate_kbit,
|
||||
int framerate,
|
||||
vpx_codec_enc_cfg_t* cfg) {
|
||||
if (framerate > 0) {
|
||||
if (framerate > 0)
|
||||
framerate_ = framerate;
|
||||
}
|
||||
|
||||
tl0_frame_dropper_->SetRates(bitrate_kbit, framerate_);
|
||||
tl1_frame_dropper_->SetRates(max_bitrate_kbit, framerate_);
|
||||
|
||||
if (cfg != NULL && TargetBitrateExperimentEnabled()) {
|
||||
if (cfg != nullptr) {
|
||||
// Calculate a codec target bitrate. This may be higher than TL0, gaining
|
||||
// quality at the expense of frame rate at TL0. Constraints:
|
||||
// - TL0 frame rate should not be less than framerate / kMaxTL0FpsReduction.
|
||||
@ -175,10 +174,4 @@ void ScreenshareLayers::CalculateFramerate(uint32_t timestamp) {
|
||||
}
|
||||
}
|
||||
|
||||
bool ScreenshareLayers::TargetBitrateExperimentEnabled() {
|
||||
std::string group =
|
||||
field_trial::FindFullName("WebRTC-ScreencastTargetBitrateOvershoot");
|
||||
return group == "Enabled";
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
@ -49,9 +49,6 @@ class ScreenshareLayers : public TemporalLayers {
|
||||
|
||||
virtual int CurrentLayerId() const;
|
||||
|
||||
protected:
|
||||
virtual bool TargetBitrateExperimentEnabled();
|
||||
|
||||
private:
|
||||
void CalculateFramerate(uint32_t timestamp);
|
||||
bool TimeToSync(uint32_t timestamp) const;
|
||||
|
@ -44,9 +44,6 @@ class ScreenshareLayersFT : public ScreenshareLayers {
|
||||
tl0_frame_dropper,
|
||||
tl1_frame_dropper) {}
|
||||
virtual ~ScreenshareLayersFT() {}
|
||||
|
||||
protected:
|
||||
bool TargetBitrateExperimentEnabled() override { return true; }
|
||||
};
|
||||
|
||||
class ScreenshareLayerTest : public ::testing::Test {
|
||||
|
Loading…
Reference in New Issue
Block a user