| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "media/base/channel_layout.h" | 5 #include "media/base/channel_layout.h" |
| 6 | 6 |
| 7 #include <stddef.h> |
| 8 |
| 7 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/macros.h" |
| 8 | 11 |
| 9 namespace media { | 12 namespace media { |
| 10 | 13 |
| 11 static const int kLayoutToChannels[] = { | 14 static const int kLayoutToChannels[] = { |
| 12 0, // CHANNEL_LAYOUT_NONE | 15 0, // CHANNEL_LAYOUT_NONE |
| 13 0, // CHANNEL_LAYOUT_UNSUPPORTED | 16 0, // CHANNEL_LAYOUT_UNSUPPORTED |
| 14 1, // CHANNEL_LAYOUT_MONO | 17 1, // CHANNEL_LAYOUT_MONO |
| 15 2, // CHANNEL_LAYOUT_STEREO | 18 2, // CHANNEL_LAYOUT_STEREO |
| 16 3, // CHANNEL_LAYOUT_2_1 | 19 3, // CHANNEL_LAYOUT_2_1 |
| 17 3, // CHANNEL_LAYOUT_SURROUND | 20 3, // CHANNEL_LAYOUT_SURROUND |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 case CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC: | 259 case CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC: |
| 257 return "STEREO_AND_KEYBOARD_MIC"; | 260 return "STEREO_AND_KEYBOARD_MIC"; |
| 258 case CHANNEL_LAYOUT_4_1_QUAD_SIDE: | 261 case CHANNEL_LAYOUT_4_1_QUAD_SIDE: |
| 259 return "4.1_QUAD_SIDE"; | 262 return "4.1_QUAD_SIDE"; |
| 260 } | 263 } |
| 261 NOTREACHED() << "Invalid channel layout provided: " << layout; | 264 NOTREACHED() << "Invalid channel layout provided: " << layout; |
| 262 return ""; | 265 return ""; |
| 263 } | 266 } |
| 264 | 267 |
| 265 } // namespace media | 268 } // namespace media |
| OLD | NEW |