blob: ac04f072e30a220bb345db70b7f6b301ced0e978 [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";
23 case ScalabilityMode::kL1T2h:
24 return "L1T2h";
25 case ScalabilityMode::kL1T3:
26 return "L1T3";
27 case ScalabilityMode::kL1T3h:
28 return "L1T3h";
29 case ScalabilityMode::kL2T1:
30 return "L2T1";
31 case ScalabilityMode::kL2T1h:
32 return "L2T1h";
33 case ScalabilityMode::kL2T1_KEY:
34 return "L2T1_KEY";
35 case ScalabilityMode::kL2T2:
36 return "L2T2";
37 case ScalabilityMode::kL2T2h:
38 return "L2T2h";
39 case ScalabilityMode::kL2T2_KEY:
40 return "L2T2_KEY";
41 case ScalabilityMode::kL2T2_KEY_SHIFT:
42 return "L2T2_KEY_SHIFT";
43 case ScalabilityMode::kL2T3:
44 return "L2T3";
45 case ScalabilityMode::kL2T3h:
46 return "L2T3h";
47 case ScalabilityMode::kL2T3_KEY:
48 return "L2T3_KEY";
49 case ScalabilityMode::kL3T1:
50 return "L3T1";
51 case ScalabilityMode::kL3T1h:
52 return "L3T1h";
53 case ScalabilityMode::kL3T1_KEY:
54 return "L3T1_KEY";
55 case ScalabilityMode::kL3T2:
56 return "L3T2";
57 case ScalabilityMode::kL3T2h:
58 return "L3T2h";
59 case ScalabilityMode::kL3T2_KEY:
60 return "L3T2_KEY";
61 case ScalabilityMode::kL3T3:
62 return "L3T3";
63 case ScalabilityMode::kL3T3h:
64 return "L3T3h";
65 case ScalabilityMode::kL3T3_KEY:
66 return "L3T3_KEY";
67 case ScalabilityMode::kS2T1:
68 return "S2T1";
Åsa Persson6d051642022-08-29 09:05:00 +020069 case ScalabilityMode::kS2T2:
70 return "S2T2";
Byoungchan Leea1a7c632022-07-05 21:06:28 +090071 case ScalabilityMode::kS2T3:
72 return "S2T3";
Åsa Persson6d051642022-08-29 09:05:00 +020073 case ScalabilityMode::kS3T1:
74 return "S3T1";
75 case ScalabilityMode::kS3T2:
76 return "S3T2";
Byoungchan Leea1a7c632022-07-05 21:06:28 +090077 case ScalabilityMode::kS3T3:
78 return "S3T3";
79 }
80 RTC_CHECK_NOTREACHED();
81}
82
83} // namespace webrtc