Move FilePlayer and FileRecorder to Voice Engine
Because Voice Engine was the only user. (We have tried to land this many times before. I'm hoping that this time all external dependencies on these files will really be gone.) BUG=none Review-Url: https://codereview.webrtc.org/2622493002 Cr-Commit-Position: refs/heads/master@{#15978}
This commit is contained in:
3
.gn
3
.gn
@ -42,6 +42,9 @@ check_targets = [
|
||||
"//webrtc/modules/remote_bitrate_estimator/*",
|
||||
"//webrtc/stats:rtc_stats",
|
||||
"//webrtc/voice_engine",
|
||||
"//webrtc/voice_engine:audio_coder",
|
||||
"//webrtc/voice_engine:file_player",
|
||||
"//webrtc/voice_engine:file_recorder",
|
||||
"//webrtc/voice_engine:level_indicator",
|
||||
]
|
||||
|
||||
|
||||
@ -231,8 +231,6 @@ if (rtc_include_tests) {
|
||||
"//resources/synthetic-trace.rx",
|
||||
"//resources/tmobile-downlink.rx",
|
||||
"//resources/tmobile-uplink.rx",
|
||||
"//resources/utility/encapsulated_pcm16b_8khz.wav",
|
||||
"//resources/utility/encapsulated_pcmu_8khz.wav",
|
||||
"//resources/verizon3g-downlink.rx",
|
||||
"//resources/verizon3g-uplink.rx",
|
||||
"//resources/verizon4g-downlink.rx",
|
||||
@ -483,7 +481,6 @@ if (rtc_include_tests) {
|
||||
"rtp_rtcp/test/testAPI/test_api_audio.cc",
|
||||
"rtp_rtcp/test/testAPI/test_api_rtcp.cc",
|
||||
"rtp_rtcp/test/testAPI/test_api_video.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",
|
||||
|
||||
@ -11,15 +11,9 @@ import("../../build/webrtc.gni")
|
||||
rtc_static_library("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/coder.cc",
|
||||
"source/coder.h",
|
||||
"source/file_player.cc",
|
||||
"source/file_recorder.cc",
|
||||
"source/helpers_android.cc",
|
||||
"source/jvm_android.cc",
|
||||
"source/process_thread_impl.cc",
|
||||
|
||||
@ -8,6 +8,64 @@
|
||||
|
||||
import("../build/webrtc.gni")
|
||||
|
||||
rtc_static_library("audio_coder") {
|
||||
sources = [
|
||||
"coder.cc",
|
||||
"coder.h",
|
||||
]
|
||||
deps = [
|
||||
"..:webrtc_common",
|
||||
"../modules/audio_coding",
|
||||
"../modules/audio_coding:audio_format_conversion",
|
||||
"../modules/audio_coding:builtin_audio_decoder_factory",
|
||||
"../modules/audio_coding:rent_a_codec",
|
||||
]
|
||||
|
||||
if (!build_with_chromium && is_clang) {
|
||||
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
||||
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
|
||||
}
|
||||
}
|
||||
|
||||
rtc_static_library("file_player") {
|
||||
sources = [
|
||||
"file_player.cc",
|
||||
"file_player.h",
|
||||
]
|
||||
deps = [
|
||||
":audio_coder",
|
||||
"..:webrtc_common",
|
||||
"../common_audio",
|
||||
"../modules/media_file",
|
||||
"../system_wrappers",
|
||||
]
|
||||
|
||||
if (!build_with_chromium && is_clang) {
|
||||
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
||||
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
|
||||
}
|
||||
}
|
||||
|
||||
rtc_static_library("file_recorder") {
|
||||
sources = [
|
||||
"file_recorder.cc",
|
||||
"file_recorder.h",
|
||||
]
|
||||
deps = [
|
||||
":audio_coder",
|
||||
"..:webrtc_common",
|
||||
"../base:rtc_base_approved",
|
||||
"../common_audio",
|
||||
"../modules/media_file:media_file",
|
||||
"../system_wrappers",
|
||||
]
|
||||
|
||||
if (!build_with_chromium && is_clang) {
|
||||
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
||||
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
|
||||
}
|
||||
}
|
||||
|
||||
rtc_static_library("voice_engine") {
|
||||
sources = [
|
||||
"channel.cc",
|
||||
@ -85,6 +143,8 @@ rtc_static_library("voice_engine") {
|
||||
"../modules/audio_coding",
|
||||
]
|
||||
deps = [
|
||||
":file_player",
|
||||
":file_recorder",
|
||||
":level_indicator",
|
||||
"..:webrtc_common",
|
||||
"../api:audio_mixer_api",
|
||||
@ -191,6 +251,7 @@ if (rtc_include_tests) {
|
||||
":voice_engine",
|
||||
"//testing/gmock",
|
||||
"//testing/gtest",
|
||||
"//third_party/gflags",
|
||||
"//webrtc/common_audio",
|
||||
"//webrtc/modules/audio_coding",
|
||||
"//webrtc/modules/audio_conference_mixer",
|
||||
@ -210,6 +271,7 @@ if (rtc_include_tests) {
|
||||
|
||||
sources = [
|
||||
"channel_unittest.cc",
|
||||
"file_player_unittests.cc",
|
||||
"test/channel_transport/udp_socket_manager_unittest.cc",
|
||||
"test/channel_transport/udp_socket_wrapper_unittest.cc",
|
||||
"test/channel_transport/udp_transport_unittest.cc",
|
||||
@ -223,6 +285,11 @@ if (rtc_include_tests) {
|
||||
"voice_engine_fixture.h",
|
||||
]
|
||||
|
||||
data = [
|
||||
"//resources/utility/encapsulated_pcm16b_8khz.wav",
|
||||
"//resources/utility/encapsulated_pcmu_8khz.wav",
|
||||
]
|
||||
|
||||
if (is_win) {
|
||||
defines = [ "WEBRTC_DRIFT_COMPENSATION_SUPPORTED" ]
|
||||
|
||||
|
||||
@ -28,8 +28,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_base.h"
|
||||
#include "webrtc/voice_engine/include/voe_network.h"
|
||||
|
||||
@ -8,11 +8,12 @@
|
||||
* 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/audio_format_conversion.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 {
|
||||
@ -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_
|
||||
@ -8,16 +8,16 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "webrtc/modules/utility/include/file_player.h"
|
||||
#include "webrtc/voice_engine/file_player.h"
|
||||
|
||||
#include "webrtc/common_audio/resampler/include/resampler.h"
|
||||
#include "webrtc/common_types.h"
|
||||
#include "webrtc/modules/media_file/media_file.h"
|
||||
#include "webrtc/modules/media_file/media_file_defines.h"
|
||||
#include "webrtc/modules/utility/source/coder.h"
|
||||
#include "webrtc/system_wrappers/include/critical_section_wrapper.h"
|
||||
#include "webrtc/system_wrappers/include/logging.h"
|
||||
#include "webrtc/typedefs.h"
|
||||
#include "webrtc/voice_engine/coder.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -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 <memory>
|
||||
|
||||
@ -77,4 +77,4 @@ class FilePlayer {
|
||||
virtual int32_t SetAudioScaling(float scaleFactor) = 0;
|
||||
};
|
||||
} // namespace webrtc
|
||||
#endif // WEBRTC_MODULES_UTILITY_INCLUDE_FILE_PLAYER_H_
|
||||
#endif // WEBRTC_VOICE_ENGINE_FILE_PLAYER_H_
|
||||
@ -10,7 +10,7 @@
|
||||
|
||||
// Unit tests for FilePlayer.
|
||||
|
||||
#include "webrtc/modules/utility/include/file_player.h"
|
||||
#include "webrtc/voice_engine/file_player.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "webrtc/modules/utility/include/file_recorder.h"
|
||||
#include "webrtc/voice_engine/file_recorder.h"
|
||||
|
||||
#include <list>
|
||||
|
||||
@ -18,10 +18,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/source/coder.h"
|
||||
#include "webrtc/system_wrappers/include/event_wrapper.h"
|
||||
#include "webrtc/system_wrappers/include/logging.h"
|
||||
#include "webrtc/typedefs.h"
|
||||
#include "webrtc/voice_engine/coder.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -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 <memory>
|
||||
|
||||
@ -54,4 +54,4 @@ class FileRecorder {
|
||||
};
|
||||
|
||||
} // namespace webrtc
|
||||
#endif // WEBRTC_MODULES_UTILITY_INCLUDE_FILE_RECORDER_H_
|
||||
#endif // WEBRTC_VOICE_ENGINE_FILE_RECORDER_H_
|
||||
@ -18,7 +18,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"
|
||||
|
||||
|
||||
@ -18,8 +18,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"
|
||||
|
||||
Reference in New Issue
Block a user