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

Side by Side Diff: webrtc/video_engine/vie_channel_group.cc

Issue 1231273004: Base padding bitrate for an encoder on the bitrate allocated for that encoder, rather than the tota… (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: move some code around Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/video_engine/vie_encoder.h » ('j') | webrtc/video_engine/vie_encoder.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 } 467 }
468 } 468 }
469 469
470 void ChannelGroup::OnNetworkChanged(uint32_t target_bitrate_bps, 470 void ChannelGroup::OnNetworkChanged(uint32_t target_bitrate_bps,
471 uint8_t fraction_loss, 471 uint8_t fraction_loss,
472 int64_t rtt) { 472 int64_t rtt) {
473 bitrate_allocator_->OnNetworkChanged(target_bitrate_bps, fraction_loss, rtt); 473 bitrate_allocator_->OnNetworkChanged(target_bitrate_bps, fraction_loss, rtt);
474 int pad_up_to_bitrate_bps = 0; 474 int pad_up_to_bitrate_bps = 0;
475 { 475 {
476 CriticalSectionScoped lock(encoder_map_cs_.get()); 476 CriticalSectionScoped lock(encoder_map_cs_.get());
477 for (const auto& encoder : send_encoders_) { 477 for (const auto& encoder : send_encoders_) {
pbos-webrtc 2015/07/15 10:53:35 remove {}s
stefan-webrtc 2015/07/15 10:54:52 Done.
478 pad_up_to_bitrate_bps += 478 pad_up_to_bitrate_bps += encoder.second->GetPaddingNeededBps();
479 encoder.second->GetPaddingNeededBps(target_bitrate_bps);
480 } 479 }
481 } 480 }
482 pacer_->UpdateBitrate( 481 pacer_->UpdateBitrate(
483 target_bitrate_bps / 1000, 482 target_bitrate_bps / 1000,
484 PacedSender::kDefaultPaceMultiplier * target_bitrate_bps / 1000, 483 PacedSender::kDefaultPaceMultiplier * target_bitrate_bps / 1000,
485 pad_up_to_bitrate_bps / 1000); 484 pad_up_to_bitrate_bps / 1000);
486 } 485 }
487 } // namespace webrtc 486 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/video_engine/vie_encoder.h » ('j') | webrtc/video_engine/vie_encoder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698