Revert "Add support for RtpEncodingParameters::max_framerate"
This reverts commit 15be5282e91ba38894e6ad51fe9a35a38a6b7f29. Reason for revert: crbug.com/1028937 Original change's description: > Add support for RtpEncodingParameters::max_framerate > > This adds the framework support for the max_framerate parameter. > It doesn't implement it in any encoder yet. > > Bug: webrtc:11117 > Change-Id: I329624cc0205c828498d3623a2e13dd3f97e1629 > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/160184 > Reviewed-by: Steve Anton <steveanton@webrtc.org> > Reviewed-by: Erik Språng <sprang@webrtc.org> > Reviewed-by: Åsa Persson <asapersson@webrtc.org> > Commit-Queue: Florent Castelli <orphis@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#29907} TBR=steveanton@webrtc.org,asapersson@webrtc.org,sprang@webrtc.org,orphis@webrtc.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: webrtc:11117 Change-Id: Ic44dd36bea66561f0c46e73db89d451cb3e22773 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/160941 Reviewed-by: Florent Castelli <orphis@webrtc.org> Commit-Queue: Florent Castelli <orphis@webrtc.org> Cr-Commit-Position: refs/heads/master@{#29935}
This commit is contained in:

committed by
Commit Bot

parent
8861d02f89
commit
5cef9c3581
@ -89,13 +89,17 @@ VideoCodec VideoCodecInitializer::VideoEncoderConfigToVideoCodec(
|
||||
kDefaultOutlierFrameSizePercent};
|
||||
RTC_DCHECK_LE(streams.size(), kMaxSimulcastStreams);
|
||||
|
||||
int max_framerate = 0;
|
||||
|
||||
for (size_t i = 0; i < streams.size(); ++i) {
|
||||
SimulcastStream* sim_stream = &video_codec.simulcastStream[i];
|
||||
RTC_DCHECK_GT(streams[i].width, 0);
|
||||
RTC_DCHECK_GT(streams[i].height, 0);
|
||||
RTC_DCHECK_GT(streams[i].max_framerate, 0);
|
||||
// Different framerates not supported per stream at the moment, unless it's
|
||||
// screenshare where there is an exception and a simulcast encoder adapter,
|
||||
// which supports different framerates, is used instead.
|
||||
if (config.content_type != VideoEncoderConfig::ContentType::kScreen) {
|
||||
RTC_DCHECK_EQ(streams[i].max_framerate, streams[0].max_framerate);
|
||||
}
|
||||
RTC_DCHECK_GE(streams[i].min_bitrate_bps, 0);
|
||||
RTC_DCHECK_GE(streams[i].target_bitrate_bps, streams[i].min_bitrate_bps);
|
||||
RTC_DCHECK_GE(streams[i].max_bitrate_bps, streams[i].target_bitrate_bps);
|
||||
@ -122,7 +126,6 @@ VideoCodec VideoCodecInitializer::VideoEncoderConfigToVideoCodec(
|
||||
video_codec.maxBitrate += streams[i].max_bitrate_bps / 1000;
|
||||
video_codec.qpMax = std::max(video_codec.qpMax,
|
||||
static_cast<unsigned int>(streams[i].max_qp));
|
||||
max_framerate = std::max(max_framerate, streams[i].max_framerate);
|
||||
}
|
||||
|
||||
if (video_codec.maxBitrate == 0) {
|
||||
@ -134,7 +137,8 @@ VideoCodec VideoCodecInitializer::VideoEncoderConfigToVideoCodec(
|
||||
if (video_codec.maxBitrate < kEncoderMinBitrateKbps)
|
||||
video_codec.maxBitrate = kEncoderMinBitrateKbps;
|
||||
|
||||
video_codec.maxFramerate = max_framerate;
|
||||
RTC_DCHECK_GT(streams[0].max_framerate, 0);
|
||||
video_codec.maxFramerate = streams[0].max_framerate;
|
||||
|
||||
// Set codec specific options
|
||||
if (config.encoder_specific_settings)
|
||||
|
Reference in New Issue
Block a user