Adds TaskQueue congestion controller tests in VideoSendStreamTest.
Bug: webrtc:8415 Change-Id: If49d228cc9440e19fbf73c771ceece86b444c4c0 Reviewed-on: https://webrtc-review.googlesource.com/92625 Commit-Queue: Sebastian Jansson <srte@webrtc.org> Reviewed-by: Erik Språng <sprang@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24500}
This commit is contained in:

committed by
Commit Bot

parent
ba3decfe00
commit
c714b6e713
@ -79,7 +79,11 @@ void ExpectEqualFramesVector(const std::vector<VideoFrame>& frames1,
|
|||||||
const std::vector<VideoFrame>& frames2);
|
const std::vector<VideoFrame>& frames2);
|
||||||
VideoFrame CreateVideoFrame(int width, int height, uint8_t data);
|
VideoFrame CreateVideoFrame(int width, int height, uint8_t data);
|
||||||
|
|
||||||
class VideoSendStreamTest : public test::CallTest {
|
class VideoSendStreamTest : public test::CallTest,
|
||||||
|
public testing::WithParamInterface<std::string> {
|
||||||
|
public:
|
||||||
|
VideoSendStreamTest() : field_trial_(GetParam()) {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void TestNackRetransmission(uint32_t retransmit_ssrc,
|
void TestNackRetransmission(uint32_t retransmit_ssrc,
|
||||||
uint8_t retransmit_payload_type);
|
uint8_t retransmit_payload_type);
|
||||||
@ -89,9 +93,19 @@ class VideoSendStreamTest : public test::CallTest {
|
|||||||
uint8_t num_spatial_layers);
|
uint8_t num_spatial_layers);
|
||||||
|
|
||||||
void TestRequestSourceRotateVideo(bool support_orientation_ext);
|
void TestRequestSourceRotateVideo(bool support_orientation_ext);
|
||||||
|
|
||||||
|
private:
|
||||||
|
test::ScopedFieldTrials field_trial_;
|
||||||
};
|
};
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, CanStartStartedStream) {
|
INSTANTIATE_TEST_CASE_P(Default, VideoSendStreamTest, ::testing::Values(""));
|
||||||
|
|
||||||
|
INSTANTIATE_TEST_CASE_P(
|
||||||
|
TaskQueueTrial,
|
||||||
|
VideoSendStreamTest,
|
||||||
|
::testing::Values("WebRTC-TaskQueueCongestionControl/Enabled/"));
|
||||||
|
|
||||||
|
TEST_P(VideoSendStreamTest, CanStartStartedStream) {
|
||||||
task_queue_.SendTask([this]() {
|
task_queue_.SendTask([this]() {
|
||||||
CreateSenderCall();
|
CreateSenderCall();
|
||||||
|
|
||||||
@ -105,7 +119,7 @@ TEST_F(VideoSendStreamTest, CanStartStartedStream) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, CanStopStoppedStream) {
|
TEST_P(VideoSendStreamTest, CanStopStoppedStream) {
|
||||||
task_queue_.SendTask([this]() {
|
task_queue_.SendTask([this]() {
|
||||||
CreateSenderCall();
|
CreateSenderCall();
|
||||||
|
|
||||||
@ -119,7 +133,7 @@ TEST_F(VideoSendStreamTest, CanStopStoppedStream) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, SupportsCName) {
|
TEST_P(VideoSendStreamTest, SupportsCName) {
|
||||||
static std::string kCName = "PjQatC14dGfbVwGPUOA9IH7RlsFDbWl4AhXEiDsBizo=";
|
static std::string kCName = "PjQatC14dGfbVwGPUOA9IH7RlsFDbWl4AhXEiDsBizo=";
|
||||||
class CNameObserver : public test::SendTest {
|
class CNameObserver : public test::SendTest {
|
||||||
public:
|
public:
|
||||||
@ -154,7 +168,7 @@ TEST_F(VideoSendStreamTest, SupportsCName) {
|
|||||||
RunBaseTest(&test);
|
RunBaseTest(&test);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, SupportsAbsoluteSendTime) {
|
TEST_P(VideoSendStreamTest, SupportsAbsoluteSendTime) {
|
||||||
class AbsoluteSendTimeObserver : public test::SendTest {
|
class AbsoluteSendTimeObserver : public test::SendTest {
|
||||||
public:
|
public:
|
||||||
AbsoluteSendTimeObserver() : SendTest(kDefaultTimeoutMs) {
|
AbsoluteSendTimeObserver() : SendTest(kDefaultTimeoutMs) {
|
||||||
@ -201,7 +215,7 @@ TEST_F(VideoSendStreamTest, SupportsAbsoluteSendTime) {
|
|||||||
RunBaseTest(&test);
|
RunBaseTest(&test);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, SupportsTransmissionTimeOffset) {
|
TEST_P(VideoSendStreamTest, SupportsTransmissionTimeOffset) {
|
||||||
static const int kEncodeDelayMs = 5;
|
static const int kEncodeDelayMs = 5;
|
||||||
class TransmissionTimeOffsetObserver : public test::SendTest {
|
class TransmissionTimeOffsetObserver : public test::SendTest {
|
||||||
public:
|
public:
|
||||||
@ -248,7 +262,7 @@ TEST_F(VideoSendStreamTest, SupportsTransmissionTimeOffset) {
|
|||||||
RunBaseTest(&test);
|
RunBaseTest(&test);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, SupportsTransportWideSequenceNumbers) {
|
TEST_P(VideoSendStreamTest, SupportsTransportWideSequenceNumbers) {
|
||||||
static const uint8_t kExtensionId = test::kTransportSequenceNumberExtensionId;
|
static const uint8_t kExtensionId = test::kTransportSequenceNumberExtensionId;
|
||||||
class TransportWideSequenceNumberObserver : public test::SendTest {
|
class TransportWideSequenceNumberObserver : public test::SendTest {
|
||||||
public:
|
public:
|
||||||
@ -292,7 +306,7 @@ TEST_F(VideoSendStreamTest, SupportsTransportWideSequenceNumbers) {
|
|||||||
RunBaseTest(&test);
|
RunBaseTest(&test);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, SupportsVideoRotation) {
|
TEST_P(VideoSendStreamTest, SupportsVideoRotation) {
|
||||||
class VideoRotationObserver : public test::SendTest {
|
class VideoRotationObserver : public test::SendTest {
|
||||||
public:
|
public:
|
||||||
VideoRotationObserver() : SendTest(kDefaultTimeoutMs) {
|
VideoRotationObserver() : SendTest(kDefaultTimeoutMs) {
|
||||||
@ -334,7 +348,7 @@ TEST_F(VideoSendStreamTest, SupportsVideoRotation) {
|
|||||||
RunBaseTest(&test);
|
RunBaseTest(&test);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, SupportsVideoContentType) {
|
TEST_P(VideoSendStreamTest, SupportsVideoContentType) {
|
||||||
class VideoContentTypeObserver : public test::SendTest {
|
class VideoContentTypeObserver : public test::SendTest {
|
||||||
public:
|
public:
|
||||||
VideoContentTypeObserver()
|
VideoContentTypeObserver()
|
||||||
@ -380,7 +394,7 @@ TEST_F(VideoSendStreamTest, SupportsVideoContentType) {
|
|||||||
RunBaseTest(&test);
|
RunBaseTest(&test);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, SupportsVideoTimingFrames) {
|
TEST_P(VideoSendStreamTest, SupportsVideoTimingFrames) {
|
||||||
class VideoTimingObserver : public test::SendTest {
|
class VideoTimingObserver : public test::SendTest {
|
||||||
public:
|
public:
|
||||||
VideoTimingObserver() : SendTest(kDefaultTimeoutMs) {
|
VideoTimingObserver() : SendTest(kDefaultTimeoutMs) {
|
||||||
@ -583,21 +597,21 @@ class UlpfecObserver : public test::EndToEndTest {
|
|||||||
RTPHeader prev_header_;
|
RTPHeader prev_header_;
|
||||||
};
|
};
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, SupportsUlpfecWithExtensions) {
|
TEST_P(VideoSendStreamTest, SupportsUlpfecWithExtensions) {
|
||||||
test::FunctionVideoEncoderFactory encoder_factory(
|
test::FunctionVideoEncoderFactory encoder_factory(
|
||||||
[]() { return VP8Encoder::Create(); });
|
[]() { return VP8Encoder::Create(); });
|
||||||
UlpfecObserver test(true, false, true, true, "VP8", &encoder_factory);
|
UlpfecObserver test(true, false, true, true, "VP8", &encoder_factory);
|
||||||
RunBaseTest(&test);
|
RunBaseTest(&test);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, SupportsUlpfecWithoutExtensions) {
|
TEST_P(VideoSendStreamTest, SupportsUlpfecWithoutExtensions) {
|
||||||
test::FunctionVideoEncoderFactory encoder_factory(
|
test::FunctionVideoEncoderFactory encoder_factory(
|
||||||
[]() { return VP8Encoder::Create(); });
|
[]() { return VP8Encoder::Create(); });
|
||||||
UlpfecObserver test(false, false, true, true, "VP8", &encoder_factory);
|
UlpfecObserver test(false, false, true, true, "VP8", &encoder_factory);
|
||||||
RunBaseTest(&test);
|
RunBaseTest(&test);
|
||||||
}
|
}
|
||||||
|
|
||||||
class VideoSendStreamWithoutUlpfecTest : public VideoSendStreamTest {
|
class VideoSendStreamWithoutUlpfecTest : public test::CallTest {
|
||||||
protected:
|
protected:
|
||||||
VideoSendStreamWithoutUlpfecTest()
|
VideoSendStreamWithoutUlpfecTest()
|
||||||
: field_trial_("WebRTC-DisableUlpFecExperiment/Enabled/") {}
|
: field_trial_("WebRTC-DisableUlpFecExperiment/Enabled/") {}
|
||||||
@ -616,7 +630,7 @@ TEST_F(VideoSendStreamWithoutUlpfecTest, NoUlpfecIfDisabledThroughFieldTrial) {
|
|||||||
// since we'll still have to re-request FEC packets, effectively wasting
|
// since we'll still have to re-request FEC packets, effectively wasting
|
||||||
// bandwidth since the receiver has to wait for FEC retransmissions to determine
|
// bandwidth since the receiver has to wait for FEC retransmissions to determine
|
||||||
// that the received state is actually decodable.
|
// that the received state is actually decodable.
|
||||||
TEST_F(VideoSendStreamTest, DoesNotUtilizeUlpfecForH264WithNackEnabled) {
|
TEST_P(VideoSendStreamTest, DoesNotUtilizeUlpfecForH264WithNackEnabled) {
|
||||||
test::FunctionVideoEncoderFactory encoder_factory([]() {
|
test::FunctionVideoEncoderFactory encoder_factory([]() {
|
||||||
return absl::make_unique<test::FakeH264Encoder>(Clock::GetRealTimeClock());
|
return absl::make_unique<test::FakeH264Encoder>(Clock::GetRealTimeClock());
|
||||||
});
|
});
|
||||||
@ -625,7 +639,7 @@ TEST_F(VideoSendStreamTest, DoesNotUtilizeUlpfecForH264WithNackEnabled) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Without retransmissions FEC for H264 is fine.
|
// Without retransmissions FEC for H264 is fine.
|
||||||
TEST_F(VideoSendStreamTest, DoesUtilizeUlpfecForH264WithoutNackEnabled) {
|
TEST_P(VideoSendStreamTest, DoesUtilizeUlpfecForH264WithoutNackEnabled) {
|
||||||
test::FunctionVideoEncoderFactory encoder_factory([]() {
|
test::FunctionVideoEncoderFactory encoder_factory([]() {
|
||||||
return absl::make_unique<test::FakeH264Encoder>(Clock::GetRealTimeClock());
|
return absl::make_unique<test::FakeH264Encoder>(Clock::GetRealTimeClock());
|
||||||
});
|
});
|
||||||
@ -634,7 +648,7 @@ TEST_F(VideoSendStreamTest, DoesUtilizeUlpfecForH264WithoutNackEnabled) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Disabled as flaky, see https://crbug.com/webrtc/7285 for details.
|
// Disabled as flaky, see https://crbug.com/webrtc/7285 for details.
|
||||||
TEST_F(VideoSendStreamTest, DISABLED_DoesUtilizeUlpfecForVp8WithNackEnabled) {
|
TEST_P(VideoSendStreamTest, DISABLED_DoesUtilizeUlpfecForVp8WithNackEnabled) {
|
||||||
test::FunctionVideoEncoderFactory encoder_factory(
|
test::FunctionVideoEncoderFactory encoder_factory(
|
||||||
[]() { return VP8Encoder::Create(); });
|
[]() { return VP8Encoder::Create(); });
|
||||||
UlpfecObserver test(false, true, true, true, "VP8", &encoder_factory);
|
UlpfecObserver test(false, true, true, true, "VP8", &encoder_factory);
|
||||||
@ -643,7 +657,7 @@ TEST_F(VideoSendStreamTest, DISABLED_DoesUtilizeUlpfecForVp8WithNackEnabled) {
|
|||||||
|
|
||||||
#if !defined(RTC_DISABLE_VP9)
|
#if !defined(RTC_DISABLE_VP9)
|
||||||
// Disabled as flaky, see https://crbug.com/webrtc/7285 for details.
|
// Disabled as flaky, see https://crbug.com/webrtc/7285 for details.
|
||||||
TEST_F(VideoSendStreamTest, DISABLED_DoesUtilizeUlpfecForVp9WithNackEnabled) {
|
TEST_P(VideoSendStreamTest, DISABLED_DoesUtilizeUlpfecForVp9WithNackEnabled) {
|
||||||
test::FunctionVideoEncoderFactory encoder_factory(
|
test::FunctionVideoEncoderFactory encoder_factory(
|
||||||
[]() { return VP9Encoder::Create(); });
|
[]() { return VP9Encoder::Create(); });
|
||||||
UlpfecObserver test(false, true, true, true, "VP9", &encoder_factory);
|
UlpfecObserver test(false, true, true, true, "VP9", &encoder_factory);
|
||||||
@ -651,7 +665,7 @@ TEST_F(VideoSendStreamTest, DISABLED_DoesUtilizeUlpfecForVp9WithNackEnabled) {
|
|||||||
}
|
}
|
||||||
#endif // !defined(RTC_DISABLE_VP9)
|
#endif // !defined(RTC_DISABLE_VP9)
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, SupportsUlpfecWithMultithreadedH264) {
|
TEST_P(VideoSendStreamTest, SupportsUlpfecWithMultithreadedH264) {
|
||||||
test::FunctionVideoEncoderFactory encoder_factory([]() {
|
test::FunctionVideoEncoderFactory encoder_factory([]() {
|
||||||
return absl::make_unique<test::MultithreadedFakeH264Encoder>(
|
return absl::make_unique<test::MultithreadedFakeH264Encoder>(
|
||||||
Clock::GetRealTimeClock());
|
Clock::GetRealTimeClock());
|
||||||
@ -764,28 +778,28 @@ class FlexfecObserver : public test::EndToEndTest {
|
|||||||
const size_t num_video_streams_;
|
const size_t num_video_streams_;
|
||||||
};
|
};
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, SupportsFlexfecVp8) {
|
TEST_P(VideoSendStreamTest, SupportsFlexfecVp8) {
|
||||||
test::FunctionVideoEncoderFactory encoder_factory(
|
test::FunctionVideoEncoderFactory encoder_factory(
|
||||||
[]() { return VP8Encoder::Create(); });
|
[]() { return VP8Encoder::Create(); });
|
||||||
FlexfecObserver test(false, false, "VP8", &encoder_factory, 1);
|
FlexfecObserver test(false, false, "VP8", &encoder_factory, 1);
|
||||||
RunBaseTest(&test);
|
RunBaseTest(&test);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, SupportsFlexfecSimulcastVp8) {
|
TEST_P(VideoSendStreamTest, SupportsFlexfecSimulcastVp8) {
|
||||||
test::FunctionVideoEncoderFactory encoder_factory(
|
test::FunctionVideoEncoderFactory encoder_factory(
|
||||||
[]() { return VP8Encoder::Create(); });
|
[]() { return VP8Encoder::Create(); });
|
||||||
FlexfecObserver test(false, false, "VP8", &encoder_factory, 2);
|
FlexfecObserver test(false, false, "VP8", &encoder_factory, 2);
|
||||||
RunBaseTest(&test);
|
RunBaseTest(&test);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, SupportsFlexfecWithNackVp8) {
|
TEST_P(VideoSendStreamTest, SupportsFlexfecWithNackVp8) {
|
||||||
test::FunctionVideoEncoderFactory encoder_factory(
|
test::FunctionVideoEncoderFactory encoder_factory(
|
||||||
[]() { return VP8Encoder::Create(); });
|
[]() { return VP8Encoder::Create(); });
|
||||||
FlexfecObserver test(false, true, "VP8", &encoder_factory, 1);
|
FlexfecObserver test(false, true, "VP8", &encoder_factory, 1);
|
||||||
RunBaseTest(&test);
|
RunBaseTest(&test);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, SupportsFlexfecWithRtpExtensionsVp8) {
|
TEST_P(VideoSendStreamTest, SupportsFlexfecWithRtpExtensionsVp8) {
|
||||||
test::FunctionVideoEncoderFactory encoder_factory(
|
test::FunctionVideoEncoderFactory encoder_factory(
|
||||||
[]() { return VP8Encoder::Create(); });
|
[]() { return VP8Encoder::Create(); });
|
||||||
FlexfecObserver test(true, false, "VP8", &encoder_factory, 1);
|
FlexfecObserver test(true, false, "VP8", &encoder_factory, 1);
|
||||||
@ -793,14 +807,14 @@ TEST_F(VideoSendStreamTest, SupportsFlexfecWithRtpExtensionsVp8) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(RTC_DISABLE_VP9)
|
#if !defined(RTC_DISABLE_VP9)
|
||||||
TEST_F(VideoSendStreamTest, SupportsFlexfecVp9) {
|
TEST_P(VideoSendStreamTest, SupportsFlexfecVp9) {
|
||||||
test::FunctionVideoEncoderFactory encoder_factory(
|
test::FunctionVideoEncoderFactory encoder_factory(
|
||||||
[]() { return VP9Encoder::Create(); });
|
[]() { return VP9Encoder::Create(); });
|
||||||
FlexfecObserver test(false, false, "VP9", &encoder_factory, 1);
|
FlexfecObserver test(false, false, "VP9", &encoder_factory, 1);
|
||||||
RunBaseTest(&test);
|
RunBaseTest(&test);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, SupportsFlexfecWithNackVp9) {
|
TEST_P(VideoSendStreamTest, SupportsFlexfecWithNackVp9) {
|
||||||
test::FunctionVideoEncoderFactory encoder_factory(
|
test::FunctionVideoEncoderFactory encoder_factory(
|
||||||
[]() { return VP9Encoder::Create(); });
|
[]() { return VP9Encoder::Create(); });
|
||||||
FlexfecObserver test(false, true, "VP9", &encoder_factory, 1);
|
FlexfecObserver test(false, true, "VP9", &encoder_factory, 1);
|
||||||
@ -808,7 +822,7 @@ TEST_F(VideoSendStreamTest, SupportsFlexfecWithNackVp9) {
|
|||||||
}
|
}
|
||||||
#endif // defined(RTC_DISABLE_VP9)
|
#endif // defined(RTC_DISABLE_VP9)
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, SupportsFlexfecH264) {
|
TEST_P(VideoSendStreamTest, SupportsFlexfecH264) {
|
||||||
test::FunctionVideoEncoderFactory encoder_factory([]() {
|
test::FunctionVideoEncoderFactory encoder_factory([]() {
|
||||||
return absl::make_unique<test::FakeH264Encoder>(Clock::GetRealTimeClock());
|
return absl::make_unique<test::FakeH264Encoder>(Clock::GetRealTimeClock());
|
||||||
});
|
});
|
||||||
@ -816,7 +830,7 @@ TEST_F(VideoSendStreamTest, SupportsFlexfecH264) {
|
|||||||
RunBaseTest(&test);
|
RunBaseTest(&test);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, SupportsFlexfecWithNackH264) {
|
TEST_P(VideoSendStreamTest, SupportsFlexfecWithNackH264) {
|
||||||
test::FunctionVideoEncoderFactory encoder_factory([]() {
|
test::FunctionVideoEncoderFactory encoder_factory([]() {
|
||||||
return absl::make_unique<test::FakeH264Encoder>(Clock::GetRealTimeClock());
|
return absl::make_unique<test::FakeH264Encoder>(Clock::GetRealTimeClock());
|
||||||
});
|
});
|
||||||
@ -824,7 +838,7 @@ TEST_F(VideoSendStreamTest, SupportsFlexfecWithNackH264) {
|
|||||||
RunBaseTest(&test);
|
RunBaseTest(&test);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, SupportsFlexfecWithMultithreadedH264) {
|
TEST_P(VideoSendStreamTest, SupportsFlexfecWithMultithreadedH264) {
|
||||||
test::FunctionVideoEncoderFactory encoder_factory([]() {
|
test::FunctionVideoEncoderFactory encoder_factory([]() {
|
||||||
return absl::make_unique<test::MultithreadedFakeH264Encoder>(
|
return absl::make_unique<test::MultithreadedFakeH264Encoder>(
|
||||||
Clock::GetRealTimeClock());
|
Clock::GetRealTimeClock());
|
||||||
@ -929,12 +943,12 @@ void VideoSendStreamTest::TestNackRetransmission(
|
|||||||
RunBaseTest(&test);
|
RunBaseTest(&test);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, RetransmitsNack) {
|
TEST_P(VideoSendStreamTest, RetransmitsNack) {
|
||||||
// Normal NACKs should use the send SSRC.
|
// Normal NACKs should use the send SSRC.
|
||||||
TestNackRetransmission(kVideoSendSsrcs[0], kFakeVideoSendPayloadType);
|
TestNackRetransmission(kVideoSendSsrcs[0], kFakeVideoSendPayloadType);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, RetransmitsNackOverRtx) {
|
TEST_P(VideoSendStreamTest, RetransmitsNackOverRtx) {
|
||||||
// NACKs over RTX should use a separate SSRC.
|
// NACKs over RTX should use a separate SSRC.
|
||||||
TestNackRetransmission(kSendRtxSsrcs[0], kSendRtxPayloadType);
|
TestNackRetransmission(kSendRtxSsrcs[0], kSendRtxPayloadType);
|
||||||
}
|
}
|
||||||
@ -1185,19 +1199,19 @@ void VideoSendStreamTest::TestPacketFragmentationSize(VideoFormat format,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO(sprang): Is there any way of speeding up these tests?
|
// TODO(sprang): Is there any way of speeding up these tests?
|
||||||
TEST_F(VideoSendStreamTest, FragmentsGenericAccordingToMaxPacketSize) {
|
TEST_P(VideoSendStreamTest, FragmentsGenericAccordingToMaxPacketSize) {
|
||||||
TestPacketFragmentationSize(kGeneric, false);
|
TestPacketFragmentationSize(kGeneric, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, FragmentsGenericAccordingToMaxPacketSizeWithFec) {
|
TEST_P(VideoSendStreamTest, FragmentsGenericAccordingToMaxPacketSizeWithFec) {
|
||||||
TestPacketFragmentationSize(kGeneric, true);
|
TestPacketFragmentationSize(kGeneric, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, FragmentsVp8AccordingToMaxPacketSize) {
|
TEST_P(VideoSendStreamTest, FragmentsVp8AccordingToMaxPacketSize) {
|
||||||
TestPacketFragmentationSize(kVP8, false);
|
TestPacketFragmentationSize(kVP8, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, FragmentsVp8AccordingToMaxPacketSizeWithFec) {
|
TEST_P(VideoSendStreamTest, FragmentsVp8AccordingToMaxPacketSizeWithFec) {
|
||||||
TestPacketFragmentationSize(kVP8, true);
|
TestPacketFragmentationSize(kVP8, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1210,7 +1224,7 @@ TEST_F(VideoSendStreamTest, FragmentsVp8AccordingToMaxPacketSizeWithFec) {
|
|||||||
// 4. Signal a high REMB and then wait for the RTP stream to start again.
|
// 4. Signal a high REMB and then wait for the RTP stream to start again.
|
||||||
// When the stream is detected again, and the stats show that the stream
|
// When the stream is detected again, and the stats show that the stream
|
||||||
// is no longer suspended, the test ends.
|
// is no longer suspended, the test ends.
|
||||||
TEST_F(VideoSendStreamTest, SuspendBelowMinBitrate) {
|
TEST_P(VideoSendStreamTest, SuspendBelowMinBitrate) {
|
||||||
static const int kSuspendTimeFrames = 60; // Suspend for 2 seconds @ 30 fps.
|
static const int kSuspendTimeFrames = 60; // Suspend for 2 seconds @ 30 fps.
|
||||||
|
|
||||||
class RembObserver : public test::SendTest,
|
class RembObserver : public test::SendTest,
|
||||||
@ -1359,7 +1373,7 @@ TEST_F(VideoSendStreamTest, SuspendBelowMinBitrate) {
|
|||||||
|
|
||||||
// This test that padding stops being send after a while if the Camera stops
|
// This test that padding stops being send after a while if the Camera stops
|
||||||
// producing video frames and that padding resumes if the camera restarts.
|
// producing video frames and that padding resumes if the camera restarts.
|
||||||
TEST_F(VideoSendStreamTest, NoPaddingWhenVideoIsMuted) {
|
TEST_P(VideoSendStreamTest, NoPaddingWhenVideoIsMuted) {
|
||||||
class NoPaddingWhenVideoIsMuted : public test::SendTest {
|
class NoPaddingWhenVideoIsMuted : public test::SendTest {
|
||||||
public:
|
public:
|
||||||
NoPaddingWhenVideoIsMuted()
|
NoPaddingWhenVideoIsMuted()
|
||||||
@ -1434,7 +1448,7 @@ TEST_F(VideoSendStreamTest, NoPaddingWhenVideoIsMuted) {
|
|||||||
RunBaseTest(&test);
|
RunBaseTest(&test);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, PaddingIsPrimarilyRetransmissions) {
|
TEST_P(VideoSendStreamTest, PaddingIsPrimarilyRetransmissions) {
|
||||||
const int kCapacityKbps = 10000; // 10 Mbps
|
const int kCapacityKbps = 10000; // 10 Mbps
|
||||||
class PaddingIsPrimarilyRetransmissions : public test::EndToEndTest {
|
class PaddingIsPrimarilyRetransmissions : public test::EndToEndTest {
|
||||||
public:
|
public:
|
||||||
@ -1514,7 +1528,7 @@ TEST_F(VideoSendStreamTest, PaddingIsPrimarilyRetransmissions) {
|
|||||||
//
|
//
|
||||||
// Note that the test starts at "high" bitrate and does not ramp up to "higher"
|
// Note that the test starts at "high" bitrate and does not ramp up to "higher"
|
||||||
// bitrate since no receiver block or remb is sent in the initial phase.
|
// bitrate since no receiver block or remb is sent in the initial phase.
|
||||||
TEST_F(VideoSendStreamTest, MinTransmitBitrateRespectsRemb) {
|
TEST_P(VideoSendStreamTest, MinTransmitBitrateRespectsRemb) {
|
||||||
static const int kMinTransmitBitrateBps = 400000;
|
static const int kMinTransmitBitrateBps = 400000;
|
||||||
static const int kHighBitrateBps = 150000;
|
static const int kHighBitrateBps = 150000;
|
||||||
static const int kRembBitrateBps = 80000;
|
static const int kRembBitrateBps = 80000;
|
||||||
@ -1594,7 +1608,7 @@ TEST_F(VideoSendStreamTest, MinTransmitBitrateRespectsRemb) {
|
|||||||
RunBaseTest(&test);
|
RunBaseTest(&test);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, ChangingNetworkRoute) {
|
TEST_P(VideoSendStreamTest, ChangingNetworkRoute) {
|
||||||
static const int kStartBitrateBps = 300000;
|
static const int kStartBitrateBps = 300000;
|
||||||
static const int kNewMaxBitrateBps = 1234567;
|
static const int kNewMaxBitrateBps = 1234567;
|
||||||
static const uint8_t kExtensionId = test::kTransportSequenceNumberExtensionId;
|
static const uint8_t kExtensionId = test::kTransportSequenceNumberExtensionId;
|
||||||
@ -1683,7 +1697,7 @@ TEST_F(VideoSendStreamTest, ChangingNetworkRoute) {
|
|||||||
RunBaseTest(&test);
|
RunBaseTest(&test);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, ChangingTransportOverhead) {
|
TEST_P(VideoSendStreamTest, ChangingTransportOverhead) {
|
||||||
class ChangingTransportOverheadTest : public test::EndToEndTest {
|
class ChangingTransportOverheadTest : public test::EndToEndTest {
|
||||||
public:
|
public:
|
||||||
explicit ChangingTransportOverheadTest(
|
explicit ChangingTransportOverheadTest(
|
||||||
@ -1857,14 +1871,14 @@ class MaxPaddingSetTest : public test::SendTest {
|
|||||||
T* const stream_resetter_;
|
T* const stream_resetter_;
|
||||||
};
|
};
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, RespectsMinTransmitBitrate) {
|
TEST_P(VideoSendStreamTest, RespectsMinTransmitBitrate) {
|
||||||
auto reset_fun = [](const VideoSendStream::Config& send_stream_config,
|
auto reset_fun = [](const VideoSendStream::Config& send_stream_config,
|
||||||
const VideoEncoderConfig& encoder_config) {};
|
const VideoEncoderConfig& encoder_config) {};
|
||||||
MaxPaddingSetTest<decltype(reset_fun)> test(false, &reset_fun);
|
MaxPaddingSetTest<decltype(reset_fun)> test(false, &reset_fun);
|
||||||
RunBaseTest(&test);
|
RunBaseTest(&test);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, RespectsMinTransmitBitrateAfterContentSwitch) {
|
TEST_P(VideoSendStreamTest, RespectsMinTransmitBitrateAfterContentSwitch) {
|
||||||
// Function for removing and recreating the send stream with a new config.
|
// Function for removing and recreating the send stream with a new config.
|
||||||
auto reset_fun = [this](const VideoSendStream::Config& send_stream_config,
|
auto reset_fun = [this](const VideoSendStream::Config& send_stream_config,
|
||||||
const VideoEncoderConfig& encoder_config) {
|
const VideoEncoderConfig& encoder_config) {
|
||||||
@ -1887,7 +1901,7 @@ TEST_F(VideoSendStreamTest, RespectsMinTransmitBitrateAfterContentSwitch) {
|
|||||||
// possible once we start sending. Likely the frames being input are from the
|
// possible once we start sending. Likely the frames being input are from the
|
||||||
// same source that will be sent later, which just means that we're ready
|
// same source that will be sent later, which just means that we're ready
|
||||||
// earlier.
|
// earlier.
|
||||||
TEST_F(VideoSendStreamTest,
|
TEST_P(VideoSendStreamTest,
|
||||||
EncoderReconfigureOnResolutionChangeWhenNotSending) {
|
EncoderReconfigureOnResolutionChangeWhenNotSending) {
|
||||||
class EncoderObserver : public test::FakeEncoder {
|
class EncoderObserver : public test::FakeEncoder {
|
||||||
public:
|
public:
|
||||||
@ -1971,7 +1985,7 @@ TEST_F(VideoSendStreamTest,
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, CanReconfigureToUseStartBitrateAbovePreviousMax) {
|
TEST_P(VideoSendStreamTest, CanReconfigureToUseStartBitrateAbovePreviousMax) {
|
||||||
class StartBitrateObserver : public test::FakeEncoder {
|
class StartBitrateObserver : public test::FakeEncoder {
|
||||||
public:
|
public:
|
||||||
StartBitrateObserver()
|
StartBitrateObserver()
|
||||||
@ -2104,7 +2118,7 @@ class StartStopBitrateObserver : public test::FakeEncoder {
|
|||||||
// will be called with zero bitrate during initialization and that
|
// will be called with zero bitrate during initialization and that
|
||||||
// VideoSendStream::Stop also triggers VideoEncoder::SetRates Start to be called
|
// VideoSendStream::Stop also triggers VideoEncoder::SetRates Start to be called
|
||||||
// with zero bitrate.
|
// with zero bitrate.
|
||||||
TEST_F(VideoSendStreamTest, VideoSendStreamStopSetEncoderRateToZero) {
|
TEST_P(VideoSendStreamTest, VideoSendStreamStopSetEncoderRateToZero) {
|
||||||
test::NullTransport transport;
|
test::NullTransport transport;
|
||||||
StartStopBitrateObserver encoder;
|
StartStopBitrateObserver encoder;
|
||||||
test::EncoderProxyFactory encoder_factory(&encoder);
|
test::EncoderProxyFactory encoder_factory(&encoder);
|
||||||
@ -2147,7 +2161,7 @@ TEST_F(VideoSendStreamTest, VideoSendStreamStopSetEncoderRateToZero) {
|
|||||||
// be updated with a new bitrate when turning the VideoSendStream on/off with
|
// be updated with a new bitrate when turning the VideoSendStream on/off with
|
||||||
// VideoSendStream::UpdateActiveSimulcastLayers, and when the VideoStreamEncoder
|
// VideoSendStream::UpdateActiveSimulcastLayers, and when the VideoStreamEncoder
|
||||||
// is reconfigured with new active layers.
|
// is reconfigured with new active layers.
|
||||||
TEST_F(VideoSendStreamTest, VideoSendStreamUpdateActiveSimulcastLayers) {
|
TEST_P(VideoSendStreamTest, VideoSendStreamUpdateActiveSimulcastLayers) {
|
||||||
test::NullTransport transport;
|
test::NullTransport transport;
|
||||||
StartStopBitrateObserver encoder;
|
StartStopBitrateObserver encoder;
|
||||||
test::EncoderProxyFactory encoder_factory(&encoder);
|
test::EncoderProxyFactory encoder_factory(&encoder);
|
||||||
@ -2210,7 +2224,7 @@ TEST_F(VideoSendStreamTest, VideoSendStreamUpdateActiveSimulcastLayers) {
|
|||||||
DestroyCalls();
|
DestroyCalls();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
TEST_F(VideoSendStreamTest, CapturesTextureAndVideoFrames) {
|
TEST_P(VideoSendStreamTest, CapturesTextureAndVideoFrames) {
|
||||||
class FrameObserver : public rtc::VideoSinkInterface<VideoFrame> {
|
class FrameObserver : public rtc::VideoSinkInterface<VideoFrame> {
|
||||||
public:
|
public:
|
||||||
FrameObserver() : output_frame_event_(false, false) {}
|
FrameObserver() : output_frame_event_(false, false) {}
|
||||||
@ -2309,7 +2323,7 @@ VideoFrame CreateVideoFrame(int width, int height, uint8_t data) {
|
|||||||
return frame;
|
return frame;
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, EncoderIsProperlyInitializedAndDestroyed) {
|
TEST_P(VideoSendStreamTest, EncoderIsProperlyInitializedAndDestroyed) {
|
||||||
class EncoderStateObserver : public test::SendTest, public VideoEncoder {
|
class EncoderStateObserver : public test::SendTest, public VideoEncoder {
|
||||||
public:
|
public:
|
||||||
explicit EncoderStateObserver(
|
explicit EncoderStateObserver(
|
||||||
@ -2436,7 +2450,7 @@ TEST_F(VideoSendStreamTest, EncoderIsProperlyInitializedAndDestroyed) {
|
|||||||
EXPECT_EQ(1u, test_encoder.num_releases());
|
EXPECT_EQ(1u, test_encoder.num_releases());
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, EncoderSetupPropagatesCommonEncoderConfigValues) {
|
TEST_P(VideoSendStreamTest, EncoderSetupPropagatesCommonEncoderConfigValues) {
|
||||||
class VideoCodecConfigObserver : public test::SendTest,
|
class VideoCodecConfigObserver : public test::SendTest,
|
||||||
public test::FakeEncoder {
|
public test::FakeEncoder {
|
||||||
public:
|
public:
|
||||||
@ -2698,22 +2712,22 @@ VideoCodecConfigObserver<VideoCodecVP9>::GetEncoderSpecificSettings() const {
|
|||||||
VideoEncoderConfig::Vp9EncoderSpecificSettings>(encoder_settings_);
|
VideoEncoderConfig::Vp9EncoderSpecificSettings>(encoder_settings_);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, EncoderSetupPropagatesVp8Config) {
|
TEST_P(VideoSendStreamTest, EncoderSetupPropagatesVp8Config) {
|
||||||
VideoCodecConfigObserver<VideoCodecVP8> test(kVideoCodecVP8, "VP8");
|
VideoCodecConfigObserver<VideoCodecVP8> test(kVideoCodecVP8, "VP8");
|
||||||
RunBaseTest(&test);
|
RunBaseTest(&test);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, EncoderSetupPropagatesVp9Config) {
|
TEST_P(VideoSendStreamTest, EncoderSetupPropagatesVp9Config) {
|
||||||
VideoCodecConfigObserver<VideoCodecVP9> test(kVideoCodecVP9, "VP9");
|
VideoCodecConfigObserver<VideoCodecVP9> test(kVideoCodecVP9, "VP9");
|
||||||
RunBaseTest(&test);
|
RunBaseTest(&test);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, EncoderSetupPropagatesH264Config) {
|
TEST_P(VideoSendStreamTest, EncoderSetupPropagatesH264Config) {
|
||||||
VideoCodecConfigObserver<VideoCodecH264> test(kVideoCodecH264, "H264");
|
VideoCodecConfigObserver<VideoCodecH264> test(kVideoCodecH264, "H264");
|
||||||
RunBaseTest(&test);
|
RunBaseTest(&test);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, RtcpSenderReportContainsMediaBytesSent) {
|
TEST_P(VideoSendStreamTest, RtcpSenderReportContainsMediaBytesSent) {
|
||||||
class RtcpSenderReportTest : public test::SendTest {
|
class RtcpSenderReportTest : public test::SendTest {
|
||||||
public:
|
public:
|
||||||
RtcpSenderReportTest()
|
RtcpSenderReportTest()
|
||||||
@ -2764,7 +2778,7 @@ TEST_F(VideoSendStreamTest, RtcpSenderReportContainsMediaBytesSent) {
|
|||||||
RunBaseTest(&test);
|
RunBaseTest(&test);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, TranslatesTwoLayerScreencastToTargetBitrate) {
|
TEST_P(VideoSendStreamTest, TranslatesTwoLayerScreencastToTargetBitrate) {
|
||||||
static const int kScreencastMaxTargetBitrateDeltaKbps = 1;
|
static const int kScreencastMaxTargetBitrateDeltaKbps = 1;
|
||||||
|
|
||||||
class VideoStreamFactory
|
class VideoStreamFactory
|
||||||
@ -2831,7 +2845,7 @@ TEST_F(VideoSendStreamTest, TranslatesTwoLayerScreencastToTargetBitrate) {
|
|||||||
RunBaseTest(&test);
|
RunBaseTest(&test);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, ReconfigureBitratesSetsEncoderBitratesCorrectly) {
|
TEST_P(VideoSendStreamTest, ReconfigureBitratesSetsEncoderBitratesCorrectly) {
|
||||||
// These are chosen to be "kind of odd" to not be accidentally checked against
|
// These are chosen to be "kind of odd" to not be accidentally checked against
|
||||||
// default values.
|
// default values.
|
||||||
static const int kMinBitrateKbps = 137;
|
static const int kMinBitrateKbps = 137;
|
||||||
@ -3012,7 +3026,7 @@ TEST_F(VideoSendStreamTest, ReconfigureBitratesSetsEncoderBitratesCorrectly) {
|
|||||||
RunBaseTest(&test);
|
RunBaseTest(&test);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, ReportsSentResolution) {
|
TEST_P(VideoSendStreamTest, ReportsSentResolution) {
|
||||||
static const size_t kNumStreams = 3;
|
static const size_t kNumStreams = 3;
|
||||||
// Unusual resolutions to make sure that they are the ones being reported.
|
// Unusual resolutions to make sure that they are the ones being reported.
|
||||||
static const struct {
|
static const struct {
|
||||||
@ -3423,37 +3437,37 @@ class Vp9HeaderObserver : public test::SendTest {
|
|||||||
int expected_height_;
|
int expected_height_;
|
||||||
};
|
};
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, Vp9NonFlexMode_1Tl1SLayers) {
|
TEST_P(VideoSendStreamTest, Vp9NonFlexMode_1Tl1SLayers) {
|
||||||
const uint8_t kNumTemporalLayers = 1;
|
const uint8_t kNumTemporalLayers = 1;
|
||||||
const uint8_t kNumSpatialLayers = 1;
|
const uint8_t kNumSpatialLayers = 1;
|
||||||
TestVp9NonFlexMode(kNumTemporalLayers, kNumSpatialLayers);
|
TestVp9NonFlexMode(kNumTemporalLayers, kNumSpatialLayers);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, Vp9NonFlexMode_2Tl1SLayers) {
|
TEST_P(VideoSendStreamTest, Vp9NonFlexMode_2Tl1SLayers) {
|
||||||
const uint8_t kNumTemporalLayers = 2;
|
const uint8_t kNumTemporalLayers = 2;
|
||||||
const uint8_t kNumSpatialLayers = 1;
|
const uint8_t kNumSpatialLayers = 1;
|
||||||
TestVp9NonFlexMode(kNumTemporalLayers, kNumSpatialLayers);
|
TestVp9NonFlexMode(kNumTemporalLayers, kNumSpatialLayers);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, Vp9NonFlexMode_3Tl1SLayers) {
|
TEST_P(VideoSendStreamTest, Vp9NonFlexMode_3Tl1SLayers) {
|
||||||
const uint8_t kNumTemporalLayers = 3;
|
const uint8_t kNumTemporalLayers = 3;
|
||||||
const uint8_t kNumSpatialLayers = 1;
|
const uint8_t kNumSpatialLayers = 1;
|
||||||
TestVp9NonFlexMode(kNumTemporalLayers, kNumSpatialLayers);
|
TestVp9NonFlexMode(kNumTemporalLayers, kNumSpatialLayers);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, Vp9NonFlexMode_1Tl2SLayers) {
|
TEST_P(VideoSendStreamTest, Vp9NonFlexMode_1Tl2SLayers) {
|
||||||
const uint8_t kNumTemporalLayers = 1;
|
const uint8_t kNumTemporalLayers = 1;
|
||||||
const uint8_t kNumSpatialLayers = 2;
|
const uint8_t kNumSpatialLayers = 2;
|
||||||
TestVp9NonFlexMode(kNumTemporalLayers, kNumSpatialLayers);
|
TestVp9NonFlexMode(kNumTemporalLayers, kNumSpatialLayers);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, Vp9NonFlexMode_2Tl2SLayers) {
|
TEST_P(VideoSendStreamTest, Vp9NonFlexMode_2Tl2SLayers) {
|
||||||
const uint8_t kNumTemporalLayers = 2;
|
const uint8_t kNumTemporalLayers = 2;
|
||||||
const uint8_t kNumSpatialLayers = 2;
|
const uint8_t kNumSpatialLayers = 2;
|
||||||
TestVp9NonFlexMode(kNumTemporalLayers, kNumSpatialLayers);
|
TestVp9NonFlexMode(kNumTemporalLayers, kNumSpatialLayers);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, Vp9NonFlexMode_3Tl2SLayers) {
|
TEST_P(VideoSendStreamTest, Vp9NonFlexMode_3Tl2SLayers) {
|
||||||
const uint8_t kNumTemporalLayers = 3;
|
const uint8_t kNumTemporalLayers = 3;
|
||||||
const uint8_t kNumSpatialLayers = 2;
|
const uint8_t kNumSpatialLayers = 2;
|
||||||
TestVp9NonFlexMode(kNumTemporalLayers, kNumSpatialLayers);
|
TestVp9NonFlexMode(kNumTemporalLayers, kNumSpatialLayers);
|
||||||
@ -3544,7 +3558,7 @@ void VideoSendStreamTest::TestVp9NonFlexMode(uint8_t num_temporal_layers,
|
|||||||
RunBaseTest(&test);
|
RunBaseTest(&test);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, Vp9NonFlexModeSmallResolution) {
|
TEST_P(VideoSendStreamTest, Vp9NonFlexModeSmallResolution) {
|
||||||
static const size_t kNumFramesToSend = 50;
|
static const size_t kNumFramesToSend = 50;
|
||||||
static const int kWidth = 4;
|
static const int kWidth = 4;
|
||||||
static const int kHeight = 4;
|
static const int kHeight = 4;
|
||||||
@ -3588,7 +3602,7 @@ TEST_F(VideoSendStreamTest, Vp9NonFlexModeSmallResolution) {
|
|||||||
#define MAYBE_Vp9FlexModeRefCount DISABLED_Vp9FlexModeRefCount
|
#define MAYBE_Vp9FlexModeRefCount DISABLED_Vp9FlexModeRefCount
|
||||||
// #define MAYBE_Vp9FlexModeRefCount Vp9FlexModeRefCount
|
// #define MAYBE_Vp9FlexModeRefCount Vp9FlexModeRefCount
|
||||||
#endif
|
#endif
|
||||||
TEST_F(VideoSendStreamTest, MAYBE_Vp9FlexModeRefCount) {
|
TEST_P(VideoSendStreamTest, MAYBE_Vp9FlexModeRefCount) {
|
||||||
class FlexibleMode : public Vp9HeaderObserver {
|
class FlexibleMode : public Vp9HeaderObserver {
|
||||||
void ModifyVideoConfigsHook(
|
void ModifyVideoConfigsHook(
|
||||||
VideoSendStream::Config* send_config,
|
VideoSendStream::Config* send_config,
|
||||||
@ -3638,12 +3652,12 @@ void VideoSendStreamTest::TestRequestSourceRotateVideo(
|
|||||||
DestroyStreams();
|
DestroyStreams();
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest,
|
TEST_P(VideoSendStreamTest,
|
||||||
RequestSourceRotateIfVideoOrientationExtensionNotSupported) {
|
RequestSourceRotateIfVideoOrientationExtensionNotSupported) {
|
||||||
TestRequestSourceRotateVideo(false);
|
TestRequestSourceRotateVideo(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest,
|
TEST_P(VideoSendStreamTest,
|
||||||
DoNotRequestsRotationIfVideoOrientationExtensionSupported) {
|
DoNotRequestsRotationIfVideoOrientationExtensionSupported) {
|
||||||
TestRequestSourceRotateVideo(true);
|
TestRequestSourceRotateVideo(true);
|
||||||
}
|
}
|
||||||
@ -3651,7 +3665,7 @@ TEST_F(VideoSendStreamTest,
|
|||||||
// This test verifies that overhead is removed from the bandwidth estimate by
|
// This test verifies that overhead is removed from the bandwidth estimate by
|
||||||
// testing that the maximum possible target payload rate is smaller than the
|
// testing that the maximum possible target payload rate is smaller than the
|
||||||
// maximum bandwidth estimate by the overhead rate.
|
// maximum bandwidth estimate by the overhead rate.
|
||||||
TEST_F(VideoSendStreamTest, RemoveOverheadFromBandwidth) {
|
TEST_P(VideoSendStreamTest, RemoveOverheadFromBandwidth) {
|
||||||
test::ScopedFieldTrials override_field_trials(
|
test::ScopedFieldTrials override_field_trials(
|
||||||
"WebRTC-SendSideBwe-WithOverhead/Enabled/");
|
"WebRTC-SendSideBwe-WithOverhead/Enabled/");
|
||||||
class RemoveOverheadFromBandwidthTest : public test::EndToEndTest,
|
class RemoveOverheadFromBandwidthTest : public test::EndToEndTest,
|
||||||
@ -3736,7 +3750,7 @@ TEST_F(VideoSendStreamTest, RemoveOverheadFromBandwidth) {
|
|||||||
RunBaseTest(&test);
|
RunBaseTest(&test);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, SendsKeepAlive) {
|
TEST_P(VideoSendStreamTest, SendsKeepAlive) {
|
||||||
const int kTimeoutMs = 50; // Really short timeout for testing.
|
const int kTimeoutMs = 50; // Really short timeout for testing.
|
||||||
|
|
||||||
class KeepaliveObserver : public test::SendTest {
|
class KeepaliveObserver : public test::SendTest {
|
||||||
@ -3846,7 +3860,7 @@ std::string GetAlrProbingExperimentString() {
|
|||||||
}
|
}
|
||||||
const float kAlrProbingExperimentPaceMultiplier = 1.0f;
|
const float kAlrProbingExperimentPaceMultiplier = 1.0f;
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, AlrConfiguredWhenSendSideOn) {
|
TEST_P(VideoSendStreamTest, AlrConfiguredWhenSendSideOn) {
|
||||||
test::ScopedFieldTrials alr_experiment(GetAlrProbingExperimentString());
|
test::ScopedFieldTrials alr_experiment(GetAlrProbingExperimentString());
|
||||||
// Send-side bwe on, use pacing factor from |kAlrProbingExperiment| above.
|
// Send-side bwe on, use pacing factor from |kAlrProbingExperiment| above.
|
||||||
PacingFactorObserver test_with_send_side(true,
|
PacingFactorObserver test_with_send_side(true,
|
||||||
@ -3854,7 +3868,7 @@ TEST_F(VideoSendStreamTest, AlrConfiguredWhenSendSideOn) {
|
|||||||
RunBaseTest(&test_with_send_side);
|
RunBaseTest(&test_with_send_side);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, AlrNotConfiguredWhenSendSideOff) {
|
TEST_P(VideoSendStreamTest, AlrNotConfiguredWhenSendSideOff) {
|
||||||
test::ScopedFieldTrials alr_experiment(GetAlrProbingExperimentString());
|
test::ScopedFieldTrials alr_experiment(GetAlrProbingExperimentString());
|
||||||
// Send-side bwe off, use configuration should not be overridden.
|
// Send-side bwe off, use configuration should not be overridden.
|
||||||
PacingFactorObserver test_without_send_side(false, absl::nullopt);
|
PacingFactorObserver test_without_send_side(false, absl::nullopt);
|
||||||
@ -3990,7 +4004,7 @@ class ContentSwitchTest : public test::SendTest {
|
|||||||
T* stream_resetter_;
|
T* stream_resetter_;
|
||||||
};
|
};
|
||||||
|
|
||||||
TEST_F(VideoSendStreamTest, SwitchesToScreenshareAndBack) {
|
TEST_P(VideoSendStreamTest, SwitchesToScreenshareAndBack) {
|
||||||
auto reset_fun = [this](const VideoSendStream::Config& send_stream_config,
|
auto reset_fun = [this](const VideoSendStream::Config& send_stream_config,
|
||||||
const VideoEncoderConfig& encoder_config,
|
const VideoEncoderConfig& encoder_config,
|
||||||
test::BaseTest* test) {
|
test::BaseTest* test) {
|
||||||
|
Reference in New Issue
Block a user