* @parameter webrtc_data_channel_h channel, void *user_data
* @return NA
*/
-static void dataChannelBufferedAmountLowCB(webrtc_data_channel_h channel, void *user_data)\r
-{\r
- FPRINTF("[Line : %d][%s] Callback checking\\n", __LINE__, API_NAMESPACE);\r
+static void dataChannelBufferedAmountLowCB(webrtc_data_channel_h channel, void *user_data)
+{
+ FPRINTF("[Line : %d][%s] Callback checking\\n", __LINE__, API_NAMESPACE);
}
/**
for (i = 0; i < sizeof(valid_types) / sizeof(valid_types[0]); i++) {
nRet = webrtc_add_media_source(g_hWebRtcHandle, valid_types[i], &nId);
+ if (nRet == WEBRTC_ERROR_NOT_SUPPORTED) {
+ dlog_print(DLOG_DEBUG, "NativeTCT", "[%s(%d)] camera feature is not supported, skip it", __FUNCTION__, __LINE__);
+ continue;
+ }
PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_add_media_source", WebRtcGetError(nRet));
nRet = webrtc_media_source_set_mute(g_hWebRtcHandle, nId, WEBRTC_MEDIA_TYPE_VIDEO, bSetMute);
callback_data cb_data = { .mainloop = NULL, .is_invoked = false };
int nRet = webrtc_add_media_source(g_hWebRtcHandle, WEBRTC_MEDIA_SOURCE_TYPE_VIDEOTEST, &nId);
- if (nRet == WEBRTC_ERROR_NOT_SUPPORTED) {
- dlog_print(DLOG_DEBUG, "NativeTCT", "[%s(%d)] camera feature is not supported, skip it", __FUNCTION__, __LINE__);
- return 0;
- }
PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_add_media_source", WebRtcGetError(nRet));
nRet = webrtc_set_ice_candidate_cb(g_hWebRtcHandle, webrtcIceCandidateCB, NULL);
callback_data cb_data = { .mainloop = NULL, .is_invoked = false };
int nRet = webrtc_add_media_source(g_hWebRtcHandle, WEBRTC_MEDIA_SOURCE_TYPE_VIDEOTEST, &nId);
- if (nRet == WEBRTC_ERROR_NOT_SUPPORTED) {
- dlog_print(DLOG_DEBUG, "NativeTCT", "[%s(%d)] camera feature is not supported, skip it", __FUNCTION__, __LINE__);
- return 0;
- }
PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_add_media_source", WebRtcGetError(nRet));
nRet = webrtc_set_ice_candidate_cb(g_hWebRtcHandle, webrtcIceCandidateCB, NULL);
* @postcondition NA
*/
-int ITc_media_webrtc_data_channel_get_buffered_amount_low_threshold_p(void)\r
-{\r
- START_TEST;\r
-\r
+int ITc_media_webrtc_data_channel_get_buffered_amount_low_threshold_p(void)
+{
+ START_TEST;
+
webrtc_data_channel_h hChannel;
- char *pszChannel = "test data channel label";\r
- unsigned int nThreshold;\r
-\r
- int nRet = webrtc_create_data_channel(g_hWebRtcHandle, pszChannel, NULL, &hChannel);\r
+ char *pszChannel = "test data channel label";
+ unsigned int nThreshold;
+
+ int nRet = webrtc_create_data_channel(g_hWebRtcHandle, pszChannel, NULL, &hChannel);
PRINT_RESULT(WEBRTC_ERROR_NONE, nRet, "webrtc_create_data_channel", WebRtcGetError(nRet));
- CHECK_HANDLE(hChannel, "webrtc_create_data_channel");\r
-\r
- nRet = webrtc_data_channel_set_buffered_amount_low_cb(hChannel, TEST_BUFFERED_AMOUNT_THRESHOLD, dataChannelBufferedAmountLowCB, NULL);\r
- PRINT_RESULT_CLEANUP(WEBRTC_ERROR_NONE, nRet, "webrtc_data_channel_set_buffered_amount_low_cb", WebRtcGetError(nRet), webrtc_destroy_data_channel(hChannel));\r
-\r
- nRet = webrtc_data_channel_get_buffered_amount_low_threshold(hChannel, &nThreshold);\r
- PRINT_RESULT_CLEANUP(WEBRTC_ERROR_NONE, nRet, "webrtc_data_channel_get_buffered_amount_low_threshold", WebRtcGetError(nRet), webrtc_destroy_data_channel(hChannel));\r
-\r
- PRINT_RESULT_CLEANUP(TEST_BUFFERED_AMOUNT_THRESHOLD, nThreshold, "webrtc_data_channel_get_buffered_amount_low_threshold", WebRtcGetError(nRet), webrtc_destroy_data_channel(hChannel));\r
-\r
+ CHECK_HANDLE(hChannel, "webrtc_create_data_channel");
+
+ nRet = webrtc_data_channel_set_buffered_amount_low_cb(hChannel, TEST_BUFFERED_AMOUNT_THRESHOLD, dataChannelBufferedAmountLowCB, NULL);
+ PRINT_RESULT_CLEANUP(WEBRTC_ERROR_NONE, nRet, "webrtc_data_channel_set_buffered_amount_low_cb", WebRtcGetError(nRet), webrtc_destroy_data_channel(hChannel));
+
+ nRet = webrtc_data_channel_get_buffered_amount_low_threshold(hChannel, &nThreshold);
+ PRINT_RESULT_CLEANUP(WEBRTC_ERROR_NONE, nRet, "webrtc_data_channel_get_buffered_amount_low_threshold", WebRtcGetError(nRet), webrtc_destroy_data_channel(hChannel));
+
+ PRINT_RESULT_CLEANUP(TEST_BUFFERED_AMOUNT_THRESHOLD, nThreshold, "webrtc_data_channel_get_buffered_amount_low_threshold", WebRtcGetError(nRet), webrtc_destroy_data_channel(hChannel));
+
nRet = webrtc_destroy_data_channel(hChannel);
- PRINT_RESULT_NORETURN(WEBRTC_ERROR_NONE, nRet, "webrtc_destroy_data_channel", WebRtcGetError(nRet));\r
-\r
- return 0;\r
+ PRINT_RESULT_NORETURN(WEBRTC_ERROR_NONE, nRet, "webrtc_destroy_data_channel", WebRtcGetError(nRet));
+
+ return 0;
}
/** @} */
/** @} */