Rename Fec to Ulpfec in VideoSendStreamTest.

This is a pure "rename CL". No functional changes are intended.

BUG=webrtc:5654

Review-Url: https://codereview.webrtc.org/2449053002
Cr-Commit-Position: refs/heads/master@{#14841}
This commit is contained in:
brandtr 2016-10-31 03:40:49 -07:00 committed by Commit bot
parent 42ca68ab72
commit e602f0ab08

View File

@ -311,18 +311,18 @@ class FakeReceiveStatistics : public NullReceiveStatistics {
StatisticianMap stats_map_;
};
class FecObserver : public test::EndToEndTest {
class UlpfecObserver : public test::EndToEndTest {
public:
FecObserver(bool header_extensions_enabled,
UlpfecObserver(bool header_extensions_enabled,
bool use_nack,
bool expect_red,
bool expect_fec,
bool expect_ulpfec,
const std::string& codec)
: EndToEndTest(VideoSendStreamTest::kDefaultTimeoutMs),
payload_name_(codec),
use_nack_(use_nack),
expect_red_(expect_red),
expect_fec_(expect_fec),
expect_ulpfec_(expect_ulpfec),
send_count_(0),
received_media_(false),
received_fec_(false),
@ -385,7 +385,7 @@ class FecObserver : public test::EndToEndTest {
if (encapsulated_payload_type != -1) {
if (encapsulated_payload_type ==
VideoSendStreamTest::kUlpfecPayloadType) {
EXPECT_TRUE(expect_fec_);
EXPECT_TRUE(expect_ulpfec_);
received_fec_ = true;
} else {
received_media_ = true;
@ -393,7 +393,7 @@ class FecObserver : public test::EndToEndTest {
}
if (send_count_ > 100 && received_media_) {
if (received_fec_ || !expect_fec_)
if (received_fec_ || !expect_ulpfec_)
observation_complete_.Set();
}
@ -453,7 +453,7 @@ class FecObserver : public test::EndToEndTest {
const std::string payload_name_;
const bool use_nack_;
const bool expect_red_;
const bool expect_fec_;
const bool expect_ulpfec_;
int send_count_;
bool received_media_;
bool received_fec_;
@ -461,13 +461,13 @@ class FecObserver : public test::EndToEndTest {
RTPHeader prev_header_;
};
TEST_F(VideoSendStreamTest, SupportsFecWithExtensions) {
FecObserver test(true, false, true, true, "VP8");
TEST_F(VideoSendStreamTest, SupportsUlpfecWithExtensions) {
UlpfecObserver test(true, false, true, true, "VP8");
RunBaseTest(&test);
}
TEST_F(VideoSendStreamTest, SupportsFecWithoutExtensions) {
FecObserver test(false, false, true, true, "VP8");
TEST_F(VideoSendStreamTest, SupportsUlpfecWithoutExtensions) {
UlpfecObserver test(false, false, true, true, "VP8");
RunBaseTest(&test);
}
@ -475,25 +475,25 @@ TEST_F(VideoSendStreamTest, SupportsFecWithoutExtensions) {
// since we'll still have to re-request FEC packets, effectively wasting
// bandwidth since the receiver has to wait for FEC retransmissions to determine
// that the received state is actually decodable.
TEST_F(VideoSendStreamTest, DoesNotUtilizeFecForH264WithNackEnabled) {
FecObserver test(false, true, true, false, "H264");
TEST_F(VideoSendStreamTest, DoesNotUtilizeUlpfecForH264WithNackEnabled) {
UlpfecObserver test(false, true, true, false, "H264");
RunBaseTest(&test);
}
// Without retransmissions FEC for H264 is fine.
TEST_F(VideoSendStreamTest, DoesUtilizeRedForH264WithoutNackEnabled) {
FecObserver test(false, false, true, true, "H264");
UlpfecObserver test(false, false, true, true, "H264");
RunBaseTest(&test);
}
TEST_F(VideoSendStreamTest, DoesUtilizeRedForVp8WithNackEnabled) {
FecObserver test(false, true, true, true, "VP8");
UlpfecObserver test(false, true, true, true, "VP8");
RunBaseTest(&test);
}
#if !defined(RTC_DISABLE_VP9)
TEST_F(VideoSendStreamTest, DoesUtilizeRedForVp9WithNackEnabled) {
FecObserver test(false, true, true, true, "VP9");
UlpfecObserver test(false, true, true, true, "VP9");
RunBaseTest(&test);
}
#endif // !defined(RTC_DISABLE_VP9)