Add more logging about the bwe state and VideoSendStream state.
Review-Url: https://codereview.webrtc.org/2121273003 Cr-Commit-Position: refs/heads/master@{#13402}
This commit is contained in:
parent
e7e6a07f73
commit
9b522f8d04
@ -168,6 +168,10 @@ void BitrateAllocator::UpdateAllocationLimits() {
|
||||
}
|
||||
}
|
||||
|
||||
LOG(LS_INFO) << "UpdateAllocationLimits : total_requested_min_bitrate: "
|
||||
<< total_requested_min_bitrate
|
||||
<< "bps, total_requested_padding_bitrate: "
|
||||
<< total_requested_padding_bitrate << "bps";
|
||||
limit_observer_->OnAllocationLimitsChanged(total_requested_min_bitrate,
|
||||
total_requested_padding_bitrate);
|
||||
}
|
||||
|
||||
@ -277,6 +277,8 @@ int64_t CongestionController::GetPacerQueuingDelayMs() const {
|
||||
}
|
||||
|
||||
void CongestionController::SignalNetworkState(NetworkState state) {
|
||||
LOG(LS_INFO) << "SignalNetworkState "
|
||||
<< (state == kNetworkUp ? "Up" : "Down");
|
||||
if (state == kNetworkUp) {
|
||||
pacer_->Resume();
|
||||
} else {
|
||||
@ -340,6 +342,10 @@ bool CongestionController::HasNetworkParametersToReportChanged(
|
||||
last_reported_bitrate_bps_ != bitrate_bps ||
|
||||
(bitrate_bps > 0 && (last_reported_fraction_loss_ != fraction_loss ||
|
||||
last_reported_rtt_ != rtt));
|
||||
if (changed && (last_reported_bitrate_bps_ == 0 || bitrate_bps == 0)) {
|
||||
LOG(LS_INFO) << "Bitrate estimate state changed, BWE: " << bitrate_bps
|
||||
<< " bps.";
|
||||
}
|
||||
last_reported_bitrate_bps_ = bitrate_bps;
|
||||
last_reported_fraction_loss_ = fraction_loss;
|
||||
last_reported_rtt_ = rtt;
|
||||
|
||||
@ -397,6 +397,7 @@ VideoSendStream::VideoSendStream(
|
||||
encoder_wakeup_event_(false, false),
|
||||
stop_encoder_thread_(0),
|
||||
encoder_max_bitrate_bps_(0),
|
||||
encoder_target_rate_bps_(0),
|
||||
state_(State::kStopped),
|
||||
overuse_detector_(
|
||||
Clock::GetRealTimeClock(),
|
||||
@ -527,6 +528,7 @@ bool VideoSendStream::DeliverRtcp(const uint8_t* packet, size_t length) {
|
||||
}
|
||||
|
||||
void VideoSendStream::Start() {
|
||||
LOG(LS_INFO) << "VideoSendStream::Start";
|
||||
if (payload_router_.active())
|
||||
return;
|
||||
TRACE_EVENT_INSTANT0("webrtc", "VideoSendStream::Start");
|
||||
@ -539,6 +541,7 @@ void VideoSendStream::Start() {
|
||||
}
|
||||
|
||||
void VideoSendStream::Stop() {
|
||||
LOG(LS_INFO) << "VideoSendStream::Stop";
|
||||
if (!payload_router_.active())
|
||||
return;
|
||||
TRACE_EVENT_INSTANT0("webrtc", "VideoSendStream::Stop");
|
||||
@ -895,6 +898,13 @@ uint32_t VideoSendStream::OnBitrateUpdated(uint32_t bitrate_bps,
|
||||
rtc::CritScope lock(&encoder_settings_crit_);
|
||||
encoder_target_rate_bps =
|
||||
std::min(encoder_max_bitrate_bps_, encoder_target_rate_bps);
|
||||
if ((encoder_target_rate_bps_ == 0 && encoder_target_rate_bps > 0) ||
|
||||
(encoder_target_rate_bps_ > 0 && encoder_target_rate_bps == 0)) {
|
||||
LOG(LS_INFO)
|
||||
<< "OnBitrateUpdated: Encoder state changed, target bitrate "
|
||||
<< encoder_target_rate_bps << " bps.";
|
||||
}
|
||||
encoder_target_rate_bps_ = encoder_target_rate_bps;
|
||||
}
|
||||
vie_encoder_.OnBitrateUpdated(encoder_target_rate_bps, fraction_loss, rtt);
|
||||
stats_proxy_.OnSetEncoderTargetRate(encoder_target_rate_bps);
|
||||
|
||||
@ -139,6 +139,7 @@ class VideoSendStream : public webrtc::VideoSendStream,
|
||||
std::unique_ptr<EncoderSettings> pending_encoder_settings_
|
||||
GUARDED_BY(encoder_settings_crit_);
|
||||
uint32_t encoder_max_bitrate_bps_ GUARDED_BY(encoder_settings_crit_);
|
||||
uint32_t encoder_target_rate_bps_ GUARDED_BY(encoder_settings_crit_);
|
||||
|
||||
enum class State {
|
||||
kStopped, // VideoSendStream::Start has not yet been called.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user