Let PCF.GetRtpSenderCapabilities return codecs' scalabilityModes.
Also move ScalabilityModeToString to api and add RTC_EXPORT so that Chromium can use it. Bug: chromium:986069 Change-Id: I5dbbb6de9b14ca20f3ae0630552dcd44595ad5ef Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267780 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Daniel.L (Byoungchan) Lee <daniel.l@hpcnt.com> Cr-Commit-Position: refs/heads/main@{#37444}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
e1c707c40f
commit
a1a7c638ec
@ -11,6 +11,12 @@
|
||||
#ifndef API_VIDEO_CODECS_SCALABILITY_MODE_H_
|
||||
#define API_VIDEO_CODECS_SCALABILITY_MODE_H_
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "rtc_base/system/rtc_export.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
// Supported scalability modes. Most applications should use the
|
||||
@ -18,7 +24,7 @@ namespace webrtc {
|
||||
// This list of currently recognized modes is intended for the api boundary
|
||||
// between webrtc and injected encoders. Any application usage outside of
|
||||
// injected encoders is strongly discouraged.
|
||||
enum class ScalabilityMode {
|
||||
enum class ScalabilityMode : uint8_t {
|
||||
kL1T1,
|
||||
kL1T2,
|
||||
kL1T2h,
|
||||
@ -48,5 +54,44 @@ enum class ScalabilityMode {
|
||||
kS3T3,
|
||||
};
|
||||
|
||||
inline constexpr ScalabilityMode kAllScalabilityModes[] = {
|
||||
// clang-format off
|
||||
ScalabilityMode::kL1T1,
|
||||
ScalabilityMode::kL1T2,
|
||||
ScalabilityMode::kL1T2h,
|
||||
ScalabilityMode::kL1T3,
|
||||
ScalabilityMode::kL1T3h,
|
||||
ScalabilityMode::kL2T1,
|
||||
ScalabilityMode::kL2T1h,
|
||||
ScalabilityMode::kL2T1_KEY,
|
||||
ScalabilityMode::kL2T2,
|
||||
ScalabilityMode::kL2T2h,
|
||||
ScalabilityMode::kL2T2_KEY,
|
||||
ScalabilityMode::kL2T2_KEY_SHIFT,
|
||||
ScalabilityMode::kL2T3,
|
||||
ScalabilityMode::kL2T3h,
|
||||
ScalabilityMode::kL2T3_KEY,
|
||||
ScalabilityMode::kL3T1,
|
||||
ScalabilityMode::kL3T1h,
|
||||
ScalabilityMode::kL3T1_KEY,
|
||||
ScalabilityMode::kL3T2,
|
||||
ScalabilityMode::kL3T2h,
|
||||
ScalabilityMode::kL3T2_KEY,
|
||||
ScalabilityMode::kL3T3,
|
||||
ScalabilityMode::kL3T3h,
|
||||
ScalabilityMode::kL3T3_KEY,
|
||||
ScalabilityMode::kS2T1,
|
||||
ScalabilityMode::kS2T3,
|
||||
ScalabilityMode::kS3T3,
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
inline constexpr size_t kScalabilityModeCount =
|
||||
sizeof(kAllScalabilityModes) / sizeof(ScalabilityMode);
|
||||
|
||||
RTC_EXPORT
|
||||
absl::string_view ScalabilityModeToString(ScalabilityMode scalability_mode);
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // API_VIDEO_CODECS_SCALABILITY_MODE_H_
|
||||
|
||||
Reference in New Issue
Block a user