diff options
author | wtc <wtc@chromium.org> | 2014-11-07 11:28:51 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-07 19:29:03 +0000 |
commit | 707f8938eedc4fc47ee9bb56ad88ed91c4c9c7b6 (patch) | |
tree | b4c1afa06fc76b8cc7be71063c2daf4d25ac8e84 | |
parent | 9fb0481da9c5a809052611df341796c9cb6367d4 (diff) | |
download | chromium_src-707f8938eedc4fc47ee9bb56ad88ed91c4c9c7b6.zip chromium_src-707f8938eedc4fc47ee9bb56ad88ed91c4c9c7b6.tar.gz chromium_src-707f8938eedc4fc47ee9bb56ad88ed91c4c9c7b6.tar.bz2 |
Add CHANNEL_LAYOUT_4_1_QUAD_SIDE.
It is a 4.1 variant, consisting of FL+FR+LFE+SL+SR.
R=dalecurtis@chromium.org
BUG=none
Review URL: https://codereview.chromium.org/701313002
Cr-Commit-Position: refs/heads/master@{#303271}
-rw-r--r-- | media/base/channel_layout.cc | 8 | ||||
-rw-r--r-- | media/base/channel_layout.h | 5 | ||||
-rw-r--r-- | media/mojo/interfaces/media_types.mojom | 3 | ||||
-rw-r--r-- | media/mojo/services/media_type_converters.cc | 1 |
4 files changed, 14 insertions, 3 deletions
diff --git a/media/base/channel_layout.cc b/media/base/channel_layout.cc index ffabfdf..12a6015 100644 --- a/media/base/channel_layout.cc +++ b/media/base/channel_layout.cc @@ -41,6 +41,7 @@ static const int kLayoutToChannels[] = { 8, // CHANNEL_LAYOUT_OCTAGONAL 0, // CHANNEL_LAYOUT_DISCRETE 3, // CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC + 5, // CHANNEL_LAYOUT_4_1_QUAD_SIDE }; // The channel orderings for each layout as specified by FFmpeg. Each value @@ -149,6 +150,9 @@ static const int kChannelOrderings[CHANNEL_LAYOUT_MAX + 1][CHANNELS_MAX + 1] = { // CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC { 0 , 1 , 2 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 }, + // CHANNEL_LAYOUT_4_1_QUAD_SIDE + { 0 , 1 , -1 , 4 , -1 , -1 , -1 , -1 , -1 , 2 , 3 }, + // FL | FR | FC | LFE | BL | BR | FLofC | FRofC | BC | SL | SR }; @@ -205,7 +209,7 @@ const char* ChannelLayoutToString(ChannelLayout layout) { case CHANNEL_LAYOUT_4_0: return "4.0"; case CHANNEL_LAYOUT_2_2: - return "2.2"; + return "QUAD_SIDE"; case CHANNEL_LAYOUT_QUAD: return "QUAD"; case CHANNEL_LAYOUT_5_0: @@ -252,6 +256,8 @@ const char* ChannelLayoutToString(ChannelLayout layout) { return "DISCRETE"; case CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC: return "STEREO_AND_KEYBOARD_MIC"; + case CHANNEL_LAYOUT_4_1_QUAD_SIDE: + return "4.1_QUAD_SIDE"; } NOTREACHED() << "Invalid channel layout provided: " << layout; return ""; diff --git a/media/base/channel_layout.h b/media/base/channel_layout.h index 323368a..b57f152 100644 --- a/media/base/channel_layout.h +++ b/media/base/channel_layout.h @@ -105,8 +105,11 @@ enum ChannelLayout { // of that. CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC = 30, + // Front L, Front R, Side L, Side R, LFE + CHANNEL_LAYOUT_4_1_QUAD_SIDE = 31, + // Max value, must always equal the largest entry ever logged. - CHANNEL_LAYOUT_MAX = CHANNEL_LAYOUT_STEREO_AND_KEYBOARD_MIC + CHANNEL_LAYOUT_MAX = CHANNEL_LAYOUT_4_1_QUAD_SIDE }; enum Channels { diff --git a/media/mojo/interfaces/media_types.mojom b/media/mojo/interfaces/media_types.mojom index aaf6586..0745cb5 100644 --- a/media/mojo/interfaces/media_types.mojom +++ b/media/mojo/interfaces/media_types.mojom @@ -70,7 +70,8 @@ enum ChannelLayout { k_OCTAGONAL = 28, k_DISCRETE = 29, k_STEREO_AND_KEYBOARD_MIC = 30, - k_MAX = k_STEREO_AND_KEYBOARD_MIC, + k_4_1_QUAD_SIDE = 31, + k_MAX = k_4_1_QUAD_SIDE, }; // See media/base/sample_format.h for descriptions. diff --git a/media/mojo/services/media_type_converters.cc b/media/mojo/services/media_type_converters.cc index c4b3a96..95eb1ba 100644 --- a/media/mojo/services/media_type_converters.cc +++ b/media/mojo/services/media_type_converters.cc @@ -84,6 +84,7 @@ ASSERT_ENUM_EQ(ChannelLayout, CHANNEL_LAYOUT, CHANNEL_LAYOUT_k, _STEREO_AND_KEYBOARD_MIC); +ASSERT_ENUM_EQ(ChannelLayout, CHANNEL_LAYOUT, CHANNEL_LAYOUT_k, _4_1_QUAD_SIDE); ASSERT_ENUM_EQ(ChannelLayout, CHANNEL_LAYOUT, CHANNEL_LAYOUT_k, _MAX); // SampleFormat. |