#include <pulse/proplist.h>
#include <algorithm>
#include <sstream>
+#include <cassert>
using namespace tizen_media_transporter;
char *stream_type;
int stream_index;
int aec_ref_device_id = 0;
- sound_acoustic_echo_cancel_type_e aec_type;
+ sound_effect_method_with_reference_e method;
// bool available = false;
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, &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);
RET_IF(!stream_type, "stream_type is NULL");
- 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)
+
+ if (sound_manager_get_effect_method_with_reference(streamInfo, &method, &aec_ref_device_id) == SOUND_MANAGER_ERROR_NONE) {
+ assert(method == SOUND_EFFECT_ACOUSTIC_ECHO_CANCEL_WEBRTC);
stringStream << ", " << PA_PROP_MEDIA_PREPROCESSOR_METHOD << "webrtc, "
<< PA_PROP_MEDIA_ECHO_CANCEL_REFERENCE_DEVICE << aec_ref_device_id;
+ LOG_INFO("stream_info[%p, type:%s, index:%d, method:0x%x, aec_ref_device_id:%d]",
+ streamInfo, stream_type, stream_index, method, aec_ref_device_id);
+ } else {
+ LOG_INFO("stream_info[%p, type:%s, index:%d]",
+ streamInfo, stream_type, stream_index);
+ }
+
_streamInfo = stringStream.str();
}