diff --git a/bundle.json b/bundle.json index 928798e75b178959a5dfb376cc4361022d739708..b7af76f8c8e5758414aa75a14b61b992c7ac1fc1 100644 --- a/bundle.json +++ b/bundle.json @@ -58,10 +58,6 @@ "//foundation/multimedia/audio_framework/services:audio_policy_service_packages", "//foundation/multimedia/audio_framework/sa_profile:audio_service_sa_profile", "//foundation/multimedia/audio_framework/sa_profile:audio_policy_service_sa_profile", - "//foundation/multimedia/audio_framework/frameworks/native/audiorenderer:audio_renderer_sink", - "//foundation/multimedia/audio_framework/frameworks/native/audiorenderer:bluetooth_renderer_sink", - "//foundation/multimedia/audio_framework/frameworks/native/audiorenderer:renderer_sink_adapter", - "//foundation/multimedia/audio_framework/frameworks/native/audiocapturer:audio_capturer_source", "//foundation/multimedia/audio_framework/frameworks/native/audioadapter:pulse_audio_service_adapter" ] }, diff --git a/frameworks/native/bluetoothclient/BUILD.gn b/frameworks/native/bluetoothclient/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..0950cab9bfc88cab8b8819a8916bf3eea1713e56 --- /dev/null +++ b/frameworks/native/bluetoothclient/BUILD.gn @@ -0,0 +1,62 @@ +# Copyright (c) 2021-2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build/ohos.gni") +import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni") +import("//foundation/multimedia/audio_framework/config.gni") + +ohos_shared_library("audio_bluetooth_client") { + install_enable = true + sources = [ + "audio_bluetooth_manager.cpp", + "bluetooth_a2dp_audio_src_observer_stub.cpp", + "bluetooth_a2dp_src_observer.cpp", + ] + + include_dirs = [ + "//foundation/communication/bluetooth/frameworks/inner/common", + "//foundation/communication/bluetooth/interfaces/inner_api/include", + "//foundation/communication/bluetooth/interfaces/inner_api/include/c_header", + "//foundation/communication/bluetooth/services/bluetooth/common/", + "//foundation/communication/bluetooth/services/bluetooth/ipc/include", + "//foundation/multimedia/audio_framework/services/include/audio_policy/server/service/interface", + "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include", + "//commonlibrary/c_utils/base/include", + "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", + "//drivers/peripheral/bluetooth/audio/interfaces/include", + "//drivers/peripheral/bluetooth/audio/hal/hdi_binder/proxy/include", + ] + + deps = [ + "$hdf_uhdf_path/hdi:libhdi", + "$hdf_uhdf_path/host:libhdf_host", + "$hdf_uhdf_path/ipc:libhdf_ipc_adapter", + "$hdf_uhdf_path/utils:libhdf_utils", + "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog", + "//foundation/communication/bluetooth/frameworks/inner:btframework", + "//foundation/communication/bluetooth/services/bluetooth/ipc:btipc_static", + "//foundation/communication/ipc/interfaces/innerkits/ipc_core:ipc_core", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink:bluetooth_renderer_sink", + ] + + external_deps = [ + "c_utils:utils", + "hiviewdfx_hilog_native:libhilog", + "ipc:ipc_core", + "safwk:system_ability_fwk", + "samgr:samgr_proxy", + ] + + part_name = "multimedia_audio_framework" + subsystem_name = "multimedia" +} diff --git a/services/src/audio_bluetooth/client/audio_bluetooth_manager.cpp b/frameworks/native/bluetoothclient/audio_bluetooth_manager.cpp similarity index 100% rename from services/src/audio_bluetooth/client/audio_bluetooth_manager.cpp rename to frameworks/native/bluetoothclient/audio_bluetooth_manager.cpp diff --git a/services/include/audio_bluetooth/client/audio_bluetooth_manager.h b/frameworks/native/bluetoothclient/audio_bluetooth_manager.h similarity index 100% rename from services/include/audio_bluetooth/client/audio_bluetooth_manager.h rename to frameworks/native/bluetoothclient/audio_bluetooth_manager.h diff --git a/services/src/audio_bluetooth/client/bluetooth_a2dp_audio_src_observer_stub.cpp b/frameworks/native/bluetoothclient/bluetooth_a2dp_audio_src_observer_stub.cpp similarity index 100% rename from services/src/audio_bluetooth/client/bluetooth_a2dp_audio_src_observer_stub.cpp rename to frameworks/native/bluetoothclient/bluetooth_a2dp_audio_src_observer_stub.cpp diff --git a/services/include/audio_bluetooth/client/bluetooth_a2dp_audio_src_observer_stub.h b/frameworks/native/bluetoothclient/bluetooth_a2dp_audio_src_observer_stub.h similarity index 100% rename from services/include/audio_bluetooth/client/bluetooth_a2dp_audio_src_observer_stub.h rename to frameworks/native/bluetoothclient/bluetooth_a2dp_audio_src_observer_stub.h diff --git a/services/src/audio_bluetooth/client/bluetooth_a2dp_src_observer.cpp b/frameworks/native/bluetoothclient/bluetooth_a2dp_src_observer.cpp similarity index 100% rename from services/src/audio_bluetooth/client/bluetooth_a2dp_src_observer.cpp rename to frameworks/native/bluetoothclient/bluetooth_a2dp_src_observer.cpp diff --git a/services/include/audio_bluetooth/client/bluetooth_a2dp_src_observer.h b/frameworks/native/bluetoothclient/bluetooth_a2dp_src_observer.h similarity index 100% rename from services/include/audio_bluetooth/client/bluetooth_a2dp_src_observer.h rename to frameworks/native/bluetoothclient/bluetooth_a2dp_src_observer.h diff --git a/frameworks/native/audiorenderer/BUILD.gn b/frameworks/native/hdiadapter/sink/BUILD.gn similarity index 59% rename from frameworks/native/audiorenderer/BUILD.gn rename to frameworks/native/hdiadapter/sink/BUILD.gn index 4e2370388b11521211ecf6131da14eaa4e8abfe4..e78a08c3899a7bad958e10eb59e7305081fb507d 100644 --- a/frameworks/native/audiorenderer/BUILD.gn +++ b/frameworks/native/hdiadapter/sink/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2022 Huawei Device Co., Ltd. +# Copyright (c) 2022-2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -9,7 +9,7 @@ # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and -# limitations under the License. +# limitations under the License. import("//build/ohos.gni") import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni") @@ -18,7 +18,7 @@ import("//foundation/multimedia/audio_framework/config.gni") ohos_shared_library("audio_renderer_sink") { install_enable = true - sources = [ "//foundation/multimedia/audio_framework/frameworks/native/audiorenderer/src/audio_renderer_sink.cpp" ] + sources = [ "primary/audio_renderer_sink.cpp" ] cflags = [ "-fPIC" ] cflags += [ "-Wall" ] @@ -28,8 +28,8 @@ ohos_shared_library("audio_renderer_sink") { cflags_cc = cflags include_dirs = [ - "//foundation/multimedia/audio_framework/frameworks/native/audiorenderer/include", "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink/common", "//commonlibrary/c_utils/base/include", "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", "//drivers/peripheral/audio/interfaces/include", @@ -57,7 +57,7 @@ ohos_shared_library("audio_renderer_sink") { ohos_shared_library("bluetooth_renderer_sink") { install_enable = true - sources = [ "//foundation/multimedia/audio_framework/frameworks/native/audiorenderer/src/bluetooth_renderer_sink.cpp" ] + sources = [ "bluetooth/bluetooth_renderer_sink.cpp" ] cflags = [ "-fPIC" ] cflags += [ "-Wall" ] @@ -65,8 +65,8 @@ ohos_shared_library("bluetooth_renderer_sink") { cflags_cc = cflags include_dirs = [ - "//foundation/multimedia/audio_framework/frameworks/native/audiorenderer/include", "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink/common", "//commonlibrary/c_utils/base/include", "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", "//drivers/peripheral/bluetooth/audio/interfaces/include", @@ -93,7 +93,7 @@ ohos_shared_library("bluetooth_renderer_sink") { ohos_shared_library("remote_audio_renderer_sink") { install_enable = true - sources = [ "//foundation/multimedia/audio_framework/frameworks/native/audiorenderer/src/remote_audio_renderer_sink.cpp" ] + sources = [ "remote/remote_audio_renderer_sink.cpp" ] cflags = [ "-fPIC" ] cflags += [ "-Wall" ] @@ -103,8 +103,8 @@ ohos_shared_library("remote_audio_renderer_sink") { } include_dirs = [ - "//foundation/multimedia/audio_framework/frameworks/native/audiorenderer/include", "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink/common", "//commonlibrary/c_utils/base/include", "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", "//drivers/peripheral/audio/interfaces/include", @@ -137,7 +137,7 @@ ohos_shared_library("remote_audio_renderer_sink") { ohos_shared_library("audio_renderer_file_sink") { install_enable = true - sources = [ "//foundation/multimedia/audio_framework/frameworks/native/audiorenderer/src/audio_renderer_file_sink.cpp" ] + sources = [ "file/audio_renderer_file_sink.cpp" ] cflags = [ "-fPIC" ] cflags += [ "-Wall" ] @@ -146,7 +146,6 @@ ohos_shared_library("audio_renderer_file_sink") { include_dirs = [ "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", - "//foundation/multimedia/audio_framework/frameworks/native/audiorenderer/include", "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include", "//commonlibrary/c_utils/base/include", ] @@ -160,58 +159,10 @@ ohos_shared_library("audio_renderer_file_sink") { external_deps = [ "c_utils:utils" ] } -ohos_shared_library("audio_bluetooth_client") { - install_enable = true - sources = [ - "//foundation/multimedia/audio_framework/services/src/audio_bluetooth/client/audio_bluetooth_manager.cpp", - "//foundation/multimedia/audio_framework/services/src/audio_bluetooth/client/bluetooth_a2dp_audio_src_observer_stub.cpp", - "//foundation/multimedia/audio_framework/services/src/audio_bluetooth/client/bluetooth_a2dp_src_observer.cpp", - ] - - include_dirs = [ - "//foundation/communication/bluetooth/frameworks/inner/common", - "//foundation/communication/bluetooth/interfaces/inner_api/include", - "//foundation/communication/bluetooth/interfaces/inner_api/include/c_header", - "//foundation/communication/bluetooth/services/bluetooth/common/", - "//foundation/communication/bluetooth/services/bluetooth/ipc/include", - "//foundation/multimedia/audio_framework/services/include/audio_policy/server/service/interface", - "//foundation/multimedia/audio_framework/services/include/audio_bluetooth/client", - "//foundation/multimedia/audio_framework/frameworks/native/audiorenderer/include", - "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include", - "//commonlibrary/c_utils/base/include", - "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", - "//drivers/peripheral/bluetooth/audio/interfaces/include", - "//drivers/peripheral/bluetooth/audio/hal/hdi_binder/proxy/include", - ] - - deps = [ - "$hdf_uhdf_path/hdi:libhdi", - "$hdf_uhdf_path/host:libhdf_host", - "$hdf_uhdf_path/ipc:libhdf_ipc_adapter", - "$hdf_uhdf_path/utils:libhdf_utils", - "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog", - "//foundation/communication/bluetooth/frameworks/inner:btframework", - "//foundation/communication/bluetooth/services/bluetooth/ipc:btipc_static", - "//foundation/communication/ipc/interfaces/innerkits/ipc_core:ipc_core", - "//foundation/multimedia/audio_framework/frameworks/native/audiorenderer:bluetooth_renderer_sink", - ] - - external_deps = [ - "c_utils:utils", - "hiviewdfx_hilog_native:libhilog", - "ipc:ipc_core", - "safwk:system_ability_fwk", - "samgr:samgr_proxy", - ] - - part_name = "multimedia_audio_framework" - subsystem_name = "multimedia" -} - ohos_shared_library("renderer_sink_adapter") { install_enable = true - sources = [ "//foundation/multimedia/audio_framework/frameworks/native/audiorenderer/src/renderer_sink_adapter.c" ] + sources = [ "common/renderer_sink_adapter.c" ] cflags = [ "-fPIC" ] cflags += [ "-Wall" ] @@ -219,22 +170,26 @@ ohos_shared_library("renderer_sink_adapter") { cflags_cc = cflags include_dirs = [ - "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", - "//drivers/peripheral/audio/interfaces/include", - "//foundation/multimedia/audio_framework/frameworks/native/audiorenderer/include", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink/common", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink/primary", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink/file", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink/bluetooth", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink/remote", "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include", - "//third_party/bounds_checking_function:libsec_static", + "//drivers/peripheral/audio/interfaces/include", "//commonlibrary/c_utils/base:utils", + "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", + "//third_party/bounds_checking_function:libsec_static", ] public_configs = [ ":audio_external_library_config" ] deps = [ "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog", - "//foundation/multimedia/audio_framework/frameworks/native/audiorenderer:audio_renderer_file_sink", - "//foundation/multimedia/audio_framework/frameworks/native/audiorenderer:audio_renderer_sink", - "//foundation/multimedia/audio_framework/frameworks/native/audiorenderer:bluetooth_renderer_sink", - "//foundation/multimedia/audio_framework/frameworks/native/audiorenderer:remote_audio_renderer_sink", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink:audio_renderer_file_sink", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink:audio_renderer_sink", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink:bluetooth_renderer_sink", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink:remote_audio_renderer_sink", ] part_name = "multimedia_audio_framework" diff --git a/frameworks/native/audiorenderer/src/bluetooth_renderer_sink.cpp b/frameworks/native/hdiadapter/sink/bluetooth/bluetooth_renderer_sink.cpp similarity index 100% rename from frameworks/native/audiorenderer/src/bluetooth_renderer_sink.cpp rename to frameworks/native/hdiadapter/sink/bluetooth/bluetooth_renderer_sink.cpp diff --git a/frameworks/native/audiorenderer/include/bluetooth_renderer_sink.h b/frameworks/native/hdiadapter/sink/bluetooth/bluetooth_renderer_sink.h similarity index 100% rename from frameworks/native/audiorenderer/include/bluetooth_renderer_sink.h rename to frameworks/native/hdiadapter/sink/bluetooth/bluetooth_renderer_sink.h diff --git a/frameworks/native/audiorenderer/include/bluetooth_renderer_sink_intf.h b/frameworks/native/hdiadapter/sink/bluetooth/bluetooth_renderer_sink_intf.h similarity index 100% rename from frameworks/native/audiorenderer/include/bluetooth_renderer_sink_intf.h rename to frameworks/native/hdiadapter/sink/bluetooth/bluetooth_renderer_sink_intf.h diff --git a/frameworks/native/audiorenderer/include/audio_sink_callback.h b/frameworks/native/hdiadapter/sink/common/audio_sink_callback.h similarity index 100% rename from frameworks/native/audiorenderer/include/audio_sink_callback.h rename to frameworks/native/hdiadapter/sink/common/audio_sink_callback.h diff --git a/frameworks/native/audiorenderer/src/renderer_sink_adapter.c b/frameworks/native/hdiadapter/sink/common/renderer_sink_adapter.c similarity index 100% rename from frameworks/native/audiorenderer/src/renderer_sink_adapter.c rename to frameworks/native/hdiadapter/sink/common/renderer_sink_adapter.c diff --git a/frameworks/native/audiorenderer/include/renderer_sink_adapter.h b/frameworks/native/hdiadapter/sink/common/renderer_sink_adapter.h similarity index 100% rename from frameworks/native/audiorenderer/include/renderer_sink_adapter.h rename to frameworks/native/hdiadapter/sink/common/renderer_sink_adapter.h diff --git a/frameworks/native/audiorenderer/src/audio_renderer_file_sink.cpp b/frameworks/native/hdiadapter/sink/file/audio_renderer_file_sink.cpp similarity index 100% rename from frameworks/native/audiorenderer/src/audio_renderer_file_sink.cpp rename to frameworks/native/hdiadapter/sink/file/audio_renderer_file_sink.cpp diff --git a/frameworks/native/audiorenderer/include/audio_renderer_file_sink.h b/frameworks/native/hdiadapter/sink/file/audio_renderer_file_sink.h similarity index 100% rename from frameworks/native/audiorenderer/include/audio_renderer_file_sink.h rename to frameworks/native/hdiadapter/sink/file/audio_renderer_file_sink.h diff --git a/frameworks/native/audiorenderer/include/audio_renderer_file_sink_intf.h b/frameworks/native/hdiadapter/sink/file/audio_renderer_file_sink_intf.h similarity index 100% rename from frameworks/native/audiorenderer/include/audio_renderer_file_sink_intf.h rename to frameworks/native/hdiadapter/sink/file/audio_renderer_file_sink_intf.h diff --git a/frameworks/native/audiorenderer/src/audio_renderer_sink.cpp b/frameworks/native/hdiadapter/sink/primary/audio_renderer_sink.cpp similarity index 100% rename from frameworks/native/audiorenderer/src/audio_renderer_sink.cpp rename to frameworks/native/hdiadapter/sink/primary/audio_renderer_sink.cpp diff --git a/frameworks/native/audiorenderer/include/audio_renderer_sink.h b/frameworks/native/hdiadapter/sink/primary/audio_renderer_sink.h similarity index 100% rename from frameworks/native/audiorenderer/include/audio_renderer_sink.h rename to frameworks/native/hdiadapter/sink/primary/audio_renderer_sink.h diff --git a/frameworks/native/audiorenderer/include/audio_renderer_sink_intf.h b/frameworks/native/hdiadapter/sink/primary/audio_renderer_sink_intf.h similarity index 100% rename from frameworks/native/audiorenderer/include/audio_renderer_sink_intf.h rename to frameworks/native/hdiadapter/sink/primary/audio_renderer_sink_intf.h diff --git a/frameworks/native/audiorenderer/src/remote_audio_renderer_sink.cpp b/frameworks/native/hdiadapter/sink/remote/remote_audio_renderer_sink.cpp similarity index 100% rename from frameworks/native/audiorenderer/src/remote_audio_renderer_sink.cpp rename to frameworks/native/hdiadapter/sink/remote/remote_audio_renderer_sink.cpp diff --git a/frameworks/native/audiorenderer/include/remote_audio_renderer_sink.h b/frameworks/native/hdiadapter/sink/remote/remote_audio_renderer_sink.h similarity index 100% rename from frameworks/native/audiorenderer/include/remote_audio_renderer_sink.h rename to frameworks/native/hdiadapter/sink/remote/remote_audio_renderer_sink.h diff --git a/frameworks/native/audiorenderer/include/remote_audio_renderer_sink_intf.h b/frameworks/native/hdiadapter/sink/remote/remote_audio_renderer_sink_intf.h similarity index 100% rename from frameworks/native/audiorenderer/include/remote_audio_renderer_sink_intf.h rename to frameworks/native/hdiadapter/sink/remote/remote_audio_renderer_sink_intf.h diff --git a/frameworks/native/audiocapturer/BUILD.gn b/frameworks/native/hdiadapter/source/BUILD.gn similarity index 77% rename from frameworks/native/audiocapturer/BUILD.gn rename to frameworks/native/hdiadapter/source/BUILD.gn index dc148be76ded17d7f83cf83e94e8e95904a0e4d3..a194a22d7dfae93cb29489cec7a6a01511d5768f 100644 --- a/frameworks/native/audiocapturer/BUILD.gn +++ b/frameworks/native/hdiadapter/source/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2022 Huawei Device Co., Ltd. +# Copyright (c) 2022-2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -9,7 +9,7 @@ # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and -# limitations under the License. +# limitations under the License. import("//build/ohos.gni") import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni") @@ -17,7 +17,7 @@ import("//foundation/multimedia/audio_framework/config.gni") ohos_shared_library("audio_capturer_source") { install_enable = true - sources = [ "//foundation/multimedia/audio_framework/frameworks/native/audiocapturer/src/audio_capturer_source.cpp" ] + sources = [ "primary/audio_capturer_source.cpp" ] cflags = [ "-fPIC" ] cflags += [ "-Wall" ] if ("${product_name}" == "m40") { @@ -26,8 +26,8 @@ ohos_shared_library("audio_capturer_source") { cflags_cc = cflags include_dirs = [ - "//foundation/multimedia/audio_framework/frameworks/native/audiocapturer/include", "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source/common", "//commonlibrary/c_utils/base/include", "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", "//drivers/peripheral/audio/interfaces/include", @@ -51,7 +51,7 @@ ohos_shared_library("audio_capturer_source") { } ohos_shared_library("remote_audio_capturer_source") { install_enable = true - sources = [ "//foundation/multimedia/audio_framework/frameworks/native/audiocapturer/src/remote_audio_capturer_source.cpp" ] + sources = [ "remote/remote_audio_capturer_source.cpp" ] cflags = [ "-fPIC" ] cflags += [ "-Wall" ] cflags_cc = cflags @@ -60,8 +60,8 @@ ohos_shared_library("remote_audio_capturer_source") { } include_dirs = [ - "//foundation/multimedia/audio_framework/frameworks/native/audiocapturer/include", "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source/common", "//commonlibrary/c_utils/base/include", "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", ] @@ -89,7 +89,7 @@ ohos_shared_library("remote_audio_capturer_source") { ohos_shared_library("audio_capturer_file_source") { install_enable = true - sources = [ "//foundation/multimedia/audio_framework/frameworks/native/audiocapturer/src/audio_capturer_file_source.cpp" ] + sources = [ "file/audio_capturer_file_source.cpp" ] cflags = [ "-fPIC" ] cflags += [ "-Wall" ] @@ -98,8 +98,8 @@ ohos_shared_library("audio_capturer_file_source") { include_dirs = [ "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", - "//foundation/multimedia/audio_framework/frameworks/native/audiocapturer/include", "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source/common", "//drivers/peripheral/audio/interfaces/include", "//commonlibrary/c_utils/base/include", ] @@ -117,8 +117,8 @@ ohos_shared_library("capturer_source_adapter") { install_enable = true sources = [ - "//foundation/multimedia/audio_framework/frameworks/native/audiocapturer/src/capturer_source_adapter.c", - "//foundation/multimedia/audio_framework/frameworks/native/audiocapturer/src/i_audio_capturer_source.cpp", + "common/capturer_source_adapter.c", + "common/i_audio_capturer_source.cpp", ] cflags = [ "-fPIC" ] @@ -127,21 +127,24 @@ ohos_shared_library("capturer_source_adapter") { cflags_cc = cflags include_dirs = [ - "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", - "//drivers/peripheral/audio/interfaces/include", - "//foundation/multimedia/audio_framework/frameworks/native/audiocapturer/include", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source/common", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source/primary", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source/file", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source/remote", "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include", - "//third_party/bounds_checking_function:libsec_static", + "//drivers/peripheral/audio/interfaces/include", + "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", "//commonlibrary/c_utils/base:utils", + "//third_party/bounds_checking_function:libsec_static", ] public_configs = [ ":audio_external_library_config" ] deps = [ "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog", - "//foundation/multimedia/audio_framework/frameworks/native/audiocapturer:audio_capturer_file_source", - "//foundation/multimedia/audio_framework/frameworks/native/audiocapturer:audio_capturer_source", - "//foundation/multimedia/audio_framework/frameworks/native/audiocapturer:remote_audio_capturer_source", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source:audio_capturer_file_source", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source:audio_capturer_source", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source:remote_audio_capturer_source", ] part_name = "multimedia_audio_framework" diff --git a/frameworks/native/audiocapturer/src/capturer_source_adapter.c b/frameworks/native/hdiadapter/source/common/capturer_source_adapter.c similarity index 100% rename from frameworks/native/audiocapturer/src/capturer_source_adapter.c rename to frameworks/native/hdiadapter/source/common/capturer_source_adapter.c diff --git a/frameworks/native/audiocapturer/include/capturer_source_adapter.h b/frameworks/native/hdiadapter/source/common/capturer_source_adapter.h similarity index 100% rename from frameworks/native/audiocapturer/include/capturer_source_adapter.h rename to frameworks/native/hdiadapter/source/common/capturer_source_adapter.h diff --git a/frameworks/native/audiocapturer/src/i_audio_capturer_source.cpp b/frameworks/native/hdiadapter/source/common/i_audio_capturer_source.cpp similarity index 100% rename from frameworks/native/audiocapturer/src/i_audio_capturer_source.cpp rename to frameworks/native/hdiadapter/source/common/i_audio_capturer_source.cpp diff --git a/frameworks/native/audiocapturer/include/i_audio_capturer_source.h b/frameworks/native/hdiadapter/source/common/i_audio_capturer_source.h similarity index 100% rename from frameworks/native/audiocapturer/include/i_audio_capturer_source.h rename to frameworks/native/hdiadapter/source/common/i_audio_capturer_source.h diff --git a/frameworks/native/audiocapturer/include/i_audio_capturer_source_intf.h b/frameworks/native/hdiadapter/source/common/i_audio_capturer_source_intf.h similarity index 100% rename from frameworks/native/audiocapturer/include/i_audio_capturer_source_intf.h rename to frameworks/native/hdiadapter/source/common/i_audio_capturer_source_intf.h diff --git a/frameworks/native/audiocapturer/src/audio_capturer_file_source.cpp b/frameworks/native/hdiadapter/source/file/audio_capturer_file_source.cpp similarity index 100% rename from frameworks/native/audiocapturer/src/audio_capturer_file_source.cpp rename to frameworks/native/hdiadapter/source/file/audio_capturer_file_source.cpp diff --git a/frameworks/native/audiocapturer/include/audio_capturer_file_source.h b/frameworks/native/hdiadapter/source/file/audio_capturer_file_source.h similarity index 100% rename from frameworks/native/audiocapturer/include/audio_capturer_file_source.h rename to frameworks/native/hdiadapter/source/file/audio_capturer_file_source.h diff --git a/frameworks/native/audiocapturer/src/audio_capturer_source.cpp b/frameworks/native/hdiadapter/source/primary/audio_capturer_source.cpp similarity index 100% rename from frameworks/native/audiocapturer/src/audio_capturer_source.cpp rename to frameworks/native/hdiadapter/source/primary/audio_capturer_source.cpp diff --git a/frameworks/native/audiocapturer/include/audio_capturer_source.h b/frameworks/native/hdiadapter/source/primary/audio_capturer_source.h similarity index 100% rename from frameworks/native/audiocapturer/include/audio_capturer_source.h rename to frameworks/native/hdiadapter/source/primary/audio_capturer_source.h diff --git a/frameworks/native/audiocapturer/src/remote_audio_capturer_source.cpp b/frameworks/native/hdiadapter/source/remote/remote_audio_capturer_source.cpp similarity index 100% rename from frameworks/native/audiocapturer/src/remote_audio_capturer_source.cpp rename to frameworks/native/hdiadapter/source/remote/remote_audio_capturer_source.cpp diff --git a/frameworks/native/audiocapturer/include/remote_audio_capturer_source.h b/frameworks/native/hdiadapter/source/remote/remote_audio_capturer_source.h similarity index 100% rename from frameworks/native/audiocapturer/include/remote_audio_capturer_source.h rename to frameworks/native/hdiadapter/source/remote/remote_audio_capturer_source.h diff --git a/frameworks/native/pulseaudio/src/modules/hdi/BUILD.gn b/frameworks/native/pulseaudio/src/modules/hdi/BUILD.gn index f0eb04c12c21823807fcae3b125e86dde5b53ca9..c9c219ca0a04b8b3e3951187822fee85bdeb271e 100644 --- a/frameworks/native/pulseaudio/src/modules/hdi/BUILD.gn +++ b/frameworks/native/pulseaudio/src/modules/hdi/BUILD.gn @@ -28,8 +28,15 @@ config("hdi_config") { "$pulseaudio_build_path/include", "//drivers/peripheral/audio/interfaces/include", "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include", - "//foundation/multimedia/audio_framework/frameworks/native/audiocapturer/include", - "//foundation/multimedia/audio_framework/frameworks/native/audiorenderer/include", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink/common", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink/primary", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink/file", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink/bluetooth", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink/remote", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source/common", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source/primary", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source/file", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source/remote", "//commonlibrary/c_utils/base/include", ] @@ -61,7 +68,7 @@ ohos_shared_library("module-hdi-sink") { "$pulseaudio_build_path/src:pulsecommon", "$pulseaudio_build_path/src/pulse:pulse", "$pulseaudio_build_path/src/pulsecore:pulsecore", - "//foundation/multimedia/audio_framework/frameworks/native/audiorenderer:renderer_sink_adapter", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink:renderer_sink_adapter", ] external_deps = [ "hiviewdfx_hilog_native:libhilog" ] @@ -84,7 +91,7 @@ ohos_shared_library("module-hdi-source") { "$pulseaudio_build_path/src:pulsecommon", "$pulseaudio_build_path/src/pulse:pulse", "$pulseaudio_build_path/src/pulsecore:pulsecore", - "//foundation/multimedia/audio_framework/frameworks/native/audiocapturer:capturer_source_adapter", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source:capturer_source_adapter", "//third_party/bounds_checking_function:libsec_static", ] diff --git a/services/src/audio_service/client/audio_ringtone_manager.cpp b/frameworks/native/systemsound/audio_ringtone_manager.cpp similarity index 100% rename from services/src/audio_service/client/audio_ringtone_manager.cpp rename to frameworks/native/systemsound/audio_ringtone_manager.cpp diff --git a/services/include/audio_service/client/audio_ringtone_manager.h b/frameworks/native/systemsound/audio_ringtone_manager.h similarity index 100% rename from services/include/audio_service/client/audio_ringtone_manager.h rename to frameworks/native/systemsound/audio_ringtone_manager.h diff --git a/interfaces/inner_api/native/audioringtone/BUILD.gn b/interfaces/inner_api/native/audioringtone/BUILD.gn index 0ef417cef163ec2d2ec70c0d735c3189d3d697ac..9bab4f31b44da1ec2f0e0bb21fbee81eab3c2a87 100644 --- a/interfaces/inner_api/native/audioringtone/BUILD.gn +++ b/interfaces/inner_api/native/audioringtone/BUILD.gn @@ -16,7 +16,7 @@ import("//foundation/multimedia/audio_framework/multimedia_aafwk.gni") ohos_shared_library("audio_ringtone_client") { install_enable = true - sources = [ "//foundation/multimedia/audio_framework/services/src/audio_service/client/audio_ringtone_manager.cpp" ] + sources = [ "//foundation/multimedia/audio_framework/frameworks/native/systemsound/audio_ringtone_manager.cpp" ] public_configs = [ ":ringtone_external_library_config" ] diff --git a/services/BUILD.gn b/services/BUILD.gn index 127b43b26f42818da4877ffd6931acde9ff0396d..25e93e4395524ca579d997c6b93d37a5590b3ab8 100644 --- a/services/BUILD.gn +++ b/services/BUILD.gn @@ -32,8 +32,13 @@ config("audio_service_config") { "include/audio_service/server", "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include", "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", - "//foundation/multimedia/audio_framework/frameworks/native/audiocapturer/include", - "//foundation/multimedia/audio_framework/frameworks/native/audiorenderer/include", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink/common", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink/primary", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink/remote", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink/file", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink/bluetooth", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source/common", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source/primary", "//drivers/peripheral/audio/interfaces/include", "include/audio_service/common", ] @@ -59,10 +64,10 @@ ohos_shared_library("audio_service") { } deps = [ - "//foundation/multimedia/audio_framework/frameworks/native/audiocapturer:audio_capturer_source", - "//foundation/multimedia/audio_framework/frameworks/native/audiorenderer:audio_renderer_sink", - "//foundation/multimedia/audio_framework/frameworks/native/audiorenderer:remote_audio_renderer_sink", - "//foundation/multimedia/audio_framework/frameworks/native/audiorenderer:renderer_sink_adapter", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink:audio_renderer_sink", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink:remote_audio_renderer_sink", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/sink:renderer_sink_adapter", + "//foundation/multimedia/audio_framework/frameworks/native/hdiadapter/source:audio_capturer_source", "//foundation/multimedia/audio_framework/frameworks/native/pulseaudio/src/daemon:pulseaudio", "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiomanager:audio_client", ] @@ -105,6 +110,7 @@ config("audio_policy_public_config") { "//foundation/multimedia/audio_framework/services/include/audio_service/common", "//foundation/multimedia/audio_framework/frameworks/native/audioadapter/include", "//foundation/multimedia/audio_framework/frameworks/native/audiopolicy/include", + "//foundation/multimedia/audio_framework/frameworks/native/bluetoothclient", "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include", "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiomanager/include", "//foundation/multimedia/audio_framework/services/include/audio_policy/server/service/common", @@ -116,7 +122,6 @@ config("audio_policy_public_config") { "//foundation/multimedia/audio_framework/services/include/audio_policy/common", "//foundation/multimedia/audio_framework/services/include/audio_policy/server", "//foundation/multimedia/audio_framework/services/include/audio_policy/client", - "//foundation/multimedia/audio_framework/services/include/audio_bluetooth/client", "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include", "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/include", "//foundation/distributeddatamgr/distributeddatamgr/interfaces/innerkits/distributeddata/include", @@ -207,7 +212,7 @@ ohos_shared_library("audio_policy_service") { "//foundation/distributeddatamgr/distributeddatamgr/interfaces/innerkits/distributeddata:distributeddata_inner", "//foundation/distributeddatamgr/distributeddatamgr/services/distributeddataservice/adapter:distributeddata_adapter", "//foundation/multimedia/audio_framework/frameworks/native/audioadapter:pulse_audio_service_adapter", - "//foundation/multimedia/audio_framework/frameworks/native/audiorenderer:audio_bluetooth_client", + "//foundation/multimedia/audio_framework/frameworks/native/bluetoothclient:audio_bluetooth_client", "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiomanager:audio_client", "//foundation/multimedia/audio_framework/services:audio_dump", "//third_party/libxml2:xml2",