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