return true;
}
+/**
+* @function dataChannelBufferedAmountLowCB
+* @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
+}
+
/**
* @function ITs_webrtc_startup
* @description Called before each test
return 0;
}
+
+
+//& purpose: Gets the buffered amount of the data channel.
+//& type: auto
+/**
+* @testcase ITc_media_webrtc_data_channel_get_buffered_amount_p
+* @since_tizen 7.0
+* @author SRID(ankit.sri1)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Gets the buffered amount of the data channel.
+* @scenario Sets and Gets the display mode of the video track.
+* @apicovered webrtc_create_data_chanel,webrtc_data_channel_get_buffered_amount, webrtc_destroy_data_channel
+* @passcase If webrtc_data_channel_get_buffered_amount is successful
+* @failcase If webrtc_data_channel_get_buffered_amount is unsuccessful
+* @precondition NA
+* @postcondition NA
+*/
+
+int ITc_media_webrtc_data_channel_get_buffered_amount_p(void)
+{
+ START_TEST;
+
+ webrtc_data_channel_h hChannel;
+ char *pszChannel = "test data channel label";
+ unsigned int nBufferedAmount;
+
+ 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");
+
+ nRet = webrtc_data_channel_get_buffered_amount(hChannel, &nBufferedAmount);
+ PRINT_RESULT_CLEANUP(WEBRTC_ERROR_NONE, nRet, "webrtc_data_channel_get_buffered_amount", 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));
+
+ return 0;
+}
+
+//& purpose: Set and unset the buffered amount of the data channel.
+//& type: auto
+/**
+* @testcase ITc_media_webrtc_data_channel_set_unset_buffered_amount_low_cb_p
+* @since_tizen 7.0
+* @author SRID(ankit.sri1)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Sets and unsets the buffered amount of the data channel.
+* @scenario Sets and Gets the display mode of the video track.
+* @apicovered webrtc_create_data_chanel,webrtc_data_channel_set_buffered_amount_low_cb, webrtc_data_channel_unset_buffered_amount_low_cb, webrtc_destroy_data_channel
+* @passcase If webrtc_data_channel_set_buffered_amount_low_cb and webrtc_data_channel_unset_buffered_amount_low_cb is successful
+* @failcase If webrtc_data_channel_set_buffered_amount_low_cb or webrtc_data_channel_unset_buffered_amount_low_cb fails
+* @precondition NA
+* @postcondition NA
+*/
+
+int ITc_media_webrtc_data_channel_set_unset_buffered_amount_low_cb_p(void)
+{
+ START_TEST;
+
+ webrtc_data_channel_h hChannel;
+ char *pszChannel = "test data channel label";
+
+ 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");
+
+ 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_unset_buffered_amount_low_cb(hChannel);
+ PRINT_RESULT_CLEANUP(WEBRTC_ERROR_NONE, nRet, "webrtc_data_channel_unset_buffered_amount_low_cb", 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));
+
+ return 0;
+}
+
+//& purpose: Get the buffered amount of the low threshold data channel.
+//& type: auto
+/**
+* @testcase ITc_media_webrtc_data_channel_get_buffered_amount_low_threshold_p
+* @since_tizen 7.0
+* @author SRID(ankit.sri1)
+* @reviewer SRID(shobhit.v)
+* @type auto
+* @description Get the buffered amount of the low threshold data channel.
+* @scenario Get the buffered amount of the low threshold data channel.
+* @apicovered webrtc_create_data_chanel,webrtc_data_channel_set_buffered_amount_low_cb,webrtc_data_channel_get_buffered_amount_low_threshold, webrtc_destroy_data_channel
+* @passcase If webrtc_data_channel_set_buffered_amount_low_cb and webrtc_data_channel_get_buffered_amount_low_threshold is successful
+* @failcase If webrtc_data_channel_set_buffered_amount_low_cb or webrtc_data_channel_get_buffered_amount_low_threshold fails
+* @precondition NA
+* @postcondition NA
+*/
+
+int ITc_media_webrtc_data_channel_get_buffered_amount_low_threshold_p(void)\r
+{\r
+ START_TEST;\r
+\r
+ 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
+ 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
+ nRet = webrtc_destroy_data_channel(hChannel);
+ PRINT_RESULT_NORETURN(WEBRTC_ERROR_NONE, nRet, "webrtc_destroy_data_channel", WebRtcGetError(nRet));\r
+\r
+ return 0;\r
+}
/** @} */
/** @} */
extern int ITc_media_webrtc_start_and_finish_negotiation_p(void);
extern int ITc_webrtc_file_source_set_get_looping_p(void);
extern int ITc_webrtc_file_source_set_path_p(void);
+extern int ITc_media_webrtc_data_channel_get_buffered_amount_p(void);
+extern int ITc_media_webrtc_data_channel_set_unset_buffered_amount_low_cb_p(void);
+extern int ITc_media_webrtc_data_channel_get_buffered_amount_low_threshold_p(void);
testcase tc_array[] = {
{"ITc_webrtc_create_destroy_p", ITc_webrtc_create_destroy_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
{"ITc_media_webrtc_start_and_finish_negotiation_p", ITc_media_webrtc_start_and_finish_negotiation_p, NULL, NULL},
{"ITc_webrtc_file_source_set_get_looping_p", ITc_webrtc_file_source_set_get_looping_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
{"ITc_webrtc_file_source_set_path_p", ITc_webrtc_file_source_set_path_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
+ {"ITc_media_webrtc_data_channel_get_buffered_amount_p", ITc_media_webrtc_data_channel_get_buffered_amount_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
+ {"ITc_media_webrtc_data_channel_set_unset_buffered_amount_low_cb_p", ITc_media_webrtc_data_channel_set_unset_buffered_amount_low_cb_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
+ {"ITc_media_webrtc_data_channel_get_buffered_amount_low_threshold_p",ITc_media_webrtc_data_channel_get_buffered_amount_low_threshold_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
{NULL, NULL}
};
extern int ITc_media_webrtc_start_and_finish_negotiation_p(void);
extern int ITc_webrtc_file_source_set_get_looping_p(void);
extern int ITc_webrtc_file_source_set_path_p(void);
+extern int ITc_media_webrtc_data_channel_get_buffered_amount_p(void);
+extern int ITc_media_webrtc_data_channel_set_unset_buffered_amount_low_cb_p(void);
+extern int ITc_media_webrtc_data_channel_get_buffered_amount_low_threshold_p(void);
testcase tc_array[] = {
{"ITc_webrtc_create_destroy_p", ITc_webrtc_create_destroy_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
{"ITc_media_webrtc_start_and_finish_negotiation_p", ITc_media_webrtc_start_and_finish_negotiation_p, NULL, NULL},
{"ITc_webrtc_file_source_set_get_looping_p", ITc_webrtc_file_source_set_get_looping_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
{"ITc_webrtc_file_source_set_path_p", ITc_webrtc_file_source_set_path_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
+ {"ITc_media_webrtc_data_channel_get_buffered_amount_p", ITc_media_webrtc_data_channel_get_buffered_amount_p, ITs_webrtc_startup, ITs_webrtc_cleanup },
+ {"ITc_media_webrtc_data_channel_set_unset_buffered_amount_low_cb_p", ITc_media_webrtc_data_channel_set_unset_buffered_amount_low_cb_p, ITs_webrtc_startup, ITs_webrtc_cleanup },
+ {"ITc_media_webrtc_data_channel_get_buffered_amount_low_threshold_p",ITc_media_webrtc_data_channel_get_buffered_amount_low_threshold_p, ITs_webrtc_startup, ITs_webrtc_cleanup },
{NULL, NULL}
};
extern int ITc_media_webrtc_start_and_finish_negotiation_p(void);
extern int ITc_webrtc_file_source_set_get_looping_p(void);
extern int ITc_webrtc_file_source_set_path_p(void);
+extern int ITc_media_webrtc_data_channel_get_buffered_amount_p(void);
+extern int ITc_media_webrtc_data_channel_set_unset_buffered_amount_low_cb_p(void);
+extern int ITc_media_webrtc_data_channel_get_buffered_amount_low_threshold_p(void);
testcase tc_array[] = {
{"ITc_webrtc_create_destroy_p", ITc_webrtc_create_destroy_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
{"ITc_media_webrtc_start_and_finish_negotiation_p", ITc_media_webrtc_start_and_finish_negotiation_p, NULL, NULL},
{"ITc_webrtc_file_source_set_get_looping_p", ITc_webrtc_file_source_set_get_looping_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
{"ITc_webrtc_file_source_set_path_p", ITc_webrtc_file_source_set_path_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
+ {"ITc_media_webrtc_data_channel_get_buffered_amount_p", ITc_media_webrtc_data_channel_get_buffered_amount_p, ITs_webrtc_startup, ITs_webrtc_cleanup },
+ {"ITc_media_webrtc_data_channel_set_unset_buffered_amount_low_cb_p", ITc_media_webrtc_data_channel_set_unset_buffered_amount_low_cb_p, ITs_webrtc_startup, ITs_webrtc_cleanup },
+ {"ITc_media_webrtc_data_channel_get_buffered_amount_low_threshold_p",ITc_media_webrtc_data_channel_get_buffered_amount_low_threshold_p, ITs_webrtc_startup, ITs_webrtc_cleanup },
{NULL, NULL}
};
extern int ITc_media_webrtc_start_and_finish_negotiation_p(void);
extern int ITc_webrtc_file_source_set_get_looping_p(void);
extern int ITc_webrtc_file_source_set_path_p(void);
+extern int ITc_media_webrtc_data_channel_get_buffered_amount_p(void);
+extern int ITc_media_webrtc_data_channel_set_unset_buffered_amount_low_cb_p(void);
+extern int ITc_media_webrtc_data_channel_get_buffered_amount_low_threshold_p(void);
testcase tc_array[] = {
{"ITc_webrtc_create_destroy_p", ITc_webrtc_create_destroy_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
{"ITc_media_webrtc_start_and_finish_negotiation_p", ITc_media_webrtc_start_and_finish_negotiation_p, NULL, NULL},
{"ITc_webrtc_file_source_set_get_looping_p", ITc_webrtc_file_source_set_get_looping_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
{"ITc_webrtc_file_source_set_path_p", ITc_webrtc_file_source_set_path_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
+ {"ITc_media_webrtc_data_channel_get_buffered_amount_p", ITc_media_webrtc_data_channel_get_buffered_amount_p, ITs_webrtc_startup, ITs_webrtc_cleanup },
+ {"ITc_media_webrtc_data_channel_set_unset_buffered_amount_low_cb_p", ITc_media_webrtc_data_channel_set_unset_buffered_amount_low_cb_p, ITs_webrtc_startup, ITs_webrtc_cleanup },
+ {"ITc_media_webrtc_data_channel_get_buffered_amount_low_threshold_p",ITc_media_webrtc_data_channel_get_buffered_amount_low_threshold_p, ITs_webrtc_startup, ITs_webrtc_cleanup },
{NULL, NULL}
};