[ITC][webrtc][Non-ACR] Fix invalid return type of stats callback 75/274875/1
authorSangchul Lee <sc11.lee@samsung.com>
Wed, 11 May 2022 08:33:18 +0000 (17:33 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Wed, 11 May 2022 08:49:04 +0000 (17:49 +0900)
Unnecessary hook for startup/cleanup functions is removed.

Change-Id: Ib7edd5e249beafcb07b0df814c7f1697f8cbb231
Signed-off-by: Sangchul Lee <sc11.lee@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 a1235b324a2e90c54fc98d05627375501b6b64f9..9e9bbce4d7f89d86d6cafb7822175a14982074a6 100644 (file)
@@ -62,18 +62,19 @@ static void destroyWindow()
 #define TEST_ICE_CANDIDATE     "{'ice':{'candidate':'candidate:3600539631 1 tcp 1518149375 192.168.0.127 9 typ host tcptype active generation 0 ufrag l4kk network-id 3 network-cost 10','sdpMid':'video0','sdpMLineIndex':0}}"
 
 /**
-* @function                    webrtcStatsCB
-* @parameter                   webrtc_stats_type_e type, const webrtc_stats_prop_info_s *prop_info, void *user_data
-* @return                      NA
+* @function             webrtcStatsCB
+* @parameter            webrtc_stats_type_e type, const webrtc_stats_prop_info_s *prop_info, void *user_data
+* @return               @c true to continue with the next iteration of the loop, otherwise @c false to break out of the loop
 */
-static void webrtcStatsCB(webrtc_stats_type_e type, const webrtc_stats_prop_info_s *prop_info, void *user_data)
+static bool webrtcStatsCB(webrtc_stats_type_e type, const webrtc_stats_prop_info_s *prop_info, void *user_data)
 {
        callback_data *cb_data = (callback_data *)user_data;
        FPRINTF("[Line : %d][%s] Callback webrtcStatsCB called type[0x%x] prop[%s, 0x%08x, value:%d]\\n", __LINE__, API_NAMESPACE, type, prop_info->name, prop_info->prop, prop_info->type);
        if (!cb_data)
-               return;
+               return false;
        cb_data->is_invoked = true;
        QUIT_LOOP(cb_data->mainloop);
+       return false;
 }
 
 /**
index ab334b54e7d26b26c4e92487832a1db9c676c57a..fcf45071d5297d87e2fddbb983db40f5eebe39a1 100644 (file)
@@ -78,7 +78,7 @@ extern int ITc_webrtc_file_source_set_path_p(void);
 extern int ITc_webrtc_data_channel_get_buffered_amount_p(void);
 extern int ITc_webrtc_data_channel_set_unset_buffered_amount_low_cb_p(void);
 extern int ITc_webrtc_data_channel_get_buffered_amount_low_threshold_p(void);
-extern int ITc_webrtc_media_source_set_get_video_framerate_p(void);\r
+extern int ITc_webrtc_media_source_set_get_video_framerate_p(void);
 extern int ITc_webrtc_set_get_bundle_policy_p(void);
 extern int ITc_webrtc_foreach_stats_p(void);
 
@@ -139,7 +139,7 @@ testcase tc_array[] = {
     {"ITc_webrtc_data_channel_get_buffered_amount_low_threshold_p",ITc_webrtc_data_channel_get_buffered_amount_low_threshold_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
     {"ITc_webrtc_media_source_set_get_video_framerate_p",ITc_webrtc_media_source_set_get_video_framerate_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
     {"ITc_webrtc_set_get_bundle_policy_p",ITc_webrtc_set_get_bundle_policy_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
-    {"ITc_webrtc_foreach_stats_p",ITc_webrtc_foreach_stats_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
+    {"ITc_webrtc_foreach_stats_p",ITc_webrtc_foreach_stats_p, NULL, NULL},
     {NULL, NULL}
 };
 
index 9605c1f7a039318e1ae5edbdc8b580cbb8d199d4..41c7a8194db8e7ad54f597835636151530e01c66 100644 (file)
@@ -78,7 +78,7 @@ extern int ITc_webrtc_file_source_set_path_p(void);
 extern int ITc_webrtc_data_channel_get_buffered_amount_p(void);
 extern int ITc_webrtc_data_channel_set_unset_buffered_amount_low_cb_p(void);
 extern int ITc_webrtc_data_channel_get_buffered_amount_low_threshold_p(void);
-extern int ITc_webrtc_media_source_set_get_video_framerate_p(void);\r
+extern int ITc_webrtc_media_source_set_get_video_framerate_p(void);
 extern int ITc_webrtc_set_get_bundle_policy_p(void);
 extern int ITc_webrtc_foreach_stats_p(void);
 
@@ -140,7 +140,7 @@ testcase tc_array[] = {
     {"ITc_webrtc_data_channel_get_buffered_amount_low_threshold_p",ITc_webrtc_data_channel_get_buffered_amount_low_threshold_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
     {"ITc_webrtc_media_source_set_get_video_framerate_p",ITc_webrtc_media_source_set_get_video_framerate_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
     {"ITc_webrtc_set_get_bundle_policy_p",ITc_webrtc_set_get_bundle_policy_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
-       {"ITc_webrtc_foreach_stats_p",ITc_webrtc_foreach_stats_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
+       {"ITc_webrtc_foreach_stats_p",ITc_webrtc_foreach_stats_p, NULL, NULL},
     {NULL, NULL}
 };
 
index 24de564342070b3697c5b902a1a3cf49bdc13e98..c861d9720c695a91af71ca4826424e9254693a25 100644 (file)
@@ -78,7 +78,7 @@ extern int ITc_webrtc_file_source_set_path_p(void);
 extern int ITc_webrtc_data_channel_get_buffered_amount_p(void);
 extern int ITc_webrtc_data_channel_set_unset_buffered_amount_low_cb_p(void);
 extern int ITc_webrtc_data_channel_get_buffered_amount_low_threshold_p(void);
-extern int ITc_webrtc_media_source_set_get_video_framerate_p(void);\r
+extern int ITc_webrtc_media_source_set_get_video_framerate_p(void);
 extern int ITc_webrtc_set_get_bundle_policy_p(void);
 extern int ITc_webrtc_foreach_stats_p(void);
 
@@ -139,7 +139,7 @@ testcase tc_array[] = {
     {"ITc_webrtc_data_channel_get_buffered_amount_low_threshold_p",ITc_webrtc_data_channel_get_buffered_amount_low_threshold_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
     {"ITc_webrtc_media_source_set_get_video_framerate_p",ITc_webrtc_media_source_set_get_video_framerate_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
     {"ITc_webrtc_set_get_bundle_policy_p",ITc_webrtc_set_get_bundle_policy_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
-       {"ITc_webrtc_foreach_stats_p",ITc_webrtc_foreach_stats_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
+       {"ITc_webrtc_foreach_stats_p",ITc_webrtc_foreach_stats_p, NULL, NULL},
     {NULL, NULL}
 };
 
index 24de564342070b3697c5b902a1a3cf49bdc13e98..c861d9720c695a91af71ca4826424e9254693a25 100644 (file)
@@ -78,7 +78,7 @@ extern int ITc_webrtc_file_source_set_path_p(void);
 extern int ITc_webrtc_data_channel_get_buffered_amount_p(void);
 extern int ITc_webrtc_data_channel_set_unset_buffered_amount_low_cb_p(void);
 extern int ITc_webrtc_data_channel_get_buffered_amount_low_threshold_p(void);
-extern int ITc_webrtc_media_source_set_get_video_framerate_p(void);\r
+extern int ITc_webrtc_media_source_set_get_video_framerate_p(void);
 extern int ITc_webrtc_set_get_bundle_policy_p(void);
 extern int ITc_webrtc_foreach_stats_p(void);
 
@@ -139,7 +139,7 @@ testcase tc_array[] = {
     {"ITc_webrtc_data_channel_get_buffered_amount_low_threshold_p",ITc_webrtc_data_channel_get_buffered_amount_low_threshold_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
     {"ITc_webrtc_media_source_set_get_video_framerate_p",ITc_webrtc_media_source_set_get_video_framerate_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
     {"ITc_webrtc_set_get_bundle_policy_p",ITc_webrtc_set_get_bundle_policy_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
-       {"ITc_webrtc_foreach_stats_p",ITc_webrtc_foreach_stats_p, ITs_webrtc_startup, ITs_webrtc_cleanup},
+       {"ITc_webrtc_foreach_stats_p",ITc_webrtc_foreach_stats_p, NULL, NULL},
     {NULL, NULL}
 };