Lines Matching refs:bitrate_observer
179 TestBitrateObserver bitrate_observer; in TEST_F() local
187 AddObserver(&bitrate_observer, kMinSendBitrateBps, kMaxBitrateBps, in TEST_F()
189 EXPECT_EQ(300000, allocator_->GetStartBitrate(&bitrate_observer)); in TEST_F()
192 EXPECT_EQ(200000, allocator_->GetStartBitrate(&bitrate_observer)); in TEST_F()
198 EXPECT_EQ(3000000, allocator_->GetStartBitrate(&bitrate_observer)); in TEST_F()
203 AddObserver(&bitrate_observer, kMinSendBitrateBps, 4000000, 0, true, in TEST_F()
207 EXPECT_EQ(4000000, allocator_->GetStartBitrate(&bitrate_observer)); in TEST_F()
209 AddObserver(&bitrate_observer, kMinSendBitrateBps, kMaxBitrateBps, 0, true, in TEST_F()
211 EXPECT_EQ(3000000, allocator_->GetStartBitrate(&bitrate_observer)); in TEST_F()
212 EXPECT_EQ(3000000u, bitrate_observer.last_bitrate_bps_); in TEST_F()
215 EXPECT_EQ(1500000u, bitrate_observer.last_bitrate_bps_); in TEST_F()
281 TestBitrateObserver bitrate_observer; in TEST_F() local
289 AddObserver(&bitrate_observer, kMinSendBitrateBps, kMaxBitrateBps, in TEST_F()
293 allocator_->RemoveObserver(&bitrate_observer); in TEST_F()
426 TestBitrateObserver bitrate_observer; in TEST_F() local
429 AddObserver(&bitrate_observer, kMinBitrateBps, kMaxBitrateBps, 0, false, "", in TEST_F()
431 EXPECT_EQ(300000, allocator_->GetStartBitrate(&bitrate_observer)); in TEST_F()
436 EXPECT_EQ(150000u, bitrate_observer.last_bitrate_bps_); in TEST_F()
441 bitrate_observer.SetBitrateProtectionRatio(kProtectionRatio); in TEST_F()
444 EXPECT_EQ(200000u, bitrate_observer.last_bitrate_bps_); in TEST_F()
457 EXPECT_EQ(0u, bitrate_observer.last_bitrate_bps_); in TEST_F()
462 EXPECT_EQ(0u, bitrate_observer.last_bitrate_bps_); in TEST_F()
471 bitrate_observer.last_bitrate_bps_); in TEST_F()
474 bitrate_observer.SetBitrateProtectionRatio(0.0); in TEST_F()
479 bitrate_observer.last_bitrate_bps_); in TEST_F()
483 EXPECT_EQ(kMinStartBitrateBps, bitrate_observer.last_bitrate_bps_); in TEST_F()
487 allocator_->RemoveObserver(&bitrate_observer); in TEST_F()
492 TestBitrateObserver bitrate_observer; in TEST_F() local
504 allocator_->AddObserver(&bitrate_observer, allocation_config); in TEST_F()
507 bitrate_observer.SetBitrateProtectionRatio(/*protection_ratio=*/0.2); in TEST_F()
514 bitrate_observer.SetBitrateProtectionRatio(/*protection_ratio=*/0.0); in TEST_F()
521 bitrate_observer.SetBitrateProtectionRatio(/*protection_ratio=*/0.2); in TEST_F()