xref: /aosp_15_r20/external/webrtc/api/video_codecs/scalability_mode.cc (revision d9f758449e529ab9291ac668be2861e7a55c2422)
1 /*
2  *  Copyright (c) 2022 The WebRTC project authors. All Rights Reserved.
3  *
4  *  Use of this source code is governed by a BSD-style license
5  *  that can be found in the LICENSE file in the root of the source
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS.  All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10 
11 #include "api/video_codecs/scalability_mode.h"
12 
13 #include "rtc_base/checks.h"
14 
15 namespace webrtc {
16 
ScalabilityModeToString(ScalabilityMode scalability_mode)17 absl::string_view ScalabilityModeToString(ScalabilityMode scalability_mode) {
18   switch (scalability_mode) {
19     case ScalabilityMode::kL1T1:
20       return "L1T1";
21     case ScalabilityMode::kL1T2:
22       return "L1T2";
23     case ScalabilityMode::kL1T3:
24       return "L1T3";
25     case ScalabilityMode::kL2T1:
26       return "L2T1";
27     case ScalabilityMode::kL2T1h:
28       return "L2T1h";
29     case ScalabilityMode::kL2T1_KEY:
30       return "L2T1_KEY";
31     case ScalabilityMode::kL2T2:
32       return "L2T2";
33     case ScalabilityMode::kL2T2h:
34       return "L2T2h";
35     case ScalabilityMode::kL2T2_KEY:
36       return "L2T2_KEY";
37     case ScalabilityMode::kL2T2_KEY_SHIFT:
38       return "L2T2_KEY_SHIFT";
39     case ScalabilityMode::kL2T3:
40       return "L2T3";
41     case ScalabilityMode::kL2T3h:
42       return "L2T3h";
43     case ScalabilityMode::kL2T3_KEY:
44       return "L2T3_KEY";
45     case ScalabilityMode::kL3T1:
46       return "L3T1";
47     case ScalabilityMode::kL3T1h:
48       return "L3T1h";
49     case ScalabilityMode::kL3T1_KEY:
50       return "L3T1_KEY";
51     case ScalabilityMode::kL3T2:
52       return "L3T2";
53     case ScalabilityMode::kL3T2h:
54       return "L3T2h";
55     case ScalabilityMode::kL3T2_KEY:
56       return "L3T2_KEY";
57     case ScalabilityMode::kL3T3:
58       return "L3T3";
59     case ScalabilityMode::kL3T3h:
60       return "L3T3h";
61     case ScalabilityMode::kL3T3_KEY:
62       return "L3T3_KEY";
63     case ScalabilityMode::kS2T1:
64       return "S2T1";
65     case ScalabilityMode::kS2T1h:
66       return "S2T1h";
67     case ScalabilityMode::kS2T2:
68       return "S2T2";
69     case ScalabilityMode::kS2T2h:
70       return "S2T2h";
71     case ScalabilityMode::kS2T3:
72       return "S2T3";
73     case ScalabilityMode::kS2T3h:
74       return "S2T3h";
75     case ScalabilityMode::kS3T1:
76       return "S3T1";
77     case ScalabilityMode::kS3T1h:
78       return "S3T1h";
79     case ScalabilityMode::kS3T2:
80       return "S3T2";
81     case ScalabilityMode::kS3T2h:
82       return "S3T2h";
83     case ScalabilityMode::kS3T3:
84       return "S3T3";
85     case ScalabilityMode::kS3T3h:
86       return "S3T3h";
87   }
88   RTC_CHECK_NOTREACHED();
89 }
90 
91 }  // namespace webrtc
92