From 677f42c6797174e2ea7fe41f00515515a09a3a5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=85sa=20Persson?= Date: Fri, 16 Mar 2018 13:09:17 +0100 Subject: [PATCH] Enable ContinuousAfterStreamCountChangeSimulcastEncoderAdapter picture id tests. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Support added in: https://webrtc-review.googlesource.com/c/src/+/61640 The tests are no longer related to any field trial. Bug: none Change-Id: I42dbdf23fa44953a139177a6693630507152e2ef Reviewed-on: https://webrtc-review.googlesource.com/62345 Commit-Queue: Åsa Persson Reviewed-by: Niels Moller Cr-Commit-Position: refs/heads/master@{#22472} --- video/picture_id_tests.cc | 41 +++++++++++---------------------------- 1 file changed, 11 insertions(+), 30 deletions(-) diff --git a/video/picture_id_tests.cc b/video/picture_id_tests.cc index 0484d97c82..9a43efe923 100644 --- a/video/picture_id_tests.cc +++ b/video/picture_id_tests.cc @@ -14,7 +14,6 @@ #include "rtc_base/numerics/safe_conversions.h" #include "rtc_base/numerics/sequence_number_util.h" #include "test/call_test.h" -#include "test/field_trial.h" namespace webrtc { namespace { @@ -28,9 +27,6 @@ const int kEncoderBitrateBps = 300000; const uint32_t kPictureIdWraparound = (1 << 15); const size_t kNumTemporalLayers[] = {1, 2, 3}; -const char kVp8ForcedFallbackEncoderEnabled[] = - "WebRTC-VP8-Forced-Fallback-Encoder-v2/Enabled/"; - RtpVideoCodecTypes PayloadNameToRtpVideoCodecType( const std::string& payload_name) { if (payload_name == "VP8") { @@ -224,12 +220,9 @@ class PictureIdObserver : public test::RtpRtcpObserver { }; class PictureIdTest : public test::CallTest, - public ::testing::WithParamInterface< - ::testing::tuple> { + public ::testing::WithParamInterface { public: - PictureIdTest() - : scoped_field_trial_(::testing::get<0>(GetParam())), - num_temporal_layers_(::testing::get<1>(GetParam())) {} + PictureIdTest() : num_temporal_layers_(GetParam()) {} virtual ~PictureIdTest() { EXPECT_EQ(nullptr, video_send_stream_); @@ -249,16 +242,13 @@ class PictureIdTest : public test::CallTest, const std::vector& ssrc_counts); private: - test::ScopedFieldTrials scoped_field_trial_; const size_t num_temporal_layers_; std::unique_ptr observer_; }; -INSTANTIATE_TEST_CASE_P( - TestWithForcedFallbackEncoderEnabled, - PictureIdTest, - ::testing::Combine(::testing::Values(kVp8ForcedFallbackEncoderEnabled, ""), - ::testing::ValuesIn(kNumTemporalLayers))); +INSTANTIATE_TEST_CASE_P(TemporalLayers, + PictureIdTest, + ::testing::ValuesIn(kNumTemporalLayers)); // Use a special stream factory to ensure that all simulcast streams are being // sent. @@ -432,22 +422,13 @@ TEST_P(PictureIdTest, IncreasingAfterRecreateStreamSimulcastEncoderAdapter) { TestPictureIdIncreaseAfterRecreateStreams({1, 3, 3, 1, 1}); } -// When using the simulcast encoder adapter, the picture id is randomly set -// when the ssrc count is reduced and then increased. This means that we are -// not spec compliant in that particular case. TEST_P(PictureIdTest, ContinuousAfterStreamCountChangeSimulcastEncoderAdapter) { - // If forced fallback is enabled, the picture id is set in the PayloadRouter - // and the sequence should be continuous. - if (::testing::get<0>(GetParam()) == kVp8ForcedFallbackEncoderEnabled && - ::testing::get<1>(GetParam()) == 1) { // No temporal layers. - InternalEncoderFactory internal_encoder_factory; - SimulcastEncoderAdapter simulcast_encoder_adapter( - &internal_encoder_factory); - // Make sure that the picture id is not reset if the stream count goes - // down and then up. - SetupEncoder(&simulcast_encoder_adapter, "VP8"); - TestPictureIdContinuousAfterReconfigure({3, 1, 3}); - } + InternalEncoderFactory internal_encoder_factory; + SimulcastEncoderAdapter simulcast_encoder_adapter(&internal_encoder_factory); + // Make sure that the picture id is not reset if the stream count goes + // down and then up. + SetupEncoder(&simulcast_encoder_adapter, "VP8"); + TestPictureIdContinuousAfterReconfigure({3, 1, 3}); } TEST_P(PictureIdTest, IncreasingAfterRecreateStreamVp9) {