From e7edea97592733649ac067355da122b047b128cd Mon Sep 17 00:00:00 2001 From: kwiberg Date: Wed, 22 Jun 2016 16:29:55 -0700 Subject: [PATCH] Revert of Move FilePlayer and FileRecorder to Voice Engine (patchset #5 id:80001 of https://codereview.chromium.org/2037623002/ ) Reason for revert: voice_engine_unittests: FilePlayerTest.PlayWavPcm16File and FilePlayerTest.PlayWavPcmuFile fail on 32-bit android (android_rel and android-dbg try bots, Android32 Tests (L Nexus5) and Android32 Tests (L Nexus7.2) build bots). Not sure why this would happen, since I just moved the test without modifying it. Some test filtering that no longer manages to disable them? Anyway, reverting until I know how to fix. This was actually caught by the try bots, but I missed it because I was manually ignoring them because of an error with the bots. :-( Original issue's description: > Move FilePlayer and FileRecorder to Voice Engine > > Because Voice Engine was the only user. > > R=perkj@webrtc.org, solenberg@webrtc.org > > Committed: https://chromium.googlesource.com/external/webrtc/+/65874b163ee5d6eb460c53590702ed98ca399605 TBR=perkj@webrtc.org,solenberg@webrtc.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review-Url: https://codereview.webrtc.org/2092633002 Cr-Commit-Position: refs/heads/master@{#13267} --- webrtc/modules/BUILD.gn | 1 + webrtc/modules/modules.gyp | 1 + webrtc/modules/utility/BUILD.gn | 8 ++++++++ .../utility/include}/file_player.h | 7 +++---- .../utility/include}/file_recorder.h | 7 +++---- .../{voice_engine => modules/utility/source}/coder.cc | 3 +-- .../{voice_engine => modules/utility/source}/coder.h | 6 +++--- .../utility/source}/file_player_impl.cc | 3 +-- .../utility/source}/file_player_impl.h | 11 +++++------ .../utility/source}/file_player_unittests.cc | 3 ++- .../utility/source}/file_recorder_impl.cc | 3 +-- .../utility/source}/file_recorder_impl.h | 11 +++++------ webrtc/modules/utility/utility.gypi | 8 ++++++++ webrtc/voice_engine/BUILD.gn | 8 -------- webrtc/voice_engine/channel.h | 4 ++-- webrtc/voice_engine/output_mixer.h | 2 +- webrtc/voice_engine/transmit_mixer.h | 4 ++-- webrtc/voice_engine/voice_engine.gyp | 10 ---------- 18 files changed, 47 insertions(+), 53 deletions(-) rename webrtc/{voice_engine => modules/utility/include}/file_player.h (94%) rename webrtc/{voice_engine => modules/utility/include}/file_recorder.h (91%) rename webrtc/{voice_engine => modules/utility/source}/coder.cc (98%) rename webrtc/{voice_engine => modules/utility/source}/coder.h (93%) rename webrtc/{voice_engine => modules/utility/source}/file_player_impl.cc (99%) rename webrtc/{voice_engine => modules/utility/source}/file_player_impl.h (89%) rename webrtc/{voice_engine => modules/utility/source}/file_player_unittests.cc (98%) rename webrtc/{voice_engine => modules/utility/source}/file_recorder_impl.cc (99%) rename webrtc/{voice_engine => modules/utility/source}/file_recorder_impl.h (89%) diff --git a/webrtc/modules/BUILD.gn b/webrtc/modules/BUILD.gn index c86bae1b67..4eeaa59126 100644 --- a/webrtc/modules/BUILD.gn +++ b/webrtc/modules/BUILD.gn @@ -223,6 +223,7 @@ if (rtc_include_tests) { "rtp_rtcp/test/testAPI/test_api_rtcp.cc", "rtp_rtcp/test/testAPI/test_api_video.cc", "utility/source/audio_frame_operations_unittest.cc", + "utility/source/file_player_unittests.cc", "utility/source/process_thread_impl_unittest.cc", "video_coding/codecs/test/packet_manipulator_unittest.cc", "video_coding/codecs/test/stats_unittest.cc", diff --git a/webrtc/modules/modules.gyp b/webrtc/modules/modules.gyp index f0fc1283c9..e9a250c89d 100644 --- a/webrtc/modules/modules.gyp +++ b/webrtc/modules/modules.gyp @@ -351,6 +351,7 @@ 'rtp_rtcp/test/testAPI/test_api_rtcp.cc', 'rtp_rtcp/test/testAPI/test_api_video.cc', 'utility/source/audio_frame_operations_unittest.cc', + 'utility/source/file_player_unittests.cc', 'utility/source/process_thread_impl_unittest.cc', 'video_coding/codecs/test/packet_manipulator_unittest.cc', 'video_coding/codecs/test/stats_unittest.cc', diff --git a/webrtc/modules/utility/BUILD.gn b/webrtc/modules/utility/BUILD.gn index c3c9f0a923..5437e4f5f7 100644 --- a/webrtc/modules/utility/BUILD.gn +++ b/webrtc/modules/utility/BUILD.gn @@ -11,10 +11,18 @@ import("../../build/webrtc.gni") source_set("utility") { sources = [ "include/audio_frame_operations.h", + "include/file_player.h", + "include/file_recorder.h", "include/helpers_android.h", "include/jvm_android.h", "include/process_thread.h", "source/audio_frame_operations.cc", + "source/coder.cc", + "source/coder.h", + "source/file_player_impl.cc", + "source/file_player_impl.h", + "source/file_recorder_impl.cc", + "source/file_recorder_impl.h", "source/helpers_android.cc", "source/helpers_ios.mm", "source/jvm_android.cc", diff --git a/webrtc/voice_engine/file_player.h b/webrtc/modules/utility/include/file_player.h similarity index 94% rename from webrtc/voice_engine/file_player.h rename to webrtc/modules/utility/include/file_player.h index 898d66cd4d..b064e3021b 100644 --- a/webrtc/voice_engine/file_player.h +++ b/webrtc/modules/utility/include/file_player.h @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef WEBRTC_VOICE_ENGINE_FILE_PLAYER_H_ -#define WEBRTC_VOICE_ENGINE_FILE_PLAYER_H_ +#ifndef WEBRTC_MODULES_UTILITY_INCLUDE_FILE_PLAYER_H_ +#define WEBRTC_MODULES_UTILITY_INCLUDE_FILE_PLAYER_H_ #include "webrtc/common_types.h" #include "webrtc/engine_configurations.h" @@ -83,5 +83,4 @@ protected: }; } // namespace webrtc - -#endif // WEBRTC_VOICE_ENGINE_FILE_PLAYER_H_ +#endif // WEBRTC_MODULES_UTILITY_INCLUDE_FILE_PLAYER_H_ diff --git a/webrtc/voice_engine/file_recorder.h b/webrtc/modules/utility/include/file_recorder.h similarity index 91% rename from webrtc/voice_engine/file_recorder.h rename to webrtc/modules/utility/include/file_recorder.h index 001a449b6a..92c91bd4b0 100644 --- a/webrtc/voice_engine/file_recorder.h +++ b/webrtc/modules/utility/include/file_recorder.h @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef WEBRTC_VOICE_ENGINE_FILE_RECORDER_H_ -#define WEBRTC_VOICE_ENGINE_FILE_RECORDER_H_ +#ifndef WEBRTC_MODULES_UTILITY_INCLUDE_FILE_RECORDER_H_ +#define WEBRTC_MODULES_UTILITY_INCLUDE_FILE_RECORDER_H_ #include "webrtc/common_types.h" #include "webrtc/engine_configurations.h" @@ -61,5 +61,4 @@ protected: }; } // namespace webrtc - -#endif // WEBRTC_VOICE_ENGINE_FILE_RECORDER_H_ +#endif // WEBRTC_MODULES_UTILITY_INCLUDE_FILE_RECORDER_H_ diff --git a/webrtc/voice_engine/coder.cc b/webrtc/modules/utility/source/coder.cc similarity index 98% rename from webrtc/voice_engine/coder.cc rename to webrtc/modules/utility/source/coder.cc index ab724e5cec..f2ae43eb10 100644 --- a/webrtc/voice_engine/coder.cc +++ b/webrtc/modules/utility/source/coder.cc @@ -8,11 +8,10 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "webrtc/voice_engine/coder.h" - #include "webrtc/common_types.h" #include "webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory.h" #include "webrtc/modules/include/module_common_types.h" +#include "webrtc/modules/utility/source/coder.h" namespace webrtc { namespace { diff --git a/webrtc/voice_engine/coder.h b/webrtc/modules/utility/source/coder.h similarity index 93% rename from webrtc/voice_engine/coder.h rename to webrtc/modules/utility/source/coder.h index 41a7c59bbf..5f441904be 100644 --- a/webrtc/voice_engine/coder.h +++ b/webrtc/modules/utility/source/coder.h @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef WEBRTC_VOICE_ENGINE_CODER_H_ -#define WEBRTC_VOICE_ENGINE_CODER_H_ +#ifndef WEBRTC_MODULES_UTILITY_SOURCE_CODER_H_ +#define WEBRTC_MODULES_UTILITY_SOURCE_CODER_H_ #include @@ -65,4 +65,4 @@ class AudioCoder : public AudioPacketizationCallback { }; } // namespace webrtc -#endif // WEBRTC_VOICE_ENGINE_CODER_H_ +#endif // WEBRTC_MODULES_UTILITY_SOURCE_CODER_H_ diff --git a/webrtc/voice_engine/file_player_impl.cc b/webrtc/modules/utility/source/file_player_impl.cc similarity index 99% rename from webrtc/voice_engine/file_player_impl.cc rename to webrtc/modules/utility/source/file_player_impl.cc index c1239d36e5..e783a7eca8 100644 --- a/webrtc/voice_engine/file_player_impl.cc +++ b/webrtc/modules/utility/source/file_player_impl.cc @@ -8,8 +8,7 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "webrtc/voice_engine/file_player_impl.h" - +#include "webrtc/modules/utility/source/file_player_impl.h" #include "webrtc/system_wrappers/include/logging.h" namespace webrtc { diff --git a/webrtc/voice_engine/file_player_impl.h b/webrtc/modules/utility/source/file_player_impl.h similarity index 89% rename from webrtc/voice_engine/file_player_impl.h rename to webrtc/modules/utility/source/file_player_impl.h index 82d7daf47c..62887da13b 100644 --- a/webrtc/voice_engine/file_player_impl.h +++ b/webrtc/modules/utility/source/file_player_impl.h @@ -8,18 +8,18 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef WEBRTC_VOICE_ENGINE_FILE_PLAYER_IMPL_H_ -#define WEBRTC_VOICE_ENGINE_FILE_PLAYER_IMPL_H_ +#ifndef WEBRTC_MODULES_UTILITY_SOURCE_FILE_PLAYER_IMPL_H_ +#define WEBRTC_MODULES_UTILITY_SOURCE_FILE_PLAYER_IMPL_H_ #include "webrtc/common_audio/resampler/include/resampler.h" #include "webrtc/common_types.h" #include "webrtc/engine_configurations.h" #include "webrtc/modules/media_file/media_file.h" #include "webrtc/modules/media_file/media_file_defines.h" +#include "webrtc/modules/utility/include/file_player.h" +#include "webrtc/modules/utility/source/coder.h" #include "webrtc/system_wrappers/include/critical_section_wrapper.h" #include "webrtc/typedefs.h" -#include "webrtc/voice_engine/coder.h" -#include "webrtc/voice_engine/file_player.h" namespace webrtc { class FilePlayerImpl : public FilePlayer @@ -75,5 +75,4 @@ private: float _scaling; }; } // namespace webrtc - -#endif // WEBRTC_VOICE_ENGINE_FILE_PLAYER_IMPL_H_ +#endif // WEBRTC_MODULES_UTILITY_SOURCE_FILE_PLAYER_IMPL_H_ diff --git a/webrtc/voice_engine/file_player_unittests.cc b/webrtc/modules/utility/source/file_player_unittests.cc similarity index 98% rename from webrtc/voice_engine/file_player_unittests.cc rename to webrtc/modules/utility/source/file_player_unittests.cc index dd440fb750..58471e5e8d 100644 --- a/webrtc/voice_engine/file_player_unittests.cc +++ b/webrtc/modules/utility/source/file_player_unittests.cc @@ -10,6 +10,8 @@ // Unit tests for FilePlayer. +#include "webrtc/modules/utility/include/file_player.h" + #include #include @@ -18,7 +20,6 @@ #include "webrtc/base/md5digest.h" #include "webrtc/base/stringencode.h" #include "webrtc/test/testsupport/fileutils.h" -#include "webrtc/voice_engine/file_player.h" DEFINE_bool(file_player_output, false, "Generate reference files."); diff --git a/webrtc/voice_engine/file_recorder_impl.cc b/webrtc/modules/utility/source/file_recorder_impl.cc similarity index 99% rename from webrtc/voice_engine/file_recorder_impl.cc rename to webrtc/modules/utility/source/file_recorder_impl.cc index bfdc01d7a5..82b37f0118 100644 --- a/webrtc/voice_engine/file_recorder_impl.cc +++ b/webrtc/modules/utility/source/file_recorder_impl.cc @@ -8,10 +8,9 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "webrtc/voice_engine/file_recorder_impl.h" - #include "webrtc/engine_configurations.h" #include "webrtc/modules/media_file/media_file.h" +#include "webrtc/modules/utility/source/file_recorder_impl.h" #include "webrtc/system_wrappers/include/logging.h" namespace webrtc { diff --git a/webrtc/voice_engine/file_recorder_impl.h b/webrtc/modules/utility/source/file_recorder_impl.h similarity index 89% rename from webrtc/voice_engine/file_recorder_impl.h rename to webrtc/modules/utility/source/file_recorder_impl.h index 67af742f41..a9dd3a8863 100644 --- a/webrtc/voice_engine/file_recorder_impl.h +++ b/webrtc/modules/utility/source/file_recorder_impl.h @@ -12,8 +12,8 @@ // multiple file formats. The unencoded input data is written to file in the // encoded format specified. -#ifndef WEBRTC_VOICE_ENGINE_FILE_RECORDER_IMPL_H_ -#define WEBRTC_VOICE_ENGINE_FILE_RECORDER_IMPL_H_ +#ifndef WEBRTC_MODULES_UTILITY_SOURCE_FILE_RECORDER_IMPL_H_ +#define WEBRTC_MODULES_UTILITY_SOURCE_FILE_RECORDER_IMPL_H_ #include @@ -24,10 +24,10 @@ #include "webrtc/modules/include/module_common_types.h" #include "webrtc/modules/media_file/media_file.h" #include "webrtc/modules/media_file/media_file_defines.h" +#include "webrtc/modules/utility/include/file_recorder.h" +#include "webrtc/modules/utility/source/coder.h" #include "webrtc/system_wrappers/include/event_wrapper.h" #include "webrtc/typedefs.h" -#include "webrtc/voice_engine/coder.h" -#include "webrtc/voice_engine/file_recorder.h" namespace webrtc { // The largest decoded frame size in samples (60ms with 32kHz sample rate). @@ -76,5 +76,4 @@ private: Resampler _audioResampler; }; } // namespace webrtc - -#endif // WEBRTC_VOICE_ENGINE_FILE_RECORDER_IMPL_H_ +#endif // WEBRTC_MODULES_UTILITY_SOURCE_FILE_RECORDER_IMPL_H_ diff --git a/webrtc/modules/utility/utility.gypi b/webrtc/modules/utility/utility.gypi index 2c4e20f0da..6e11f1654d 100644 --- a/webrtc/modules/utility/utility.gypi +++ b/webrtc/modules/utility/utility.gypi @@ -20,11 +20,19 @@ ], 'sources': [ 'include/audio_frame_operations.h', + 'include/file_player.h', + 'include/file_recorder.h', 'include/helpers_android.h', 'include/helpers_ios.h', 'include/jvm_android.h', 'include/process_thread.h', 'source/audio_frame_operations.cc', + 'source/coder.cc', + 'source/coder.h', + 'source/file_player_impl.cc', + 'source/file_player_impl.h', + 'source/file_recorder_impl.cc', + 'source/file_recorder_impl.h', 'source/helpers_android.cc', 'source/helpers_ios.mm', 'source/jvm_android.cc', diff --git a/webrtc/voice_engine/BUILD.gn b/webrtc/voice_engine/BUILD.gn index f174ab9ea0..31b1d5b430 100644 --- a/webrtc/voice_engine/BUILD.gn +++ b/webrtc/voice_engine/BUILD.gn @@ -16,14 +16,6 @@ source_set("voice_engine") { "channel_manager.h", "channel_proxy.cc", "channel_proxy.h", - "coder.cc", - "coder.h", - "file_player.h", - "file_player_impl.cc", - "file_player_impl.h", - "file_recorder.h", - "file_recorder_impl.cc", - "file_recorder_impl.h", "include/voe_audio_processing.h", "include/voe_base.h", "include/voe_codec.h", diff --git a/webrtc/voice_engine/channel.h b/webrtc/voice_engine/channel.h index fda8dcc2fd..9b6a2a136f 100644 --- a/webrtc/voice_engine/channel.h +++ b/webrtc/voice_engine/channel.h @@ -26,8 +26,8 @@ #include "webrtc/modules/rtp_rtcp/include/remote_ntp_time_estimator.h" #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" -#include "webrtc/voice_engine/file_player.h" -#include "webrtc/voice_engine/file_recorder.h" +#include "webrtc/modules/utility/include/file_player.h" +#include "webrtc/modules/utility/include/file_recorder.h" #include "webrtc/voice_engine/include/voe_audio_processing.h" #include "webrtc/voice_engine/include/voe_network.h" #include "webrtc/voice_engine/level_indicator.h" diff --git a/webrtc/voice_engine/output_mixer.h b/webrtc/voice_engine/output_mixer.h index 9bf3b35c93..ae2f53fdb9 100644 --- a/webrtc/voice_engine/output_mixer.h +++ b/webrtc/voice_engine/output_mixer.h @@ -16,7 +16,7 @@ #include "webrtc/common_types.h" #include "webrtc/modules/audio_conference_mixer/include/audio_conference_mixer.h" #include "webrtc/modules/audio_conference_mixer/include/audio_conference_mixer_defines.h" -#include "webrtc/voice_engine/file_recorder.h" +#include "webrtc/modules/utility/include/file_recorder.h" #include "webrtc/voice_engine/level_indicator.h" #include "webrtc/voice_engine/voice_engine_defines.h" diff --git a/webrtc/voice_engine/transmit_mixer.h b/webrtc/voice_engine/transmit_mixer.h index ebd90a7acd..483af0518a 100644 --- a/webrtc/voice_engine/transmit_mixer.h +++ b/webrtc/voice_engine/transmit_mixer.h @@ -16,8 +16,8 @@ #include "webrtc/common_types.h" #include "webrtc/modules/audio_processing/typing_detection.h" #include "webrtc/modules/include/module_common_types.h" -#include "webrtc/voice_engine/file_player.h" -#include "webrtc/voice_engine/file_recorder.h" +#include "webrtc/modules/utility/include/file_player.h" +#include "webrtc/modules/utility/include/file_recorder.h" #include "webrtc/voice_engine/include/voe_base.h" #include "webrtc/voice_engine/level_indicator.h" #include "webrtc/voice_engine/monitor_module.h" diff --git a/webrtc/voice_engine/voice_engine.gyp b/webrtc/voice_engine/voice_engine.gyp index 5f26de1cea..17a64b5420 100644 --- a/webrtc/voice_engine/voice_engine.gyp +++ b/webrtc/voice_engine/voice_engine.gyp @@ -52,14 +52,6 @@ 'channel_manager.h', 'channel_proxy.cc', 'channel_proxy.h', - 'coder.cc', - 'coder.h', - 'file_player.h', - 'file_player_impl.cc', - 'file_player_impl.h', - 'file_recorder.h', - 'file_recorder_impl.cc', - 'file_recorder_impl.h', 'level_indicator.cc', 'level_indicator.h', 'monitor_module.cc', @@ -117,7 +109,6 @@ 'voice_engine', '<(DEPTH)/testing/gmock.gyp:gmock', '<(DEPTH)/testing/gtest.gyp:gtest', - '<(DEPTH)/third_party/gflags/gflags.gyp:gflags', # The rest are to satisfy the unittests' include chain. # This would be unnecessary if we used qualified includes. '<(webrtc_root)/common_audio/common_audio.gyp:common_audio', @@ -133,7 +124,6 @@ ], 'sources': [ 'channel_unittest.cc', - 'file_player_unittests.cc', 'network_predictor_unittest.cc', 'transmit_mixer_unittest.cc', 'utility_unittest.cc',