From 87906f9640adef625fba5a9b7c48455c762b3b7f Mon Sep 17 00:00:00 2001 From: chen0088 Date: Tue, 7 Nov 2023 10:29:24 +0800 Subject: [PATCH] fix: add sensitive value Signed-off-by: chen0088 --- audiohandler/src/daudio_handler.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/audiohandler/src/daudio_handler.cpp b/audiohandler/src/daudio_handler.cpp index fb06fc4e..1091b37d 100644 --- a/audiohandler/src/daudio_handler.cpp +++ b/audiohandler/src/daudio_handler.cpp @@ -83,12 +83,15 @@ std::vector DAudioHandler::Query() auto dhId = audioSrv->GetPinValueFromType(dev->deviceType_, dev->deviceRole_); json infoJson; + DHItem dhItem; int32_t deviceType = GetDevTypeByDHId(dhId); if (deviceType == AUDIO_DEVICE_TYPE_MIC) { + dhItem.subtype = "mic"; infoJson["SampleRates"] = micInfos_.sampleRates; infoJson["ChannelMasks"] = micInfos_.channels; infoJson["Formats"] = micInfos_.formats; } else if (deviceType == AUDIO_DEVICE_TYPE_SPEAKER) { + dhItem.subtype = "speaker"; infoJson["SampleRates"] = spkInfos_.sampleRates; infoJson["ChannelMasks"] = spkInfos_.channels; infoJson["Formats"] = spkInfos_.formats; @@ -106,11 +109,11 @@ std::vector DAudioHandler::Query() DHLOGI("DScreen QueryAudioDecoderAbility info: %s", audioDecoders.c_str()); infoJson[KEY_HISTREAMER_AUDIO_DECODER] = audioDecoders; - DHItem dhItem; dhItem.dhId = std::to_string(dhId); dhItem.attrs = infoJson.dump(); dhItemVec.push_back(dhItem); - DHLOGD("Query result: dhId: %d, attrs: %s.", dhId, infoJson.dump().c_str()); + DHLOGD("Query result: dhId: %d, subtype: %s, attrs: %s.", dhId, dhItem.subtype.c_str(), + infoJson.dump().c_str()); if (dhId == DEFAULT_RENDER_ID) { dhItem.dhId = std::to_string(LOW_LATENCY_RENDER_ID); dhItemVec.push_back(dhItem); -- Gitee