Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: media/base/channel_layout.h

Issue 148553003: Clean up histogram'd media enum max values. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: adjust comment Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 // Front L, Front R, Front C, Back L, Back R, LFE, Front LofC, Front RofC 93 // Front L, Front R, Front C, Back L, Back R, LFE, Front LofC, Front RofC
94 CHANNEL_LAYOUT_7_1_WIDE_BACK = 27, 94 CHANNEL_LAYOUT_7_1_WIDE_BACK = 27,
95 95
96 // Front L, Front R, Front C, Side L, Side R, Rear C, Back L, Back R. 96 // Front L, Front R, Front C, Side L, Side R, Rear C, Back L, Back R.
97 CHANNEL_LAYOUT_OCTAGONAL = 28, 97 CHANNEL_LAYOUT_OCTAGONAL = 28,
98 98
99 // Channels are not explicitly mapped to speakers. 99 // Channels are not explicitly mapped to speakers.
100 CHANNEL_LAYOUT_DISCRETE = 29, 100 CHANNEL_LAYOUT_DISCRETE = 29,
101 101
102 // Total number of layouts. 102 // Total number of layouts.
scherkus (not reviewing) 2014/01/27 22:37:31 I'd update this to reflect its use w/ histrogrammi
103 CHANNEL_LAYOUT_MAX // Must always be last! 103 CHANNEL_LAYOUT_HISTOGRAM_MAX // Must always be last!
104 }; 104 };
105 105
106 enum Channels { 106 enum Channels {
107 LEFT = 0, 107 LEFT = 0,
108 RIGHT, 108 RIGHT,
109 CENTER, 109 CENTER,
110 LFE, 110 LFE,
111 BACK_LEFT, 111 BACK_LEFT,
112 BACK_RIGHT, 112 BACK_RIGHT,
113 LEFT_OF_CENTER, 113 LEFT_OF_CENTER,
114 RIGHT_OF_CENTER, 114 RIGHT_OF_CENTER,
115 BACK_CENTER, 115 BACK_CENTER,
116 SIDE_LEFT, 116 SIDE_LEFT,
117 SIDE_RIGHT, 117 SIDE_RIGHT,
118 CHANNELS_MAX 118 CHANNELS_HISTOGRAM_MAX
119 }; 119 };
120 120
121 // Returns the expected channel position in an interleaved stream. Values of -1 121 // Returns the expected channel position in an interleaved stream. Values of -1
122 // mean the channel at that index is not used for that layout. Values range 122 // mean the channel at that index is not used for that layout. Values range
123 // from 0 to CHANNELS_MAX - 1. 123 // from 0 to CHANNELS_MAX - 1.
124 MEDIA_EXPORT int ChannelOrder(ChannelLayout layout, Channels channel); 124 MEDIA_EXPORT int ChannelOrder(ChannelLayout layout, Channels channel);
125 125
126 // Returns the number of channels in a given ChannelLayout. 126 // Returns the number of channels in a given ChannelLayout.
127 MEDIA_EXPORT int ChannelLayoutToChannelCount(ChannelLayout layout); 127 MEDIA_EXPORT int ChannelLayoutToChannelCount(ChannelLayout layout);
128 128
129 // Given the number of channels, return the best layout, 129 // Given the number of channels, return the best layout,
130 // or return CHANNEL_LAYOUT_UNSUPPORTED if there is no good match. 130 // or return CHANNEL_LAYOUT_UNSUPPORTED if there is no good match.
131 MEDIA_EXPORT ChannelLayout GuessChannelLayout(int channels); 131 MEDIA_EXPORT ChannelLayout GuessChannelLayout(int channels);
132 132
133 // Returns a string representation of the channel layout. 133 // Returns a string representation of the channel layout.
134 MEDIA_EXPORT const char* ChannelLayoutToString(ChannelLayout layout); 134 MEDIA_EXPORT const char* ChannelLayoutToString(ChannelLayout layout);
135 135
136 } // namespace media 136 } // namespace media
137 137
138 #endif // MEDIA_BASE_CHANNEL_LAYOUT_H_ 138 #endif // MEDIA_BASE_CHANNEL_LAYOUT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698