Move FilePlayer and FileRecorder to Voice Engine

Because Voice Engine was the only user.

R=perkj@webrtc.org, solenberg@webrtc.org

Review URL: https://codereview.webrtc.org/2037623002 .

Cr-Commit-Position: refs/heads/master@{#13261}
This commit is contained in:
Karl Wiberg 2016-06-22 23:47:42 +02:00
parent 821942d8b2
commit 65874b163e
18 changed files with 53 additions and 47 deletions

View File

@ -223,7 +223,6 @@ 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",

View File

@ -351,7 +351,6 @@
'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',

View File

@ -11,18 +11,10 @@ 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",

View File

@ -20,19 +20,11 @@
],
'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',

View File

@ -16,6 +16,14 @@ 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",

View File

@ -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/modules/utility/include/file_player.h"
#include "webrtc/modules/utility/include/file_recorder.h"
#include "webrtc/voice_engine/file_player.h"
#include "webrtc/voice_engine/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"

View File

@ -8,10 +8,11 @@
* 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 {

View File

@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef WEBRTC_MODULES_UTILITY_SOURCE_CODER_H_
#define WEBRTC_MODULES_UTILITY_SOURCE_CODER_H_
#ifndef WEBRTC_VOICE_ENGINE_CODER_H_
#define WEBRTC_VOICE_ENGINE_CODER_H_
#include <memory>
@ -65,4 +65,4 @@ class AudioCoder : public AudioPacketizationCallback {
};
} // namespace webrtc
#endif // WEBRTC_MODULES_UTILITY_SOURCE_CODER_H_
#endif // WEBRTC_VOICE_ENGINE_CODER_H_

View File

@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef WEBRTC_MODULES_UTILITY_INCLUDE_FILE_PLAYER_H_
#define WEBRTC_MODULES_UTILITY_INCLUDE_FILE_PLAYER_H_
#ifndef WEBRTC_VOICE_ENGINE_FILE_PLAYER_H_
#define WEBRTC_VOICE_ENGINE_FILE_PLAYER_H_
#include "webrtc/common_types.h"
#include "webrtc/engine_configurations.h"
@ -83,4 +83,5 @@ protected:
};
} // namespace webrtc
#endif // WEBRTC_MODULES_UTILITY_INCLUDE_FILE_PLAYER_H_
#endif // WEBRTC_VOICE_ENGINE_FILE_PLAYER_H_

View File

@ -8,7 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include "webrtc/modules/utility/source/file_player_impl.h"
#include "webrtc/voice_engine/file_player_impl.h"
#include "webrtc/system_wrappers/include/logging.h"
namespace webrtc {

View File

@ -8,18 +8,18 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef WEBRTC_MODULES_UTILITY_SOURCE_FILE_PLAYER_IMPL_H_
#define WEBRTC_MODULES_UTILITY_SOURCE_FILE_PLAYER_IMPL_H_
#ifndef WEBRTC_VOICE_ENGINE_FILE_PLAYER_IMPL_H_
#define WEBRTC_VOICE_ENGINE_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,4 +75,5 @@ private:
float _scaling;
};
} // namespace webrtc
#endif // WEBRTC_MODULES_UTILITY_SOURCE_FILE_PLAYER_IMPL_H_
#endif // WEBRTC_VOICE_ENGINE_FILE_PLAYER_IMPL_H_

View File

@ -10,8 +10,6 @@
// Unit tests for FilePlayer.
#include "webrtc/modules/utility/include/file_player.h"
#include <stdio.h>
#include <string>
@ -20,6 +18,7 @@
#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.");

View File

@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef WEBRTC_MODULES_UTILITY_INCLUDE_FILE_RECORDER_H_
#define WEBRTC_MODULES_UTILITY_INCLUDE_FILE_RECORDER_H_
#ifndef WEBRTC_VOICE_ENGINE_FILE_RECORDER_H_
#define WEBRTC_VOICE_ENGINE_FILE_RECORDER_H_
#include "webrtc/common_types.h"
#include "webrtc/engine_configurations.h"
@ -61,4 +61,5 @@ protected:
};
} // namespace webrtc
#endif // WEBRTC_MODULES_UTILITY_INCLUDE_FILE_RECORDER_H_
#endif // WEBRTC_VOICE_ENGINE_FILE_RECORDER_H_

View File

@ -8,9 +8,10 @@
* 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 {

View File

@ -12,8 +12,8 @@
// multiple file formats. The unencoded input data is written to file in the
// encoded format specified.
#ifndef WEBRTC_MODULES_UTILITY_SOURCE_FILE_RECORDER_IMPL_H_
#define WEBRTC_MODULES_UTILITY_SOURCE_FILE_RECORDER_IMPL_H_
#ifndef WEBRTC_VOICE_ENGINE_FILE_RECORDER_IMPL_H_
#define WEBRTC_VOICE_ENGINE_FILE_RECORDER_IMPL_H_
#include <list>
@ -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,4 +76,5 @@ private:
Resampler _audioResampler;
};
} // namespace webrtc
#endif // WEBRTC_MODULES_UTILITY_SOURCE_FILE_RECORDER_IMPL_H_
#endif // WEBRTC_VOICE_ENGINE_FILE_RECORDER_IMPL_H_

View File

@ -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/modules/utility/include/file_recorder.h"
#include "webrtc/voice_engine/file_recorder.h"
#include "webrtc/voice_engine/level_indicator.h"
#include "webrtc/voice_engine/voice_engine_defines.h"

View File

@ -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/modules/utility/include/file_player.h"
#include "webrtc/modules/utility/include/file_recorder.h"
#include "webrtc/voice_engine/file_player.h"
#include "webrtc/voice_engine/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"

View File

@ -52,6 +52,14 @@
'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',
@ -109,6 +117,7 @@
'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',
@ -124,6 +133,7 @@
],
'sources': [
'channel_unittest.cc',
'file_player_unittests.cc',
'network_predictor_unittest.cc',
'transmit_mixer_unittest.cc',
'utility_unittest.cc',