[ITC][webrtc][ACR-1859] TCs added for new APIs 68/316668/4
authorshobhitv <shobhit.v@samsung.com>
Mon, 26 Aug 2024 12:24:01 +0000 (17:54 +0530)
committershobhit verma <shobhit.v@samsung.com>
Tue, 27 Aug 2024 06:02:29 +0000 (06:02 +0000)
Change-Id: I080133c9bd22fb3a0d3e27bcbdb2e119800c332a
Signed-off-by: shobhitv <shobhit.v@samsung.com>
src/itc/webrtc/ITs-webrtc.c
src/itc/webrtc/tct-webrtc-native_mobile.h
src/itc/webrtc/tct-webrtc-native_tizeniot.h
src/itc/webrtc/tct-webrtc-native_tv.h
src/itc/webrtc/tct-webrtc-native_wearable.h

index 3486833787aa23fa200e73ce8159a31fa5df7dc3..717fe23e98b3997cc50b9691c1492824d46e5599 100755 (executable)
@@ -23,6 +23,7 @@
 #define TEST_STRING_DATA        "test string"
 #define TEST_BUFFER_SIZE        16
 #define TEST_FPS                       30
+#define TEST_PAYLOAD_TYPE_OPUS         96
 
 static char g_test_buffer[TEST_BUFFER_SIZE] = {'t', 'e', 's', 't', 'b', 'u', 'f', '\0', };
 static bool g_bIsMicrophoneFeatureSupported;
@@ -2828,5 +2829,337 @@ int ITc_webrtc_media_source_start_media_source_p(void)
 
        return 0;
 }
