*/
static void webrtcSessionDescriptionCreatedCB(webrtc_h webrtc, const char *description, void *user_data)
{
- g_bCallbackSessionCalled = true;
+ g_bCallbackCalled = true;
FPRINTF("[Line : %d][%s] Callback webrtcSessionDescriptionCreatedCB called\\n", __LINE__, API_NAMESPACE);
- if (g_pMainLoop )
+ if (g_pMainLoop)
{
g_main_loop_quit(g_pMainLoop);
g_pMainLoop = NULL;
{
g_bCallbackCalled = true;
FPRINTF("[Line : %d][%s] Callback webrtcStateChangedCB called\\n", __LINE__, API_NAMESPACE);
- if (g_pMainLoop )
+ if (g_pMainLoop)
{
g_main_loop_quit(g_pMainLoop);
g_pMainLoop = NULL;
{
g_bCallbackCalled = true;
FPRINTF("[Line : %d][%s] Callback webrtcSignalingStateChangeCB called\\n", __LINE__, API_NAMESPACE);
- if (g_pMainLoop )
+ if (g_pMainLoop)
{
g_main_loop_quit(g_pMainLoop);
g_pMainLoop = NULL;
PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_start", WebRtcGetError(nRet));
RUN_POLLING_LOOP;
- if(g_bCallbackCalled != true)
- {
-
+ if (!g_bCallbackCalled) {
FPRINTF("[Line : %d][%s] Callback webrtcStateChangedCB not invoked for %s\\n", __LINE__, API_NAMESPACE, "webrtc_set_state_changed_cb");
- webrtc_stop(g_hWebRtcHandle);
return 1;
}
PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_start", WebRtcGetError(nRet));
RUN_POLLING_LOOP;
- if(g_bCallbackCalled != true)
- {
-
+ if (!g_bCallbackCalled) {
FPRINTF("[Line : %d][%s] Callback webrtcStateChangedCB not invoked\\n", __LINE__, API_NAMESPACE);
return 1;
}
+ g_bCallbackCalled = false;
nRet = webrtc_create_offer(hWebRtcHandle, NULL, &pszOffer);
PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_create_offer", WebRtcGetError(nRet));
- g_bCallbackCalled = false;
nRet = webrtc_create(&hLocalWebRtcHandle);
PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_create", WebRtcGetError(nRet));
CHECK_HANDLE(hLocalWebRtcHandle, "webrtc_create");
PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_start", WebRtcGetError(nRet));
RUN_POLLING_LOOP;
+ if (!g_bCallbackCalled) {
+ FPRINTF("[Line : %d][%s] Callback webrtcStateChangedCB not invoked\\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
+ g_bCallbackCalled = false;
nRet = webrtc_set_remote_description(hLocalWebRtcHandle, pszOffer);
PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_set_remote_description", WebRtcGetError(nRet));
RUN_POLLING_LOOP;
+ if (!g_bCallbackCalled) {
+ FPRINTF("[Line : %d][%s] Callback webrtcSignalingStateChangeCB not invoked\\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
nRet = webrtc_create_answer(hLocalWebRtcHandle, NULL, &pszAnswer);
PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_create_answer", WebRtcGetError(nRet));
PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_start", WebRtcGetError(nRet));
RUN_POLLING_LOOP;
- if(g_bCallbackCalled != true)
- {
-
+ if (!g_bCallbackCalled) {
FPRINTF("[Line : %d][%s] Callback webrtcStateChangedCB not invoked\\n", __LINE__, API_NAMESPACE);
return 1;
}
PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_start", WebRtcGetError(nRet));
RUN_POLLING_LOOP;
- if(g_bCallbackCalled != true)
- {
-
+ if (!g_bCallbackCalled) {
FPRINTF("[Line : %d][%s] Callback webrtcStateChangedCB not invoked\\n", __LINE__, API_NAMESPACE);
return 1;
}
PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_start", WebRtcGetError(nRet));
RUN_POLLING_LOOP;
- if(g_bCallbackCalled != true)
- {
-
+ if (!g_bCallbackCalled) {
FPRINTF("[Line : %d][%s] Callback webrtcStateChangedCB not invoked\\n", __LINE__, API_NAMESPACE);
return 1;
}
PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_start", WebRtcGetError(nRet));
RUN_POLLING_LOOP;
- if(g_bCallbackCalled != true)
- {
-
+ if (!g_bCallbackCalled) {
FPRINTF("[Line : %d][%s] Callback webrtcStateChangedCB not invoked\\n", __LINE__, API_NAMESPACE);
return 1;
}
char *pszOffer, *pszAnswer;
webrtc_h hLocalWebRtcHandle;
g_bCallbackCalled = false;
- g_bCallbackSessionCalled = false;
int nTimeoutId = -1;
int nRet = webrtc_add_media_source(g_hWebRtcHandle, WEBRTC_MEDIA_SOURCE_TYPE_CAMERA, &nId);
PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_start", WebRtcGetError(nRet));
RUN_POLLING_LOOP;
- if(g_bCallbackCalled != true)
- {
-
+ if (!g_bCallbackCalled) {
FPRINTF("[Line : %d][%s] Callback webrtcStateChangedCB not invoked\\n", __LINE__, API_NAMESPACE);
return 1;
}
PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_create_offer_async", WebRtcGetError(nRet));
RUN_POLLING_LOOP;
+ if (!g_bCallbackCalled) {
+ FPRINTF("[Line : %d][%s] Callback webrtcSessionDescriptionCreatedCB not invoked\\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
nRet = webrtc_stop(g_hWebRtcHandle);
PRINT_RESULT_NORETURN(WEBRTC_ERROR_NONE, nRet, "webrtc_stop", WebRtcGetError(nRet));
char *pszOffer, *pszAnswer;
webrtc_h hLocalWebRtcHandle, hWebRtcHandle;
g_bCallbackCalled = false;
- g_bCallbackSessionCalled = false;
int nTimeoutId = -1;
int nRet = webrtc_add_media_source(g_hWebRtcHandle, WEBRTC_MEDIA_SOURCE_TYPE_MIC, &nId);
PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_start", WebRtcGetError(nRet));
RUN_POLLING_LOOP;
- if(g_bCallbackCalled != true)
- {
-
+ if (!g_bCallbackCalled) {
FPRINTF("[Line : %d][%s] Callback webrtcStateChangedCB not invoked\\n", __LINE__, API_NAMESPACE);
return 1;
}
+ g_bCallbackCalled = false;
nRet = webrtc_create_offer(g_hWebRtcHandle, NULL, &pszOffer);
PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_create_offer", WebRtcGetError(nRet));
- g_bCallbackCalled = false;
nRet = webrtc_create(&hLocalWebRtcHandle);
PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_create", WebRtcGetError(nRet));
PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_start", WebRtcGetError(nRet));
RUN_POLLING_LOOP;
- if(g_bCallbackCalled != true)
- {
+ if (!g_bCallbackCalled) {
FPRINTF("[Line : %d][%s] Callback webrtcStateChangedCB not invoked\\n", __LINE__, API_NAMESPACE);
return 1;
}
+ g_bCallbackCalled = false;
nRet = webrtc_set_remote_description(hLocalWebRtcHandle, pszOffer);
PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_set_remote_description", WebRtcGetError(nRet));
RUN_POLLING_LOOP;
- if(g_bCallbackCalled != true)
- {
+ if (!g_bCallbackCalled) {
FPRINTF("[Line : %d][%s] Callback webrtcSignalingStateChangeCB not invoked\\n", __LINE__, API_NAMESPACE);
return 1;
}
+ g_bCallbackCalled = false;
nRet = webrtc_create_answer_async(hLocalWebRtcHandle, NULL, webrtcSessionDescriptionCreatedCB, NULL);
PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_create_answer_async", WebRtcGetError(nRet));
RUN_POLLING_LOOP;
+ if (!g_bCallbackCalled) {
+ FPRINTF("[Line : %d][%s] Callback webrtcSessionDescriptionCreatedCB not invoked\\n", __LINE__, API_NAMESPACE);
+ return 1;
+ }
FREE_MEMORY(pszOffer);
PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_start", WebRtcGetError(nRet));
RUN_POLLING_LOOP;
- if(g_bCallbackCalled != true)
- {
-
+ if (!g_bCallbackCalled) {
FPRINTF("[Line : %d][%s] Callback webrtcStateChangedCB not invoked\\n", __LINE__, API_NAMESPACE);
return 1;
}
PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_start", WebRtcGetError(nRet));
RUN_POLLING_LOOP;
- if(g_bCallbackCalled != true)
- {
-
+ if (!g_bCallbackCalled) {
FPRINTF("[Line : %d][%s] Callback webrtcStateChangedCB not invoked\\n", __LINE__, API_NAMESPACE);
return 1;
}
PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_start", WebRtcGetError(nRet));
RUN_POLLING_LOOP;
- if(g_bCallbackCalled != true)
- {
-
+ if (!g_bCallbackCalled) {
FPRINTF("[Line : %d][%s] Callback webrtcStateChangedCB not invoked\\n", __LINE__, API_NAMESPACE);
return 1;
}
PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_start", WebRtcGetError(nRet));
RUN_POLLING_LOOP;
- if(g_bCallbackCalled != true)
- {
-
+ if (!g_bCallbackCalled) {
FPRINTF("[Line : %d][%s] Callback webrtcStateChangedCB not invoked\\n", __LINE__, API_NAMESPACE);
return 1;
}