Extract some test code out from audio_device_impl into own targets
Bug: b/272350185, webrtc:15081 Change-Id: Ic7a0c8b335bb60d7975a490896da92aa95575ca5 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/310784 Commit-Queue: Artem Titov <titovartem@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/main@{#40384}
This commit is contained in:
parent
9948623027
commit
415e30fdbb
@ -57,11 +57,14 @@ rtc_source_set("audio_device_api") {
|
||||
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
|
||||
}
|
||||
|
||||
rtc_library("audio_device_config") {
|
||||
sources = [ "audio_device_config.h" ]
|
||||
}
|
||||
|
||||
rtc_library("audio_device_buffer") {
|
||||
sources = [
|
||||
"audio_device_buffer.cc",
|
||||
"audio_device_buffer.h",
|
||||
"audio_device_config.h",
|
||||
"fine_audio_buffer.cc",
|
||||
"fine_audio_buffer.h",
|
||||
]
|
||||
@ -209,6 +212,47 @@ if (!build_with_chromium) {
|
||||
}
|
||||
}
|
||||
|
||||
rtc_library("audio_device_dummy") {
|
||||
visibility = [ "*" ]
|
||||
sources = [
|
||||
"dummy/audio_device_dummy.cc",
|
||||
"dummy/audio_device_dummy.h",
|
||||
]
|
||||
deps = [
|
||||
":audio_device_api",
|
||||
":audio_device_buffer",
|
||||
":audio_device_generic",
|
||||
]
|
||||
}
|
||||
|
||||
if (!build_with_chromium) {
|
||||
rtc_library("file_audio_device") {
|
||||
visibility = [ "*" ]
|
||||
sources = [
|
||||
"dummy/file_audio_device.cc",
|
||||
"dummy/file_audio_device.h",
|
||||
"dummy/file_audio_device_factory.cc",
|
||||
"dummy/file_audio_device_factory.h",
|
||||
]
|
||||
defines = []
|
||||
if (rtc_use_dummy_audio_file_devices) {
|
||||
defines += [ "WEBRTC_DUMMY_FILE_DEVICES" ]
|
||||
}
|
||||
deps = [
|
||||
":audio_device_generic",
|
||||
"../../rtc_base:checks",
|
||||
"../../rtc_base:logging",
|
||||
"../../rtc_base:platform_thread",
|
||||
"../../rtc_base:stringutils",
|
||||
"../../rtc_base:timeutils",
|
||||
"../../rtc_base/synchronization:mutex",
|
||||
"../../rtc_base/system:file_wrapper",
|
||||
"../../system_wrappers",
|
||||
]
|
||||
absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
|
||||
}
|
||||
}
|
||||
|
||||
# Contains default implementations of webrtc::AudioDeviceModule for Windows,
|
||||
# Linux, Mac, iOS and Android.
|
||||
rtc_library("audio_device_impl") {
|
||||
@ -216,7 +260,9 @@ rtc_library("audio_device_impl") {
|
||||
deps = [
|
||||
":audio_device_api",
|
||||
":audio_device_buffer",
|
||||
":audio_device_config",
|
||||
":audio_device_default",
|
||||
":audio_device_dummy",
|
||||
":audio_device_generic",
|
||||
"../../api:array_view",
|
||||
"../../api:make_ref_counted",
|
||||
@ -254,13 +300,7 @@ rtc_library("audio_device_impl") {
|
||||
deps += [ "../../sdk:audio_device" ]
|
||||
}
|
||||
|
||||
sources = [
|
||||
"dummy/audio_device_dummy.cc",
|
||||
"dummy/audio_device_dummy.h",
|
||||
"dummy/file_audio_device.cc",
|
||||
"dummy/file_audio_device.h",
|
||||
"include/fake_audio_device.h",
|
||||
]
|
||||
sources = [ "include/fake_audio_device.h" ]
|
||||
|
||||
if (build_with_mozilla) {
|
||||
sources += [
|
||||
@ -396,11 +436,10 @@ rtc_library("audio_device_impl") {
|
||||
}
|
||||
|
||||
if (!build_with_chromium) {
|
||||
sources += [
|
||||
# Do not link these into Chrome since they contain static data.
|
||||
"dummy/file_audio_device_factory.cc",
|
||||
"dummy/file_audio_device_factory.h",
|
||||
]
|
||||
deps += [ ":file_audio_device" ]
|
||||
|
||||
# TODO(titovartem): remove after downstream is fixed
|
||||
sources += [ "dummy/file_audio_device_factory.h" ]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -303,6 +303,7 @@ if (is_ios || is_mac) {
|
||||
"../api/task_queue:pending_task_safety_flag",
|
||||
"../modules/audio_device:audio_device_api",
|
||||
"../modules/audio_device:audio_device_buffer",
|
||||
"../modules/audio_device:audio_device_config",
|
||||
"../modules/audio_device:audio_device_generic",
|
||||
"../rtc_base:buffer",
|
||||
"../rtc_base:checks",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user