Byoungchan Lee | a1a7c63 | 2022-07-05 21:06:28 +0900 | [diff] [blame] | 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 | |
| 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"; |
Byoungchan Lee | a1a7c63 | 2022-07-05 21:06:28 +0900 | [diff] [blame] | 23 | case ScalabilityMode::kL1T3: |
| 24 | return "L1T3"; |
Byoungchan Lee | a1a7c63 | 2022-07-05 21:06:28 +0900 | [diff] [blame] | 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"; |
Åsa Persson | ecfe8da | 2022-08-31 09:46:41 +0200 | [diff] [blame] | 65 | case ScalabilityMode::kS2T1h: |
| 66 | return "S2T1h"; |
Åsa Persson | 6d05164 | 2022-08-29 09:05:00 +0200 | [diff] [blame] | 67 | case ScalabilityMode::kS2T2: |
| 68 | return "S2T2"; |
Åsa Persson | ecfe8da | 2022-08-31 09:46:41 +0200 | [diff] [blame] | 69 | case ScalabilityMode::kS2T2h: |
| 70 | return "S2T2h"; |
Byoungchan Lee | a1a7c63 | 2022-07-05 21:06:28 +0900 | [diff] [blame] | 71 | case ScalabilityMode::kS2T3: |
| 72 | return "S2T3"; |
Åsa Persson | ecfe8da | 2022-08-31 09:46:41 +0200 | [diff] [blame] | 73 | case ScalabilityMode::kS2T3h: |
| 74 | return "S2T3h"; |
Åsa Persson | 6d05164 | 2022-08-29 09:05:00 +0200 | [diff] [blame] | 75 | case ScalabilityMode::kS3T1: |
| 76 | return "S3T1"; |
Åsa Persson | ecfe8da | 2022-08-31 09:46:41 +0200 | [diff] [blame] | 77 | case ScalabilityMode::kS3T1h: |
| 78 | return "S3T1h"; |
Åsa Persson | 6d05164 | 2022-08-29 09:05:00 +0200 | [diff] [blame] | 79 | case ScalabilityMode::kS3T2: |
| 80 | return "S3T2"; |
Åsa Persson | ecfe8da | 2022-08-31 09:46:41 +0200 | [diff] [blame] | 81 | case ScalabilityMode::kS3T2h: |
| 82 | return "S3T2h"; |
Byoungchan Lee | a1a7c63 | 2022-07-05 21:06:28 +0900 | [diff] [blame] | 83 | case ScalabilityMode::kS3T3: |
| 84 | return "S3T3"; |
Åsa Persson | ecfe8da | 2022-08-31 09:46:41 +0200 | [diff] [blame] | 85 | case ScalabilityMode::kS3T3h: |
| 86 | return "S3T3h"; |
Byoungchan Lee | a1a7c63 | 2022-07-05 21:06:28 +0900 | [diff] [blame] | 87 | } |
| 88 | RTC_CHECK_NOTREACHED(); |
| 89 | } |
| 90 | |
| 91 | } // namespace webrtc |