Adds RTPSenderVideo::Config struct with red/ulpfec config

This CL moves the various parameters in the the RTPSenderVideo ctor into
a struct, and adds the red/ulpfec payload types to it.
Once the downstream usage of SetUlpfecConfig() is gone, we can make
those members const and avoid locking in SendVideo().

Bug: webrtc:10809
Change-Id: I9a96ab5b2a4eb2997ebf4a3a3e3cd2eb5715fd79
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/155365
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29384}
This commit is contained in:
Erik Språng
2019-10-04 15:17:29 +02:00
committed by Commit Bot
parent b9bfe655d4
commit dc34a25ca4
7 changed files with 307 additions and 177 deletions

View File

@ -178,9 +178,13 @@ class RtpRtcpImplTest : public ::testing::Test {
sender_.impl_->SetSequenceNumber(kSequenceNumber);
sender_.impl_->SetStorePacketsStatus(true, 100);
sender_video_ = std::make_unique<RTPSenderVideo>(
&clock_, sender_.impl_->RtpSender(), nullptr, &playout_delay_oracle_,
nullptr, false, false, false, FieldTrialBasedConfig());
FieldTrialBasedConfig field_trials;
RTPSenderVideo::Config video_config;
video_config.clock = &clock_;
video_config.rtp_sender = sender_.impl_->RtpSender();
video_config.playout_delay_oracle = &playout_delay_oracle_;
video_config.field_trials = &field_trials;
sender_video_ = std::make_unique<RTPSenderVideo>(video_config);
memset(&codec_, 0, sizeof(VideoCodec));
codec_.plType = 100;