Make video scalability mode configurable from peerconnection level.
This CL does not aim at cleaning up simulcast/SVC configuration, just to make it possible to set the scalability mode for AV1. Implementing a codec agnostic SVC/simulcast API is a (big) project on its own. Change-Id: Ia88df31eb1111713e5f8832e95c8db44f92887ca BUG: webrtc:11607 Change-Id: Ia88df31eb1111713e5f8832e95c8db44f92887ca Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/192541 Reviewed-by: Florent Castelli <orphis@webrtc.org> Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org> Reviewed-by: Erik Språng <sprang@webrtc.org> Commit-Queue: Philip Eliasson <philipel@webrtc.org> Cr-Commit-Position: refs/heads/master@{#32631}
This commit is contained in:
@ -94,6 +94,7 @@ VideoCodec VideoCodecInitializer::VideoEncoderConfigToVideoCodec(
|
||||
|
||||
int max_framerate = 0;
|
||||
|
||||
absl::optional<std::string> scalability_mode = streams[0].scalability_mode;
|
||||
for (size_t i = 0; i < streams.size(); ++i) {
|
||||
SpatialLayer* sim_stream = &video_codec.simulcastStream[i];
|
||||
RTC_DCHECK_GT(streams[i].width, 0);
|
||||
@ -126,6 +127,15 @@ VideoCodec VideoCodecInitializer::VideoEncoderConfigToVideoCodec(
|
||||
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 (streams[0].scalability_mode != streams[i].scalability_mode) {
|
||||
RTC_LOG(LS_WARNING) << "Inconsistent scalability modes configured.";
|
||||
scalability_mode.reset();
|
||||
}
|
||||
}
|
||||
|
||||
if (scalability_mode.has_value()) {
|
||||
video_codec.SetScalabilityMode(*scalability_mode);
|
||||
}
|
||||
|
||||
if (video_codec.maxBitrate == 0) {
|
||||
|
Reference in New Issue
Block a user