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

Unified Diff: media/filters/opus_constants.cc

Issue 1414793002: Update WebmMuxer for audio component of MediaStream recording. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: format Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/filters/opus_constants.h ('k') | media/media.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/opus_constants.cc
diff --git a/media/filters/opus_constants.cc b/media/filters/opus_constants.cc
new file mode 100644
index 0000000000000000000000000000000000000000..438367d9fd8d194e603be56af1708216053f4dc2
--- /dev/null
+++ b/media/filters/opus_constants.cc
@@ -0,0 +1,57 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include <stdint.h>
+#include "media/filters/opus_constants.h"
+
+namespace media {
+
+const uint8_t kDefaultOpusChannelLayout[OPUS_MAX_CHANNELS_WITH_DEFAULT_LAYOUT] =
+ {0, 1};
+
+const uint8_t kFFmpegChannelDecodingLayouts
+ [OPUS_MAX_VORBIS_CHANNELS][OPUS_MAX_VORBIS_CHANNELS] = {
+ {0},
+
+ // Stereo: No reorder.
+ {0, 1},
+
+ // 3 Channels, from Vorbis order to:
+ // L, R, Center
+ {0, 2, 1},
+
+ // 4 Channels: No reorder.
+ {0, 1, 2, 3},
+
+ // 5 Channels, from Vorbis order to:
+ // Front L, Front R, Center, Back L, Back R
+ {0, 2, 1, 3, 4},
+
+ // 6 Channels (5.1), from Vorbis order to:
+ // Front L, Front R, Center, LFE, Back L, Back R
+ {0, 2, 1, 5, 3, 4},
+
+ // 7 Channels (6.1), from Vorbis order to:
+ // Front L, Front R, Front Center, LFE, Side L, Side R, Back Center
+ {0, 2, 1, 6, 3, 4, 5},
+
+ // 8 Channels (7.1), from Vorbis order to:
+ // Front L, Front R, Center, LFE, Back L, Back R, Side L, Side R
+ {0, 2, 1, 7, 5, 6, 3, 4},
+};
+
+const uint8_t
+ kOpusVorbisChannelMap[OPUS_MAX_VORBIS_CHANNELS][OPUS_MAX_VORBIS_CHANNELS] =
+ {
+ {0},
+ {0, 1},
+ {0, 2, 1},
+ {0, 1, 2, 3},
+ {0, 4, 1, 2, 3},
+ {0, 4, 1, 2, 3, 5},
+ {0, 4, 1, 2, 3, 5, 6},
+ {0, 6, 1, 2, 3, 4, 5, 7},
+};
+
+} // namespace media
« no previous file with comments | « media/filters/opus_constants.h ('k') | media/media.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698