webrtc_private: Fix build break 35/294335/1 accepted/tizen/unified/20230620.022510
authorJaechul Lee <jcsing.lee@samsung.com>
Fri, 16 Jun 2023 07:00:04 +0000 (16:00 +0900)
committerJaechul Lee <jcsing.lee@samsung.com>
Fri, 16 Jun 2023 07:13:32 +0000 (16:13 +0900)
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 <jcsing.lee@samsung.com>
packaging/capi-media-webrtc.spec
src/webrtc_private.c
src/webrtc_source.c
test/webrtc_test.c

index 0055f4cf2ecb377e84fb7c4fdb9515121c7e03e1..48db35566a63337ad8e9a8623e520e4ef1c3188d 100644 (file)
@@ -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
index 0108e0d9c94ded6104a7402c96ba578976f6e041..719b42a83bd402eaedcf7134f95a607e5aab6ea3 100644 (file)
@@ -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)),
index ec65ebda70292db3337dd81085808a06bb4bd02e..5a6f4343b5c0135bf2007c4fb922ee46518a1db3 100644 (file)
@@ -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);
 }
index 8fbb0cf9a5a09dafdefa9f77f39f711873b7fcd4..85c99882f5dced60cd69e5440eedefc8d725c1fb 100644 (file)
@@ -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 {