| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  *  Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2  *  Copyright (c) 2015 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 175 TEST_F(PayloadRouterTest, SetTargetSendBitrates) { | 175 TEST_F(PayloadRouterTest, SetTargetSendBitrates) { | 
| 176   MockRtpRtcp rtp_1; | 176   MockRtpRtcp rtp_1; | 
| 177   MockRtpRtcp rtp_2; | 177   MockRtpRtcp rtp_2; | 
| 178   std::list<RtpRtcp*> modules; | 178   std::list<RtpRtcp*> modules; | 
| 179   modules.push_back(&rtp_1); | 179   modules.push_back(&rtp_1); | 
| 180   modules.push_back(&rtp_2); | 180   modules.push_back(&rtp_2); | 
| 181   payload_router_->SetSendingRtpModules(modules); | 181   payload_router_->SetSendingRtpModules(modules); | 
| 182 | 182 | 
| 183   const uint32_t bitrate_1 = 10000; | 183   const uint32_t bitrate_1 = 10000; | 
| 184   const uint32_t bitrate_2 = 76543; | 184   const uint32_t bitrate_2 = 76543; | 
| 185   std::vector<uint32_t> bitrates (2, bitrate_1); | 185   std::vector<uint32_t> bitrates(2, bitrate_1); | 
| 186   bitrates[1] = bitrate_2; | 186   bitrates[1] = bitrate_2; | 
| 187   EXPECT_CALL(rtp_1, SetTargetSendBitrate(bitrate_1)) | 187   EXPECT_CALL(rtp_1, SetTargetSendBitrate(bitrate_1)) | 
| 188       .Times(1); | 188       .Times(1); | 
| 189   EXPECT_CALL(rtp_2, SetTargetSendBitrate(bitrate_2)) | 189   EXPECT_CALL(rtp_2, SetTargetSendBitrate(bitrate_2)) | 
| 190       .Times(1); | 190       .Times(1); | 
| 191   payload_router_->SetTargetSendBitrates(bitrates); | 191   payload_router_->SetTargetSendBitrates(bitrates); | 
| 192 | 192 | 
| 193   bitrates.resize(1); | 193   bitrates.resize(1); | 
| 194   EXPECT_CALL(rtp_1, SetTargetSendBitrate(bitrate_1)) | 194   EXPECT_CALL(rtp_1, SetTargetSendBitrate(bitrate_1)) | 
| 195       .Times(0); | 195       .Times(0); | 
| 196   EXPECT_CALL(rtp_2, SetTargetSendBitrate(bitrate_2)) | 196   EXPECT_CALL(rtp_2, SetTargetSendBitrate(bitrate_2)) | 
| 197       .Times(0); | 197       .Times(0); | 
| 198   payload_router_->SetTargetSendBitrates(bitrates); | 198   payload_router_->SetTargetSendBitrates(bitrates); | 
| 199 | 199 | 
| 200   bitrates.resize(3); | 200   bitrates.resize(3); | 
| 201   bitrates[1] = bitrate_2; | 201   bitrates[1] = bitrate_2; | 
| 202   bitrates[2] = bitrate_1 + bitrate_2; | 202   bitrates[2] = bitrate_1 + bitrate_2; | 
| 203   EXPECT_CALL(rtp_1, SetTargetSendBitrate(bitrate_1)) | 203   EXPECT_CALL(rtp_1, SetTargetSendBitrate(bitrate_1)) | 
| 204       .Times(1); | 204       .Times(1); | 
| 205   EXPECT_CALL(rtp_2, SetTargetSendBitrate(bitrate_2)) | 205   EXPECT_CALL(rtp_2, SetTargetSendBitrate(bitrate_2)) | 
| 206       .Times(1); | 206       .Times(1); | 
| 207   payload_router_->SetTargetSendBitrates(bitrates); | 207   payload_router_->SetTargetSendBitrates(bitrates); | 
| 208 } | 208 } | 
| 209 }  // namespace webrtc | 209 }  // namespace webrtc | 
| OLD | NEW | 
|---|