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

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

Issue 10914203: Add UMA reporting for audio hardware parameters. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments. Created 8 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « media/audio/sample_rates.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Enumerates the various representations of the ordering of audio channels.
11 // Logged to UMA, so never reuse a value, always add new/greater ones!
10 enum ChannelLayout { 12 enum ChannelLayout {
11 CHANNEL_LAYOUT_NONE = 0, 13 CHANNEL_LAYOUT_NONE = 0,
12 CHANNEL_LAYOUT_UNSUPPORTED, 14 CHANNEL_LAYOUT_UNSUPPORTED = 1,
13 15
14 // Front C 16 // Front C
15 CHANNEL_LAYOUT_MONO, 17 CHANNEL_LAYOUT_MONO = 2,
16 18
17 // Front L, Front R 19 // Front L, Front R
18 CHANNEL_LAYOUT_STEREO, 20 CHANNEL_LAYOUT_STEREO = 3,
19 21
20 // Front L, Front R, Back C 22 // Front L, Front R, Back C
21 CHANNEL_LAYOUT_2_1, 23 CHANNEL_LAYOUT_2_1 = 4,
22 24
23 // Front L, Front R, Front C 25 // Front L, Front R, Front C
24 CHANNEL_LAYOUT_SURROUND, 26 CHANNEL_LAYOUT_SURROUND = 5,
25 27
26 // Front L, Front R, Front C, Back C 28 // Front L, Front R, Front C, Back C
27 CHANNEL_LAYOUT_4_0, 29 CHANNEL_LAYOUT_4_0 = 6,
28 30
29 // Front L, Front R, Side L, Side R 31 // Front L, Front R, Side L, Side R
30 CHANNEL_LAYOUT_2_2, 32 CHANNEL_LAYOUT_2_2 = 7,
31 33
32 // Front L, Front R, Back L, Back R 34 // Front L, Front R, Back L, Back R
33 CHANNEL_LAYOUT_QUAD, 35 CHANNEL_LAYOUT_QUAD = 8,
34 36
35 // Front L, Front R, Front C, Side L, Side R 37 // Front L, Front R, Front C, Side L, Side R
36 CHANNEL_LAYOUT_5_0, 38 CHANNEL_LAYOUT_5_0 = 9,
37 39
38 // Front L, Front R, Front C, Side L, Side R, LFE 40 // Front L, Front R, Front C, Side L, Side R, LFE
39 CHANNEL_LAYOUT_5_1, 41 CHANNEL_LAYOUT_5_1 = 10,
40 42
41 // Front L, Front R, Front C, Back L, Back R 43 // Front L, Front R, Front C, Back L, Back R
42 CHANNEL_LAYOUT_5_0_BACK, 44 CHANNEL_LAYOUT_5_0_BACK = 11,
43 45
44 // Front L, Front R, Front C, Back L, Back R, LFE 46 // Front L, Front R, Front C, Back L, Back R, LFE
45 CHANNEL_LAYOUT_5_1_BACK, 47 CHANNEL_LAYOUT_5_1_BACK = 12,
46 48
47 // Front L, Front R, Front C, Side L, Side R, Back L, Back R 49 // Front L, Front R, Front C, Side L, Side R, Back L, Back R
48 CHANNEL_LAYOUT_7_0, 50 CHANNEL_LAYOUT_7_0 = 13,
49 51
50 // Front L, Front R, Front C, Side L, Side R, LFE, Back L, Back R 52 // Front L, Front R, Front C, Side L, Side R, LFE, Back L, Back R
51 CHANNEL_LAYOUT_7_1, 53 CHANNEL_LAYOUT_7_1 = 14,
52 54
53 // Front L, Front R, Front C, Back L, Back R, LFE, Front LofC, Front RofC 55 // Front L, Front R, Front C, Back L, Back R, LFE, Front LofC, Front RofC
54 CHANNEL_LAYOUT_7_1_WIDE, 56 CHANNEL_LAYOUT_7_1_WIDE = 15,
55 57
56 // Stereo L, Stereo R 58 // Stereo L, Stereo R
57 CHANNEL_LAYOUT_STEREO_DOWNMIX, 59 CHANNEL_LAYOUT_STEREO_DOWNMIX = 16,
58 60
59 // Total number of layouts. 61 // Total number of layouts.
60 CHANNEL_LAYOUT_MAX 62 CHANNEL_LAYOUT_MAX // Must always be last!
61 }; 63 };
62 64
63 enum Channels { 65 enum Channels {
64 LEFT = 0, 66 LEFT = 0,
65 RIGHT, 67 RIGHT,
66 CENTER, 68 CENTER,
67 LFE, 69 LFE,
68 BACK_LEFT, 70 BACK_LEFT,
69 BACK_RIGHT, 71 BACK_RIGHT,
70 LEFT_OF_CENTER, 72 LEFT_OF_CENTER,
(...skipping 12 matching lines...) Expand all
83 // position (because the order is L, R, C, LFE, LS, RS), so 85 // position (because the order is L, R, C, LFE, LS, RS), so
84 // kChannelOrderings[CHANNEL_LAYOUT_5POINT1][SIDE_LEFT] = 4; 86 // kChannelOrderings[CHANNEL_LAYOUT_5POINT1][SIDE_LEFT] = 4;
85 // Values of -1 mean the channel at that index is not used for that layout. 87 // Values of -1 mean the channel at that index is not used for that layout.
86 MEDIA_EXPORT extern const int 88 MEDIA_EXPORT extern const int
87 kChannelOrderings[CHANNEL_LAYOUT_MAX][CHANNELS_MAX]; 89 kChannelOrderings[CHANNEL_LAYOUT_MAX][CHANNELS_MAX];
88 90
89 // Returns the number of channels in a given ChannelLayout. 91 // Returns the number of channels in a given ChannelLayout.
90 MEDIA_EXPORT int ChannelLayoutToChannelCount(ChannelLayout layout); 92 MEDIA_EXPORT int ChannelLayoutToChannelCount(ChannelLayout layout);
91 93
92 #endif // MEDIA_BASE_CHANNEL_LAYOUT_H_ 94 #endif // MEDIA_BASE_CHANNEL_LAYOUT_H_
OLDNEW
« no previous file with comments | « media/audio/sample_rates.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698