Reland "Reland "Move rtp-specific config out of EncoderSettings.""
This reverts commit 6c2c13af06b32778b86950681758a7970d1c5d9e. Reason for revert: Intend to investigate and fix perf problems. Original change's description: > Revert "Reland "Move rtp-specific config out of EncoderSettings."" > > This reverts commit 04dd1768625eb2241d1fb97fd0137897e703e266. > > Reason for revert: Regression in ramp up perf tests. > > Original change's description: > > Reland "Move rtp-specific config out of EncoderSettings." > > > > This is a reland of bc900cb1d1810fcf678fe41cf1e3966daa39c88c > > > > Original change's description: > > > Move rtp-specific config out of EncoderSettings. > > > > > > In VideoSendStream::Config, move payload_name and payload_type from > > > EncoderSettings to Rtp. > > > > > > EncoderSettings now contains configuration for VideoStreamEncoder only, > > > and should perhaps be renamed in a follow up cl. It's no longer > > > passed as an argument to VideoCodecInitializer::SetupCodec. > > > > > > The latter then needs a different way to know the codec type, > > > which is provided by a new codec_type member in VideoEncoderConfig. > > > > > > Bug: webrtc:8830 > > > Change-Id: Ifcc691aef1ee6a95e43c0452c5e630d92a511cd6 > > > Reviewed-on: https://webrtc-review.googlesource.com/62062 > > > Commit-Queue: Niels Moller <nisse@webrtc.org> > > > Reviewed-by: Magnus Jedvert <magjed@webrtc.org> > > > Reviewed-by: Stefan Holmer <stefan@webrtc.org> > > > Reviewed-by: Rasmus Brandt <brandtr@webrtc.org> > > > Cr-Commit-Position: refs/heads/master@{#22532} > > > > Bug: webrtc:8830 > > Change-Id: If88ef7d57cdaa4fae3c7b2a97ea5a6e1b833e019 > > Reviewed-on: https://webrtc-review.googlesource.com/63721 > > Reviewed-by: Rasmus Brandt <brandtr@webrtc.org> > > Reviewed-by: Stefan Holmer <stefan@webrtc.org> > > Commit-Queue: Niels Moller <nisse@webrtc.org> > > Cr-Commit-Position: refs/heads/master@{#22595} > > TBR=brandtr@webrtc.org,magjed@webrtc.org,nisse@webrtc.org,stefan@webrtc.org > > Bug: webrtc:8830,chromium:827080 > Change-Id: Iaaf146de91ec5c0d741b8efdf143f7e173084fef > Reviewed-on: https://webrtc-review.googlesource.com/65520 > Commit-Queue: Niels Moller <nisse@webrtc.org> > Reviewed-by: Niels Moller <nisse@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#22677} TBR=brandtr@webrtc.org,magjed@webrtc.org,nisse@webrtc.org,stefan@webrtc.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: webrtc:8830, chromium:827080 Change-Id: I9b62987bf5daced90dfeb3ebb6739c80117c487f Reviewed-on: https://webrtc-review.googlesource.com/66862 Commit-Queue: Niels Moller <nisse@webrtc.org> Reviewed-by: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#22751}
This commit is contained in:
@ -118,10 +118,9 @@ class BitrateEstimatorTest : public test::CallTest {
|
||||
video_send_config_.rtp.ssrcs.push_back(kVideoSendSsrcs[0]);
|
||||
// Encoders will be set separately per stream.
|
||||
video_send_config_.encoder_settings.encoder = nullptr;
|
||||
video_send_config_.encoder_settings.payload_name = "FAKE";
|
||||
video_send_config_.encoder_settings.payload_type =
|
||||
kFakeVideoSendPayloadType;
|
||||
test::FillEncoderConfiguration(1, &video_encoder_config_);
|
||||
video_send_config_.rtp.payload_name = "FAKE";
|
||||
video_send_config_.rtp.payload_type = kFakeVideoSendPayloadType;
|
||||
test::FillEncoderConfiguration(kVideoCodecVP8, 1, &video_encoder_config_);
|
||||
|
||||
receive_config_ = VideoReceiveStream::Config(receive_transport_.get());
|
||||
// receive_config_.decoders will be set by every stream separately.
|
||||
@ -182,10 +181,8 @@ class BitrateEstimatorTest : public test::CallTest {
|
||||
|
||||
VideoReceiveStream::Decoder decoder;
|
||||
decoder.decoder = &fake_decoder_;
|
||||
decoder.payload_type =
|
||||
test_->video_send_config_.encoder_settings.payload_type;
|
||||
decoder.payload_name =
|
||||
test_->video_send_config_.encoder_settings.payload_name;
|
||||
decoder.payload_type = test_->video_send_config_.rtp.payload_type;
|
||||
decoder.payload_name = test_->video_send_config_.rtp.payload_name;
|
||||
test_->receive_config_.decoders.clear();
|
||||
test_->receive_config_.decoders.push_back(decoder);
|
||||
test_->receive_config_.rtp.remote_ssrc =
|
||||
|
||||
@ -135,8 +135,8 @@ std::unique_ptr<rtclog::StreamConfig> CreateRtcLogStreamConfig(
|
||||
rtclog_config->rtcp_mode = config.rtp.rtcp_mode;
|
||||
rtclog_config->rtp_extensions = config.rtp.extensions;
|
||||
|
||||
rtclog_config->codecs.emplace_back(config.encoder_settings.payload_name,
|
||||
config.encoder_settings.payload_type,
|
||||
rtclog_config->codecs.emplace_back(config.rtp.payload_name,
|
||||
config.rtp.payload_type,
|
||||
config.rtp.rtx.payload_type);
|
||||
return rtclog_config;
|
||||
}
|
||||
|
||||
@ -220,7 +220,7 @@ void RampUpTester::ModifyVideoConfigs(
|
||||
recv_config.rtp.rtx_ssrc = video_rtx_ssrcs_[i];
|
||||
recv_config.rtp
|
||||
.rtx_associated_payload_types[send_config->rtp.rtx.payload_type] =
|
||||
send_config->encoder_settings.payload_type;
|
||||
send_config->rtp.payload_type;
|
||||
}
|
||||
++i;
|
||||
}
|
||||
|
||||
@ -126,10 +126,6 @@ class VideoEncoderConfig {
|
||||
~VideoEncoderConfig();
|
||||
std::string ToString() const;
|
||||
|
||||
// TODO(nisse): This codec_type member is intended to be the new way
|
||||
// to say which codec to use, when
|
||||
// VideoSendStream::Config::EncoderSettings::payload_name is
|
||||
// deleted. For the transition, both need to coexist.
|
||||
VideoCodecType codec_type;
|
||||
rtc::scoped_refptr<VideoStreamFactoryInterface> video_stream_factory;
|
||||
std::vector<SpatialLayer> spatial_layers;
|
||||
|
||||
@ -91,9 +91,7 @@ std::string VideoSendStream::Config::ToString() const {
|
||||
std::string VideoSendStream::Config::EncoderSettings::ToString() const {
|
||||
char buf[1024];
|
||||
rtc::SimpleStringBuilder ss(buf);
|
||||
ss << "{payload_name: " << payload_name;
|
||||
ss << ", payload_type: " << payload_type;
|
||||
ss << ", encoder_factory: "
|
||||
ss << "{encoder_factory: "
|
||||
<< (encoder_factory ? "(VideoEncoderFactory)" : "(nullptr)");
|
||||
ss << ", encoder: " << (encoder ? "(VideoEncoder)" : "nullptr");
|
||||
ss << '}';
|
||||
@ -132,6 +130,8 @@ std::string VideoSendStream::Config::Rtp::ToString() const {
|
||||
|
||||
ss << ", nack: {rtp_history_ms: " << nack.rtp_history_ms << '}';
|
||||
ss << ", ulpfec: " << ulpfec.ToString();
|
||||
ss << ", payload_name: " << payload_name;
|
||||
ss << ", payload_type: " << payload_type;
|
||||
|
||||
ss << ", flexfec: {payload_type: " << flexfec.payload_type;
|
||||
ss << ", ssrc: " << flexfec.ssrc;
|
||||
|
||||
@ -113,19 +113,9 @@ class VideoSendStream {
|
||||
|
||||
struct EncoderSettings {
|
||||
EncoderSettings() = default;
|
||||
EncoderSettings(std::string payload_name,
|
||||
int payload_type,
|
||||
VideoEncoder* encoder)
|
||||
: payload_name(std::move(payload_name)),
|
||||
payload_type(payload_type),
|
||||
encoder(encoder) {}
|
||||
explicit EncoderSettings(VideoEncoder* encoder) : encoder(encoder) {}
|
||||
std::string ToString() const;
|
||||
|
||||
// TODO(nisse): About to be deleted. Unused if the corresponding
|
||||
// fields in the below Rtp struct are set.
|
||||
std::string payload_name;
|
||||
int payload_type = -1;
|
||||
|
||||
// TODO(sophiechang): Delete this field when no one is using internal
|
||||
// sources anymore.
|
||||
bool internal_source = false;
|
||||
|
||||
Reference in New Issue
Block a user