This CL implements webrtc::AecDump, which is an interface defined in https://codereview.webrtc.org/2778783002. This AudioProcessing submodule writes audio and APM state to a file. The file writing is done by posting IO tasks (write_to_file_task.h) on an rtc::TaskQueue. There is an existing implementation for this through AudioProcessing::StartDebugRecording() and AudioProcessing::StopDebugRecording(). This implementation still works, and is used as the default until this dependent CL: https://codereview.webrtc.org/2896813002/. To be able to build webrtc without protobuf support, the interface is isolated from protobuf types. Audio data from AudioProcessing is passed to AecDumpImpl through the AecDump interface. There it is stored in protobuf objects, which are posted on the task queue. This functionality is verified correct by the CL https://codereview.webrtc.org/2864373002, which enables this recording submodule in APM tests. BUG=webrtc:7404 Review-Url: https://codereview.webrtc.org/2865113002 Cr-Commit-Position: refs/heads/master@{#18241}
75 lines
1.4 KiB
Plaintext
75 lines
1.4 KiB
Plaintext
import("../../../webrtc.gni") # This contains def of 'rtc_enable_protobuf'
|
|
|
|
rtc_source_set("aec_dump") {
|
|
sources = [
|
|
"aec_dump_factory.h",
|
|
]
|
|
|
|
public_deps = [
|
|
"..:aec_dump_interface",
|
|
]
|
|
|
|
deps = [
|
|
"../../../base:rtc_base_approved",
|
|
]
|
|
}
|
|
|
|
if (rtc_enable_protobuf) {
|
|
rtc_source_set("aec_dump_impl") {
|
|
sources = [
|
|
"aec_dump_impl.cc",
|
|
"aec_dump_impl.h",
|
|
"capture_stream_info.cc",
|
|
"capture_stream_info.h",
|
|
"write_to_file_task.cc",
|
|
"write_to_file_task.h",
|
|
]
|
|
|
|
public = []
|
|
|
|
public_deps = [
|
|
":aec_dump",
|
|
"..:aec_dump_interface",
|
|
]
|
|
|
|
deps = [
|
|
"../../../base:protobuf_utils",
|
|
"../../../base:rtc_base_approved",
|
|
"../../../base:rtc_task_queue",
|
|
"../../../modules:module_api",
|
|
"../../../system_wrappers",
|
|
]
|
|
|
|
deps += [ "../:audioproc_debug_proto" ]
|
|
}
|
|
|
|
rtc_source_set("aec_dump_unittests") {
|
|
testonly = true
|
|
defines = []
|
|
deps = [
|
|
":aec_dump_impl",
|
|
"..:aec_dump_interface",
|
|
"..:audioproc_debug_proto",
|
|
"../../../base:rtc_task_queue",
|
|
"../../../modules:module_api",
|
|
"../../../test:test_support",
|
|
"//testing/gtest",
|
|
]
|
|
sources = [
|
|
"aec_dump_unittest.cc",
|
|
]
|
|
}
|
|
}
|
|
|
|
rtc_source_set("null_aec_dump_factory") {
|
|
assert_no_deps = [ ":aec_dump_impl" ]
|
|
sources = [
|
|
"null_aec_dump_factory.cc",
|
|
]
|
|
|
|
public_deps = [
|
|
":aec_dump",
|
|
"..:aec_dump_interface",
|
|
]
|
|
}
|