mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-29 13:26:33 +01:00
Revert "cleanup obsolete sps-pps-idr field trial"
This reverts commit 4f79b1d2e5
.
Reason for revert: Still used in one project. I'll make a fix for that and then reland this.
Original change's description:
> cleanup obsolete sps-pps-idr field trial
>
> which has been superseeded by the equivalent nonstandard sdp fmtp
> sps-pps-idr-in-keyframe
> parameter.
>
> Bug: webrtc:11769
> Change-Id: I02667a165dd3f86b4685530c43f19531ec654737
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271121
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#37839}
Bug: webrtc:11769
Change-Id: I11e097e00813b7b232e01b236510cbf1b2850843
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272560
Reviewed-by: Philipp Hancke <phancke@microsoft.com>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Auto-Submit: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37862}
This commit is contained in:
parent
e9d58df24d
commit
eb3307f784
5 changed files with 80 additions and 10 deletions
|
@ -225,13 +225,22 @@ TEST_F(CodecEndToEndTest, SendsAndReceivesMultiplexVideoRotation90) {
|
|||
class EndToEndTestH264 : public test::CallTest,
|
||||
public ::testing::WithParamInterface<std::string> {
|
||||
public:
|
||||
EndToEndTestH264() {
|
||||
EndToEndTestH264() : field_trial_(GetParam()) {
|
||||
RegisterRtpExtension(RtpExtension(RtpExtension::kVideoRotationUri,
|
||||
kVideoRotationExtensionId));
|
||||
}
|
||||
|
||||
private:
|
||||
test::ScopedFieldTrials field_trial_;
|
||||
};
|
||||
|
||||
TEST_F(EndToEndTestH264, SendsAndReceivesH264) {
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
SpsPpsIdrIsKeyframe,
|
||||
EndToEndTestH264,
|
||||
::testing::Values("WebRTC-SpsPpsIdrIsH264Keyframe/Disabled/",
|
||||
"WebRTC-SpsPpsIdrIsH264Keyframe/Enabled/"));
|
||||
|
||||
TEST_P(EndToEndTestH264, SendsAndReceivesH264) {
|
||||
test::FunctionVideoEncoderFactory encoder_factory(
|
||||
[]() { return H264Encoder::Create(cricket::VideoCodec("H264")); });
|
||||
test::FunctionVideoDecoderFactory decoder_factory(
|
||||
|
@ -241,7 +250,7 @@ TEST_F(EndToEndTestH264, SendsAndReceivesH264) {
|
|||
RunBaseTest(&test);
|
||||
}
|
||||
|
||||
TEST_F(EndToEndTestH264, SendsAndReceivesH264VideoRotation90) {
|
||||
TEST_P(EndToEndTestH264, SendsAndReceivesH264VideoRotation90) {
|
||||
test::FunctionVideoEncoderFactory encoder_factory(
|
||||
[]() { return H264Encoder::Create(cricket::VideoCodec("H264")); });
|
||||
test::FunctionVideoDecoderFactory decoder_factory(
|
||||
|
@ -251,7 +260,7 @@ TEST_F(EndToEndTestH264, SendsAndReceivesH264VideoRotation90) {
|
|||
RunBaseTest(&test);
|
||||
}
|
||||
|
||||
TEST_F(EndToEndTestH264, SendsAndReceivesH264PacketizationMode0) {
|
||||
TEST_P(EndToEndTestH264, SendsAndReceivesH264PacketizationMode0) {
|
||||
cricket::VideoCodec codec = cricket::VideoCodec("H264");
|
||||
codec.SetParam(cricket::kH264FmtpPacketizationMode, "0");
|
||||
test::FunctionVideoEncoderFactory encoder_factory(
|
||||
|
@ -263,7 +272,7 @@ TEST_F(EndToEndTestH264, SendsAndReceivesH264PacketizationMode0) {
|
|||
RunBaseTest(&test);
|
||||
}
|
||||
|
||||
TEST_F(EndToEndTestH264, SendsAndReceivesH264PacketizationMode1) {
|
||||
TEST_P(EndToEndTestH264, SendsAndReceivesH264PacketizationMode1) {
|
||||
cricket::VideoCodec codec = cricket::VideoCodec("H264");
|
||||
codec.SetParam(cricket::kH264FmtpPacketizationMode, "1");
|
||||
test::FunctionVideoEncoderFactory encoder_factory(
|
||||
|
|
|
@ -425,6 +425,25 @@ TEST(GenericDescriptorTest,
|
|||
fixture->RunWithAnalyzer(foreman_cif);
|
||||
}
|
||||
|
||||
TEST(FullStackTest, Foreman_Cif_Delay_50_0_Plr_5_H264_Sps_Pps_Idr) {
|
||||
test::ScopedFieldTrials override_field_trials(
|
||||
AppendFieldTrials("WebRTC-SpsPpsIdrIsH264Keyframe/Enabled/"));
|
||||
auto fixture = CreateVideoQualityTestFixture();
|
||||
|
||||
ParamsWithLogging foreman_cif;
|
||||
foreman_cif.call.send_side_bwe = true;
|
||||
foreman_cif.video[0] = {
|
||||
true, 352, 288, 30,
|
||||
30000, 500000, 2000000, false,
|
||||
"H264", 1, 0, 0,
|
||||
false, false, true, ClipNameToClipPath("foreman_cif")};
|
||||
foreman_cif.analyzer = {"foreman_cif_delay_50_0_plr_5_H264_sps_pps_idr", 0.0,
|
||||
0.0, kFullStackTestDurationSecs};
|
||||
foreman_cif.config->loss_percent = 5;
|
||||
foreman_cif.config->queue_delay_ms = 50;
|
||||
fixture->RunWithAnalyzer(foreman_cif);
|
||||
}
|
||||
|
||||
// Verify that this is worth the bot time, before enabling.
|
||||
TEST(FullStackTest, Foreman_Cif_Delay_50_0_Plr_5_H264_Flexfec) {
|
||||
auto fixture = CreateVideoQualityTestFixture();
|
||||
|
|
|
@ -614,6 +614,33 @@ TEST(PCGenericDescriptorTest,
|
|||
fixture->Run(RunParams(TimeDelta::Seconds(kTestDurationSec)));
|
||||
}
|
||||
|
||||
TEST(PCFullStackTest, Pc_Foreman_Cif_Delay_50_0_Plr_5_H264_Sps_Pps_Idr) {
|
||||
test::ScopedFieldTrials override_field_trials(
|
||||
AppendFieldTrials("WebRTC-SpsPpsIdrIsH264Keyframe/Enabled/"));
|
||||
|
||||
std::unique_ptr<NetworkEmulationManager> network_emulation_manager =
|
||||
CreateNetworkEmulationManager();
|
||||
BuiltInNetworkBehaviorConfig config;
|
||||
config.loss_percent = 5;
|
||||
config.queue_delay_ms = 50;
|
||||
auto fixture = CreateTestFixture(
|
||||
"pc_foreman_cif_delay_50_0_plr_5_H264_sps_pps_idr",
|
||||
*network_emulation_manager->time_controller(),
|
||||
CreateTwoNetworkLinks(network_emulation_manager.get(), config),
|
||||
[](PeerConfigurer* alice) {
|
||||
VideoConfig video(352, 288, 30);
|
||||
video.stream_label = "alice-video";
|
||||
auto frame_generator = CreateFromYuvFileFrameGenerator(
|
||||
video, ClipNameToClipPath("foreman_cif"));
|
||||
alice->AddVideoConfig(std::move(video), std::move(frame_generator));
|
||||
alice->SetVideoCodecs({VideoCodecConfig(cricket::kH264CodecName)});
|
||||
},
|
||||
[](PeerConfigurer* bob) {
|
||||
bob->SetVideoCodecs({VideoCodecConfig(cricket::kH264CodecName)});
|
||||
});
|
||||
fixture->Run(RunParams(TimeDelta::Seconds(kTestDurationSec)));
|
||||
}
|
||||
|
||||
TEST(PCFullStackTest, Pc_Foreman_Cif_Delay_50_0_Plr_5_H264_Flexfec) {
|
||||
std::unique_ptr<NetworkEmulationManager> network_emulation_manager =
|
||||
CreateNetworkEmulationManager();
|
||||
|
|
|
@ -360,7 +360,8 @@ void RtpVideoStreamReceiver2::AddReceiveCodec(
|
|||
const std::map<std::string, std::string>& codec_params,
|
||||
bool raw_payload) {
|
||||
RTC_DCHECK_RUN_ON(&packet_sequence_checker_);
|
||||
if (codec_params.count(cricket::kH264FmtpSpsPpsIdrInKeyframe)) {
|
||||
if (codec_params.count(cricket::kH264FmtpSpsPpsIdrInKeyframe) ||
|
||||
field_trials_.IsEnabled("WebRTC-SpsPpsIdrIsH264Keyframe")) {
|
||||
packet_buffer_.ForceSpsPpsIdrIsH264Keyframe();
|
||||
}
|
||||
payload_type_map_.emplace(
|
||||
|
|
|
@ -501,7 +501,18 @@ TEST_F(RtpVideoStreamReceiver2Test, GenericKeyFrameBitstreamError) {
|
|||
video_header);
|
||||
}
|
||||
|
||||
TEST_F(RtpVideoStreamReceiver2Test, InBandSpsPps) {
|
||||
class RtpVideoStreamReceiver2TestH264
|
||||
: public RtpVideoStreamReceiver2Test,
|
||||
public ::testing::WithParamInterface<std::string> {
|
||||
protected:
|
||||
RtpVideoStreamReceiver2TestH264() : RtpVideoStreamReceiver2Test(GetParam()) {}
|
||||
};
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(SpsPpsIdrIsKeyframe,
|
||||
RtpVideoStreamReceiver2TestH264,
|
||||
Values("", "WebRTC-SpsPpsIdrIsH264Keyframe/Enabled/"));
|
||||
|
||||
TEST_P(RtpVideoStreamReceiver2TestH264, InBandSpsPps) {
|
||||
rtc::CopyOnWriteBuffer sps_data;
|
||||
RtpPacketReceived rtp_packet;
|
||||
RTPVideoHeader sps_video_header = GetDefaultH264VideoHeader();
|
||||
|
@ -548,7 +559,7 @@ TEST_F(RtpVideoStreamReceiver2Test, InBandSpsPps) {
|
|||
idr_video_header);
|
||||
}
|
||||
|
||||
TEST_F(RtpVideoStreamReceiver2Test, OutOfBandFmtpSpsPps) {
|
||||
TEST_P(RtpVideoStreamReceiver2TestH264, OutOfBandFmtpSpsPps) {
|
||||
constexpr int kPayloadType = 99;
|
||||
std::map<std::string, std::string> codec_params;
|
||||
// Example parameter sets from https://tools.ietf.org/html/rfc3984#section-8.2
|
||||
|
@ -589,10 +600,13 @@ TEST_F(RtpVideoStreamReceiver2Test, OutOfBandFmtpSpsPps) {
|
|||
video_header);
|
||||
}
|
||||
|
||||
TEST_F(RtpVideoStreamReceiver2Test, ForceSpsPpsIdrIsKeyframe) {
|
||||
TEST_P(RtpVideoStreamReceiver2TestH264, ForceSpsPpsIdrIsKeyframe) {
|
||||
constexpr int kPayloadType = 99;
|
||||
std::map<std::string, std::string> codec_params;
|
||||
codec_params.insert({cricket::kH264FmtpSpsPpsIdrInKeyframe, ""});
|
||||
if (GetParam() ==
|
||||
"") { // Forcing can be done either with field trial or codec_params.
|
||||
codec_params.insert({cricket::kH264FmtpSpsPpsIdrInKeyframe, ""});
|
||||
}
|
||||
rtp_video_stream_receiver_->AddReceiveCodec(kPayloadType, kVideoCodecH264,
|
||||
codec_params,
|
||||
/*raw_payload=*/false);
|
||||
|
|
Loading…
Reference in a new issue