Remove unused arguments and variable in MediaOptimization.
BUG=none Review-Url: https://codereview.webrtc.org/2552703005 Cr-Commit-Position: refs/heads/master@{#15471}
This commit is contained in:
parent
7722a4cc8d
commit
9abd275711
@ -38,7 +38,6 @@ MediaOptimization::MediaOptimization(Clock* clock)
|
||||
codec_height_(0),
|
||||
user_frame_rate_(0),
|
||||
frame_dropper_(new FrameDropper),
|
||||
fraction_lost_(0),
|
||||
send_statistics_zero_encode_(0),
|
||||
max_payload_size_(1460),
|
||||
video_target_bitrate_(0),
|
||||
@ -105,21 +104,9 @@ void MediaOptimization::SetEncodingDataInternal(int32_t max_bit_rate,
|
||||
max_payload_size_ = mtu;
|
||||
}
|
||||
|
||||
uint32_t MediaOptimization::SetTargetRates(uint32_t target_bitrate,
|
||||
uint8_t fraction_lost,
|
||||
int64_t round_trip_time_ms) {
|
||||
uint32_t MediaOptimization::SetTargetRates(uint32_t target_bitrate) {
|
||||
CriticalSectionScoped lock(crit_sect_.get());
|
||||
|
||||
// Get frame rate for encoder: this is the actual/sent frame rate.
|
||||
float actual_frame_rate = SentFrameRateInternal();
|
||||
|
||||
// Sanity check.
|
||||
if (actual_frame_rate < 1.0) {
|
||||
actual_frame_rate = 1.0;
|
||||
}
|
||||
|
||||
fraction_lost_ = fraction_lost;
|
||||
|
||||
video_target_bitrate_ = target_bitrate;
|
||||
|
||||
// Cap target video bitrate to codec maximum.
|
||||
|
||||
@ -49,14 +49,8 @@ class MediaOptimization {
|
||||
int32_t mtu);
|
||||
|
||||
// Sets target rates for the encoder given the channel parameters.
|
||||
// Inputs: target bitrate - the encoder target bitrate in bits/s.
|
||||
// fraction_lost - packet loss rate in % in the network.
|
||||
// round_trip_time_ms - round trip time in milliseconds.
|
||||
// min_bit_rate - the bit rate of the end-point with lowest rate.
|
||||
// max_bit_rate - the bit rate of the end-point with highest rate.
|
||||
uint32_t SetTargetRates(uint32_t target_bitrate,
|
||||
uint8_t fraction_lost,
|
||||
int64_t round_trip_time_ms);
|
||||
// Input: target bitrate - the encoder target bitrate in bits/s.
|
||||
uint32_t SetTargetRates(uint32_t target_bitrate);
|
||||
|
||||
void EnableFrameDropper(bool enable);
|
||||
bool DropFrame();
|
||||
@ -115,7 +109,6 @@ class MediaOptimization {
|
||||
uint16_t codec_height_ GUARDED_BY(crit_sect_);
|
||||
float user_frame_rate_ GUARDED_BY(crit_sect_);
|
||||
std::unique_ptr<FrameDropper> frame_dropper_ GUARDED_BY(crit_sect_);
|
||||
uint8_t fraction_lost_ GUARDED_BY(crit_sect_);
|
||||
uint32_t send_statistics_[4] GUARDED_BY(crit_sect_);
|
||||
uint32_t send_statistics_zero_encode_ GUARDED_BY(crit_sect_);
|
||||
int32_t max_payload_size_ GUARDED_BY(crit_sect_);
|
||||
|
||||
@ -197,8 +197,7 @@ EncoderParameters VideoSender::UpdateEncoderParameters(
|
||||
const EncoderParameters& params,
|
||||
VideoBitrateAllocator* bitrate_allocator,
|
||||
uint32_t target_bitrate_bps) {
|
||||
uint32_t video_target_rate_bps = _mediaOpt.SetTargetRates(
|
||||
target_bitrate_bps, params.loss_rate, params.rtt);
|
||||
uint32_t video_target_rate_bps = _mediaOpt.SetTargetRates(target_bitrate_bps);
|
||||
uint32_t input_frame_rate = _mediaOpt.InputFrameRate();
|
||||
if (input_frame_rate == 0)
|
||||
input_frame_rate = current_codec_.maxFramerate;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user