| 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 #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" | 8 #include "media/base/media_export.h" |
| 9 | 9 |
| 10 namespace media { | 10 namespace media { |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 RIGHT, | 69 RIGHT, |
| 70 CENTER, | 70 CENTER, |
| 71 LFE, | 71 LFE, |
| 72 BACK_LEFT, | 72 BACK_LEFT, |
| 73 BACK_RIGHT, | 73 BACK_RIGHT, |
| 74 LEFT_OF_CENTER, | 74 LEFT_OF_CENTER, |
| 75 RIGHT_OF_CENTER, | 75 RIGHT_OF_CENTER, |
| 76 BACK_CENTER, | 76 BACK_CENTER, |
| 77 SIDE_LEFT, | 77 SIDE_LEFT, |
| 78 SIDE_RIGHT, | 78 SIDE_RIGHT, |
| 79 STEREO_LEFT, | |
| 80 STEREO_RIGHT, | |
| 81 CHANNELS_MAX | 79 CHANNELS_MAX |
| 82 }; | 80 }; |
| 83 | 81 |
| 84 // Returns the expected channel position in an interleaved stream. Values of -1 | 82 // Returns the expected channel position in an interleaved stream. Values of -1 |
| 85 // mean the channel at that index is not used for that layout. Values range | 83 // mean the channel at that index is not used for that layout. Values range |
| 86 // from 0 to CHANNELS_MAX - 1. | 84 // from 0 to CHANNELS_MAX - 1. |
| 87 MEDIA_EXPORT int ChannelOrder(ChannelLayout layout, Channels channel); | 85 MEDIA_EXPORT int ChannelOrder(ChannelLayout layout, Channels channel); |
| 88 | 86 |
| 89 // Returns the number of channels in a given ChannelLayout. | 87 // Returns the number of channels in a given ChannelLayout. |
| 90 MEDIA_EXPORT int ChannelLayoutToChannelCount(ChannelLayout layout); | 88 MEDIA_EXPORT int ChannelLayoutToChannelCount(ChannelLayout layout); |
| 91 | 89 |
| 92 } // namespace media | 90 } // namespace media |
| 93 | 91 |
| 94 #endif // MEDIA_BASE_CHANNEL_LAYOUT_H_ | 92 #endif // MEDIA_BASE_CHANNEL_LAYOUT_H_ |
| OLD | NEW |