From: Sangchul Lee Date: Wed, 10 Nov 2021 08:01:48 +0000 (+0900) Subject: [ITC][webrtc][non-ACR] Remove unused variables and add some logs X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F03%2F268603%2F2;p=test%2Ftct%2Fnative%2Fapi.git [ITC][webrtc][non-ACR] Remove unused variables and add some logs Change-Id: Id0f5d1ae62b430db4049a7c1164bf434af4f57ce Signed-off-by: Sangchul Lee (cherry picked from commit 2066615bebfaaadbe5f33e6f100522c603a05193) --- diff --git a/src/itc/webrtc/ITs-webrtc-common.h b/src/itc/webrtc/ITs-webrtc-common.h index 48d882c5f..734470494 100755 --- a/src/itc/webrtc/ITs-webrtc-common.h +++ b/src/itc/webrtc/ITs-webrtc-common.h @@ -44,10 +44,12 @@ #define RUN_POLLING_LOOP {\ if(g_bCallbackCalled == false)\ {\ + int nTimeoutId;\ g_pMainLoop = g_main_loop_new(NULL, false);\ - g_nTimeoutId = g_timeout_add(TIMEOUT_CB, Timeout, g_pMainLoop);\ + nTimeoutId = g_timeout_add(TIMEOUT_CB, Timeout, g_pMainLoop);\ + dlog_print(DLOG_DEBUG, "NativeTCT", "[%s(%d)] call g_main_loop_run(), g_pMainLoop[%p]", __FUNCTION__, __LINE__, g_pMainLoop);\ g_main_loop_run(g_pMainLoop);\ - g_source_remove(g_nTimeoutId);\ + g_source_remove(nTimeoutId);\ g_pMainLoop = NULL;\ }\ } @@ -62,7 +64,6 @@ } bool g_bWebRTCCreation; webrtc_h g_hWebRtcHandle; -int g_nTimeoutId; static GMainLoop *g_pMainLoop = NULL; bool g_bCallbackCalled; gboolean Timeout(gpointer data); diff --git a/src/itc/webrtc/ITs-webrtc.c b/src/itc/webrtc/ITs-webrtc.c index bf14e48c0..878044856 100755 --- a/src/itc/webrtc/ITs-webrtc.c +++ b/src/itc/webrtc/ITs-webrtc.c @@ -69,6 +69,7 @@ static void webrtcSessionDescriptionCreatedCB(webrtc_h webrtc, const char *descr FPRINTF("[Line : %d][%s] Callback webrtcSessionDescriptionCreatedCB called\\n", __LINE__, API_NAMESPACE); if (g_pMainLoop) { + dlog_print(DLOG_DEBUG, "NativeTCT", "[%s(%d)] call g_main_loop_quit(), g_pMainLoop[%p]", __FUNCTION__, __LINE__, g_pMainLoop); g_main_loop_quit(g_pMainLoop); g_pMainLoop = NULL; } @@ -105,6 +106,7 @@ static void webrtcStateChangedCB(webrtc_h webrtc, webrtc_state_e previous, webrt FPRINTF("[Line : %d][%s] Callback webrtcStateChangedCB called\\n", __LINE__, API_NAMESPACE); if (g_pMainLoop) { + dlog_print(DLOG_DEBUG, "NativeTCT", "[%s(%d)] call g_main_loop_quit(), g_pMainLoop[%p]", __FUNCTION__, __LINE__, g_pMainLoop); g_main_loop_quit(g_pMainLoop); g_pMainLoop = NULL; } @@ -121,6 +123,7 @@ static void webrtcSignalingStateChangeCB(webrtc_h webrtc, webrtc_signaling_state FPRINTF("[Line : %d][%s] Callback webrtcSignalingStateChangeCB called\\n", __LINE__, API_NAMESPACE); if (g_pMainLoop) { + dlog_print(DLOG_DEBUG, "NativeTCT", "[%s(%d)] call g_main_loop_quit(), g_pMainLoop[%p]", __FUNCTION__, __LINE__, g_pMainLoop); g_main_loop_quit(g_pMainLoop); g_pMainLoop = NULL; } @@ -257,7 +260,6 @@ int ITc_webrtc_start_stop_p(void) START_TEST; g_bCallbackCalled = false; - int nTimeoutId = -1; int nRet = webrtc_set_ice_candidate_cb(g_hWebRtcHandle, webrtcIceCandidateCB, NULL); PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_set_ice_candidate_cb", WebRtcGetError(nRet)); @@ -922,7 +924,6 @@ int ITc_media_webrtc_create_offer_answer_p(void) char *pszOffer, *pszAnswer; webrtc_h hLocalWebRtcHandle,hWebRtcHandle; g_bCallbackCalled = false; - int nTimeoutId = -1; int nRet = webrtc_create(&hWebRtcHandle); PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_create", WebRtcGetError(nRet)); @@ -1027,7 +1028,6 @@ int ITc_media_webrtc_set_local_description_p(void) unsigned int nId; char *pszOffer; g_bCallbackCalled = false; - int nTimeoutId = -1; int nRet = webrtc_add_media_source(g_hWebRtcHandle, WEBRTC_MEDIA_SOURCE_TYPE_AUDIOTEST, &nId); PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_add_media_source", WebRtcGetError(nRet)); @@ -1081,7 +1081,6 @@ int ITc_media_webrtc_set_remote_description_p(void) { START_TEST; g_bCallbackCalled = false; - int nTimeoutId = -1; webrtc_h hLocalWebRtcHandle; unsigned int nId; char *pszOffer; @@ -1163,7 +1162,6 @@ int ITc_media_webrtc_add_ice_candidate_p(void) { START_TEST; g_bCallbackCalled = false; - int nTimeoutId = -1; int nRet = webrtc_set_ice_candidate_cb(g_hWebRtcHandle, webrtcIceCandidateCB, NULL); PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_set_ice_candidate_cb", WebRtcGetError(nRet)); @@ -1386,7 +1384,6 @@ int ITc_media_webrtc_create_offer_async_p(void) char *pszOffer, *pszAnswer; webrtc_h hLocalWebRtcHandle; g_bCallbackCalled = false; - int nTimeoutId = -1; int nRet = webrtc_add_media_source(g_hWebRtcHandle, WEBRTC_MEDIA_SOURCE_TYPE_CAMERA, &nId); if (nRet == WEBRTC_ERROR_NOT_SUPPORTED) { @@ -1448,7 +1445,6 @@ int ITc_media_webrtc_create_answer_async_p(void) char *pszOffer, *pszAnswer; webrtc_h hLocalWebRtcHandle, hWebRtcHandle; g_bCallbackCalled = false; - int nTimeoutId = -1; int nRet = webrtc_add_media_source(g_hWebRtcHandle, WEBRTC_MEDIA_SOURCE_TYPE_AUDIOTEST, &nId); PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_add_media_source", WebRtcGetError(nRet)); @@ -1549,7 +1545,6 @@ int ITc_media_webrtc_media_source_set_audio_loopback_p(void) unsigned int nId; sound_stream_info_h hStreamInfo; g_bCallbackCalled = false; - int nTimeoutId = -1; createWindow(); int nRet = webrtc_add_media_source(g_hWebRtcHandle, WEBRTC_MEDIA_SOURCE_TYPE_AUDIOTEST, &nId); @@ -1608,7 +1603,6 @@ int ITc_media_webrtc_media_source_set_video_loopback_p(void) unsigned int nId; sound_stream_info_h hStreamInfo; g_bCallbackCalled = false; - int nTimeoutId = -1; createWindow(); int nRet = webrtc_add_media_source(g_hWebRtcHandle, WEBRTC_MEDIA_SOURCE_TYPE_VIDEOTEST, &nId); @@ -1661,7 +1655,6 @@ int ITc_media_webrtc_set_get_display_mode_p(void) unsigned int nId,nTrackId; sound_stream_info_h hStreamInfo; g_bCallbackCalled = false; - int nTimeoutId = -1; webrtc_display_mode_e eMode; createWindow(); @@ -1721,7 +1714,6 @@ int ITc_media_webrtc_set_get_display_visible_p(void) unsigned int nId,nTrackId; sound_stream_info_h hStreamInfo; g_bCallbackCalled = false; - int nTimeoutId = -1; webrtc_display_mode_e eMode; bool bGetVisible, bSetVisible = false;