blob: c449b4217e028d2ee9084fe6c4d7f85802129f2c [file] [log] [blame]
Byoungchan Leea1a7c632022-07-05 21:06:28 +09001/*
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
15namespace webrtc {
16
17absl::string_view ScalabilityModeToString(ScalabilityMode scalability_mode) {
18 switch (scalability_mode) {
19 case ScalabilityMode::kL1T1:
20 return "L1T1";
21 case ScalabilityMode::kL1T2:
22 return "L1T2";
Byoungchan Leea1a7c632022-07-05 21:06:28 +090023 case ScalabilityMode::kL1T3:
24 return "L1T3";
Byoungchan Leea1a7c632022-07-05 21:06:28 +090025 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";
Åsa Perssonecfe8da2022-08-31 09:46:41 +020065 case ScalabilityMode::kS2T1h:
66 return "S2T1h";
Åsa Persson6d051642022-08-29 09:05:00 +020067 case ScalabilityMode::kS2T2:
68 return "S2T2";
Åsa Perssonecfe8da2022-08-31 09:46:41 +020069 case ScalabilityMode::kS2T2h:
70 return "S2T2h";
Byoungchan Leea1a7c632022-07-05 21:06:28 +090071 case ScalabilityMode::kS2T3:
72 return "S2T3";
Åsa Perssonecfe8da2022-08-31 09:46:41 +020073 case ScalabilityMode::kS2T3h:
74 return "S2T3h";
Åsa Persson6d051642022-08-29 09:05:00 +020075 case ScalabilityMode::kS3T1:
76 return "S3T1";
Åsa Perssonecfe8da2022-08-31 09:46:41 +020077 case ScalabilityMode::kS3T1h:
78 return "S3T1h";
Åsa Persson6d051642022-08-29 09:05:00 +020079 case ScalabilityMode::kS3T2:
80 return "S3T2";
Åsa Perssonecfe8da2022-08-31 09:46:41 +020081 case ScalabilityMode::kS3T2h:
82 return "S3T2h";
Byoungchan Leea1a7c632022-07-05 21:06:28 +090083 case ScalabilityMode::kS3T3:
84 return "S3T3";
Åsa Perssonecfe8da2022-08-31 09:46:41 +020085 case ScalabilityMode::kS3T3h:
86 return "S3T3h";
Byoungchan Leea1a7c632022-07-05 21:06:28 +090087 }
88 RTC_CHECK_NOTREACHED();
89}
90
91} // namespace webrtc