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

Unified Diff: webrtc/video/bitrate_estimator_tests.cc

Issue 1208083002: Remove MimdRateControl and factories for RemoteBitrateEstimor. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressed comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtcp_sender_unittest.cc ('k') | webrtc/video/rampup_tests.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/bitrate_estimator_tests.cc
diff --git a/webrtc/video/bitrate_estimator_tests.cc b/webrtc/video/bitrate_estimator_tests.cc
index 6e71ca24efe7d8b9269b96235af8df03ce6fcfb9..a0fdc92b6120001d04929814dd8f3b9aafd56f75 100644
--- a/webrtc/video/bitrate_estimator_tests.cc
+++ b/webrtc/video/bitrate_estimator_tests.cc
@@ -272,13 +272,16 @@ class BitrateEstimatorTest : public test::CallTest {
std::vector<Stream*> streams_;
};
+static const char* kAbsSendTimeLog =
+ "RemoteBitrateEstimatorAbsSendTime: Instantiating.";
+static const char* kSingleStreamLog =
+ "RemoteBitrateEstimatorSingleStream: Instantiating.";
+
TEST_F(BitrateEstimatorTest, InstantiatesTOFPerDefaultForVideo) {
send_config_.rtp.extensions.push_back(
RtpExtension(RtpExtension::kTOffset, kTOFExtensionId));
- receiver_trace_.PushExpectedLogLine(
- "RemoteBitrateEstimatorFactory: Instantiating.");
- receiver_trace_.PushExpectedLogLine(
- "RemoteBitrateEstimatorFactory: Instantiating.");
+ receiver_trace_.PushExpectedLogLine(kSingleStreamLog);
+ receiver_trace_.PushExpectedLogLine(kSingleStreamLog);
streams_.push_back(new Stream(this, false));
EXPECT_EQ(kEventSignaled, receiver_trace_.Wait());
}
@@ -286,13 +289,10 @@ TEST_F(BitrateEstimatorTest, InstantiatesTOFPerDefaultForVideo) {
TEST_F(BitrateEstimatorTest, ImmediatelySwitchToASTForAudio) {
send_config_.rtp.extensions.push_back(
RtpExtension(RtpExtension::kAbsSendTime, kASTExtensionId));
- receiver_trace_.PushExpectedLogLine(
- "RemoteBitrateEstimatorFactory: Instantiating.");
- receiver_trace_.PushExpectedLogLine(
- "RemoteBitrateEstimatorFactory: Instantiating.");
+ receiver_trace_.PushExpectedLogLine(kSingleStreamLog);
+ receiver_trace_.PushExpectedLogLine(kSingleStreamLog);
receiver_trace_.PushExpectedLogLine("Switching to absolute send time RBE.");
- receiver_trace_.PushExpectedLogLine(
- "AbsoluteSendTimeRemoteBitrateEstimatorFactory: Instantiating.");
+ receiver_trace_.PushExpectedLogLine(kAbsSendTimeLog);
streams_.push_back(new Stream(this, true));
EXPECT_EQ(kEventSignaled, receiver_trace_.Wait());
}
@@ -300,30 +300,24 @@ TEST_F(BitrateEstimatorTest, ImmediatelySwitchToASTForAudio) {
TEST_F(BitrateEstimatorTest, ImmediatelySwitchToASTForVideo) {
send_config_.rtp.extensions.push_back(
RtpExtension(RtpExtension::kAbsSendTime, kASTExtensionId));
- receiver_trace_.PushExpectedLogLine(
- "RemoteBitrateEstimatorFactory: Instantiating.");
- receiver_trace_.PushExpectedLogLine(
- "RemoteBitrateEstimatorFactory: Instantiating.");
+ receiver_trace_.PushExpectedLogLine(kSingleStreamLog);
+ receiver_trace_.PushExpectedLogLine(kSingleStreamLog);
receiver_trace_.PushExpectedLogLine("Switching to absolute send time RBE.");
- receiver_trace_.PushExpectedLogLine(
- "AbsoluteSendTimeRemoteBitrateEstimatorFactory: Instantiating.");
+ receiver_trace_.PushExpectedLogLine(kAbsSendTimeLog);
streams_.push_back(new Stream(this, false));
EXPECT_EQ(kEventSignaled, receiver_trace_.Wait());
}
TEST_F(BitrateEstimatorTest, SwitchesToASTForAudio) {
- receiver_trace_.PushExpectedLogLine(
- "RemoteBitrateEstimatorFactory: Instantiating.");
- receiver_trace_.PushExpectedLogLine(
- "RemoteBitrateEstimatorFactory: Instantiating.");
+ receiver_trace_.PushExpectedLogLine(kSingleStreamLog);
+ receiver_trace_.PushExpectedLogLine(kSingleStreamLog);
streams_.push_back(new Stream(this, true));
EXPECT_EQ(kEventSignaled, receiver_trace_.Wait());
send_config_.rtp.extensions.push_back(
RtpExtension(RtpExtension::kAbsSendTime, kASTExtensionId));
receiver_trace_.PushExpectedLogLine("Switching to absolute send time RBE.");
- receiver_trace_.PushExpectedLogLine(
- "AbsoluteSendTimeRemoteBitrateEstimatorFactory: Instantiating.");
+ receiver_trace_.PushExpectedLogLine(kAbsSendTimeLog);
streams_.push_back(new Stream(this, true));
EXPECT_EQ(kEventSignaled, receiver_trace_.Wait());
}
@@ -331,18 +325,15 @@ TEST_F(BitrateEstimatorTest, SwitchesToASTForAudio) {
TEST_F(BitrateEstimatorTest, SwitchesToASTForVideo) {
send_config_.rtp.extensions.push_back(
RtpExtension(RtpExtension::kTOffset, kTOFExtensionId));
- receiver_trace_.PushExpectedLogLine(
- "RemoteBitrateEstimatorFactory: Instantiating.");
- receiver_trace_.PushExpectedLogLine(
- "RemoteBitrateEstimatorFactory: Instantiating.");
+ receiver_trace_.PushExpectedLogLine(kSingleStreamLog);
+ receiver_trace_.PushExpectedLogLine(kSingleStreamLog);
streams_.push_back(new Stream(this, false));
EXPECT_EQ(kEventSignaled, receiver_trace_.Wait());
send_config_.rtp.extensions[0] =
RtpExtension(RtpExtension::kAbsSendTime, kASTExtensionId);
receiver_trace_.PushExpectedLogLine("Switching to absolute send time RBE.");
- receiver_trace_.PushExpectedLogLine(
- "AbsoluteSendTimeRemoteBitrateEstimatorFactory: Instantiating.");
+ receiver_trace_.PushExpectedLogLine(kAbsSendTimeLog);
streams_.push_back(new Stream(this, false));
EXPECT_EQ(kEventSignaled, receiver_trace_.Wait());
}
@@ -350,18 +341,15 @@ TEST_F(BitrateEstimatorTest, SwitchesToASTForVideo) {
TEST_F(BitrateEstimatorTest, SwitchesToASTThenBackToTOFForVideo) {
send_config_.rtp.extensions.push_back(
RtpExtension(RtpExtension::kTOffset, kTOFExtensionId));
- receiver_trace_.PushExpectedLogLine(
- "RemoteBitrateEstimatorFactory: Instantiating.");
- receiver_trace_.PushExpectedLogLine(
- "RemoteBitrateEstimatorFactory: Instantiating.");
+ receiver_trace_.PushExpectedLogLine(kSingleStreamLog);
+ receiver_trace_.PushExpectedLogLine(kSingleStreamLog);
streams_.push_back(new Stream(this, false));
EXPECT_EQ(kEventSignaled, receiver_trace_.Wait());
send_config_.rtp.extensions[0] =
RtpExtension(RtpExtension::kAbsSendTime, kASTExtensionId);
receiver_trace_.PushExpectedLogLine("Switching to absolute send time RBE.");
- receiver_trace_.PushExpectedLogLine(
- "AbsoluteSendTimeRemoteBitrateEstimatorFactory: Instantiating.");
+ receiver_trace_.PushExpectedLogLine(kAbsSendTimeLog);
streams_.push_back(new Stream(this, false));
EXPECT_EQ(kEventSignaled, receiver_trace_.Wait());
@@ -369,8 +357,7 @@ TEST_F(BitrateEstimatorTest, SwitchesToASTThenBackToTOFForVideo) {
RtpExtension(RtpExtension::kTOffset, kTOFExtensionId);
receiver_trace_.PushExpectedLogLine(
"WrappingBitrateEstimator: Switching to transmission time offset RBE.");
- receiver_trace_.PushExpectedLogLine(
- "RemoteBitrateEstimatorFactory: Instantiating.");
+ receiver_trace_.PushExpectedLogLine(kSingleStreamLog);
streams_.push_back(new Stream(this, false));
streams_[0]->StopSending();
streams_[1]->StopSending();
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtcp_sender_unittest.cc ('k') | webrtc/video/rampup_tests.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698