New enum ScalabilityMode.

Used instead of string representation in lower-levels of encoder configuration, to avoid string comparisons (with risk of misspelling) in lots of places.

Bug: webrtc:11607
Change-Id: I4d51c2265aac297c29976d2aa601d8ffb33b7326
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259870
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36706}
This commit is contained in:
Niels Möller
2022-04-29 11:03:13 +02:00
committed by WebRTC LUCI CQ
parent cbf07f70e2
commit 79d566b0cf
33 changed files with 397 additions and 112 deletions

View File

@ -13,8 +13,8 @@
#include <memory>
#include <vector>
#include "absl/strings/string_view.h"
#include "absl/types/optional.h"
#include "api/video_codecs/scalability_mode.h"
#include "modules/video_coding/svc/scalable_video_controller.h"
namespace webrtc {
@ -23,12 +23,12 @@ namespace webrtc {
// https://w3c.github.io/webrtc-svc/#scalabilitymodes*
// Returns nullptr for unknown name.
std::unique_ptr<ScalableVideoController> CreateScalabilityStructure(
absl::string_view name);
ScalabilityMode name);
// Returns descrption of the scalability structure identified by 'name',
// Returns description of the scalability structure identified by 'name',
// Return nullopt for unknown name.
absl::optional<ScalableVideoController::StreamLayersConfig>
ScalabilityStructureConfig(absl::string_view name);
ScalabilityStructureConfig(ScalabilityMode name);
} // namespace webrtc