+
+
+//& purpose: Starts the WebRTC synchronously
+//& type: auto
+/**
+* @testcase                    ITc_webrtc_start_sync_p
+* @since_tizen                         9.0
+* @author                              SRID(shobhit.v)
+* @reviewer                            SRID(tarun1.kumar)
+* @type                                auto
+* @description                 Starts the WebRTC.
+* @scenario                            Create a webrtc handle, set ice candidate callback and start webRTC
+* @apicovered                  webrtc_set_ice_candidate_cb and webrtc_start_sync
+* @passcase                            If webrtc_set_ice_candidate_cb and webrtc_start_sync is successful
+* @failcase                    If webrtc_set_ice_candidate_cb Or webrtc_start_sync fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_webrtc_start_sync_p(void)
+{
+       START_TEST;
+
+       int nRet = webrtc_set_ice_candidate_cb(g_hWebRtcHandle, webrtcIceCandidateCB, NULL);
+       PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_set_ice_candidate_cb", WebRtcGetError(nRet));
+
+       nRet = webrtc_start_sync(g_hWebRtcHandle);
+       PRINT_RESULT_CLEANUP(WEBRTC_ERROR_NONE, nRet, "webrtc_start_sync", WebRtcGetError(nRet), webrtc_unset_ice_candidate_cb(g_hWebRtcHandle));
+
+       webrtc_unset_ice_candidate_cb(g_hWebRtcHandle);
+       PRINT_RESULT_NORETURN(WEBRTC_ERROR_NONE, nRet, "webrtc_unset_ice_candidate_cb", WebRtcGetError(nRet));
+       return 0;
+}
+
+//& purpose: Sets the RTP payload type to the media source and get RTP payload type of the media source
+//& type: auto
+/**
+* @testcase                    ITc_webrtc_media_source_set_get_payload_type_p
+* @since_tizen                         9.0
+* @author                              SRID(shobhit.v)
+* @reviewer                            SRID(tarun1.kumar)
+* @type                                auto
+* @description                 Set RTP payload type to the media source and get it
+* @scenario                            Create a webrtc handle, Add media source, Set and Get payload type
+* @apicovered                  webrtc_add_media_source, webrtc_media_source_set_payload_type and webrtc_media_source_get_payload_type
+* @passcase                            If webrtc_add_media_source, webrtc_media_source_set_payload_type and webrtc_media_source_get_payload_type is successful
+* @failcase                    If webrtc_add_media_source Or webrtc_media_source_set_payload_type Or webrtc_media_source_get_payload_type fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_webrtc_media_source_set_get_payload_type_p(void)
+{
+       START_TEST;
+       unsigned int nId = -1;
+       unsigned int nGetpayloadType = -1;
+
+       int nRet = webrtc_add_media_source(g_hWebRtcHandle, WEBRTC_MEDIA_SOURCE_TYPE_MIC, &nId);
+       if (!g_bIsMicrophoneFeatureSupported)
+       {
+               PRINT_RESULT(WEBRTC_ERROR_NOT_SUPPORTED, nRet, "webrtc_add_media_source", WebRtcGetError(nRet));
+               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));
+       if (nId < 0)
+       {
+               FPRINTF("[Line : %d][%s] webrtc_add_media_source failed, ID is invalid\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       nRet = webrtc_media_source_set_payload_type(g_hWebRtcHandle, nId, WEBRTC_TRANSCEIVER_CODEC_OPUS, TEST_PAYLOAD_TYPE_OPUS);
+       PRINT_RESULT_CLEANUP(WEBRTC_ERROR_NONE, nRet, "webrtc_media_source_set_payload_type", WebRtcGetError(nRet), webrtc_remove_media_source(g_hWebRtcHandle, nId));
+
+       nRet = webrtc_media_source_get_payload_type(g_hWebRtcHandle, nId, WEBRTC_TRANSCEIVER_CODEC_OPUS, &nGetpayloadType);
+       PRINT_RESULT_CLEANUP(WEBRTC_ERROR_NONE, nRet, "webrtc_media_source_get_payload_type", WebRtcGetError(nRet), webrtc_remove_media_source(g_hWebRtcHandle, nId));
+
+       if (nGetpayloadType != TEST_PAYLOAD_TYPE_OPUS)
+       {
+               FPRINTF("[Line : %d][%s] Set and get Payload type is different\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+       nRet = webrtc_remove_media_source(g_hWebRtcHandle, nId);
+       PRINT_RESULT_NORETURN(WEBRTC_ERROR_NONE, nRet, "webrtc_remove_media_source", WebRtcGetError(nRet));
+
+       return 0;
+}
+
+//& purpose: Gets the local session description
+//& type: auto
+/**
+* @testcase                    ITc_webrtc_get_local_description_p
+* @since_tizen                         9.0
+* @author                              SRID(shobhit.v)
+* @reviewer                            SRID(tarun1.kumar)
+* @type                                auto
+* @description                 Gets the local session description
+* @scenario                            Create a webrtc handle, Set the offer message as local description and Gets the local session description
+* @apicovered                  webrtc_add_media_source, webrtc_set_ice_candidate_cb, webrtc_create_offer, webrtc_set_local_description and webrtc_get_local_description
+* @passcase                            If Pre condition APIs and webrtc_get_local_description pass
+* @failcase                    If Pre condition APIs Or webrtc_get_local_description fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_webrtc_get_local_description_p(void)
+{
+       START_TEST;
+       callback_data cb_data;
+       unsigned int nId = -1;
+       char *pszOffer = NULL;
+       char *pszLocalDesc = NULL;
+       INIT_CALLBACK_DATA(cb_data);
+
+       int nRet = webrtc_add_media_source(g_hWebRtcHandle, WEBRTC_MEDIA_SOURCE_TYPE_MIC, &nId);
+       if (!g_bIsMicrophoneFeatureSupported)
+       {
+               PRINT_RESULT(WEBRTC_ERROR_NOT_SUPPORTED, nRet, "webrtc_add_media_source", WebRtcGetError(nRet));
+               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));
+       if (nId < 0)
+       {
+               FPRINTF("[Line : %d][%s] webrtc_add_media_source failed, ID is invalid\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       nRet = webrtc_set_ice_candidate_cb(g_hWebRtcHandle, webrtcIceCandidateCB, NULL);
+       PRINT_RESULT_CLEANUP(WEBRTC_ERROR_NONE, nRet, "webrtc_set_ice_candidate_cb", WebRtcGetError(nRet), webrtc_remove_media_source(g_hWebRtcHandle, nId));
+
+       nRet = webrtc_set_state_changed_cb(g_hWebRtcHandle, webrtcStateChangedCB, &cb_data);
+       PRINT_RESULT_CLEANUP(WEBRTC_ERROR_NONE, nRet, "webrtc_set_state_changed_cb", WebRtcGetError(nRet), webrtc_unset_ice_candidate_cb(g_hWebRtcHandle); webrtc_remove_media_source(g_hWebRtcHandle, nId));
+
+       g_mutex_lock(&cb_data.mutex);
+
+       nRet = webrtc_start(g_hWebRtcHandle);
+       PRINT_RESULT_CLEANUP(WEBRTC_ERROR_NONE, nRet, "webrtc_start", WebRtcGetError(nRet), webrtc_unset_state_changed_cb(g_hWebRtcHandle); webrtc_unset_ice_candidate_cb(g_hWebRtcHandle); webrtc_remove_media_source(g_hWebRtcHandle, nId));
+
+       RUN_POLLING_LOOP(cb_data);
+       if (!cb_data.is_invoked) {
+               FPRINTF("[Line : %d][%s] Callback webrtcStateChangedCB not invoked\\n", __LINE__, API_NAMESPACE);
+               webrtc_unset_state_changed_cb(g_hWebRtcHandle);
+               webrtc_unset_ice_candidate_cb(g_hWebRtcHandle);
+               webrtc_remove_media_source(g_hWebRtcHandle, nId);
+               return 1;
+       }
+
+       nRet = webrtc_create_offer(g_hWebRtcHandle, NULL, &pszOffer);
+       PRINT_RESULT_CLEANUP(WEBRTC_ERROR_NONE, nRet, "webrtc_create_offer", WebRtcGetError(nRet), webrtc_stop(g_hWebRtcHandle); webrtc_unset_state_changed_cb(g_hWebRtcHandle); webrtc_unset_ice_candidate_cb(g_hWebRtcHandle); webrtc_remove_media_source(g_hWebRtcHandle, nId));
+       CHECK_HANDLE(pszOffer, "webrtc_create_offer");
+
+       nRet = webrtc_set_local_description(g_hWebRtcHandle, pszOffer);
+       PRINT_RESULT_CLEANUP(WEBRTC_ERROR_NONE, nRet, "webrtc_set_local_description", WebRtcGetError(nRet), webrtc_stop(g_hWebRtcHandle); webrtc_unset_state_changed_cb(g_hWebRtcHandle); webrtc_unset_ice_candidate_cb(g_hWebRtcHandle); webrtc_remove_media_source(g_hWebRtcHandle, nId));
+
+       nRet = webrtc_get_local_description(g_hWebRtcHandle, &pszLocalDesc);
+       PRINT_RESULT_CLEANUP(WEBRTC_ERROR_NONE, nRet, "webrtc_set_local_description", WebRtcGetError(nRet), webrtc_stop(g_hWebRtcHandle); webrtc_unset_state_changed_cb(g_hWebRtcHandle); webrtc_unset_ice_candidate_cb(g_hWebRtcHandle); webrtc_remove_media_source(g_hWebRtcHandle, nId));
+       CHECK_HANDLE(pszLocalDesc, "webrtc_get_local_description");
+
+       if (strcmp(pszOffer, pszLocalDesc) != 0)
+       {
+               FPRINTF("[Line : %d][%s] Set and get local description mismatch\\n", __LINE__, API_NAMESPACE);
+               free(pszOffer);
+               free(pszLocalDesc);
+
+               //Cleanup API call
+               webrtc_stop(g_hWebRtcHandle);
+               webrtc_unset_state_changed_cb(g_hWebRtcHandle);
+               webrtc_unset_ice_candidate_cb(g_hWebRtcHandle);
+               webrtc_remove_media_source(g_hWebRtcHandle, nId);
+               return 1;
+       }
+
+       //Cleanup API call
+       nRet = webrtc_stop(g_hWebRtcHandle);
+       PRINT_RESULT_NORETURN(WEBRTC_ERROR_NONE, nRet, "webrtc_stop", WebRtcGetError(nRet));
+       nRet = webrtc_unset_state_changed_cb(g_hWebRtcHandle);
+       PRINT_RESULT_NORETURN(WEBRTC_ERROR_NONE, nRet, "webrtc_unset_state_changed_cb", WebRtcGetError(nRet));
+       nRet = webrtc_unset_ice_candidate_cb(g_hWebRtcHandle);
+       PRINT_RESULT_NORETURN(WEBRTC_ERROR_NONE, nRet, "webrtc_unset_ice_candidate_cb", WebRtcGetError(nRet));
+       nRet = webrtc_remove_media_source(g_hWebRtcHandle, nId);
+       PRINT_RESULT_NORETURN(WEBRTC_ERROR_NONE, nRet, "webrtc_remove_media_source", WebRtcGetError(nRet));
+
+       return 0;
+}
+
+
+//& purpose: Gets the remote session description
+//& type: auto
+/**
+* @testcase                    ITc_webrtc_get_remote_description_p
+* @since_tizen                         9.0
+* @author                              SRID(shobhit.v)
+* @reviewer                            SRID(tarun1.kumar)
+* @type                                auto
+* @description                 Gets the local session description
+* @scenario                            Create a webrtc handle, Set the offer message as local description and Gets the local session description
+* @apicovered                  webrtc_add_media_source, webrtc_set_ice_candidate_cb, webrtc_create_offer, webrtc_set_remote_description and webrtc_get_remote_description
+* @passcase                            If Pre condition APIs and webrtc_get_remote_description pass
+* @failcase                    If Pre condition APIs Or webrtc_get_remote_description fails
+* @precondition                        NA
+* @postcondition               NA
+*/
+int ITc_webrtc_get_remote_description_p(void)
+{
+       START_TEST;
+       callback_data cb_data;
+       unsigned int nId = -1;
+       char *pszOffer = NULL;
+       char *pszLocalDesc = NULL;
+       webrtc_h hWebrtc = NULL;
+       webrtc_h hWebrtc2 = NULL;
+       INIT_CALLBACK_DATA(cb_data);
+
+       int nRet = webrtc_create(&hWebrtc);
+       PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_create", WebRtcGetError(nRet));
+       CHECK_HANDLE(hWebrtc, "webrtc_create");
+
+       nRet = webrtc_add_media_source(hWebrtc, WEBRTC_MEDIA_SOURCE_TYPE_MIC, &nId);
+       if (!g_bIsMicrophoneFeatureSupported)
+       {
+               PRINT_RESULT(WEBRTC_ERROR_NOT_SUPPORTED, nRet, "webrtc_add_media_source", WebRtcGetError(nRet));
+               nRet = webrtc_add_media_source(hWebrtc, WEBRTC_MEDIA_SOURCE_TYPE_AUDIOTEST, &nId);
+       }
+       PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_add_media_source", WebRtcGetError(nRet));
+       if (nId < 0)
+       {
+               FPRINTF("[Line : %d][%s] webrtc_add_media_source failed, ID is invalid\\n", __LINE__, API_NAMESPACE);
+               return 1;
+       }
+
+       nRet = webrtc_set_ice_candidate_cb(hWebrtc, webrtcIceCandidateCB, NULL);
+       PRINT_RESULT_CLEANUP(WEBRTC_ERROR_NONE, nRet, "webrtc_set_ice_candidate_cb", WebRtcGetError(nRet), webrtc_remove_media_source(hWebrtc, nId));
+
+       nRet = webrtc_set_state_changed_cb(hWebrtc, webrtcStateChangedCB, &cb_data);
+       PRINT_RESULT_CLEANUP(WEBRTC_ERROR_NONE, nRet, "webrtc_set_state_changed_cb", WebRtcGetError(nRet), webrtc_unset_ice_candidate_cb(hWebrtc); webrtc_remove_media_source(hWebrtc, nId));
+
+       g_mutex_lock(&cb_data.mutex);
+
+       nRet = webrtc_start(hWebrtc);
+       PRINT_RESULT_CLEANUP(WEBRTC_ERROR_NONE, nRet, "webrtc_start", WebRtcGetError(nRet), webrtc_unset_state_changed_cb(hWebrtc); webrtc_unset_ice_candidate_cb(hWebrtc); webrtc_remove_media_source(hWebrtc, nId));
+
+       RUN_POLLING_LOOP(cb_data);
+       if (!cb_data.is_invoked) {
+               FPRINTF("[Line : %d][%s] Callback webrtcStateChangedCB not invoked\\n", __LINE__, API_NAMESPACE);
+               webrtc_unset_state_changed_cb(hWebrtc);
+               webrtc_unset_ice_candidate_cb(hWebrtc);
+               webrtc_remove_media_source(hWebrtc, nId);
+               webrtc_destroy(hWebrtc);
+               return 1;
+       }
+
+       nRet = webrtc_create_offer(hWebrtc, NULL, &pszOffer);
+       PRINT_RESULT_CLEANUP(WEBRTC_ERROR_NONE, nRet, "webrtc_create_offer", WebRtcGetError(nRet), webrtc_stop(hWebrtc); webrtc_unset_state_changed_cb(hWebrtc); webrtc_unset_ice_candidate_cb(hWebrtc); webrtc_remove_media_source(hWebrtc, nId));
+       CHECK_HANDLE(pszOffer, "webrtc_create_offer");
+
+       INIT_CALLBACK_DATA(cb_data);
+       nRet = webrtc_create(&hWebrtc2);
+       PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_create", WebRtcGetError(nRet));
+       CHECK_HANDLE(hWebrtc2, "webrtc_create");
+
+       nRet = webrtc_set_ice_candidate_cb(hWebrtc2, webrtcIceCandidateCB, NULL);
+       PRINT_RESULT_CLEANUP(WEBRTC_ERROR_NONE, nRet, "webrtc_set_ice_candidate_cb", WebRtcGetError(nRet), webrtc_destroy(hWebrtc2));
+
+       nRet = webrtc_set_state_changed_cb(hWebrtc2, webrtcStateChangedCB, &cb_data);
+       PRINT_RESULT_CLEANUP(WEBRTC_ERROR_NONE, nRet, "webrtc_set_state_changed_cb", WebRtcGetError(nRet), webrtc_unset_ice_candidate_cb(hWebrtc2);webrtc_destroy(hWebrtc2));
+
+       g_mutex_lock(&cb_data.mutex);
+
+       nRet = webrtc_start(hWebrtc2);
+       PRINT_RESULT_CLEANUP(WEBRTC_ERROR_NONE, nRet, "webrtc_start", WebRtcGetError(nRet), webrtc_unset_state_changed_cb(hWebrtc2); webrtc_unset_ice_candidate_cb(hWebrtc2);webrtc_destroy(hWebrtc2));
+
+       RUN_POLLING_LOOP(cb_data);
+       if (!cb_data.is_invoked) {
+               FPRINTF("[Line : %d][%s] Callback webrtcStateChangedCB not invoked\\n", __LINE__, API_NAMESPACE);
+
+               //Cleanup API call
+               webrtc_stop(hWebrtc);
+               webrtc_unset_state_changed_cb(hWebrtc);
+               webrtc_unset_ice_candidate_cb(hWebrtc);
+               webrtc_remove_media_source(hWebrtc, nId);
+               webrtc_destroy(hWebrtc);
+
+               webrtc_unset_state_changed_cb(hWebrtc2);
+               webrtc_unset_ice_candidate_cb(hWebrtc2);
+               webrtc_destroy(hWebrtc2);
+               return 1;
+       }
+
+       nRet = webrtc_set_remote_description(hWebrtc2, pszOffer);
+       PRINT_RESULT_CLEANUP(WEBRTC_ERROR_NONE, nRet, "webrtc_set_remote_description", WebRtcGetError(nRet), webrtc_stop(hWebrtc2); webrtc_unset_state_changed_cb(hWebrtc2); webrtc_unset_ice_candidate_cb(hWebrtc2);webrtc_destroy(hWebrtc2));
+
+       nRet = webrtc_get_remote_description(hWebrtc2, &pszLocalDesc);
+       PRINT_RESULT_CLEANUP(WEBRTC_ERROR_NONE, nRet, "webrtc_set_local_description", WebRtcGetError(nRet), webrtc_stop(hWebrtc2); webrtc_unset_state_changed_cb(hWebrtc2); webrtc_unset_ice_candidate_cb(hWebrtc2);webrtc_destroy(hWebrtc2));
+       CHECK_HANDLE(pszLocalDesc, "webrtc_get_remote_description");
+
+       if (strcmp(pszOffer, pszLocalDesc) != 0)
+       {
+               FPRINTF("[Line : %d][%s] Set and get local description mismatch\\n", __LINE__, API_NAMESPACE);
+               free(pszOffer);
+               free(pszLocalDesc);
+
+               //Cleanup API call
+               webrtc_stop(hWebrtc);
+               webrtc_unset_state_changed_cb(hWebrtc);
+               webrtc_unset_ice_candidate_cb(hWebrtc);
+               webrtc_remove_media_source(hWebrtc, nId);
+               webrtc_destroy(hWebrtc);
+
+               webrtc_stop(hWebrtc2);
+               webrtc_unset_state_changed_cb(hWebrtc2);
+               webrtc_unset_ice_candidate_cb(hWebrtc2);
+               webrtc_destroy(hWebrtc2);
+               return 1;
+       }
+
+       nRet = webrtc_stop(hWebrtc);
+       PRINT_RESULT_NORETURN(WEBRTC_ERROR_NONE, nRet, "webrtc_stop", WebRtcGetError(nRet));
+       nRet = webrtc_unset_state_changed_cb(hWebrtc);
+       PRINT_RESULT_NORETURN(WEBRTC_ERROR_NONE, nRet, "webrtc_unset_state_changed_cb", WebRtcGetError(nRet));
+       nRet = webrtc_unset_ice_candidate_cb(hWebrtc);
+       PRINT_RESULT_NORETURN(WEBRTC_ERROR_NONE, nRet, "webrtc_unset_ice_candidate_cb", WebRtcGetError(nRet));
+       nRet = webrtc_remove_media_source(hWebrtc, nId);
+       PRINT_RESULT_NORETURN(WEBRTC_ERROR_NONE, nRet, "webrtc_remove_media_source", WebRtcGetError(nRet));
+       nRet = webrtc_destroy(hWebrtc);
+       PRINT_RESULT_NORETURN(WEBRTC_ERROR_NONE, nRet, "webrtc_destroy", WebRtcGetError(nRet));
+
+       nRet = webrtc_stop(hWebrtc2);
+       PRINT_RESULT_NORETURN(WEBRTC_ERROR_NONE, nRet, "webrtc_stop", WebRtcGetError(nRet));
+       nRet = webrtc_unset_state_changed_cb(hWebrtc2);
+       PRINT_RESULT_NORETURN(WEBRTC_ERROR_NONE, nRet, "webrtc_unset_state_changed_cb", WebRtcGetError(nRet));
+       nRet = webrtc_unset_ice_candidate_cb(hWebrtc2);
+       PRINT_RESULT_NORETURN(WEBRTC_ERROR_NONE, nRet, "webrtc_unset_ice_candidate_cb", WebRtcGetError(nRet));
+       nRet = webrtc_destroy(hWebrtc2);
+       PRINT_RESULT_NORETURN(WEBRTC_ERROR_NONE, nRet, "webrtc_destroy", WebRtcGetError(nRet));
+       return 0;
+}
 /** @} */
 /** @} */
