OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef MEDIA_BASE_CHANNEL_LAYOUT_H_ | 5 #ifndef MEDIA_BASE_CHANNEL_LAYOUT_H_ |
6 #define MEDIA_BASE_CHANNEL_LAYOUT_H_ | 6 #define MEDIA_BASE_CHANNEL_LAYOUT_H_ |
7 | 7 |
8 #include "media/base/media_export.h" | |
9 | |
10 enum ChannelLayout { | 8 enum ChannelLayout { |
11 CHANNEL_LAYOUT_NONE = 0, | 9 CHANNEL_LAYOUT_NONE = 0, |
12 CHANNEL_LAYOUT_UNSUPPORTED, | 10 CHANNEL_LAYOUT_UNSUPPORTED, |
13 | 11 |
14 // Front C | 12 // Front C |
15 CHANNEL_LAYOUT_MONO, | 13 CHANNEL_LAYOUT_MONO, |
16 | 14 |
17 // Front L, Front R | 15 // Front L, Front R |
18 CHANNEL_LAYOUT_STEREO, | 16 CHANNEL_LAYOUT_STEREO, |
19 | 17 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 | 77 |
80 // The channel orderings for each layout as specified by FFmpeg. | 78 // The channel orderings for each layout as specified by FFmpeg. |
81 // Values represent the index of each channel in each layout. For example, the | 79 // Values represent the index of each channel in each layout. For example, the |
82 // left side surround sound channel in FFmpeg's 5.1 layout is in the 5th | 80 // left side surround sound channel in FFmpeg's 5.1 layout is in the 5th |
83 // position (because the order is L, R, C, LFE, LS, RS), so | 81 // position (because the order is L, R, C, LFE, LS, RS), so |
84 // kChannelOrderings[CHANNEL_LAYOUT_5POINT1][SIDE_LEFT] = 4; | 82 // kChannelOrderings[CHANNEL_LAYOUT_5POINT1][SIDE_LEFT] = 4; |
85 // Values of -1 mean the channel at that index is not used for that layout. | 83 // Values of -1 mean the channel at that index is not used for that layout. |
86 extern const int kChannelOrderings[CHANNEL_LAYOUT_MAX][CHANNELS_MAX]; | 84 extern const int kChannelOrderings[CHANNEL_LAYOUT_MAX][CHANNELS_MAX]; |
87 | 85 |
88 // Returns the number of channels in a given ChannelLayout. | 86 // Returns the number of channels in a given ChannelLayout. |
89 MEDIA_EXPORT int ChannelLayoutToChannelCount(ChannelLayout layout); | 87 int ChannelLayoutToChannelCount(ChannelLayout layout); |
90 | 88 |
91 #endif // MEDIA_BASE_CHANNEL_LAYOUT_H_ | 89 #endif // MEDIA_BASE_CHANNEL_LAYOUT_H_ |
OLD | NEW |