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

Side by Side Diff: webrtc/video/vie_encoder.cc

Issue 1913073002: Extract common simulcast logic from VP8 wrapper and simulcast adapter (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Address comments, added tests Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 void ViEEncoder::OnBitrateUpdated(uint32_t bitrate_bps, 426 void ViEEncoder::OnBitrateUpdated(uint32_t bitrate_bps,
427 uint8_t fraction_lost, 427 uint8_t fraction_lost,
428 int64_t round_trip_time_ms) { 428 int64_t round_trip_time_ms) {
429 LOG(LS_VERBOSE) << "OnBitrateUpdated, bitrate " << bitrate_bps 429 LOG(LS_VERBOSE) << "OnBitrateUpdated, bitrate " << bitrate_bps
430 << " packet loss " << static_cast<int>(fraction_lost) 430 << " packet loss " << static_cast<int>(fraction_lost)
431 << " rtt " << round_trip_time_ms; 431 << " rtt " << round_trip_time_ms;
432 video_sender_.SetChannelParameters(bitrate_bps, fraction_lost, 432 video_sender_.SetChannelParameters(bitrate_bps, fraction_lost,
433 round_trip_time_ms); 433 round_trip_time_ms);
434 bool video_is_suspended = video_sender_.VideoSuspended(); 434 bool video_is_suspended = video_sender_.VideoSuspended();
435 bool video_suspension_changed; 435 bool video_suspension_changed;
436
436 { 437 {
437 rtc::CritScope lock(&data_cs_); 438 rtc::CritScope lock(&data_cs_);
438 last_observed_bitrate_bps_ = bitrate_bps; 439 last_observed_bitrate_bps_ = bitrate_bps;
439 video_suspension_changed = video_suspended_ != video_is_suspended; 440 video_suspension_changed = video_suspended_ != video_is_suspended;
440 video_suspended_ = video_is_suspended; 441 video_suspended_ = video_is_suspended;
441 } 442 }
442 443
443 if (!video_suspension_changed) 444 if (!video_suspension_changed)
444 return; 445 return;
445 // Video suspend-state changed, inform codec observer. 446 // Video suspend-state changed, inform codec observer.
(...skipping 11 matching lines...) Expand all
457 } 458 }
458 459
459 int32_t QMVideoSettingsCallback::SetVideoQMSettings( 460 int32_t QMVideoSettingsCallback::SetVideoQMSettings(
460 const uint32_t frame_rate, 461 const uint32_t frame_rate,
461 const uint32_t width, 462 const uint32_t width,
462 const uint32_t height) { 463 const uint32_t height) {
463 return vp_->SetTargetResolution(width, height, frame_rate); 464 return vp_->SetTargetResolution(width, height, frame_rate);
464 } 465 }
465 466
466 } // namespace webrtc 467 } // namespace webrtc
OLDNEW
« webrtc/modules/video_coding/utility/simulcast_state.h ('K') | « webrtc/video/video_send_stream.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698