index 11bbc87c36c1f014234630f2d357876b8620e357..f31868bb001c8f24c003aaeec5062c33a8e8950f 100755 (executable)
@@ -83,6 +83,10 @@ extern int ITc_webrtc_media_source_set_get_transceiver_codec_p(void);
 extern int ITc_webrtc_media_source_set_get_encoder_bitrate_p(void);
 extern int ITc_webrtc_camera_source_set_get_device_id_p(void);
 extern int ITc_webrtc_media_source_start_media_source_p(void);
+extern int ITc_webrtc_start_sync_p(void);
+extern int ITc_webrtc_media_source_set_get_payload_type_p(void);
+extern int ITc_webrtc_get_local_description_p(void);
+extern int ITc_webrtc_get_remote_description_p(void);
 
 testcase tc_array[] = {
     {"ITc_webrtc_create_destroy_p", ITc_webrtc_create_destroy_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
@@ -144,6 +148,10 @@ testcase tc_array[] = {
        {"ITc_webrtc_media_source_set_get_encoder_bitrate_p",ITc_webrtc_media_source_set_get_encoder_bitrate_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
        {"ITc_webrtc_camera_source_set_get_device_id_p",ITc_webrtc_camera_source_set_get_device_id_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
        {"ITc_webrtc_media_source_start_media_source_p",ITc_webrtc_media_source_start_media_source_p,ITs_webrtc_startup, ITs_webrtc_cleanup},
+       {"ITc_webrtc_start_sync_p",ITc_webrtc_start_sync_p,ITs_webrtc_startup, ITs_webrtc_cleanup},
+       {"ITc_webrtc_media_source_set_get_payload_type_p",ITc_webrtc_media_source_set_get_payload_type_p,ITs_webrtc_startup, ITs_webrtc_cleanup},
+       {"ITc_webrtc_get_local_description_p",ITc_webrtc_get_local_description_p,ITs_webrtc_startup, ITs_webrtc_cleanup},
+       {"ITc_webrtc_get_remote_description_p",ITc_webrtc_get_remote_description_p,ITs_webrtc_startup, ITs_webrtc_cleanup},
     {NULL, NULL}
 };
 
index 11bbc87c36c1f014234630f2d357876b8620e357..f5e27e064115b22f47f301791a71684167c808ba 100755 (executable)
@@ -83,6 +83,10 @@ extern int ITc_webrtc_media_source_set_get_transceiver_codec_p(void);
 extern int ITc_webrtc_media_source_set_get_encoder_bitrate_p(void);
 extern int ITc_webrtc_camera_source_set_get_device_id_p(void);
 extern int ITc_webrtc_media_source_start_media_source_p(void);
+extern int ITc_webrtc_start_sync_p(void);
+extern int ITc_webrtc_media_source_set_get_payload_type_p(void);
+extern int ITc_webrtc_get_local_description_p(void);
+extern int ITc_webrtc_get_remote_description_p(void);
 
 testcase tc_array[] = {
     {"ITc_webrtc_create_destroy_p", ITc_webrtc_create_destroy_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
@@ -144,7 +148,11 @@ testcase tc_array[] = {
        {"ITc_webrtc_media_source_set_get_encoder_bitrate_p",ITc_webrtc_media_source_set_get_encoder_bitrate_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
        {"ITc_webrtc_camera_source_set_get_device_id_p",ITc_webrtc_camera_source_set_get_device_id_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
        {"ITc_webrtc_media_source_start_media_source_p",ITc_webrtc_media_source_start_media_source_p,ITs_webrtc_startup, ITs_webrtc_cleanup},
-    {NULL, NULL}
+       {"ITc_webrtc_start_sync_p",ITc_webrtc_start_sync_p,ITs_webrtc_startup, ITs_webrtc_cleanup},
+       {"ITc_webrtc_media_source_set_get_payload_type_p",ITc_webrtc_media_source_set_get_payload_type_p,ITs_webrtc_startup, ITs_webrtc_cleanup},
+       {"ITc_webrtc_get_local_description_p",ITc_webrtc_get_local_description_p,ITs_webrtc_startup, ITs_webrtc_cleanup},
+       {"ITc_webrtc_get_remote_description_p",ITc_webrtc_get_remote_description_p,ITs_webrtc_startup, ITs_webrtc_cleanup},
+       {NULL, NULL}
 };
 
 #endif // __TCT_WEBRTC_NATIVE_H__
index 11bbc87c36c1f014234630f2d357876b8620e357..f31868bb001c8f24c003aaeec5062c33a8e8950f 100755 (executable)
@@ -83,6 +83,10 @@ extern int ITc_webrtc_media_source_set_get_transceiver_codec_p(void);
 extern int ITc_webrtc_media_source_set_get_encoder_bitrate_p(void);
 extern int ITc_webrtc_camera_source_set_get_device_id_p(void);
 extern int ITc_webrtc_media_source_start_media_source_p(void);
+extern int ITc_webrtc_start_sync_p(void);
+extern int ITc_webrtc_media_source_set_get_payload_type_p(void);
+extern int ITc_webrtc_get_local_description_p(void);
+extern int ITc_webrtc_get_remote_description_p(void);
 
 testcase tc_array[] = {
     {"ITc_webrtc_create_destroy_p", ITc_webrtc_create_destroy_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
@@ -144,6 +148,10 @@ testcase tc_array[] = {
        {"ITc_webrtc_media_source_set_get_encoder_bitrate_p",ITc_webrtc_media_source_set_get_encoder_bitrate_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
        {"ITc_webrtc_camera_source_set_get_device_id_p",ITc_webrtc_camera_source_set_get_device_id_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
        {"ITc_webrtc_media_source_start_media_source_p",ITc_webrtc_media_source_start_media_source_p,ITs_webrtc_startup, ITs_webrtc_cleanup},
+       {"ITc_webrtc_start_sync_p",ITc_webrtc_start_sync_p,ITs_webrtc_startup, ITs_webrtc_cleanup},
+       {"ITc_webrtc_media_source_set_get_payload_type_p",ITc_webrtc_media_source_set_get_payload_type_p,ITs_webrtc_startup, ITs_webrtc_cleanup},
+       {"ITc_webrtc_get_local_description_p",ITc_webrtc_get_local_description_p,ITs_webrtc_startup, ITs_webrtc_cleanup},
+       {"ITc_webrtc_get_remote_description_p",ITc_webrtc_get_remote_description_p,ITs_webrtc_startup, ITs_webrtc_cleanup},
     {NULL, NULL}
 };
 
index 11bbc87c36c1f014234630f2d357876b8620e357..f31868bb001c8f24c003aaeec5062c33a8e8950f 100755 (executable)
@@ -83,6 +83,10 @@ extern int ITc_webrtc_media_source_set_get_transceiver_codec_p(void);
 extern int ITc_webrtc_media_source_set_get_encoder_bitrate_p(void);
 extern int ITc_webrtc_camera_source_set_get_device_id_p(void);
 extern int ITc_webrtc_media_source_start_media_source_p(void);
+extern int ITc_webrtc_start_sync_p(void);
+extern int ITc_webrtc_media_source_set_get_payload_type_p(void);
+extern int ITc_webrtc_get_local_description_p(void);
+extern int ITc_webrtc_get_remote_description_p(void);
 
 testcase tc_array[] = {
     {"ITc_webrtc_create_destroy_p", ITc_webrtc_create_destroy_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
@@ -144,6 +148,10 @@ testcase tc_array[] = {
        {"ITc_webrtc_media_source_set_get_encoder_bitrate_p",ITc_webrtc_media_source_set_get_encoder_bitrate_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
        {"ITc_webrtc_camera_source_set_get_device_id_p",ITc_webrtc_camera_source_set_get_device_id_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
        {"ITc_webrtc_media_source_start_media_source_p",ITc_webrtc_media_source_start_media_source_p,ITs_webrtc_startup, ITs_webrtc_cleanup},
+       {"ITc_webrtc_start_sync_p",ITc_webrtc_start_sync_p,ITs_webrtc_startup, ITs_webrtc_cleanup},
+       {"ITc_webrtc_media_source_set_get_payload_type_p",ITc_webrtc_media_source_set_get_payload_type_p,ITs_webrtc_startup, ITs_webrtc_cleanup},
+       {"ITc_webrtc_get_local_description_p",ITc_webrtc_get_local_description_p,ITs_webrtc_startup, ITs_webrtc_cleanup},
+       {"ITc_webrtc_get_remote_description_p",ITc_webrtc_get_remote_description_p,ITs_webrtc_startup, ITs_webrtc_cleanup},
     {NULL, NULL}
 };