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

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

Issue 10826296: Introduce shared_memory_support media target for PPAPI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. 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/base/channel_layout.h ('k') | media/media.gyp » ('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) 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 #include "media/base/channel_layout.h" 5 #include "media/base/channel_layout.h"
6 6
7 static const int kLayoutToChannels[] = { 7 static const int kLayoutToChannels[] = {
8 0, // CHANNEL_LAYOUT_NONE 8 0, // CHANNEL_LAYOUT_NONE
9 0, // CHANNEL_LAYOUT_UNSUPPORTED 9 0, // CHANNEL_LAYOUT_UNSUPPORTED
10 1, // CHANNEL_LAYOUT_MONO 10 1, // CHANNEL_LAYOUT_MONO
11 2, // CHANNEL_LAYOUT_STEREO 11 2, // CHANNEL_LAYOUT_STEREO
12 3, // CHANNEL_LAYOUT_2_1 12 3, // CHANNEL_LAYOUT_2_1
13 3, // CHANNEL_LAYOUT_SURROUND 13 3, // CHANNEL_LAYOUT_SURROUND
14 4, // CHANNEL_LAYOUT_4POINT0 14 4, // CHANNEL_LAYOUT_4POINT0
15 4, // CHANNEL_LAYOUT_2_2 15 4, // CHANNEL_LAYOUT_2_2
16 4, // CHANNEL_LAYOUT_QUAD 16 4, // CHANNEL_LAYOUT_QUAD
17 5, // CHANNEL_LAYOUT_5POINT0 17 5, // CHANNEL_LAYOUT_5POINT0
18 6, // CHANNEL_LAYOUT_5POINT1 18 6, // CHANNEL_LAYOUT_5POINT1
19 5, // CHANNEL_LAYOUT_5POINT0_BACK 19 5, // CHANNEL_LAYOUT_5POINT0_BACK
20 6, // CHANNEL_LAYOUT_5POINT1_BACK 20 6, // CHANNEL_LAYOUT_5POINT1_BACK
21 7, // CHANNEL_LAYOUT_7POINT0 21 7, // CHANNEL_LAYOUT_7POINT0
22 8, // CHANNEL_LAYOUT_7POINT1 22 8, // CHANNEL_LAYOUT_7POINT1
23 8, // CHANNEL_LAYOUT_7POINT1_WIDE 23 8, // CHANNEL_LAYOUT_7POINT1_WIDE
24 2}; // CHANNEL_LAYOUT_STEREO_DOWNMIX 24 2}; // CHANNEL_LAYOUT_STEREO_DOWNMIX
25 25
26 #if defined(OS_MACOSX) || defined(USE_PULSEAUDIO)
27 const int kChannelOrderings[CHANNEL_LAYOUT_MAX][CHANNELS_MAX] = { 26 const int kChannelOrderings[CHANNEL_LAYOUT_MAX][CHANNELS_MAX] = {
28 // FL | FR | FC | LFE | BL | BR | FLofC | FRofC | BC | SL | SR | StL | StR 27 // FL | FR | FC | LFE | BL | BR | FLofC | FRofC | BC | SL | SR | StL | StR
29 28
30 // CHANNEL_LAYOUT_NONE 29 // CHANNEL_LAYOUT_NONE
31 { -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 }, 30 { -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 },
32 31
33 // CHANNEL_LAYOUT_UNSUPPORTED 32 // CHANNEL_LAYOUT_UNSUPPORTED
34 { -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 }, 33 { -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 },
35 34
36 // CHANNEL_LAYOUT_MONO 35 // CHANNEL_LAYOUT_MONO
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 { 0 , 1 , 2 , 3 , 6 , 7 , -1 , -1 , -1 , 4 , 5 , -1 , -1 }, 72 { 0 , 1 , 2 , 3 , 6 , 7 , -1 , -1 , -1 , 4 , 5 , -1 , -1 },
74 73
75 // CHANNEL_LAYOUT_7POINT1_WIDE 74 // CHANNEL_LAYOUT_7POINT1_WIDE
76 { 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , -1 , -1 , -1 , -1 , -1 }, 75 { 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , -1 , -1 , -1 , -1 , -1 },
77 76
78 // CHANNEL_LAYOUT_STEREO_DOWNMIX 77 // CHANNEL_LAYOUT_STEREO_DOWNMIX
79 { -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , 0 , 1 }, 78 { -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , 0 , 1 },
80 79
81 // FL | FR | FC | LFE | BL | BR | FLofC | FRofC | BC | SL | SR | StL | StR 80 // FL | FR | FC | LFE | BL | BR | FLofC | FRofC | BC | SL | SR | StL | StR
82 }; 81 };
83 #endif
84 82
85 int ChannelLayoutToChannelCount(ChannelLayout layout) { 83 int ChannelLayoutToChannelCount(ChannelLayout layout) {
86 return kLayoutToChannels[layout]; 84 return kLayoutToChannels[layout];
87 } 85 }
OLDNEW
« no previous file with comments | « media/base/channel_layout.h ('k') | media/media.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698