[1.0.24] Change to PA_PROP_MEDIA_PREPROCESSOR_METHOD 94/294394/1 accepted/tizen/unified/20230620.022512
authorJaechul Lee <jcsing.lee@samsung.com>
Mon, 19 Jun 2023 00:41:08 +0000 (09:41 +0900)
committerJaechul Lee <jcsing.lee@samsung.com>
Mon, 19 Jun 2023 00:42:06 +0000 (09:42 +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.

Change-Id: I554662abc65846bab07b67f084f606282f8e4f4a

packaging/capi-media-transporter.spec
src/MediaSourceBinMic.cpp
test/mtpr_test.c

index c5c2883..74a3d51 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-transporter
 Summary:    A Media Transporter library in Tizen Native API
-Version:    1.0.23
+Version:    1.0.24
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index 04737dc..dc0ec0e 100644 (file)
@@ -100,13 +100,15 @@ void MediaSourceBinMic::setSoundStreamInfo(sound_stream_info_h streamInfo)
        char *stream_type;
        int stream_index;
        int aec_ref_device_id = 0;
+       sound_acoustic_echo_cancel_type_e aec_type;
+
        // bool available = false;
 
        RET_IF(!streamInfo, "streamInfo is NULL");
 
        sound_manager_get_type_from_stream_information(streamInfo, &stream_type);
        sound_manager_get_index_from_stream_information(streamInfo, &stream_index);
-       sound_manager_get_echo_cancel_reference_device(streamInfo, &aec_ref_device_id);
+       sound_manager_get_echo_cancel_reference_device(streamInfo, &aec_ref_device_id, &aec_type);
 
        /* FIXEME: need to add NATIVE_API_MEDIATRANSPORTER in sound-manager */
        // ret = sound_manager_is_available_stream_information(stream_info, NATIVE_API_MEDIATRANSPORTER, &available);
@@ -122,14 +124,14 @@ void MediaSourceBinMic::setSoundStreamInfo(sound_stream_info_h streamInfo)
 
        RET_IF(!stream_type, "stream_type is NULL");
 
-       LOG_INFO("stream_info[%p, type:%s, index:%d, aec_ref_device_id:%d]",
-               streamInfo, stream_type, stream_index, aec_ref_device_id);
+       LOG_INFO("stream_info[%p, type:%s, index:%d, aec_ref_device_id:%d, aec_type:%d]",
+               streamInfo, stream_type, stream_index, aec_ref_device_id, aec_type);
 
        std::ostringstream stringStream;
        stringStream << "props," << PA_PROP_MEDIA_ROLE << "=" <<
                stream_type << ", " << PA_PROP_MEDIA_PARENT_ID << "=" << stream_index;
        if (aec_ref_device_id != SOUND_MANAGER_STREAM_NO_REFERENCE_DEVICE)
-               stringStream << ", " << PA_PROP_MEDIA_ECHO_CANCEL_METHOD << "default, "
+               stringStream << ", " << PA_PROP_MEDIA_PREPROCESSOR_METHOD << "webrtc, "
                 << PA_PROP_MEDIA_ECHO_CANCEL_REFERENCE_DEVICE << aec_ref_device_id;
 
        _streamInfo = stringStream.str();
index 92db6b7..74a09c4 100644 (file)
@@ -599,7 +599,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 {