From 2cbcae7f7e85010a1ec912ecabcabde036d650e4 Mon Sep 17 00:00:00 2001 From: hwwuhaobo Date: Wed, 19 Apr 2023 15:43:52 +0800 Subject: [PATCH 01/20] fix daudio ext build Signed-off-by: hwwuhaobo --- bundle.json | 32 +++++++ services/audioclient/BUILD.gn | 85 +++++++++++++++++++ .../spkclient/src/dspeaker_client.cpp | 1 - services/audiomanager/servicesink/BUILD.gn | 8 +- .../audiotransport/decodetransport/BUILD.gn | 13 +++ .../audiotransport/encodetransport/BUILD.gn | 13 +++ services/common/BUILD.gn | 2 + 7 files changed, 146 insertions(+), 8 deletions(-) create mode 100644 services/audioclient/BUILD.gn diff --git a/bundle.json b/bundle.json index bcd6ba69..ddd52e7f 100755 --- a/bundle.json +++ b/bundle.json @@ -55,6 +55,7 @@ "//foundation/distributedhardware/distributed_audio/services/common:distributed_audio_utils", "//foundation/distributedhardware/distributed_audio/services/hdfaudioclient:daudio_client", + "//foundation/distributedhardware/distributed_audio/services/audioclient:distributed_audio_sink_client", "//foundation/distributedhardware/distributed_audio/services/audiomanager/servicesource:distributed_audio_source", "//foundation/distributedhardware/distributed_audio/services/audiomanager/servicesink:distributed_audio_sink", @@ -88,6 +89,37 @@ ] } }, + { + "type": "so", + "name": "//foundation/distributedhardware/distributed_audio/services/audio_client:distributed_audio_sink_client", + "header": { + "header_base": "//foundation/distributedhardware/distributed_audio/services/audio_client", + "header_files": [ + "interface/imic_client.h", + "interface/ispk_client.h" + ] + } + }, + { + "type": "so", + "name": "//foundation/distributedhardware/distributed_audio/services/audiotransport/decodetransport:distributed_audio_decode_transport", + "header": { + "header_base": "//foundation/distributedhardware/distributed_audio/services/audiotransport/decodetransport", + "header_files": [ + "include/audio_decode_transport.h" + ] + } + }, + { + "type": "so", + "name": "//foundation/distributedhardware/distributed_audio/services/audiotransport/encodetransport:distributed_audio_encode_transport", + "header": { + "header_base": "//foundation/distributedhardware/distributed_audio/services/audiotransport/encodetransport", + "header_files": [ + "include/audio_encode_transport.h" + ] + } + }, { "type": "so", "name": "//foundation/distributedhardware/distributed_audio/services/common:distributed_audio_utils", diff --git a/services/audioclient/BUILD.gn b/services/audioclient/BUILD.gn new file mode 100644 index 00000000..c972095e --- /dev/null +++ b/services/audioclient/BUILD.gn @@ -0,0 +1,85 @@ +# Copyright (c) 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("//build/ohos_var.gni") +import("../../distributedaudio.gni") + +config("daudio_client_pub_config"){ + include_dirs = [ + "interface", + ] +} + +ohos_shared_library("distributed_audio_sink_client") { + include_dirs = [ + "//base/hiviewdfx/hisysevent/interfaces/native/innerkits/hisysevent/include", + "//base/hiviewdfx/hitrace/interfaces/native/innerkits/include/hitrace_meter", + "//foundation/multimedia/audio_framework/frameworks/native/common/include", + "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocapturer/include", + "//third_party/json/include", + "${mediastandardfwk_path}/audiocapturer/include", + "${mediastandardfwk_path}/audiocommon/include", + "${mediastandardfwk_path}/audiorenderer/include", + "${mediastandardfwk_path}/audiomanager/include", + ] + + include_dirs += [ + "include", + "${audio_client_path}/micclient/include", + "${audio_client_path}/spkclient/include", + "${audio_client_path}/interface", + "${audio_processor_path}/encodeprocessor/include", + "${audio_processor_path}/decodeprocessor/include", + "${audio_processor_path}/interface", + "${audio_transport_path}/audiochannel/interface", + "${audio_transport_path}/audiochannel/audiodatachannel/include", + "${audio_transport_path}/decodetransport/include", + "${audio_transport_path}/encodetransport/include", + "${audio_transport_path}/interface", + "${common_path}/include", + "${common_path}/dfx_utils/include", + "${fwk_common_path}/utils/include", + "${services_path}/common/audioparam", + "${services_path}/common/audioeventcallback", + "${services_path}/common/audiodata/include", + ] + + public_configs = [ ":daudio_client_pub_config" ] + + sources = [ + "${audio_client_path}/micclient/src/dmic_client.cpp", + "${audio_client_path}/spkclient/src/dspeaker_client.cpp", + ] + + deps = [ + "${audio_transport_path}/decodetransport:distributed_audio_decode_transport", + "${audio_transport_path}/encodetransport:distributed_audio_encode_transport", + "${services_path}/common:distributed_audio_utils", + ] + + external_deps = [ + "multimedia_audio_framework:audio_capturer", + "multimedia_audio_framework:audio_client", + "multimedia_audio_framework:audio_renderer", + ] + + defines = [ + "HI_LOG_ENABLE", + "LOG_DOMAIN=0xD004100", + ] + + subsystem_name = "distributedhardware" + + part_name = "distributed_audio" +} diff --git a/services/audioclient/spkclient/src/dspeaker_client.cpp b/services/audioclient/spkclient/src/dspeaker_client.cpp index a0b63064..b9e5315e 100644 --- a/services/audioclient/spkclient/src/dspeaker_client.cpp +++ b/services/audioclient/spkclient/src/dspeaker_client.cpp @@ -18,7 +18,6 @@ #include "daudio_constants.h" #include "daudio_hisysevent.h" #include "daudio_util.h" -#include "dh_utils_tool.h" #undef DH_LOG_TAG #define DH_LOG_TAG "DSpeakerClient" diff --git a/services/audiomanager/servicesink/BUILD.gn b/services/audiomanager/servicesink/BUILD.gn index bd822197..fd84b7fe 100755 --- a/services/audiomanager/servicesink/BUILD.gn +++ b/services/audiomanager/servicesink/BUILD.gn @@ -28,10 +28,6 @@ ohos_shared_library("distributed_audio_sink") { "//third_party/json/include", "//utils/system/safwk/native/include", "${fwk_common_path}/utils/include", - "${mediastandardfwk_path}/audiocapturer/include", - "${mediastandardfwk_path}/audiocommon/include", - "${mediastandardfwk_path}/audiorenderer/include", - "${mediastandardfwk_path}/audiomanager/include", ] include_dirs += [ @@ -39,7 +35,6 @@ ohos_shared_library("distributed_audio_sink") { "${audio_client_path}/micclient/include", "${audio_client_path}/spkclient/include", "${audio_control_path}/controlsink/include", - "${audio_client_path}/interface", "${audio_processor_path}/encodeprocessor/include", "${audio_processor_path}/decodeprocessor/include", "${audio_processor_path}/interface", @@ -67,8 +62,6 @@ ohos_shared_library("distributed_audio_sink") { ] sources = [ - "${audio_client_path}/micclient/src/dmic_client.cpp", - "${audio_client_path}/spkclient/src/dspeaker_client.cpp", "${audio_control_path}/controlsink/src/daudio_sink_dev_ctrl_manager.cpp", "${innerkits_path}/native_cpp/audio_sink/src/daudio_sink_handler.cpp", "${innerkits_path}/native_cpp/audio_sink/src/daudio_sink_load_callback.cpp", @@ -82,6 +75,7 @@ ohos_shared_library("distributed_audio_sink") { deps = [ "${audio_transport_path}/audioctrltransport:distributed_audio_control", + "${services_path}/audioclient:distributed_audio_sink_client", "${audio_transport_path}/decodetransport:distributed_audio_decode_transport", "${audio_transport_path}/encodetransport:distributed_audio_encode_transport", "${services_path}/common:distributed_audio_utils", diff --git a/services/audiotransport/decodetransport/BUILD.gn b/services/audiotransport/decodetransport/BUILD.gn index 2c920c4d..3d2fe28d 100644 --- a/services/audiotransport/decodetransport/BUILD.gn +++ b/services/audiotransport/decodetransport/BUILD.gn @@ -15,6 +15,17 @@ import("//build/ohos.gni") import("//build/ohos_var.gni") import("../../../distributedaudio.gni") +config("decode_transport_pub_config") { + include_dirs = [ + "include", + "../audiotransportstatus/include", + "../audiotransportstatus/interface", + "../interface", + "../audiochannel/interface", + "../audiochannel/audiodatachannel/include", + ] +} + ohos_shared_library("distributed_audio_decode_transport") { include_dirs = [ "//base/hiviewdfx/hisysevent/interfaces/native/innerkits/hisysevent/include", @@ -43,6 +54,8 @@ ohos_shared_library("distributed_audio_decode_transport") { "${softbusadapter_path}/include", ] + public_configs = [ :"decode_transport_pub_config" ] + sources = [ "${audio_processor_path}/decodeprocessor/src/audio_decoder_processor.cpp", "${audio_processor_path}/decoder/src/audio_decoder.cpp", diff --git a/services/audiotransport/encodetransport/BUILD.gn b/services/audiotransport/encodetransport/BUILD.gn index 7dbd57b4..07642535 100644 --- a/services/audiotransport/encodetransport/BUILD.gn +++ b/services/audiotransport/encodetransport/BUILD.gn @@ -15,6 +15,17 @@ import("//build/ohos.gni") import("//build/ohos_var.gni") import("../../../distributedaudio.gni") +config("encode_transport_pub_config") { + include_dirs = [ + "include", + "../audiotransportstatus/include", + "../audiotransportstatus/interface", + "../interface", + "../audiochannel/interface", + "../audiochannel/audiodatachannel/include", + ] +} + ohos_shared_library("distributed_audio_encode_transport") { include_dirs = [ "//base/hiviewdfx/hisysevent/interfaces/native/innerkits/hisysevent/include", @@ -43,6 +54,8 @@ ohos_shared_library("distributed_audio_encode_transport") { "${softbusadapter_path}/include", ] + public_configs = [ :"encode_transport_pub_config" ] + sources = [ "${audio_processor_path}/encodeprocessor/src/audio_encoder_processor.cpp", "${audio_processor_path}/encoder/src/audio_encoder.cpp", diff --git a/services/common/BUILD.gn b/services/common/BUILD.gn index fd1793ed..f6f06a66 100644 --- a/services/common/BUILD.gn +++ b/services/common/BUILD.gn @@ -18,8 +18,10 @@ import("../../distributedaudio.gni") config("daudio_common_pub_config") { include_dirs = [ "audiodata/include", + "audioeventcallback", "audioparam", "${common_path}/include", + "${common_path}/dfxutils/include", ] } -- Gitee From 81d357dc577f2395370b1384717f898d079e1bdc Mon Sep 17 00:00:00 2001 From: hwwuhaobo Date: Wed, 19 Apr 2023 15:53:45 +0800 Subject: [PATCH 02/20] fix daudio ext build Signed-off-by: hwwuhaobo --- services/audiotransport/decodetransport/BUILD.gn | 2 +- services/audiotransport/encodetransport/BUILD.gn | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/services/audiotransport/decodetransport/BUILD.gn b/services/audiotransport/decodetransport/BUILD.gn index 3d2fe28d..c4ec6065 100644 --- a/services/audiotransport/decodetransport/BUILD.gn +++ b/services/audiotransport/decodetransport/BUILD.gn @@ -54,7 +54,7 @@ ohos_shared_library("distributed_audio_decode_transport") { "${softbusadapter_path}/include", ] - public_configs = [ :"decode_transport_pub_config" ] + public_configs = [ ":decode_transport_pub_config" ] sources = [ "${audio_processor_path}/decodeprocessor/src/audio_decoder_processor.cpp", diff --git a/services/audiotransport/encodetransport/BUILD.gn b/services/audiotransport/encodetransport/BUILD.gn index 07642535..aae44478 100644 --- a/services/audiotransport/encodetransport/BUILD.gn +++ b/services/audiotransport/encodetransport/BUILD.gn @@ -54,7 +54,7 @@ ohos_shared_library("distributed_audio_encode_transport") { "${softbusadapter_path}/include", ] - public_configs = [ :"encode_transport_pub_config" ] + public_configs = [ ":encode_transport_pub_config" ] sources = [ "${audio_processor_path}/encodeprocessor/src/audio_encoder_processor.cpp", -- Gitee From c9075579d897838fe07073697dc7c4073a227162 Mon Sep 17 00:00:00 2001 From: hwwuhaobo Date: Wed, 19 Apr 2023 16:06:10 +0800 Subject: [PATCH 03/20] fix daudio ext build Signed-off-by: hwwuhaobo --- bundle.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bundle.json b/bundle.json index ddd52e7f..bad4c763 100755 --- a/bundle.json +++ b/bundle.json @@ -91,9 +91,9 @@ }, { "type": "so", - "name": "//foundation/distributedhardware/distributed_audio/services/audio_client:distributed_audio_sink_client", + "name": "//foundation/distributedhardware/distributed_audio/services/audioclient:distributed_audio_sink_client", "header": { - "header_base": "//foundation/distributedhardware/distributed_audio/services/audio_client", + "header_base": "//foundation/distributedhardware/distributed_audio/services/audioclient", "header_files": [ "interface/imic_client.h", "interface/ispk_client.h" -- Gitee From 49d59500dd533f777feb9a092e9f8fc7297a136b Mon Sep 17 00:00:00 2001 From: hwwuhaobo Date: Wed, 19 Apr 2023 16:10:44 +0800 Subject: [PATCH 04/20] fix daudio ext build Signed-off-by: hwwuhaobo --- services/audioclient/BUILD.gn | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/services/audioclient/BUILD.gn b/services/audioclient/BUILD.gn index c972095e..08c82b50 100644 --- a/services/audioclient/BUILD.gn +++ b/services/audioclient/BUILD.gn @@ -23,15 +23,7 @@ config("daudio_client_pub_config"){ ohos_shared_library("distributed_audio_sink_client") { include_dirs = [ - "//base/hiviewdfx/hisysevent/interfaces/native/innerkits/hisysevent/include", - "//base/hiviewdfx/hitrace/interfaces/native/innerkits/include/hitrace_meter", - "//foundation/multimedia/audio_framework/frameworks/native/common/include", - "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocapturer/include", "//third_party/json/include", - "${mediastandardfwk_path}/audiocapturer/include", - "${mediastandardfwk_path}/audiocommon/include", - "${mediastandardfwk_path}/audiorenderer/include", - "${mediastandardfwk_path}/audiomanager/include", ] include_dirs += [ @@ -69,6 +61,8 @@ ohos_shared_library("distributed_audio_sink_client") { ] external_deps = [ + "hisysevent_native:libhisysevent", + "hitrace_native:hitrace_meter", "multimedia_audio_framework:audio_capturer", "multimedia_audio_framework:audio_client", "multimedia_audio_framework:audio_renderer", -- Gitee From a5221eb60dbf90f0c9bd5acefd3533158b11b5bf Mon Sep 17 00:00:00 2001 From: hwwuhaobo Date: Wed, 19 Apr 2023 16:49:19 +0800 Subject: [PATCH 05/20] fix daudio ext build Signed-off-by: hwwuhaobo --- services/audioclient/test/unittest/micclient/BUILD.gn | 2 +- services/audioclient/test/unittest/spkclient/BUILD.gn | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/services/audioclient/test/unittest/micclient/BUILD.gn b/services/audioclient/test/unittest/micclient/BUILD.gn index 77246db6..8137dcec 100644 --- a/services/audioclient/test/unittest/micclient/BUILD.gn +++ b/services/audioclient/test/unittest/micclient/BUILD.gn @@ -60,7 +60,7 @@ ohos_unittest("MicClientTest") { configs = [ ":module_private_config" ] deps = [ - "${services_path}/audiomanager/servicesink:distributed_audio_sink", + "${services_path}/audio_client:distributed_audio_sink_client", "//third_party/googletest:gmock", "//third_party/googletest:gtest_main", ] diff --git a/services/audioclient/test/unittest/spkclient/BUILD.gn b/services/audioclient/test/unittest/spkclient/BUILD.gn index 118cd99b..1bc22d08 100644 --- a/services/audioclient/test/unittest/spkclient/BUILD.gn +++ b/services/audioclient/test/unittest/spkclient/BUILD.gn @@ -64,7 +64,7 @@ ohos_unittest("SpeakerClientTest") { configs = [ ":module_private_config" ] deps = [ - "${services_path}/audiomanager/servicesink:distributed_audio_sink", + "${services_path}/audio_client:distributed_audio_sink_client", "${services_path}/common:distributed_audio_utils", "//third_party/googletest:gmock", "//third_party/googletest:gtest_main", -- Gitee From 1d657dafb20e64dbfedea7776216081c0e6fe759 Mon Sep 17 00:00:00 2001 From: hwwuhaobo Date: Wed, 19 Apr 2023 16:53:14 +0800 Subject: [PATCH 06/20] fix daudio ext build Signed-off-by: hwwuhaobo --- services/audioclient/BUILD.gn | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/services/audioclient/BUILD.gn b/services/audioclient/BUILD.gn index 08c82b50..52d40404 100644 --- a/services/audioclient/BUILD.gn +++ b/services/audioclient/BUILD.gn @@ -15,16 +15,12 @@ import("//build/ohos.gni") import("//build/ohos_var.gni") import("../../distributedaudio.gni") -config("daudio_client_pub_config"){ - include_dirs = [ - "interface", - ] +config("daudio_client_pub_config") { + include_dirs = [ "interface" ] } ohos_shared_library("distributed_audio_sink_client") { - include_dirs = [ - "//third_party/json/include", - ] + include_dirs = [ "//third_party/json/include" ] include_dirs += [ "include", @@ -76,4 +72,4 @@ ohos_shared_library("distributed_audio_sink_client") { subsystem_name = "distributedhardware" part_name = "distributed_audio" -} +} \ No newline at end of file -- Gitee From 161f669812d3fdca3eadfe35148083716dc98733 Mon Sep 17 00:00:00 2001 From: hwwuhaobo Date: Wed, 19 Apr 2023 17:04:09 +0800 Subject: [PATCH 07/20] fix daudio ext build Signed-off-by: hwwuhaobo --- services/audioclient/test/unittest/micclient/BUILD.gn | 2 +- services/audioclient/test/unittest/spkclient/BUILD.gn | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/services/audioclient/test/unittest/micclient/BUILD.gn b/services/audioclient/test/unittest/micclient/BUILD.gn index 8137dcec..cac58504 100644 --- a/services/audioclient/test/unittest/micclient/BUILD.gn +++ b/services/audioclient/test/unittest/micclient/BUILD.gn @@ -60,7 +60,7 @@ ohos_unittest("MicClientTest") { configs = [ ":module_private_config" ] deps = [ - "${services_path}/audio_client:distributed_audio_sink_client", + "${services_path}/audioclient:distributed_audio_sink_client", "//third_party/googletest:gmock", "//third_party/googletest:gtest_main", ] diff --git a/services/audioclient/test/unittest/spkclient/BUILD.gn b/services/audioclient/test/unittest/spkclient/BUILD.gn index 1bc22d08..a5d21277 100644 --- a/services/audioclient/test/unittest/spkclient/BUILD.gn +++ b/services/audioclient/test/unittest/spkclient/BUILD.gn @@ -64,7 +64,7 @@ ohos_unittest("SpeakerClientTest") { configs = [ ":module_private_config" ] deps = [ - "${services_path}/audio_client:distributed_audio_sink_client", + "${services_path}/audioclient:distributed_audio_sink_client", "${services_path}/common:distributed_audio_utils", "//third_party/googletest:gmock", "//third_party/googletest:gtest_main", -- Gitee From 6f9a65a1cba3b0e7d9bb14cfcf4f46f3fe0ae3d4 Mon Sep 17 00:00:00 2001 From: hwwuhaobo Date: Wed, 19 Apr 2023 17:26:41 +0800 Subject: [PATCH 08/20] fix daudio ext build Signed-off-by: hwwuhaobo --- .../audio/v1_0/include/audio_capture_interface_impl.h | 8 -------- .../v1_0/include/audio_capture_interface_impl_base.h | 8 ++++++++ .../audio/v1_0/include/audio_render_interface_impl.h | 7 ------- .../v1_0/include/audio_render_interface_impl_base.h | 9 +++++++++ services/audiomanager/test/unittest/managersink/BUILD.gn | 1 + 5 files changed, 18 insertions(+), 15 deletions(-) diff --git a/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_capture_interface_impl.h b/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_capture_interface_impl.h index d60f8db4..63b96869 100644 --- a/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_capture_interface_impl.h +++ b/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_capture_interface_impl.h @@ -35,14 +35,6 @@ using OHOS::HDI::DistributedAudio::Audioext::V1_0::AudioParameter; using OHOS::HDI::DistributedAudio::Audioext::V1_0::DAudioEvent; using OHOS::HDI::DistributedAudio::Audioext::V1_0::IDAudioCallback; -typedef enum { - CAPTURE_STATUS_OPEN = 0, - CAPTURE_STATUS_CLOSE, - CAPTURE_STATUS_START, - CAPTURE_STATUS_STOP, - CAPTURE_STATUS_PAUSE, -} AudioCaptureStatus; - class AudioCaptureInterfaceImpl : public AudioCaptureInterfaceImplBase { public: AudioCaptureInterfaceImpl(const std::string &adpName, const AudioDeviceDescriptor &desc, diff --git a/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_capture_interface_impl_base.h b/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_capture_interface_impl_base.h index 6282dc67..453315e6 100644 --- a/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_capture_interface_impl_base.h +++ b/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_capture_interface_impl_base.h @@ -30,6 +30,14 @@ using OHOS::HDI::DistributedAudio::Audioext::V1_0::AudioData; using OHOS::HDI::DistributedAudio::Audioext::V1_0::AudioParameter; using OHOS::HDI::DistributedAudio::Audioext::V1_0::IDAudioCallback; +typedef enum { + CAPTURE_STATUS_OPEN = 0, + CAPTURE_STATUS_CLOSE, + CAPTURE_STATUS_START, + CAPTURE_STATUS_STOP, + CAPTURE_STATUS_PAUSE, +} AudioCaptureStatus; + class AudioCaptureInterfaceImplBase : public IAudioCapture { public: AudioCaptureInterfaceImplBase(const AudioDeviceDescriptor &desc); diff --git a/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_render_interface_impl.h b/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_render_interface_impl.h index ff602bd8..0e703314 100644 --- a/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_render_interface_impl.h +++ b/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_render_interface_impl.h @@ -38,13 +38,6 @@ using OHOS::HDI::DistributedAudio::Audioext::V1_0::IDAudioCallback; constexpr uint32_t DURATION_FRAMES = 100; constexpr uint32_t CUR_FRAME_INIT_VALUE = 0; -typedef enum { - RENDER_STATUS_OPEN = 0, - RENDER_STATUS_CLOSE, - RENDER_STATUS_START, - RENDER_STATUS_STOP, - RENDER_STATUS_PAUSE, -} AudioRenderStatus; class AudioRenderInterfaceImpl : public AudioRenderInterfaceImplBase { public: diff --git a/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_render_interface_impl_base.h b/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_render_interface_impl_base.h index 4243a620..7e38d9bd 100644 --- a/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_render_interface_impl_base.h +++ b/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_render_interface_impl_base.h @@ -29,6 +29,15 @@ namespace HDI { namespace DistributedAudio { namespace Audio { namespace V1_0 { + +typedef enum { + RENDER_STATUS_OPEN = 0, + RENDER_STATUS_CLOSE, + RENDER_STATUS_START, + RENDER_STATUS_STOP, + RENDER_STATUS_PAUSE, +} AudioRenderStatus; + class AudioRenderInterfaceImplBase : public IAudioRender { public: AudioRenderInterfaceImplBase(const AudioDeviceDescriptor &desc); diff --git a/services/audiomanager/test/unittest/managersink/BUILD.gn b/services/audiomanager/test/unittest/managersink/BUILD.gn index d34046af..28a30f10 100644 --- a/services/audiomanager/test/unittest/managersink/BUILD.gn +++ b/services/audiomanager/test/unittest/managersink/BUILD.gn @@ -102,6 +102,7 @@ ohos_unittest("DAudioSinkManagerTest") { deps = [ "${services_path}/audiomanager/servicesink:distributed_audio_sink", + "${services_path}/audioclient:distributed_audio_sink_client", "//third_party/googletest:gmock", "//third_party/googletest:gtest_main", ] -- Gitee From 2c91a585d6277f13647ed4f30c083add625df94c Mon Sep 17 00:00:00 2001 From: hwwuhaobo Date: Wed, 19 Apr 2023 17:49:59 +0800 Subject: [PATCH 09/20] fix daudio ext build Signed-off-by: hwwuhaobo --- .../audio/v1_0/include/audio_capture_interface_impl_base.h | 1 - .../audio/v1_0/include/audio_render_interface_impl_base.h | 1 - services/audiomanager/test/unittest/managersink/BUILD.gn | 1 + 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_capture_interface_impl_base.h b/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_capture_interface_impl_base.h index 453315e6..9a297205 100644 --- a/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_capture_interface_impl_base.h +++ b/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_capture_interface_impl_base.h @@ -29,7 +29,6 @@ namespace V1_0 { using OHOS::HDI::DistributedAudio::Audioext::V1_0::AudioData; using OHOS::HDI::DistributedAudio::Audioext::V1_0::AudioParameter; using OHOS::HDI::DistributedAudio::Audioext::V1_0::IDAudioCallback; - typedef enum { CAPTURE_STATUS_OPEN = 0, CAPTURE_STATUS_CLOSE, diff --git a/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_render_interface_impl_base.h b/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_render_interface_impl_base.h index 7e38d9bd..1821548f 100644 --- a/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_render_interface_impl_base.h +++ b/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_render_interface_impl_base.h @@ -29,7 +29,6 @@ namespace HDI { namespace DistributedAudio { namespace Audio { namespace V1_0 { - typedef enum { RENDER_STATUS_OPEN = 0, RENDER_STATUS_CLOSE, diff --git a/services/audiomanager/test/unittest/managersink/BUILD.gn b/services/audiomanager/test/unittest/managersink/BUILD.gn index 28a30f10..78d7836b 100644 --- a/services/audiomanager/test/unittest/managersink/BUILD.gn +++ b/services/audiomanager/test/unittest/managersink/BUILD.gn @@ -72,6 +72,7 @@ ohos_unittest("DaudioSinkDevTest") { deps = [ "${services_path}/audiomanager/servicesink:distributed_audio_sink", + "${services_path}/audioclient:distributed_audio_sink_client", "//third_party/googletest:gmock", "//third_party/googletest:gtest_main", ] -- Gitee From fb2a625a8f67d9c67d153876b51b2da3f8bf056d Mon Sep 17 00:00:00 2001 From: hwwuhaobo Date: Thu, 20 Apr 2023 11:05:58 +0800 Subject: [PATCH 10/20] fix daudio ext build Signed-off-by: hwwuhaobo --- .../hdi_service/audio/v1_0/BUILD.gn | 2 - .../include/audio_capture_interface_impl.h | 1 + .../audio_capture_interface_impl_base.h | 9 +- .../include/audio_render_interface_impl.h | 12 +++ .../audio_render_interface_impl_base.h | 23 ++--- .../v1_0/src/audio_capture_interface_impl.cpp | 7 +- .../src/audio_capture_interface_impl_base.cpp | 55 ------------ .../v1_0/src/audio_render_interface_impl.cpp | 38 +++++++- .../src/audio_render_interface_impl_base.cpp | 88 ------------------- .../audiotransport/decodetransport/BUILD.gn | 1 + .../audiotransport/encodetransport/BUILD.gn | 1 + 11 files changed, 69 insertions(+), 168 deletions(-) delete mode 100644 hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_capture_interface_impl_base.cpp delete mode 100644 hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_render_interface_impl_base.cpp diff --git a/hdf_service/distributed_audio/hdi_service/audio/v1_0/BUILD.gn b/hdf_service/distributed_audio/hdi_service/audio/v1_0/BUILD.gn index bb347937..8db4eef5 100644 --- a/hdf_service/distributed_audio/hdi_service/audio/v1_0/BUILD.gn +++ b/hdf_service/distributed_audio/hdi_service/audio/v1_0/BUILD.gn @@ -26,10 +26,8 @@ ohos_shared_library("libaudio_manager_daudio_primary_service_1.0") { sources = [ "./src/audio_adapter_interface_impl.cpp", "./src/audio_capture_interface_impl.cpp", - "./src/audio_capture_interface_impl_base.cpp", "./src/audio_manager_interface_impl.cpp", "./src/audio_render_interface_impl.cpp", - "./src/audio_render_interface_impl_base.cpp", ] public_deps = [ diff --git a/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_capture_interface_impl.h b/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_capture_interface_impl.h index 63b96869..12df1f62 100644 --- a/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_capture_interface_impl.h +++ b/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_capture_interface_impl.h @@ -72,6 +72,7 @@ public: int32_t TurnStandbyMode() override; int32_t AudioDevDump(int32_t range, int32_t fd) override; int32_t IsSupportsPauseAndResume(bool &supportPause, bool &supportResume) override; + const AudioDeviceDescriptor &GetCaptureDesc() override; private: static constexpr int64_t AUDIO_OFFSET_FRAME_NUM = 10; diff --git a/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_capture_interface_impl_base.h b/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_capture_interface_impl_base.h index 9a297205..d705eae3 100644 --- a/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_capture_interface_impl_base.h +++ b/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_capture_interface_impl_base.h @@ -39,13 +39,10 @@ typedef enum { class AudioCaptureInterfaceImplBase : public IAudioCapture { public: - AudioCaptureInterfaceImplBase(const AudioDeviceDescriptor &desc); - ~AudioCaptureInterfaceImplBase(); + AudioCaptureInterfaceImplBase() = default; + virtual ~AudioCaptureInterfaceImplBase() = default; - const AudioDeviceDescriptor &GetCaptureDesc(); - -private: - AudioDeviceDescriptor baseDevDesc_; + virtual const AudioDeviceDescriptor &GetCaptureDesc() = 0; }; } // V1_0 } // Audio diff --git a/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_render_interface_impl.h b/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_render_interface_impl.h index 0e703314..c1536720 100644 --- a/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_render_interface_impl.h +++ b/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_render_interface_impl.h @@ -85,6 +85,13 @@ public: int32_t AudioDevDump(int32_t range, int32_t fd) override; int32_t IsSupportsPauseAndResume(bool &supportPause, bool &supportResume) override; + const AudioDeviceDescriptor &GetRenderDesc() override; + void SetVolumeInner(const uint32_t vol) override; + void SetVolumeRangeInner(const uint32_t volMax, const uint32_t volMin) override; + uint32_t GetVolumeInner() override; + uint32_t GetMaxVolumeInner() override; + uint32_t GetMinVolumeInner() override; + private: float GetFadeRate(uint32_t currentIndex, const uint32_t durationIndex); int32_t FadeInProcess(const uint32_t durationFrame, int8_t* frameData, const size_t frameLength); @@ -109,6 +116,11 @@ private: int64_t frameIndex_ = 0; int64_t framePeriodNs_ = 0; int64_t startTime_ = 0; + + std::mutex volMtx_; + uint32_t vol_ = 0; + uint32_t volMax_ = 0; + uint32_t volMin_ = 0; }; } // V1_0 } // Audio diff --git a/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_render_interface_impl_base.h b/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_render_interface_impl_base.h index 1821548f..dea8aa2b 100644 --- a/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_render_interface_impl_base.h +++ b/hdf_service/distributed_audio/hdi_service/audio/v1_0/include/audio_render_interface_impl_base.h @@ -39,22 +39,15 @@ typedef enum { class AudioRenderInterfaceImplBase : public IAudioRender { public: - AudioRenderInterfaceImplBase(const AudioDeviceDescriptor &desc); - ~AudioRenderInterfaceImplBase(); + AudioRenderInterfaceImplBase() = default; + virtual ~AudioRenderInterfaceImplBase() = default; - const AudioDeviceDescriptor &GetRenderDesc(); - void SetVolumeInner(const uint32_t vol); - void SetVolumeRangeInner(const uint32_t volMax, const uint32_t volMin); - uint32_t GetVolumeInner(); - uint32_t GetMaxVolumeInner(); - uint32_t GetMinVolumeInner(); - -private: - AudioDeviceDescriptor baseDevDesc_; - std::mutex volMtx_; - uint32_t vol_ = 0; - uint32_t volMax_ = 0; - uint32_t volMin_ = 0; + virtual const AudioDeviceDescriptor &GetRenderDesc() = 0; + virtual void SetVolumeInner(const uint32_t vol) = 0; + virtual void SetVolumeRangeInner(const uint32_t volMax, const uint32_t volMin) = 0; + virtual uint32_t GetVolumeInner() = 0; + virtual uint32_t GetMaxVolumeInner() = 0; + virtual uint32_t GetMinVolumeInner() = 0; }; } // V1_0 } // Audio diff --git a/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_capture_interface_impl.cpp b/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_capture_interface_impl.cpp index d6e80e8f..bbfcabba 100644 --- a/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_capture_interface_impl.cpp +++ b/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_capture_interface_impl.cpp @@ -36,7 +36,7 @@ namespace Audio { namespace V1_0 { AudioCaptureInterfaceImpl::AudioCaptureInterfaceImpl(const std::string &adpName, const AudioDeviceDescriptor &desc, const AudioSampleAttributes &attrs, const sptr &callback) - : AudioCaptureInterfaceImplBase(desc), adapterName_(adpName), devDesc_(desc), + : adapterName_(adpName), devDesc_(desc), devAttrs_(attrs), audioExtCallback_(callback) { devAttrs_.frameSize = CalculateFrameSize(attrs.sampleRate, attrs.channelCount, attrs.format, timeInterval_, false); @@ -320,6 +320,11 @@ int32_t AudioCaptureInterfaceImpl::GetFrameBufferSize(uint64_t &bufferSize) (void)bufferSize; return HDF_SUCCESS; } + +const AudioDeviceDescriptor &AudioCaptureInterfaceImpl::GetCaptureDesc() +{ + return devDesc_; +} } // V1_0 } // Audio } // Distributedaudio diff --git a/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_capture_interface_impl_base.cpp b/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_capture_interface_impl_base.cpp deleted file mode 100644 index 20f59ead..00000000 --- a/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_capture_interface_impl_base.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2023 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. - */ - -#include "audio_capture_interface_impl_base.h" - -#include -#include -#include "sys/time.h" -#include - -#include "daudio_constants.h" -#include "daudio_log.h" -#include "daudio_utils.h" - -#undef DH_LOG_TAG -#define DH_LOG_TAG "AudioCaptureInterfaceImplBase" - -using namespace OHOS::DistributedHardware; -namespace OHOS { -namespace HDI { -namespace DistributedAudio { -namespace Audio { -namespace V1_0 { -AudioCaptureInterfaceImplBase::AudioCaptureInterfaceImplBase(const AudioDeviceDescriptor &desc) - : baseDevDesc_(desc) -{ - DHLOGD("Distributed audio capture base constructed, id(%d).", baseDevDesc_.pins); -} - -AudioCaptureInterfaceImplBase::~AudioCaptureInterfaceImplBase() -{ - DHLOGD("Distributed audio capture base destructed, id(%d).", baseDevDesc_.pins); -} - -const AudioDeviceDescriptor &AudioCaptureInterfaceImplBase::GetCaptureDesc() -{ - return baseDevDesc_; -} -} // V1_0 -} // Audio -} // Distributedaudio -} // HDI -} // OHOS diff --git a/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_render_interface_impl.cpp b/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_render_interface_impl.cpp index d0374f55..e0b8c067 100644 --- a/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_render_interface_impl.cpp +++ b/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_render_interface_impl.cpp @@ -35,7 +35,7 @@ namespace Audio { namespace V1_0 { AudioRenderInterfaceImpl::AudioRenderInterfaceImpl(const std::string &adpName, const AudioDeviceDescriptor &desc, const AudioSampleAttributes &attrs, const sptr &callback) - : AudioRenderInterfaceImplBase(desc), adapterName_(adpName), devDesc_(desc), + : adapterName_(adpName), devDesc_(desc), devAttrs_(attrs), audioExtCallback_(callback) { devAttrs_.frameSize = CalculateFrameSize(attrs.sampleRate, attrs.channelCount, attrs.format, timeInterval_, false); @@ -399,6 +399,42 @@ int32_t AudioRenderInterfaceImpl::GetFrameBufferSize(uint64_t &bufferSize) (void)bufferSize; return HDF_SUCCESS; } + +const AudioDeviceDescriptor &AudioRenderInterfaceImpl::GetRenderDesc() +{ + return devDesc_; +} + +void AudioRenderInterfaceImpl::SetVolumeInner(const uint32_t vol) +{ + std::lock_guard volLck(volMtx_); + vol_ = vol; +} + +void AudioRenderInterfaceImpl::SetVolumeRangeInner(const uint32_t volMax, const uint32_t volMin) +{ + std::lock_guard volLck(volMtx_); + volMin_ = volMin; + volMax_ = volMax; +} + +uint32_t AudioRenderInterfaceImpl::GetVolumeInner() +{ + std::lock_guard volLck(volMtx_); + return vol_; +} + +uint32_t AudioRenderInterfaceImpl::GetMaxVolumeInner() +{ + std::lock_guard volLck(volMtx_); + return volMax_; +} + +uint32_t AudioRenderInterfaceImpl::GetMinVolumeInner() +{ + std::lock_guard volLck(volMtx_); + return volMin_; +} } // V1_0 } // Audio } // Distributedaudio diff --git a/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_render_interface_impl_base.cpp b/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_render_interface_impl_base.cpp deleted file mode 100644 index d47b2b10..00000000 --- a/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_render_interface_impl_base.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 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. - */ - -#include "audio_render_interface_impl_base.h" - -#include -#include -#include "sys/time.h" - -#include "daudio_constants.h" -#include "daudio_events.h" -#include "daudio_log.h" -#include "daudio_utils.h" - -#undef DH_LOG_TAG -#define DH_LOG_TAG "AudioRenderInterfaceImplBase" - -using namespace OHOS::DistributedHardware; -namespace OHOS { -namespace HDI { -namespace DistributedAudio { -namespace Audio { -namespace V1_0 { -AudioRenderInterfaceImplBase::AudioRenderInterfaceImplBase(const AudioDeviceDescriptor &desc) - : baseDevDesc_(desc) -{ - DHLOGD("Distributed audio render base constructed, id(%d).", desc.pins); -} - -AudioRenderInterfaceImplBase::~AudioRenderInterfaceImplBase() -{ - DHLOGD("Distributed audio render base destructed, id(%d).", baseDevDesc_.pins); -} - - -const AudioDeviceDescriptor &AudioRenderInterfaceImplBase::GetRenderDesc() -{ - return baseDevDesc_; -} - -void AudioRenderInterfaceImplBase::SetVolumeInner(const uint32_t vol) -{ - std::lock_guard volLck(volMtx_); - vol_ = vol; -} - - -void AudioRenderInterfaceImplBase::SetVolumeRangeInner(const uint32_t volMax, const uint32_t volMin) -{ - std::lock_guard volLck(volMtx_); - volMin_ = volMin; - volMax_ = volMax; -} - -uint32_t AudioRenderInterfaceImplBase::GetVolumeInner() -{ - std::lock_guard volLck(volMtx_); - return vol_; -} - -uint32_t AudioRenderInterfaceImplBase::GetMaxVolumeInner() -{ - std::lock_guard volLck(volMtx_); - return volMax_; -} - -uint32_t AudioRenderInterfaceImplBase::GetMinVolumeInner() -{ - std::lock_guard volLck(volMtx_); - return volMin_; -} -} // V1_0 -} // Audio -} // Distributedaudio -} // HDI -} // OHOS diff --git a/services/audiotransport/decodetransport/BUILD.gn b/services/audiotransport/decodetransport/BUILD.gn index c4ec6065..077491ab 100644 --- a/services/audiotransport/decodetransport/BUILD.gn +++ b/services/audiotransport/decodetransport/BUILD.gn @@ -23,6 +23,7 @@ config("decode_transport_pub_config") { "../interface", "../audiochannel/interface", "../audiochannel/audiodatachannel/include", + "../../audioprocessor/interface", ] } diff --git a/services/audiotransport/encodetransport/BUILD.gn b/services/audiotransport/encodetransport/BUILD.gn index aae44478..5bbe7281 100644 --- a/services/audiotransport/encodetransport/BUILD.gn +++ b/services/audiotransport/encodetransport/BUILD.gn @@ -23,6 +23,7 @@ config("encode_transport_pub_config") { "../interface", "../audiochannel/interface", "../audiochannel/audiodatachannel/include", + "../../audioprocessor/interface", ] } -- Gitee From 7377ea728935bb7d539e3da5b10c5631357294fe Mon Sep 17 00:00:00 2001 From: hwwuhaobo Date: Thu, 20 Apr 2023 11:35:06 +0800 Subject: [PATCH 11/20] fix daudio ext build Signed-off-by: hwwuhaobo --- .../hdi_service/audio/v1_0/src/audio_render_interface_impl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_render_interface_impl.cpp b/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_render_interface_impl.cpp index e0b8c067..f8478f10 100644 --- a/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_render_interface_impl.cpp +++ b/hdf_service/distributed_audio/hdi_service/audio/v1_0/src/audio_render_interface_impl.cpp @@ -425,7 +425,7 @@ uint32_t AudioRenderInterfaceImpl::GetVolumeInner() } uint32_t AudioRenderInterfaceImpl::GetMaxVolumeInner() -{ +{ std::lock_guard volLck(volMtx_); return volMax_; } -- Gitee From 40edef76b0004b8ff0b5052c62abe9aba1868499 Mon Sep 17 00:00:00 2001 From: hwwuhaobo Date: Thu, 20 Apr 2023 11:46:06 +0800 Subject: [PATCH 12/20] fix daudio ext build Signed-off-by: hwwuhaobo --- services/audioclient/BUILD.gn | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/audioclient/BUILD.gn b/services/audioclient/BUILD.gn index 52d40404..93ac2822 100644 --- a/services/audioclient/BUILD.gn +++ b/services/audioclient/BUILD.gn @@ -24,9 +24,9 @@ ohos_shared_library("distributed_audio_sink_client") { include_dirs += [ "include", + "${audio_client_path}/interface", "${audio_client_path}/micclient/include", "${audio_client_path}/spkclient/include", - "${audio_client_path}/interface", "${audio_processor_path}/encodeprocessor/include", "${audio_processor_path}/decodeprocessor/include", "${audio_processor_path}/interface", @@ -35,12 +35,12 @@ ohos_shared_library("distributed_audio_sink_client") { "${audio_transport_path}/decodetransport/include", "${audio_transport_path}/encodetransport/include", "${audio_transport_path}/interface", - "${common_path}/include", "${common_path}/dfx_utils/include", + "${common_path}/include", "${fwk_common_path}/utils/include", - "${services_path}/common/audioparam", "${services_path}/common/audioeventcallback", "${services_path}/common/audiodata/include", + "${services_path}/common/audioparam", ] public_configs = [ ":daudio_client_pub_config" ] -- Gitee From f80f8bcc99130c64e0c54d6afe6383cd70eb0b8d Mon Sep 17 00:00:00 2001 From: hwwuhaobo Date: Thu, 20 Apr 2023 12:41:25 +0800 Subject: [PATCH 13/20] fix daudio ext build Signed-off-by: hwwuhaobo --- services/audioclient/BUILD.gn | 1 - 1 file changed, 1 deletion(-) diff --git a/services/audioclient/BUILD.gn b/services/audioclient/BUILD.gn index 93ac2822..2f572562 100644 --- a/services/audioclient/BUILD.gn +++ b/services/audioclient/BUILD.gn @@ -23,7 +23,6 @@ ohos_shared_library("distributed_audio_sink_client") { include_dirs = [ "//third_party/json/include" ] include_dirs += [ - "include", "${audio_client_path}/interface", "${audio_client_path}/micclient/include", "${audio_client_path}/spkclient/include", -- Gitee From 7801cdc710d866bb13abd7bf1337f9c10e677df7 Mon Sep 17 00:00:00 2001 From: hwwuhaobo Date: Thu, 20 Apr 2023 14:06:04 +0800 Subject: [PATCH 14/20] fix daudio ext build Signed-off-by: hwwuhaobo --- services/audioclient/BUILD.gn | 1 - 1 file changed, 1 deletion(-) diff --git a/services/audioclient/BUILD.gn b/services/audioclient/BUILD.gn index 2f572562..abfbafae 100644 --- a/services/audioclient/BUILD.gn +++ b/services/audioclient/BUILD.gn @@ -69,6 +69,5 @@ ohos_shared_library("distributed_audio_sink_client") { ] subsystem_name = "distributedhardware" - part_name = "distributed_audio" } \ No newline at end of file -- Gitee From bbec214cca91a4992a89591eb8d33b4219b11152 Mon Sep 17 00:00:00 2001 From: hwwuhaobo Date: Thu, 20 Apr 2023 14:18:44 +0800 Subject: [PATCH 15/20] fix daudio ext build Signed-off-by: hwwuhaobo --- services/audioclient/BUILD.gn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/audioclient/BUILD.gn b/services/audioclient/BUILD.gn index abfbafae..f17df237 100644 --- a/services/audioclient/BUILD.gn +++ b/services/audioclient/BUILD.gn @@ -70,4 +70,4 @@ ohos_shared_library("distributed_audio_sink_client") { subsystem_name = "distributedhardware" part_name = "distributed_audio" -} \ No newline at end of file +} -- Gitee From c937b65e0744791fb5f975582cf64b234e62cf3a Mon Sep 17 00:00:00 2001 From: hwwuhaobo Date: Thu, 20 Apr 2023 14:20:07 +0800 Subject: [PATCH 16/20] fix daudio ext build Signed-off-by: hwwuhaobo --- services/audioclient/BUILD.gn | 1 + 1 file changed, 1 insertion(+) diff --git a/services/audioclient/BUILD.gn b/services/audioclient/BUILD.gn index f17df237..09032761 100644 --- a/services/audioclient/BUILD.gn +++ b/services/audioclient/BUILD.gn @@ -71,3 +71,4 @@ ohos_shared_library("distributed_audio_sink_client") { subsystem_name = "distributedhardware" part_name = "distributed_audio" } + -- Gitee From b5d911266c6def29c268d41fe16c8d7349404ab7 Mon Sep 17 00:00:00 2001 From: hwwuhaobo Date: Thu, 20 Apr 2023 15:03:13 +0800 Subject: [PATCH 17/20] fix daudio ext build Signed-off-by: hwwuhaobo --- services/audioclient/BUILD.gn | 1 - 1 file changed, 1 deletion(-) diff --git a/services/audioclient/BUILD.gn b/services/audioclient/BUILD.gn index 09032761..f17df237 100644 --- a/services/audioclient/BUILD.gn +++ b/services/audioclient/BUILD.gn @@ -71,4 +71,3 @@ ohos_shared_library("distributed_audio_sink_client") { subsystem_name = "distributedhardware" part_name = "distributed_audio" } - -- Gitee From 96ccbd81eb23bcb75a7f4b87b6fb4ee6e554c1cd Mon Sep 17 00:00:00 2001 From: hwwuhaobo Date: Thu, 20 Apr 2023 15:18:28 +0800 Subject: [PATCH 18/20] fix daudio ext build Signed-off-by: hwwuhaobo --- services/audioclient/BUILD.gn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/audioclient/BUILD.gn b/services/audioclient/BUILD.gn index f17df237..abfbafae 100644 --- a/services/audioclient/BUILD.gn +++ b/services/audioclient/BUILD.gn @@ -70,4 +70,4 @@ ohos_shared_library("distributed_audio_sink_client") { subsystem_name = "distributedhardware" part_name = "distributed_audio" -} +} \ No newline at end of file -- Gitee From cfb22b81ea717edb66c4bd90d2274b22ea2d685d Mon Sep 17 00:00:00 2001 From: hwwuhaobo Date: Thu, 20 Apr 2023 15:33:50 +0800 Subject: [PATCH 19/20] modify some codecheck & randomcode Signed-off-by: hwwuhaobo --- services/audioclient/BUILD.gn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/audioclient/BUILD.gn b/services/audioclient/BUILD.gn index abfbafae..f17df237 100644 --- a/services/audioclient/BUILD.gn +++ b/services/audioclient/BUILD.gn @@ -70,4 +70,4 @@ ohos_shared_library("distributed_audio_sink_client") { subsystem_name = "distributedhardware" part_name = "distributed_audio" -} \ No newline at end of file +} -- Gitee From f1d6127059eb462dbe5639513211da6e89c663d1 Mon Sep 17 00:00:00 2001 From: hwwuhaobo Date: Thu, 20 Apr 2023 17:05:14 +0800 Subject: [PATCH 20/20] fix daudio ext build Signed-off-by: hwwuhaobo --- services/audiomanager/servicesink/BUILD.gn | 2 +- services/audiomanager/test/unittest/managersink/BUILD.gn | 4 ++-- services/audiotransport/encodetransport/BUILD.gn | 4 ++-- services/common/BUILD.gn | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/services/audiomanager/servicesink/BUILD.gn b/services/audiomanager/servicesink/BUILD.gn index fd84b7fe..a84ec228 100755 --- a/services/audiomanager/servicesink/BUILD.gn +++ b/services/audiomanager/servicesink/BUILD.gn @@ -75,9 +75,9 @@ ohos_shared_library("distributed_audio_sink") { deps = [ "${audio_transport_path}/audioctrltransport:distributed_audio_control", - "${services_path}/audioclient:distributed_audio_sink_client", "${audio_transport_path}/decodetransport:distributed_audio_decode_transport", "${audio_transport_path}/encodetransport:distributed_audio_encode_transport", + "${services_path}/audioclient:distributed_audio_sink_client", "${services_path}/common:distributed_audio_utils", ] diff --git a/services/audiomanager/test/unittest/managersink/BUILD.gn b/services/audiomanager/test/unittest/managersink/BUILD.gn index 78d7836b..7bc416d7 100644 --- a/services/audiomanager/test/unittest/managersink/BUILD.gn +++ b/services/audiomanager/test/unittest/managersink/BUILD.gn @@ -71,8 +71,8 @@ ohos_unittest("DaudioSinkDevTest") { configs = [ ":module_private_config" ] deps = [ - "${services_path}/audiomanager/servicesink:distributed_audio_sink", "${services_path}/audioclient:distributed_audio_sink_client", + "${services_path}/audiomanager/servicesink:distributed_audio_sink", "//third_party/googletest:gmock", "//third_party/googletest:gtest_main", ] @@ -102,8 +102,8 @@ ohos_unittest("DAudioSinkManagerTest") { configs = [ ":module_private_config" ] deps = [ - "${services_path}/audiomanager/servicesink:distributed_audio_sink", "${services_path}/audioclient:distributed_audio_sink_client", + "${services_path}/audiomanager/servicesink:distributed_audio_sink", "//third_party/googletest:gmock", "//third_party/googletest:gtest_main", ] diff --git a/services/audiotransport/encodetransport/BUILD.gn b/services/audiotransport/encodetransport/BUILD.gn index 5bbe7281..f302209f 100644 --- a/services/audiotransport/encodetransport/BUILD.gn +++ b/services/audiotransport/encodetransport/BUILD.gn @@ -20,9 +20,9 @@ config("encode_transport_pub_config") { "include", "../audiotransportstatus/include", "../audiotransportstatus/interface", - "../interface", - "../audiochannel/interface", "../audiochannel/audiodatachannel/include", + "../audiochannel/interface", + "../interface", "../../audioprocessor/interface", ] } diff --git a/services/common/BUILD.gn b/services/common/BUILD.gn index f6f06a66..6fe124df 100644 --- a/services/common/BUILD.gn +++ b/services/common/BUILD.gn @@ -20,8 +20,8 @@ config("daudio_common_pub_config") { "audiodata/include", "audioeventcallback", "audioparam", - "${common_path}/include", "${common_path}/dfxutils/include", + "${common_path}/include", ] } -- Gitee