diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-23 21:10:43 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-23 21:10:43 +0000 |
commit | a6ccb772bb875195a072cdb260d2b2ee24f43277 (patch) | |
tree | c70eb8fdab6307b5f2ca382c84a81c466fc68df3 /third_party/opus | |
parent | 34ebfd704de4599b9ecaf357e5c9fb1f4e19f665 (diff) | |
download | chromium_src-a6ccb772bb875195a072cdb260d2b2ee24f43277.zip chromium_src-a6ccb772bb875195a072cdb260d2b2ee24f43277.tar.gz chromium_src-a6ccb772bb875195a072cdb260d2b2ee24f43277.tar.bz2 |
Add opus audio codec support in remoting
BUG=154714
Review URL: https://codereview.chromium.org/11189047
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163675 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/opus')
-rw-r--r-- | third_party/opus/opus.gyp | 44 | ||||
-rw-r--r-- | third_party/opus/overrides/include/opus_defines.h | 19 |
2 files changed, 48 insertions, 15 deletions
diff --git a/third_party/opus/opus.gyp b/third_party/opus/opus.gyp index c11c9e1..ffd84c7 100644 --- a/third_party/opus/opus.gyp +++ b/third_party/opus/opus.gyp @@ -12,17 +12,41 @@ { 'target_name': 'opus', 'type': 'static_library', + 'defines': [ + 'OPUS_BUILD', + 'WORDS_BIGENDIAN', + ], + 'conditions': [ + ['OS!="win"', { + 'defines': [ + 'HAVE_LRINT', + 'HAVE_LRINTF', + 'VAR_ARRAYS', + ], + }, { + 'defines': [ + 'USE_ALLOCA', + 'inline=__inline', + ], + 'msvs_disabled_warnings': [ + 4305, # Disable truncation warning in celt/pitch.c . + ], + }], + ], 'include_dirs': [ + '../..', + 'overrides/include', 'src/celt', 'src/include', 'src/silk', 'src/silk/float', ], - 'defines': [ - 'OPUS_BUILD', - 'VAR_ARRAYS', - 'WORDS_BIGENDIAN', - ], + 'direct_dependent_settings': { + 'include_dirs': [ + 'overrides/include', + 'src/include', + ], + }, 'sources': [ 'src/celt/_kiss_fft_guts.h', 'src/celt/arch.h', @@ -129,8 +153,6 @@ 'src/silk/float/scale_vector_FLP.c', 'src/silk/float/schur_FLP.c', 'src/silk/float/SigProc_FLP.h', - 'src/silk/float/silk_float.vcxproj', - 'src/silk/float/silk_float.vcxproj.filters', 'src/silk/float/solve_LS_FLP.c', 'src/silk/float/sort_FLP.c', 'src/silk/float/structs_FLP.h', @@ -210,14 +232,6 @@ 'src/src/opus_multistream.c', 'src/src/repacketizer.c', ], - 'conditions': [ - ['os_posix == 1', { - 'defines': [ - 'HAVE_LRINT', - 'HAVE_LRINTF', - ], - }], - ], }, # target opus ] }, { # use_system_opus != 0 diff --git a/third_party/opus/overrides/include/opus_defines.h b/third_party/opus/overrides/include/opus_defines.h new file mode 100644 index 0000000..290bc91 --- /dev/null +++ b/third_party/opus/overrides/include/opus_defines.h @@ -0,0 +1,19 @@ +// Copyright (c) 2012 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 "base/stringize_macros.h" + +// HACK: This is a hack to make sure that we don't export opus symbols. +// opus_defines.h sets OPUS_EXPORT only when OPUS_BUILD is defined. +#if defined(OPUS_BUILD) +#undef OPUS_BUILD +#define OPUS_BUILD_DEFINED +#endif // defined(OPUS_BUILD) + +#include "third_party/opus/src/include/opus_defines.h" + +#if defined(OPUS_BUILD_DEFINED) +#undef OPUS_BUILD_DEFINED +#define OPUS_BUILD +#endif // defined(OPUS_BUILD_DEFINED) |