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

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

Issue 9655018: Make AudioParameters a class instead of a struct (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix copyright years Created 8 years, 9 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/base/audio_renderer_sink.h ('k') | media/ffmpeg/ffmpeg_common.cc » ('j') | 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) 2011 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 enum ChannelLayout { 10 enum ChannelLayout {
11 CHANNEL_LAYOUT_NONE = 0, 11 CHANNEL_LAYOUT_NONE = 0,
12 CHANNEL_LAYOUT_UNSUPPORTED, 12 CHANNEL_LAYOUT_UNSUPPORTED,
13 13
14 // Front C 14 // Front C
15 CHANNEL_LAYOUT_MONO, 15 CHANNEL_LAYOUT_MONO,
16 16
17 // Front L, Front R 17 // Front L, Front R
18 CHANNEL_LAYOUT_STEREO, 18 CHANNEL_LAYOUT_STEREO,
19 19
20 // Front L, Front R, Back C 20 // Front L, Front R, Back C
21 CHANNEL_LAYOUT_2_1, 21 CHANNEL_LAYOUT_2_1,
22 22
23 // Front L, Front R, Front C 23 // Front L, Front R, Front C
24 CHANNEL_LAYOUT_SURROUND, 24 CHANNEL_LAYOUT_SURROUND,
25 25
26 // Front L, Front R, Front C, Back C 26 // Front L, Front R, Front C, Back C
27 CHANNEL_LAYOUT_4POINT0, 27 CHANNEL_LAYOUT_4_0,
28 28
29 // Front L, Front R, Side L, Side R 29 // Front L, Front R, Side L, Side R
30 CHANNEL_LAYOUT_2_2, 30 CHANNEL_LAYOUT_2_2,
31 31
32 // Front L, Front R, Back L, Back R 32 // Front L, Front R, Back L, Back R
33 CHANNEL_LAYOUT_QUAD, 33 CHANNEL_LAYOUT_QUAD,
34 34
35 // Front L, Front R, Front C, Side L, Side R 35 // Front L, Front R, Front C, Side L, Side R
36 CHANNEL_LAYOUT_5POINT0, 36 CHANNEL_LAYOUT_5_0,
37 37
38 // Front L, Front R, Front C, Side L, Side R, LFE 38 // Front L, Front R, Front C, Side L, Side R, LFE
39 CHANNEL_LAYOUT_5POINT1, 39 CHANNEL_LAYOUT_5_1,
40 40
41 // Front L, Front R, Front C, Back L, Back R 41 // Front L, Front R, Front C, Back L, Back R
42 CHANNEL_LAYOUT_5POINT0_BACK, 42 CHANNEL_LAYOUT_5_0_BACK,
43 43
44 // Front L, Front R, Front C, Back L, Back R, LFE 44 // Front L, Front R, Front C, Back L, Back R, LFE
45 CHANNEL_LAYOUT_5POINT1_BACK, 45 CHANNEL_LAYOUT_5_1_BACK,
46 46
47 // Front L, Front R, Front C, Side L, Side R, Back L, Back R 47 // Front L, Front R, Front C, Side L, Side R, Back L, Back R
48 CHANNEL_LAYOUT_7POINT0, 48 CHANNEL_LAYOUT_7_0,
49 49
50 // Front L, Front R, Front C, Side L, Side R, LFE, Back L, Back R 50 // Front L, Front R, Front C, Side L, Side R, LFE, Back L, Back R
51 CHANNEL_LAYOUT_7POINT1, 51 CHANNEL_LAYOUT_7_1,
52 52
53 // Front L, Front R, Front C, Back L, Back R, LFE, Front LofC, Front RofC 53 // Front L, Front R, Front C, Back L, Back R, LFE, Front LofC, Front RofC
54 CHANNEL_LAYOUT_7POINT1_WIDE, 54 CHANNEL_LAYOUT_7_1_WIDE,
55 55
56 // Stereo L, Stereo R 56 // Stereo L, Stereo R
57 CHANNEL_LAYOUT_STEREO_DOWNMIX, 57 CHANNEL_LAYOUT_STEREO_DOWNMIX,
58 58
59 // Total number of layouts. 59 // Total number of layouts.
60 CHANNEL_LAYOUT_MAX 60 CHANNEL_LAYOUT_MAX
61 }; 61 };
62 62
63 enum Channels { 63 enum Channels {
64 LEFT = 0, 64 LEFT = 0,
(...skipping 17 matching lines...) Expand all
82 // left side surround sound channel in FFmpeg's 5.1 layout is in the 5th 82 // 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 83 // position (because the order is L, R, C, LFE, LS, RS), so
84 // kChannelOrderings[CHANNEL_LAYOUT_5POINT1][SIDE_LEFT] = 4; 84 // kChannelOrderings[CHANNEL_LAYOUT_5POINT1][SIDE_LEFT] = 4;
85 // Values of -1 mean the channel at that index is not used for that layout. 85 // 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]; 86 extern const int kChannelOrderings[CHANNEL_LAYOUT_MAX][CHANNELS_MAX];
87 87
88 // Returns the number of channels in a given ChannelLayout. 88 // Returns the number of channels in a given ChannelLayout.
89 MEDIA_EXPORT int ChannelLayoutToChannelCount(ChannelLayout layout); 89 MEDIA_EXPORT int ChannelLayoutToChannelCount(ChannelLayout layout);
90 90
91 #endif // MEDIA_BASE_CHANNEL_LAYOUT_H_ 91 #endif // MEDIA_BASE_CHANNEL_LAYOUT_H_
OLDNEW
« no previous file with comments | « media/base/audio_renderer_sink.h ('k') | media/ffmpeg/ffmpeg_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698