blob: 1f0b70c516cf3f17e8871e57695bcaa72bad5301 [file] [log] [blame]
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +00001/*
mflodman@webrtc.orgf7b60782012-02-16 14:50:24 +00002 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +00003 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11
12// This file includes unit tests for ViERemb.
13
pbos@webrtc.orgf5d4cb12013-05-17 13:44:48 +000014#include "testing/gmock/include/gmock/gmock.h"
15#include "testing/gtest/include/gtest/gtest.h"
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +000016
mflodman@webrtc.orgf89fb9d2012-11-22 09:41:42 +000017#include <vector>
18
mflodman@webrtc.orgc289f9f2012-11-16 13:24:18 +000019#include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp.h"
20#include "webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h"
wuchengli@chromium.org637c55f2014-05-28 07:00:51 +000021#include "webrtc/modules/utility/interface/mock/mock_process_thread.h"
mflodman@webrtc.orgc289f9f2012-11-16 13:24:18 +000022#include "webrtc/system_wrappers/interface/scoped_ptr.h"
23#include "webrtc/system_wrappers/interface/tick_util.h"
24#include "webrtc/video_engine/vie_remb.h"
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +000025
26using ::testing::_;
27using ::testing::AnyNumber;
wuchengli@chromium.org637c55f2014-05-28 07:00:51 +000028using ::testing::NiceMock;
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +000029using ::testing::Return;
30
31namespace webrtc {
32
33class ViERembTest : public ::testing::Test {
34 protected:
35 virtual void SetUp() {
mflodman@webrtc.orgc289f9f2012-11-16 13:24:18 +000036 TickTime::UseFakeClock(12345);
wuchengli@chromium.org637c55f2014-05-28 07:00:51 +000037 process_thread_.reset(new NiceMock<MockProcessThread>);
stefan@webrtc.orgb5865072013-02-01 14:33:42 +000038 vie_remb_.reset(new VieRemb());
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +000039 }
wuchengli@chromium.org637c55f2014-05-28 07:00:51 +000040 scoped_ptr<MockProcessThread> process_thread_;
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +000041 scoped_ptr<VieRemb> vie_remb_;
42};
43
mflodman@webrtc.orgab2610f2012-06-29 10:05:28 +000044TEST_F(ViERembTest, OneModuleTestForSendingRemb) {
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +000045 MockRtpRtcp rtp;
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +000046 vie_remb_->AddReceiveChannel(&rtp);
mflodman@webrtc.orgf7b60782012-02-16 14:50:24 +000047 vie_remb_->AddRembSender(&rtp);
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +000048
49 const unsigned int bitrate_estimate = 456;
stefan@webrtc.org3aece422012-10-18 11:12:39 +000050 unsigned int ssrc = 1234;
stefan@webrtc.org4100b042012-11-19 10:09:20 +000051 std::vector<unsigned int> ssrcs(&ssrc, &ssrc + 1);
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +000052
solenberg@webrtc.org561990f2013-05-22 19:04:19 +000053 vie_remb_->OnReceiveBitrateChanged(ssrcs, bitrate_estimate);
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +000054
mflodman@webrtc.orgc289f9f2012-11-16 13:24:18 +000055 TickTime::AdvanceFakeClock(1000);
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +000056 EXPECT_CALL(rtp, SetREMBData(bitrate_estimate, 1, _))
57 .Times(1);
solenberg@webrtc.org561990f2013-05-22 19:04:19 +000058 vie_remb_->OnReceiveBitrateChanged(ssrcs, bitrate_estimate);
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +000059
60 // Lower bitrate to send another REMB packet.
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +000061 EXPECT_CALL(rtp, SetREMBData(bitrate_estimate - 100, 1, _))
62 .Times(1);
solenberg@webrtc.org561990f2013-05-22 19:04:19 +000063 vie_remb_->OnReceiveBitrateChanged(ssrcs, bitrate_estimate - 100);
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +000064
65 vie_remb_->RemoveReceiveChannel(&rtp);
mflodman@webrtc.orgf7b60782012-02-16 14:50:24 +000066 vie_remb_->RemoveRembSender(&rtp);
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +000067}
68
mflodman@webrtc.orgab2610f2012-06-29 10:05:28 +000069TEST_F(ViERembTest, LowerEstimateToSendRemb) {
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +000070 MockRtpRtcp rtp;
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +000071 vie_remb_->AddReceiveChannel(&rtp);
mflodman@webrtc.orgf7b60782012-02-16 14:50:24 +000072 vie_remb_->AddRembSender(&rtp);
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +000073
74 unsigned int bitrate_estimate = 456;
stefan@webrtc.org3aece422012-10-18 11:12:39 +000075 unsigned int ssrc = 1234;
stefan@webrtc.org4100b042012-11-19 10:09:20 +000076 std::vector<unsigned int> ssrcs(&ssrc, &ssrc + 1);
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +000077
solenberg@webrtc.org561990f2013-05-22 19:04:19 +000078 vie_remb_->OnReceiveBitrateChanged(ssrcs, bitrate_estimate);
stefan@webrtc.orgb5865072013-02-01 14:33:42 +000079 // Call OnReceiveBitrateChanged twice to get a first estimate.
mflodman@webrtc.orgc289f9f2012-11-16 13:24:18 +000080 TickTime::AdvanceFakeClock(1000);
mflodman@webrtc.org1fb39ba2012-08-13 17:05:14 +000081 EXPECT_CALL(rtp, SetREMBData(bitrate_estimate, 1, _))
82 .Times(1);
solenberg@webrtc.org561990f2013-05-22 19:04:19 +000083 vie_remb_->OnReceiveBitrateChanged(ssrcs, bitrate_estimate);
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +000084
85 // Lower the estimate with more than 3% to trigger a call to SetREMBData right
86 // away.
87 bitrate_estimate = bitrate_estimate - 100;
88 EXPECT_CALL(rtp, SetREMBData(bitrate_estimate, 1, _))
89 .Times(1);
solenberg@webrtc.org561990f2013-05-22 19:04:19 +000090 vie_remb_->OnReceiveBitrateChanged(ssrcs, bitrate_estimate);
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +000091}
92
stefan@webrtc.org3aece422012-10-18 11:12:39 +000093TEST_F(ViERembTest, VerifyIncreasingAndDecreasing) {
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +000094 MockRtpRtcp rtp_0;
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +000095 MockRtpRtcp rtp_1;
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +000096 vie_remb_->AddReceiveChannel(&rtp_0);
mflodman@webrtc.orgf7b60782012-02-16 14:50:24 +000097 vie_remb_->AddRembSender(&rtp_0);
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +000098 vie_remb_->AddReceiveChannel(&rtp_1);
99
100 unsigned int bitrate_estimate[] = { 456, 789 };
101 unsigned int ssrc[] = { 1234, 5678 };
stefan@webrtc.org4100b042012-11-19 10:09:20 +0000102 std::vector<unsigned int> ssrcs(ssrc, ssrc + sizeof(ssrc) / sizeof(ssrc[0]));
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000103
solenberg@webrtc.org561990f2013-05-22 19:04:19 +0000104 vie_remb_->OnReceiveBitrateChanged(ssrcs, bitrate_estimate[0]);
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000105
stefan@webrtc.orgb5865072013-02-01 14:33:42 +0000106 // Call OnReceiveBitrateChanged twice to get a first estimate.
stefan@webrtc.org3aece422012-10-18 11:12:39 +0000107 EXPECT_CALL(rtp_0, SetREMBData(bitrate_estimate[0], 2, _))
mflodman@webrtc.org1fb39ba2012-08-13 17:05:14 +0000108 .Times(1);
mflodman@webrtc.orgc289f9f2012-11-16 13:24:18 +0000109 TickTime::AdvanceFakeClock(1000);
solenberg@webrtc.org561990f2013-05-22 19:04:19 +0000110 vie_remb_->OnReceiveBitrateChanged(ssrcs, bitrate_estimate[0]);
mflodman@webrtc.org1fb39ba2012-08-13 17:05:14 +0000111
solenberg@webrtc.org561990f2013-05-22 19:04:19 +0000112 vie_remb_->OnReceiveBitrateChanged(ssrcs, bitrate_estimate[1] + 100);
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000113
114 // Lower the estimate to trigger a callback.
stefan@webrtc.org3aece422012-10-18 11:12:39 +0000115 EXPECT_CALL(rtp_0, SetREMBData(bitrate_estimate[1], 2, _))
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000116 .Times(1);
solenberg@webrtc.org561990f2013-05-22 19:04:19 +0000117 vie_remb_->OnReceiveBitrateChanged(ssrcs, bitrate_estimate[1]);
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000118
119 vie_remb_->RemoveReceiveChannel(&rtp_0);
mflodman@webrtc.orgf7b60782012-02-16 14:50:24 +0000120 vie_remb_->RemoveRembSender(&rtp_0);
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000121 vie_remb_->RemoveReceiveChannel(&rtp_1);
122}
123
mflodman@webrtc.orgab2610f2012-06-29 10:05:28 +0000124TEST_F(ViERembTest, NoRembForIncreasedBitrate) {
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000125 MockRtpRtcp rtp_0;
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000126 MockRtpRtcp rtp_1;
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000127 vie_remb_->AddReceiveChannel(&rtp_0);
mflodman@webrtc.orgf7b60782012-02-16 14:50:24 +0000128 vie_remb_->AddRembSender(&rtp_0);
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000129 vie_remb_->AddReceiveChannel(&rtp_1);
130
stefan@webrtc.org3aece422012-10-18 11:12:39 +0000131 unsigned int bitrate_estimate = 456;
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000132 unsigned int ssrc[] = { 1234, 5678 };
stefan@webrtc.org4100b042012-11-19 10:09:20 +0000133 std::vector<unsigned int> ssrcs(ssrc, ssrc + sizeof(ssrc) / sizeof(ssrc[0]));
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000134
solenberg@webrtc.org561990f2013-05-22 19:04:19 +0000135 vie_remb_->OnReceiveBitrateChanged(ssrcs, bitrate_estimate);
stefan@webrtc.orgb5865072013-02-01 14:33:42 +0000136 // Call OnReceiveBitrateChanged twice to get a first estimate.
mflodman@webrtc.orgc289f9f2012-11-16 13:24:18 +0000137 TickTime::AdvanceFakeClock(1000);
stefan@webrtc.org3aece422012-10-18 11:12:39 +0000138 EXPECT_CALL(rtp_0, SetREMBData(bitrate_estimate, 2, _))
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000139 .Times(1);
solenberg@webrtc.org561990f2013-05-22 19:04:19 +0000140 vie_remb_->OnReceiveBitrateChanged(ssrcs, bitrate_estimate);
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000141
142 // Increased estimate shouldn't trigger a callback right away.
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000143 EXPECT_CALL(rtp_0, SetREMBData(_, _, _))
144 .Times(0);
solenberg@webrtc.org561990f2013-05-22 19:04:19 +0000145 vie_remb_->OnReceiveBitrateChanged(ssrcs, bitrate_estimate + 1);
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000146
stefan@webrtc.org3aece422012-10-18 11:12:39 +0000147 // Decreasing the estimate less than 3% shouldn't trigger a new callback.
mflodman@webrtc.orgab2610f2012-06-29 10:05:28 +0000148 EXPECT_CALL(rtp_0, SetREMBData(_, _, _))
149 .Times(0);
stefan@webrtc.orgb5865072013-02-01 14:33:42 +0000150 int lower_estimate = bitrate_estimate * 98 / 100;
solenberg@webrtc.org561990f2013-05-22 19:04:19 +0000151 vie_remb_->OnReceiveBitrateChanged(ssrcs, lower_estimate);
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000152
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000153 vie_remb_->RemoveReceiveChannel(&rtp_1);
154 vie_remb_->RemoveReceiveChannel(&rtp_0);
mflodman@webrtc.orgf7b60782012-02-16 14:50:24 +0000155 vie_remb_->RemoveRembSender(&rtp_0);
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000156}
157
mflodman@webrtc.orgab2610f2012-06-29 10:05:28 +0000158TEST_F(ViERembTest, ChangeSendRtpModule) {
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000159 MockRtpRtcp rtp_0;
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000160 MockRtpRtcp rtp_1;
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000161 vie_remb_->AddReceiveChannel(&rtp_0);
mflodman@webrtc.orgf7b60782012-02-16 14:50:24 +0000162 vie_remb_->AddRembSender(&rtp_0);
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000163 vie_remb_->AddReceiveChannel(&rtp_1);
164
stefan@webrtc.org3aece422012-10-18 11:12:39 +0000165 unsigned int bitrate_estimate = 456;
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000166 unsigned int ssrc[] = { 1234, 5678 };
stefan@webrtc.org4100b042012-11-19 10:09:20 +0000167 std::vector<unsigned int> ssrcs(ssrc, ssrc + sizeof(ssrc) / sizeof(ssrc[0]));
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000168
solenberg@webrtc.org561990f2013-05-22 19:04:19 +0000169 vie_remb_->OnReceiveBitrateChanged(ssrcs, bitrate_estimate);
stefan@webrtc.orgb5865072013-02-01 14:33:42 +0000170 // Call OnReceiveBitrateChanged twice to get a first estimate.
mflodman@webrtc.orgc289f9f2012-11-16 13:24:18 +0000171 TickTime::AdvanceFakeClock(1000);
stefan@webrtc.org3aece422012-10-18 11:12:39 +0000172 EXPECT_CALL(rtp_0, SetREMBData(bitrate_estimate, 2, _))
mflodman@webrtc.org1fb39ba2012-08-13 17:05:14 +0000173 .Times(1);
solenberg@webrtc.org561990f2013-05-22 19:04:19 +0000174 vie_remb_->OnReceiveBitrateChanged(ssrcs, bitrate_estimate);
mflodman@webrtc.org1fb39ba2012-08-13 17:05:14 +0000175
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000176 // Decrease estimate to trigger a REMB.
stefan@webrtc.org3aece422012-10-18 11:12:39 +0000177 bitrate_estimate = bitrate_estimate - 100;
178 EXPECT_CALL(rtp_0, SetREMBData(bitrate_estimate, 2, _))
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000179 .Times(1);
solenberg@webrtc.org561990f2013-05-22 19:04:19 +0000180 vie_remb_->OnReceiveBitrateChanged(ssrcs, bitrate_estimate);
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000181
182 // Remove the sending module, add it again -> should get remb on the second
183 // module.
mflodman@webrtc.orgf7b60782012-02-16 14:50:24 +0000184 vie_remb_->RemoveRembSender(&rtp_0);
mflodman@webrtc.orgf7b60782012-02-16 14:50:24 +0000185 vie_remb_->AddRembSender(&rtp_1);
solenberg@webrtc.org561990f2013-05-22 19:04:19 +0000186 vie_remb_->OnReceiveBitrateChanged(ssrcs, bitrate_estimate);
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000187
stefan@webrtc.org3aece422012-10-18 11:12:39 +0000188 bitrate_estimate = bitrate_estimate - 100;
189 EXPECT_CALL(rtp_1, SetREMBData(bitrate_estimate, 2, _))
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000190 .Times(1);
solenberg@webrtc.org561990f2013-05-22 19:04:19 +0000191 vie_remb_->OnReceiveBitrateChanged(ssrcs, bitrate_estimate);
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000192
193 vie_remb_->RemoveReceiveChannel(&rtp_0);
194 vie_remb_->RemoveReceiveChannel(&rtp_1);
195}
196
mflodman@webrtc.orgab2610f2012-06-29 10:05:28 +0000197TEST_F(ViERembTest, OnlyOneRembForDoubleProcess) {
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000198 MockRtpRtcp rtp;
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000199 unsigned int bitrate_estimate = 456;
stefan@webrtc.org3aece422012-10-18 11:12:39 +0000200 unsigned int ssrc = 1234;
stefan@webrtc.org4100b042012-11-19 10:09:20 +0000201 std::vector<unsigned int> ssrcs(&ssrc, &ssrc + 1);
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000202
203 vie_remb_->AddReceiveChannel(&rtp);
mflodman@webrtc.orgf7b60782012-02-16 14:50:24 +0000204 vie_remb_->AddRembSender(&rtp);
solenberg@webrtc.org561990f2013-05-22 19:04:19 +0000205 vie_remb_->OnReceiveBitrateChanged(ssrcs, bitrate_estimate);
stefan@webrtc.orgb5865072013-02-01 14:33:42 +0000206 // Call OnReceiveBitrateChanged twice to get a first estimate.
mflodman@webrtc.orgc289f9f2012-11-16 13:24:18 +0000207 TickTime::AdvanceFakeClock(1000);
mflodman@webrtc.org1fb39ba2012-08-13 17:05:14 +0000208 EXPECT_CALL(rtp, SetREMBData(_, _, _))
209 .Times(1);
solenberg@webrtc.org561990f2013-05-22 19:04:19 +0000210 vie_remb_->OnReceiveBitrateChanged(ssrcs, bitrate_estimate);
mflodman@webrtc.org1fb39ba2012-08-13 17:05:14 +0000211
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000212 // Lower the estimate, should trigger a call to SetREMBData right away.
213 bitrate_estimate = bitrate_estimate - 100;
214 EXPECT_CALL(rtp, SetREMBData(bitrate_estimate, 1, _))
215 .Times(1);
solenberg@webrtc.org561990f2013-05-22 19:04:19 +0000216 vie_remb_->OnReceiveBitrateChanged(ssrcs, bitrate_estimate);
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000217
stefan@webrtc.orgb5865072013-02-01 14:33:42 +0000218 // Call OnReceiveBitrateChanged again, this should not trigger a new callback.
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000219 EXPECT_CALL(rtp, SetREMBData(_, _, _))
220 .Times(0);
solenberg@webrtc.org561990f2013-05-22 19:04:19 +0000221 vie_remb_->OnReceiveBitrateChanged(ssrcs, bitrate_estimate);
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000222 vie_remb_->RemoveReceiveChannel(&rtp);
mflodman@webrtc.orgf7b60782012-02-16 14:50:24 +0000223 vie_remb_->RemoveRembSender(&rtp);
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000224}
225
mflodman@webrtc.org5284d6e2012-04-23 13:22:26 +0000226// Only register receiving modules and make sure we fallback to trigger a REMB
227// packet on this one.
mflodman@webrtc.orgab2610f2012-06-29 10:05:28 +0000228TEST_F(ViERembTest, NoSendingRtpModule) {
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000229 MockRtpRtcp rtp;
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000230 vie_remb_->AddReceiveChannel(&rtp);
231
232 unsigned int bitrate_estimate = 456;
stefan@webrtc.org3aece422012-10-18 11:12:39 +0000233 unsigned int ssrc = 1234;
stefan@webrtc.org4100b042012-11-19 10:09:20 +0000234 std::vector<unsigned int> ssrcs(&ssrc, &ssrc + 1);
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000235
solenberg@webrtc.org561990f2013-05-22 19:04:19 +0000236 vie_remb_->OnReceiveBitrateChanged(ssrcs, bitrate_estimate);
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000237
stefan@webrtc.orgb5865072013-02-01 14:33:42 +0000238 // Call OnReceiveBitrateChanged twice to get a first estimate.
mflodman@webrtc.orgc289f9f2012-11-16 13:24:18 +0000239 TickTime::AdvanceFakeClock(1000);
mflodman@webrtc.org1fb39ba2012-08-13 17:05:14 +0000240 EXPECT_CALL(rtp, SetREMBData(_, _, _))
241 .Times(1);
solenberg@webrtc.org561990f2013-05-22 19:04:19 +0000242 vie_remb_->OnReceiveBitrateChanged(ssrcs, bitrate_estimate);
mflodman@webrtc.org1fb39ba2012-08-13 17:05:14 +0000243
mflodman@webrtc.org5284d6e2012-04-23 13:22:26 +0000244 // Lower the estimate to trigger a new packet REMB packet.
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000245 bitrate_estimate = bitrate_estimate - 100;
246 EXPECT_CALL(rtp, SetREMBData(_, _, _))
mflodman@webrtc.org5284d6e2012-04-23 13:22:26 +0000247 .Times(1);
solenberg@webrtc.org561990f2013-05-22 19:04:19 +0000248 vie_remb_->OnReceiveBitrateChanged(ssrcs, bitrate_estimate);
mflodman@webrtc.org84dc3d12011-12-22 10:26:13 +0000249}
250
251} // namespace webrtc