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

Unified Diff: webrtc/video/video_send_stream.cc

Issue 1325263002: Make LoadObserver settable per video send stream. Gives client flexibility and makes the implementa… (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 3 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
Index: webrtc/video/video_send_stream.cc
diff --git a/webrtc/video/video_send_stream.cc b/webrtc/video/video_send_stream.cc
index b98a1f86f85814b80764ad81da508a90c4ed71cc..3cf599fe9b99a1d4fcb9b0d755c6ce2a181fd7f8 100644
--- a/webrtc/video/video_send_stream.cc
+++ b/webrtc/video/video_send_stream.cc
@@ -101,7 +101,6 @@ std::string VideoSendStream::Config::ToString() const {
namespace internal {
VideoSendStream::VideoSendStream(
- CpuOveruseObserver* overuse_observer,
int num_cpu_cores,
ProcessThread* module_process_thread,
ChannelGroup* channel_group,
@@ -162,7 +161,7 @@ VideoSendStream::VideoSendStream(
input_.reset(new internal::VideoCaptureInput(
module_process_thread_, vie_encoder_, config_.local_renderer,
- &stats_proxy_, overuse_observer));
+ &stats_proxy_, this));
// 28 to match packet overhead in ModuleRtpRtcpImpl.
DCHECK_LE(config_.rtp.max_packet_size, static_cast<size_t>(0xFFFF - 28));
@@ -390,6 +389,18 @@ VideoSendStream::Stats VideoSendStream::GetStats() {
return stats_proxy_.GetStats();
}
+void VideoSendStream::OveruseDetected() {
+ if (config_.overuse_callback) {
pbos-webrtc 2015/09/03 20:44:55 Remove {}s for consistency outside of talk/.
the sun 2015/09/03 20:54:55 lol
pthatcher1 2015/09/04 04:56:03 Please keep {}s to be consistent with code inside
+ config_.overuse_callback->OnLoadUpdate(LoadObserver::kOveruse);
+ }
+}
+
+void VideoSendStream::NormalUsage() {
+ if (config_.overuse_callback) {
pbos-webrtc 2015/09/03 20:44:55 Remove {}s for consistency outside of talk/.
the sun 2015/09/03 20:54:55 lol
pthatcher1 2015/09/04 04:56:03 Please keep {}s to be consistent with code inside
+ config_.overuse_callback->OnLoadUpdate(LoadObserver::kUnderuse);
+ }
+}
+
void VideoSendStream::ConfigureSsrcs() {
vie_channel_->SetSSRC(config_.rtp.ssrcs.front(), kViEStreamTypeNormal, 0);
for (size_t i = 0; i < config_.rtp.ssrcs.size(); ++i) {

Powered by Google App Engine
This is Rietveld 408576698