mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-12 21:30:45 +01:00

Added modes: - S2T1h - S2T2h - S2T3h - S3T1h - S3T2h - S3T3h Bug: webrtc:13960 Change-Id: I618a30c68b0ce1609847ee33a2298fe8fa0720c9 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273664 Reviewed-by: Florent Castelli <orphis@webrtc.org> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org> Commit-Queue: Åsa Persson <asapersson@webrtc.org> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Cr-Commit-Position: refs/heads/main@{#37968}
111 lines
2.7 KiB
C++
111 lines
2.7 KiB
C++
/*
|
|
* Copyright (c) 2022 The WebRTC project authors. All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license
|
|
* that can be found in the LICENSE file in the root of the source
|
|
* tree. An additional intellectual property rights grant can be found
|
|
* in the file PATENTS. All contributing project authors may
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
*/
|
|
|
|
#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
|
|
// PeerConnection-level apis where scalability mode is represented as a string.
|
|
// 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 : uint8_t {
|
|
kL1T1,
|
|
kL1T2,
|
|
kL1T3,
|
|
kL2T1,
|
|
kL2T1h,
|
|
kL2T1_KEY,
|
|
kL2T2,
|
|
kL2T2h,
|
|
kL2T2_KEY,
|
|
kL2T2_KEY_SHIFT,
|
|
kL2T3,
|
|
kL2T3h,
|
|
kL2T3_KEY,
|
|
kL3T1,
|
|
kL3T1h,
|
|
kL3T1_KEY,
|
|
kL3T2,
|
|
kL3T2h,
|
|
kL3T2_KEY,
|
|
kL3T3,
|
|
kL3T3h,
|
|
kL3T3_KEY,
|
|
kS2T1,
|
|
kS2T1h,
|
|
kS2T2,
|
|
kS2T2h,
|
|
kS2T3,
|
|
kS2T3h,
|
|
kS3T1,
|
|
kS3T1h,
|
|
kS3T2,
|
|
kS3T2h,
|
|
kS3T3,
|
|
kS3T3h,
|
|
};
|
|
|
|
inline constexpr ScalabilityMode kAllScalabilityModes[] = {
|
|
// clang-format off
|
|
ScalabilityMode::kL1T1,
|
|
ScalabilityMode::kL1T2,
|
|
ScalabilityMode::kL1T3,
|
|
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::kS2T1h,
|
|
ScalabilityMode::kS2T2,
|
|
ScalabilityMode::kS2T2h,
|
|
ScalabilityMode::kS2T3,
|
|
ScalabilityMode::kS2T3h,
|
|
ScalabilityMode::kS3T1,
|
|
ScalabilityMode::kS3T1h,
|
|
ScalabilityMode::kS3T2,
|
|
ScalabilityMode::kS3T2h,
|
|
ScalabilityMode::kS3T3,
|
|
ScalabilityMode::kS3T3h,
|
|
// 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_
|