From: Jaechul Lee Date: Fri, 16 Jun 2023 07:00:04 +0000 (+0900) Subject: webrtc_private: Fix build break X-Git-Tag: accepted/tizen/unified/20230620.022510^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F35%2F294335%2F1;p=platform%2Fcore%2Fapi%2Fwebrtc.git webrtc_private: Fix build break PA_PROP_MEDIA_ECHO_CANCEL_METHOD was removed in pulseaudio proplist.h. So, new property named 'PA_PROP_MEDIA_PREPROCESSOR_METHOD' should be used. [Version] 0.4.14 [Issue Type] Build break Change-Id: Ia6a5d0d221dd360aa73c5fc6ed4f4d36b8315c41 Signed-off-by: Jaechul Lee --- diff --git a/packaging/capi-media-webrtc.spec b/packaging/capi-media-webrtc.spec index 0055f4cf..48db3556 100644 --- a/packaging/capi-media-webrtc.spec +++ b/packaging/capi-media-webrtc.spec @@ -1,6 +1,6 @@ Name: capi-media-webrtc Summary: A WebRTC library in Tizen Native API -Version: 0.4.13 +Version: 0.4.14 Release: 0 Group: Multimedia/API License: Apache-2.0 diff --git a/src/webrtc_private.c b/src/webrtc_private.c index 0108e0d9..719b42a8 100644 --- a/src/webrtc_private.c +++ b/src/webrtc_private.c @@ -2174,7 +2174,7 @@ int _apply_stream_info(GstElement *element, const char *stream_type, int stream_ prop = g_strdup_printf("props,%s=%s, %s=%d", PA_PROP_MEDIA_ROLE, stream_type, PA_PROP_MEDIA_PARENT_ID, stream_index); if (aec) { prop_with_aec = g_strdup_printf("%s, %s=%s, %s=%d", - prop, PA_PROP_MEDIA_ECHO_CANCEL_METHOD, "default", PA_PROP_MEDIA_ECHO_CANCEL_REFERENCE_DEVICE, aec_ref_device_id); + prop, PA_PROP_MEDIA_PREPROCESSOR_METHOD, "webrtc", PA_PROP_MEDIA_ECHO_CANCEL_REFERENCE_DEVICE, aec_ref_device_id); } RET_VAL_IF(!(structure = gst_structure_from_string(aec ? prop_with_aec : prop, NULL)), diff --git a/src/webrtc_source.c b/src/webrtc_source.c index ec65ebda..5a6f4343 100644 --- a/src/webrtc_source.c +++ b/src/webrtc_source.c @@ -970,6 +970,7 @@ int _set_sound_stream_info(webrtc_s *webrtc, unsigned int source_id, sound_strea char *stream_type; int stream_index; int aec_ref_device_id = 0; + sound_acoustic_echo_cancel_type_e aec_type; RET_VAL_IF(webrtc == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "webrtc is NULL"); RET_VAL_IF((source = _get_slot_by_id(webrtc->gst.source_slots, source_id)) == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "could not find source"); @@ -981,7 +982,7 @@ int _set_sound_stream_info(webrtc_s *webrtc, unsigned int source_id, sound_strea sound_manager_get_type_from_stream_information(stream_info, &stream_type); sound_manager_get_index_from_stream_information(stream_info, &stream_index); - sound_manager_get_echo_cancel_reference_device(stream_info, &aec_ref_device_id); + sound_manager_get_echo_cancel_reference_device(stream_info, &aec_ref_device_id, &aec_type); ret = sound_manager_is_available_stream_information(stream_info, NATIVE_API_WEBRTC, &available); if (ret != SOUND_MANAGER_ERROR_NONE) { @@ -994,8 +995,8 @@ int _set_sound_stream_info(webrtc_s *webrtc, unsigned int source_id, sound_strea return WEBRTC_ERROR_INVALID_PARAMETER; } - LOG_INFO("webrtc[%p], source_id[%u], stream_info[%p, type:%s, index:%d, aec_ref_device_id:%d]", - webrtc, source_id, stream_info, stream_type, stream_index, aec_ref_device_id); + LOG_INFO("webrtc[%p], source_id[%u], stream_info[%p, type:%s, index:%d, aec_ref_device_id:%d, aec_type:%d]", + webrtc, source_id, stream_info, stream_type, stream_index, aec_ref_device_id, aec_type); return _apply_stream_info(element, stream_type, stream_index, aec_ref_device_id); } diff --git a/test/webrtc_test.c b/test/webrtc_test.c index 8fbb0cf9..85c99882 100644 --- a/test/webrtc_test.c +++ b/test/webrtc_test.c @@ -382,7 +382,7 @@ static void __set_aec_reference_device(sound_stream_info_h stream_info) found = true; - ret = sound_manager_set_echo_cancel_reference_device(stream_info, device); + ret = sound_manager_set_echo_cancel_reference_device(stream_info, device, SOUND_ACOUSTIC_ECHO_CANCEL_VOICE_CALL); if (ret != SOUND_MANAGER_ERROR_NONE) { g_printerr("failed to sound_manager_set_echo_cancel_reference_device()\n"); } else {