diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-23 19:55:10 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-23 19:55:10 +0000 |
commit | 7fbe511b49d31fcc88a7675dbc6b6d8c8013ca68 (patch) | |
tree | 77175349dccbb9fe5fb9b3bdecdb8b92e2c32605 /third_party | |
parent | 53869dbba36edf76eec07499a5bb7b00f70ac509 (diff) | |
download | chromium_src-7fbe511b49d31fcc88a7675dbc6b6d8c8013ca68.zip chromium_src-7fbe511b49d31fcc88a7675dbc6b6d8c8013ca68.tar.gz chromium_src-7fbe511b49d31fcc88a7675dbc6b6d8c8013ca68.tar.bz2 |
Add opus audio codec support in remoting
BUG=154714
Review URL: https://chromiumcodereview.appspot.com/11189047
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163650 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/opus/opus.gyp | 42 | ||||
-rw-r--r-- | third_party/opus/overrides/include/opus_defines.h | 19 |
2 files changed, 48 insertions, 13 deletions
diff --git a/third_party/opus/opus.gyp b/third_party/opus/opus.gyp index c11c9e1..d1df5e2 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', @@ -210,14 +234,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) |