diff --git a/src/common_audio/vad/include/webrtc_vad.h b/src/common_audio/vad/include/webrtc_vad.h index b288176ed7..c21fdfa891 100644 --- a/src/common_audio/vad/include/webrtc_vad.h +++ b/src/common_audio/vad/include/webrtc_vad.h @@ -13,8 +13,8 @@ * This header file includes the VAD API calls. Specific function calls are given below. */ -#ifndef WEBRTC_VAD_WEBRTC_VAD_H_ -#define WEBRTC_VAD_WEBRTC_VAD_H_ +#ifndef WEBRTC_COMMON_AUDIO_VAD_INCLUDE_WEBRTC_VAD_H_ +#define WEBRTC_COMMON_AUDIO_VAD_INCLUDE_WEBRTC_VAD_H_ #include "typedefs.h" @@ -25,20 +25,6 @@ extern "C" { #endif -/**************************************************************************** - * WebRtcVad_get_version(...) - * - * This function returns the version number of the code. - * - * Output: - * - version : Pointer to a buffer where the version info will - * be stored. - * Input: - * - size_bytes : Size of the buffer. - * - */ -WebRtc_Word16 WebRtcVad_get_version(char *version, size_t size_bytes); - /**************************************************************************** * WebRtcVad_AssignSize(...) * @@ -156,4 +142,4 @@ WebRtc_Word16 WebRtcVad_Process(VadInst *vad_inst, } #endif -#endif // WEBRTC_VAD_WEBRTC_VAD_H_ +#endif // WEBRTC_COMMON_AUDIO_VAD_INCLUDE_WEBRTC_VAD_H_ diff --git a/src/common_audio/vad/vad_unittest.cc b/src/common_audio/vad/vad_unittest.cc index 5d86c1078c..60ee208528 100644 --- a/src/common_audio/vad/vad_unittest.cc +++ b/src/common_audio/vad/vad_unittest.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -61,12 +61,6 @@ TEST_F(VadTest, ApiTest) { speech[i] = (i * i); } - // WebRtcVad_get_version() tests - char version[32]; - EXPECT_EQ(-1, WebRtcVad_get_version(NULL, sizeof(version))); - EXPECT_EQ(-1, WebRtcVad_get_version(version, 1)); - EXPECT_EQ(0, WebRtcVad_get_version(version, sizeof(version))); - // Null instance tests EXPECT_EQ(-1, WebRtcVad_Create(NULL)); EXPECT_EQ(-1, WebRtcVad_Init(NULL)); diff --git a/src/common_audio/vad/webrtc_vad.c b/src/common_audio/vad/webrtc_vad.c index 30bc8a6e6c..9c030a3d01 100644 --- a/src/common_audio/vad/webrtc_vad.c +++ b/src/common_audio/vad/webrtc_vad.c @@ -22,24 +22,6 @@ static const int kInitCheck = 42; -WebRtc_Word16 WebRtcVad_get_version(char *version, size_t size_bytes) -{ - const char my_version[] = "VAD 1.2.0"; - - if (version == NULL) - { - return -1; - } - - if (size_bytes < sizeof(my_version)) - { - return -1; - } - - memcpy(version, my_version, sizeof(my_version)); - return 0; -} - WebRtc_Word16 WebRtcVad_AssignSize(int *size_in_bytes) { *size_in_bytes = sizeof(VadInstT) * 2 / sizeof(WebRtc_Word16); diff --git a/src/modules/audio_processing/aec/echo_cancellation.c b/src/modules/audio_processing/aec/echo_cancellation.c index 021df052ba..bde9c87c5b 100644 --- a/src/modules/audio_processing/aec/echo_cancellation.c +++ b/src/modules/audio_processing/aec/echo_cancellation.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -867,23 +867,6 @@ int WebRtcAec_GetDelayMetrics(void* handle, int* median, int* std) { return 0; } -WebRtc_Word32 WebRtcAec_get_version(WebRtc_Word8 *versionStr, WebRtc_Word16 len) -{ - const char version[] = "AEC 2.5.0"; - const short versionLen = (short)strlen(version) + 1; // +1 for null-termination - - if (versionStr == NULL) { - return -1; - } - - if (versionLen > len) { - return -1; - } - - strncpy(versionStr, version, versionLen); - return 0; -} - WebRtc_Word32 WebRtcAec_get_error_code(void *aecInst) { aecpc_t *aecpc = aecInst; diff --git a/src/modules/audio_processing/aec/include/echo_cancellation.h b/src/modules/audio_processing/aec/include/echo_cancellation.h index f2f887b6d5..a266e84fa5 100644 --- a/src/modules/audio_processing/aec/include/echo_cancellation.h +++ b/src/modules/audio_processing/aec/include/echo_cancellation.h @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC_MAIN_INTERFACE_ECHO_CANCELLATION_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC_MAIN_INTERFACE_ECHO_CANCELLATION_H_ +#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC_INCLUDE_ECHO_CANCELLATION_H_ +#define WEBRTC_MODULES_AUDIO_PROCESSING_AEC_INCLUDE_ECHO_CANCELLATION_H_ #include "typedefs.h" @@ -256,23 +256,7 @@ int WebRtcAec_GetDelayMetrics(void* handle, int* median, int* std); */ WebRtc_Word32 WebRtcAec_get_error_code(void *aecInst); -/* - * Gets a version string. - * - * Inputs Description - * ------------------------------------------------------------------- - * char *versionStr Pointer to a string array - * WebRtc_Word16 len The maximum length of the string - * - * Outputs Description - * ------------------------------------------------------------------- - * WebRtc_Word8 *versionStr Pointer to a string array - * WebRtc_Word32 return 0: OK - * -1: error - */ -WebRtc_Word32 WebRtcAec_get_version(WebRtc_Word8 *versionStr, WebRtc_Word16 len); - #ifdef __cplusplus } #endif -#endif /* WEBRTC_MODULES_AUDIO_PROCESSING_AEC_MAIN_INTERFACE_ECHO_CANCELLATION_H_ */ +#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC_INCLUDE_ECHO_CANCELLATION_H_ diff --git a/src/modules/audio_processing/aecm/echo_control_mobile.c b/src/modules/audio_processing/aecm/echo_control_mobile.c index 49798b74c6..4c5edc704b 100644 --- a/src/modules/audio_processing/aecm/echo_control_mobile.c +++ b/src/modules/audio_processing/aecm/echo_control_mobile.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -702,25 +702,6 @@ size_t WebRtcAecm_echo_path_size_bytes() return (PART_LEN1 * sizeof(WebRtc_Word16)); } -WebRtc_Word32 WebRtcAecm_get_version(WebRtc_Word8 *versionStr, WebRtc_Word16 len) -{ - const char version[] = "AECM 1.2.0"; - const short versionLen = (short)strlen(version) + 1; // +1 for null-termination - - if (versionStr == NULL) - { - return -1; - } - - if (versionLen > len) - { - return -1; - } - - strncpy(versionStr, version, versionLen); - return 0; -} - WebRtc_Word32 WebRtcAecm_get_error_code(void *aecmInst) { aecmob_t *aecm = aecmInst; diff --git a/src/modules/audio_processing/aecm/include/echo_control_mobile.h b/src/modules/audio_processing/aecm/include/echo_control_mobile.h index 063ad29fe7..da0ad8683f 100644 --- a/src/modules/audio_processing/aecm/include/echo_control_mobile.h +++ b/src/modules/audio_processing/aecm/include/echo_control_mobile.h @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AECM_MAIN_INTERFACE_ECHO_CONTROL_MOBILE_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_AECM_MAIN_INTERFACE_ECHO_CONTROL_MOBILE_H_ +#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AECM_INCLUDE_ECHO_CONTROL_MOBILE_H_ +#define WEBRTC_MODULES_AUDIO_PROCESSING_AECM_INCLUDE_ECHO_CONTROL_MOBILE_H_ #include "typedefs.h" @@ -227,24 +227,7 @@ size_t WebRtcAecm_echo_path_size_bytes(); */ WebRtc_Word32 WebRtcAecm_get_error_code(void *aecmInst); -/* - * Gets a version string - * - * Inputs Description - * ------------------------------------------------------------------- - * char *versionStr Pointer to a string array - * WebRtc_Word16 len The maximum length of the string - * - * Outputs Description - * ------------------------------------------------------------------- - * WebRtc_Word8 *versionStr Pointer to a string array - * WebRtc_Word32 return 0: OK - * -1: error - */ -WebRtc_Word32 WebRtcAecm_get_version(WebRtc_Word8 *versionStr, - WebRtc_Word16 len); - #ifdef __cplusplus } #endif -#endif /* WEBRTC_MODULES_AUDIO_PROCESSING_AECM_MAIN_INTERFACE_ECHO_CONTROL_MOBILE_H_ */ +#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AECM_INCLUDE_ECHO_CONTROL_MOBILE_H_ diff --git a/src/modules/audio_processing/agc/analog_agc.c b/src/modules/audio_processing/agc/analog_agc.c index 40c5566300..558a6cba8e 100644 --- a/src/modules/audio_processing/agc/analog_agc.c +++ b/src/modules/audio_processing/agc/analog_agc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -1692,22 +1692,3 @@ int WebRtcAgc_Init(void *agcInst, WebRtc_Word32 minLevel, WebRtc_Word32 maxLevel return 0; } } - -int WebRtcAgc_Version(WebRtc_Word8 *versionStr, WebRtc_Word16 length) -{ - const WebRtc_Word8 version[] = "AGC 1.7.0"; - const WebRtc_Word16 versionLen = (WebRtc_Word16)strlen(version) + 1; - - if (versionStr == NULL) - { - return -1; - } - - if (versionLen > length) - { - return -1; - } - - strncpy(versionStr, version, versionLen); - return 0; -} diff --git a/src/modules/audio_processing/agc/include/gain_control.h b/src/modules/audio_processing/agc/include/gain_control.h index 5ba619ac56..8af5c718ee 100644 --- a/src/modules/audio_processing/agc/include/gain_control.h +++ b/src/modules/audio_processing/agc/include/gain_control.h @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AGC_MAIN_INTERFACE_GAIN_CONTROL_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_AGC_MAIN_INTERFACE_GAIN_CONTROL_H_ +#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AGC_INCLUDE_GAIN_CONTROL_H_ +#define WEBRTC_MODULES_AUDIO_PROCESSING_AGC_INCLUDE_GAIN_CONTROL_H_ #include "typedefs.h" @@ -252,22 +252,8 @@ int WebRtcAgc_Init(void *agcInst, WebRtc_Word16 agcMode, WebRtc_UWord32 fs); -/* - * This function returns a text string containing the version. - * - * Input: - * - length : Length of the char array pointed to by version - * Output: - * - version : Pointer to a char array of to which the version - * : string will be copied. - * - * Return value : 0 - OK - * -1 - Error - */ -int WebRtcAgc_Version(WebRtc_Word8 *versionStr, WebRtc_Word16 length); - #if defined(__cplusplus) } #endif -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AGC_MAIN_INTERFACE_GAIN_CONTROL_H_ +#endif // WEBRTC_MODULES_AUDIO_PROCESSING_AGC_INCLUDE_GAIN_CONTROL_H_ diff --git a/src/modules/audio_processing/echo_cancellation_impl.cc b/src/modules/audio_processing/echo_cancellation_impl.cc index 61940b1498..355f3966f2 100644 --- a/src/modules/audio_processing/echo_cancellation_impl.cc +++ b/src/modules/audio_processing/echo_cancellation_impl.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -328,15 +328,6 @@ int EchoCancellationImpl::Initialize() { return apm_->kNoError; } -int EchoCancellationImpl::get_version(char* version, - int version_len_bytes) const { - if (WebRtcAec_get_version(version, version_len_bytes) != 0) { - return apm_->kBadParameterError; - } - - return apm_->kNoError; -} - void* EchoCancellationImpl::CreateHandle() const { Handle* handle = NULL; if (WebRtcAec_Create(&handle) != apm_->kNoError) { diff --git a/src/modules/audio_processing/echo_cancellation_impl.h b/src/modules/audio_processing/echo_cancellation_impl.h index a483a3aee4..3c2198cad5 100644 --- a/src/modules/audio_processing/echo_cancellation_impl.h +++ b/src/modules/audio_processing/echo_cancellation_impl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_MAIN_SOURCE_ECHO_CANCELLATION_IMPL_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_MAIN_SOURCE_ECHO_CANCELLATION_IMPL_H_ +#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_CANCELLATION_IMPL_H_ +#define WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_CANCELLATION_IMPL_H_ #include "audio_processing.h" #include "processing_component.h" @@ -34,7 +34,6 @@ class EchoCancellationImpl : public EchoCancellation, // ProcessingComponent implementation. virtual int Initialize(); - virtual int get_version(char* version, int version_len_bytes) const; private: // EchoCancellation implementation. @@ -73,4 +72,4 @@ class EchoCancellationImpl : public EchoCancellation, }; } // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_MAIN_SOURCE_ECHO_CANCELLATION_IMPL_H_ +#endif // WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_CANCELLATION_IMPL_H_ diff --git a/src/modules/audio_processing/echo_control_mobile_impl.cc b/src/modules/audio_processing/echo_control_mobile_impl.cc index ff15255303..6e3449d1dd 100644 --- a/src/modules/audio_processing/echo_control_mobile_impl.cc +++ b/src/modules/audio_processing/echo_control_mobile_impl.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -248,15 +248,6 @@ int EchoControlMobileImpl::Initialize() { return ProcessingComponent::Initialize(); } -int EchoControlMobileImpl::get_version(char* version, - int version_len_bytes) const { - if (WebRtcAecm_get_version(version, version_len_bytes) != 0) { - return apm_->kBadParameterError; - } - - return apm_->kNoError; -} - void* EchoControlMobileImpl::CreateHandle() const { Handle* handle = NULL; if (WebRtcAecm_Create(&handle) != apm_->kNoError) { diff --git a/src/modules/audio_processing/echo_control_mobile_impl.h b/src/modules/audio_processing/echo_control_mobile_impl.h index 6314e6603c..6d9e369468 100644 --- a/src/modules/audio_processing/echo_control_mobile_impl.h +++ b/src/modules/audio_processing/echo_control_mobile_impl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_MAIN_SOURCE_ECHO_CONTROL_MOBILE_IMPL_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_MAIN_SOURCE_ECHO_CONTROL_MOBILE_IMPL_H_ +#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_CONTROL_MOBILE_IMPL_H_ +#define WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_CONTROL_MOBILE_IMPL_H_ #include "audio_processing.h" #include "processing_component.h" @@ -32,7 +32,6 @@ class EchoControlMobileImpl : public EchoControlMobile, // ProcessingComponent implementation. virtual int Initialize(); - virtual int get_version(char* version, int version_len_bytes) const; private: // EchoControlMobile implementation. @@ -59,4 +58,4 @@ class EchoControlMobileImpl : public EchoControlMobile, }; } // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_MAIN_SOURCE_ECHO_CONTROL_MOBILE_IMPL_H_ +#endif // WEBRTC_MODULES_AUDIO_PROCESSING_ECHO_CONTROL_MOBILE_IMPL_H_ diff --git a/src/modules/audio_processing/gain_control_impl.cc b/src/modules/audio_processing/gain_control_impl.cc index dc3e565589..c3292d62da 100644 --- a/src/modules/audio_processing/gain_control_impl.cc +++ b/src/modules/audio_processing/gain_control_impl.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -333,14 +333,6 @@ int GainControlImpl::Initialize() { return apm_->kNoError; } -int GainControlImpl::get_version(char* version, int version_len_bytes) const { - if (WebRtcAgc_Version(version, version_len_bytes) != 0) { - return apm_->kBadParameterError; - } - - return apm_->kNoError; -} - void* GainControlImpl::CreateHandle() const { Handle* handle = NULL; if (WebRtcAgc_Create(&handle) != apm_->kNoError) { diff --git a/src/modules/audio_processing/gain_control_impl.h b/src/modules/audio_processing/gain_control_impl.h index 7b6987e515..5915eeb01c 100644 --- a/src/modules/audio_processing/gain_control_impl.h +++ b/src/modules/audio_processing/gain_control_impl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_MAIN_SOURCE_GAIN_CONTROL_IMPL_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_MAIN_SOURCE_GAIN_CONTROL_IMPL_H_ +#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_GAIN_CONTROL_IMPL_H_ +#define WEBRTC_MODULES_AUDIO_PROCESSING_GAIN_CONTROL_IMPL_H_ #include @@ -32,7 +32,6 @@ class GainControlImpl : public GainControl, // ProcessingComponent implementation. virtual int Initialize(); - virtual int get_version(char* version, int version_len_bytes) const; // GainControl implementation. virtual bool is_enabled() const; @@ -77,4 +76,4 @@ class GainControlImpl : public GainControl, }; } // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_MAIN_SOURCE_GAIN_CONTROL_IMPL_H_ +#endif // WEBRTC_MODULES_AUDIO_PROCESSING_GAIN_CONTROL_IMPL_H_ diff --git a/src/modules/audio_processing/high_pass_filter_impl.cc b/src/modules/audio_processing/high_pass_filter_impl.cc index fa6d5d5ece..a50da41418 100644 --- a/src/modules/audio_processing/high_pass_filter_impl.cc +++ b/src/modules/audio_processing/high_pass_filter_impl.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -143,13 +143,6 @@ bool HighPassFilterImpl::is_enabled() const { return is_component_enabled(); } -int HighPassFilterImpl::get_version(char* version, - int version_len_bytes) const { - // An empty string is used to indicate no version information. - memset(version, 0, version_len_bytes); - return apm_->kNoError; -} - void* HighPassFilterImpl::CreateHandle() const { return new FilterState; } diff --git a/src/modules/audio_processing/high_pass_filter_impl.h b/src/modules/audio_processing/high_pass_filter_impl.h index 4c23754270..94a9c89702 100644 --- a/src/modules/audio_processing/high_pass_filter_impl.h +++ b/src/modules/audio_processing/high_pass_filter_impl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_MAIN_SOURCE_HIGH_PASS_FILTER_IMPL_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_MAIN_SOURCE_HIGH_PASS_FILTER_IMPL_H_ +#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_HIGH_PASS_FILTER_IMPL_H_ +#define WEBRTC_MODULES_AUDIO_PROCESSING_HIGH_PASS_FILTER_IMPL_H_ #include "audio_processing.h" #include "processing_component.h" @@ -29,9 +29,6 @@ class HighPassFilterImpl : public HighPassFilter, // HighPassFilter implementation. virtual bool is_enabled() const; - // ProcessingComponent implementation. - virtual int get_version(char* version, int version_len_bytes) const; - private: // HighPassFilter implementation. virtual int Enable(bool enable); @@ -48,4 +45,4 @@ class HighPassFilterImpl : public HighPassFilter, }; } // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_MAIN_SOURCE_HIGH_PASS_FILTER_IMPL_H_ +#endif // WEBRTC_MODULES_AUDIO_PROCESSING_HIGH_PASS_FILTER_IMPL_H_ diff --git a/src/modules/audio_processing/level_estimator_impl.cc b/src/modules/audio_processing/level_estimator_impl.cc index f127d4abde..24f7718a08 100644 --- a/src/modules/audio_processing/level_estimator_impl.cc +++ b/src/modules/audio_processing/level_estimator_impl.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -130,13 +130,6 @@ int LevelEstimatorImpl::RMS() { return level->RMS(); } -int LevelEstimatorImpl::get_version(char* version, - int version_len_bytes) const { - // An empty string is used to indicate no version information. - memset(version, 0, version_len_bytes); - return apm_->kNoError; -} - void* LevelEstimatorImpl::CreateHandle() const { return new Level; } diff --git a/src/modules/audio_processing/level_estimator_impl.h b/src/modules/audio_processing/level_estimator_impl.h index c9b7e02bb2..1a063437fa 100644 --- a/src/modules/audio_processing/level_estimator_impl.h +++ b/src/modules/audio_processing/level_estimator_impl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_MAIN_SOURCE_LEVEL_ESTIMATOR_IMPL_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_MAIN_SOURCE_LEVEL_ESTIMATOR_IMPL_H_ +#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_ESTIMATOR_IMPL_H_ +#define WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_ESTIMATOR_IMPL_H_ #include "audio_processing.h" #include "processing_component.h" @@ -29,9 +29,6 @@ class LevelEstimatorImpl : public LevelEstimator, // LevelEstimator implementation. virtual bool is_enabled() const; - // ProcessingComponent implementation. - virtual int get_version(char* version, int version_len_bytes) const; - private: // LevelEstimator implementation. virtual int Enable(bool enable); @@ -49,4 +46,4 @@ class LevelEstimatorImpl : public LevelEstimator, }; } // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_MAIN_SOURCE_LEVEL_ESTIMATOR_IMPL_H_ +#endif // WEBRTC_MODULES_AUDIO_PROCESSING_LEVEL_ESTIMATOR_IMPL_H_ diff --git a/src/modules/audio_processing/noise_suppression_impl.cc b/src/modules/audio_processing/noise_suppression_impl.cc index f899f350ca..3c7203c842 100644 --- a/src/modules/audio_processing/noise_suppression_impl.cc +++ b/src/modules/audio_processing/noise_suppression_impl.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -110,20 +110,6 @@ NoiseSuppression::Level NoiseSuppressionImpl::level() const { return level_; } -int NoiseSuppressionImpl::get_version(char* version, - int version_len_bytes) const { -#if defined(WEBRTC_NS_FLOAT) - if (WebRtcNs_get_version(version, version_len_bytes) != 0) -#elif defined(WEBRTC_NS_FIXED) - if (WebRtcNsx_get_version(version, version_len_bytes) != 0) -#endif - { - return apm_->kBadParameterError; - } - - return apm_->kNoError; -} - void* NoiseSuppressionImpl::CreateHandle() const { Handle* handle = NULL; #if defined(WEBRTC_NS_FLOAT) diff --git a/src/modules/audio_processing/noise_suppression_impl.h b/src/modules/audio_processing/noise_suppression_impl.h index c9ff9b31af..7b65b7083c 100644 --- a/src/modules/audio_processing/noise_suppression_impl.h +++ b/src/modules/audio_processing/noise_suppression_impl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_MAIN_SOURCE_NOISE_SUPPRESSION_IMPL_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_MAIN_SOURCE_NOISE_SUPPRESSION_IMPL_H_ +#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_NOISE_SUPPRESSION_IMPL_H_ +#define WEBRTC_MODULES_AUDIO_PROCESSING_NOISE_SUPPRESSION_IMPL_H_ #include "audio_processing.h" #include "processing_component.h" @@ -29,9 +29,6 @@ class NoiseSuppressionImpl : public NoiseSuppression, // NoiseSuppression implementation. virtual bool is_enabled() const; - // ProcessingComponent implementation. - virtual int get_version(char* version, int version_len_bytes) const; - private: // NoiseSuppression implementation. virtual int Enable(bool enable); @@ -51,4 +48,4 @@ class NoiseSuppressionImpl : public NoiseSuppression, }; } // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_MAIN_SOURCE_NOISE_SUPPRESSION_IMPL_H_ +#endif // WEBRTC_MODULES_AUDIO_PROCESSING_NOISE_SUPPRESSION_IMPL_H_ diff --git a/src/modules/audio_processing/ns/include/noise_suppression.h b/src/modules/audio_processing/ns/include/noise_suppression.h index c8de9d12ff..1f498c1cd1 100644 --- a/src/modules/audio_processing/ns/include/noise_suppression.h +++ b/src/modules/audio_processing/ns/include/noise_suppression.h @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_INTERFACE_NOISE_SUPPRESSION_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_INTERFACE_NOISE_SUPPRESSION_H_ +#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_NS_INCLUDE_NOISE_SUPPRESSION_H_ +#define WEBRTC_MODULES_AUDIO_PROCESSING_NS_INCLUDE_NOISE_SUPPRESSION_H_ #include "typedefs.h" @@ -19,20 +19,6 @@ typedef struct NsHandleT NsHandle; extern "C" { #endif -/* - * This function returns the version number of the code. - * - * Input: - * - version : Pointer to a character array where the version - * info is stored. - * - length : Length of version. - * - * Return value : 0 - Ok - * -1 - Error (probably length is not sufficient) - */ -int WebRtcNs_get_version(char* version, short length); - - /* * This function creates an instance to the noise reduction structure * @@ -121,4 +107,4 @@ int WebRtcNs_Process(NsHandle* NS_inst, } #endif -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_INTERFACE_NOISE_SUPPRESSION_H_ +#endif // WEBRTC_MODULES_AUDIO_PROCESSING_NS_INCLUDE_NOISE_SUPPRESSION_H_ diff --git a/src/modules/audio_processing/ns/include/noise_suppression_x.h b/src/modules/audio_processing/ns/include/noise_suppression_x.h index 874593684d..b6eef9047a 100644 --- a/src/modules/audio_processing/ns/include/noise_suppression_x.h +++ b/src/modules/audio_processing/ns/include/noise_suppression_x.h @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_INTERFACE_NOISE_SUPPRESSION_X_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_INTERFACE_NOISE_SUPPRESSION_X_H_ +#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_NS_INCLUDE_NOISE_SUPPRESSION_X_H_ +#define WEBRTC_MODULES_AUDIO_PROCESSING_NS_INCLUDE_NOISE_SUPPRESSION_X_H_ #include "typedefs.h" @@ -19,20 +19,6 @@ typedef struct NsxHandleT NsxHandle; extern "C" { #endif -/* - * This function returns the version number of the code. - * - * Input: - * - version : Pointer to a character array where the version - * info is stored. - * - length : Length of version. - * - * Return value : 0 - Ok - * -1 - Error (probably length is not sufficient) - */ -int WebRtcNsx_get_version(char* version, short length); - - /* * This function creates an instance to the noise reduction structure * @@ -120,4 +106,4 @@ int WebRtcNsx_Process(NsxHandle* nsxInst, } #endif -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_NS_MAIN_INTERFACE_NOISE_SUPPRESSION_X_H_ +#endif // WEBRTC_MODULES_AUDIO_PROCESSING_NS_INCLUDE_NOISE_SUPPRESSION_X_H_ diff --git a/src/modules/audio_processing/ns/noise_suppression.c b/src/modules/audio_processing/ns/noise_suppression.c index d33caa9caa..a1e5ae8bd6 100644 --- a/src/modules/audio_processing/ns/noise_suppression.c +++ b/src/modules/audio_processing/ns/noise_suppression.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -15,23 +15,6 @@ #include "ns_core.h" #include "defines.h" -int WebRtcNs_get_version(char* versionStr, short length) { - const char version[] = "NS 2.2.0"; - const short versionLen = (short)strlen(version) + 1; // +1: null-termination - - if (versionStr == NULL) { - return -1; - } - - if (versionLen > length) { - return -1; - } - - strncpy(versionStr, version, versionLen); - - return 0; -} - int WebRtcNs_Create(NsHandle** NS_inst) { *NS_inst = (NsHandle*) malloc(sizeof(NSinst_t)); if (*NS_inst != NULL) { diff --git a/src/modules/audio_processing/ns/noise_suppression_x.c b/src/modules/audio_processing/ns/noise_suppression_x.c index afdea7b0f6..6d27d0e12e 100644 --- a/src/modules/audio_processing/ns/noise_suppression_x.c +++ b/src/modules/audio_processing/ns/noise_suppression_x.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -15,23 +15,6 @@ #include "nsx_core.h" #include "nsx_defines.h" -int WebRtcNsx_get_version(char* versionStr, short length) { - const char version[] = "NS\t3.1.0"; - const short versionLen = (short)strlen(version) + 1; // +1: null-termination - - if (versionStr == NULL) { - return -1; - } - - if (versionLen > length) { - return -1; - } - - strncpy(versionStr, version, versionLen); - - return 0; -} - int WebRtcNsx_Create(NsxHandle** nsxInst) { *nsxInst = (NsxHandle*)malloc(sizeof(NsxInst_t)); if (*nsxInst != NULL) { diff --git a/src/modules/audio_processing/processing_component.h b/src/modules/audio_processing/processing_component.h index 3af0c4d11a..b3457b5096 100644 --- a/src/modules/audio_processing/processing_component.h +++ b/src/modules/audio_processing/processing_component.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_MAIN_SOURCE_PROCESSING_COMPONENT_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_MAIN_SOURCE_PROCESSING_COMPONENT_H_ +#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_PROCESSING_COMPONENT_H_ +#define WEBRTC_MODULES_AUDIO_PROCESSING_PROCESSING_COMPONENT_H_ #include @@ -25,7 +25,6 @@ class ProcessingComponent { virtual int Initialize(); virtual int Destroy(); - virtual int get_version(char* version, int version_len_bytes) const = 0; bool is_component_enabled() const; @@ -51,4 +50,4 @@ class ProcessingComponent { }; } // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_MAIN_SOURCE_PROCESSING_COMPONENT_H__ +#endif // WEBRTC_MODULES_AUDIO_PROCESSING_PROCESSING_COMPONENT_H__ diff --git a/src/modules/audio_processing/voice_detection_impl.cc b/src/modules/audio_processing/voice_detection_impl.cc index e1c0f0ee3e..e248171d36 100644 --- a/src/modules/audio_processing/voice_detection_impl.cc +++ b/src/modules/audio_processing/voice_detection_impl.cc @@ -157,15 +157,6 @@ int VoiceDetectionImpl::Initialize() { return apm_->kNoError; } -int VoiceDetectionImpl::get_version(char* version, - int version_len_bytes) const { - if (WebRtcVad_get_version(version, version_len_bytes) != 0) { - return apm_->kBadParameterError; - } - - return apm_->kNoError; -} - void* VoiceDetectionImpl::CreateHandle() const { Handle* handle = NULL; if (WebRtcVad_Create(&handle) != apm_->kNoError) { diff --git a/src/modules/audio_processing/voice_detection_impl.h b/src/modules/audio_processing/voice_detection_impl.h index ef212d11b9..52d92e019a 100644 --- a/src/modules/audio_processing/voice_detection_impl.h +++ b/src/modules/audio_processing/voice_detection_impl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_MAIN_SOURCE_VOICE_DETECTION_IMPL_H_ -#define WEBRTC_MODULES_AUDIO_PROCESSING_MAIN_SOURCE_VOICE_DETECTION_IMPL_H_ +#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_VOICE_DETECTION_IMPL_H_ +#define WEBRTC_MODULES_AUDIO_PROCESSING_VOICE_DETECTION_IMPL_H_ #include "audio_processing.h" #include "processing_component.h" @@ -31,7 +31,6 @@ class VoiceDetectionImpl : public VoiceDetection, // ProcessingComponent implementation. virtual int Initialize(); - virtual int get_version(char* version, int version_len_bytes) const; private: // VoiceDetection implementation. @@ -60,4 +59,4 @@ class VoiceDetectionImpl : public VoiceDetection, }; } // namespace webrtc -#endif // WEBRTC_MODULES_AUDIO_PROCESSING_MAIN_SOURCE_VOICE_DETECTION_IMPL_H_ +#endif // WEBRTC_MODULES_AUDIO_PROCESSING_VOICE_DETECTION_IMPL_H_