Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(302)

Unified Diff: webrtc/video/video_send_stream.cc

Issue 2121273003: Add more logging about the bwe state and VideoSendStream state. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixes. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/video/video_send_stream.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/video_send_stream.cc
diff --git a/webrtc/video/video_send_stream.cc b/webrtc/video/video_send_stream.cc
index 32101871121999170f5a8281039db60d3cd7a5cc..3e95cb02956fc8d350703ca617704322fe513ba0 100644
--- a/webrtc/video/video_send_stream.cc
+++ b/webrtc/video/video_send_stream.cc
@@ -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);
« no previous file with comments | « webrtc/video/video_send_stream.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698