Add WEBRTC_BUNDLE_POLICY_MAX_COMPAT enum 83/315883/2
authorSangchul Lee <sc11.lee@samsung.com>
Thu, 8 Aug 2024 08:06:15 +0000 (17:06 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Fri, 9 Aug 2024 00:30:23 +0000 (09:30 +0900)
It has been moved from internal API.
: webrtc_set_bundle_policy_max_compat() has been removed
 from internal header.

[Version] 1.1.21
[Issue Type] API

Change-Id: I0ffbf07a0ac62c20ab39cf1e493ae03b45d97250
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
include/webrtc.h
include/webrtc_internal.h
packaging/capi-media-webrtc.spec
src/webrtc.c
src/webrtc_internal.c
test/webrtc_test.c
test/webrtc_test_menu.c

index c1b0f8645886aa203f6269600b85e1a726c7c22e..f76006c4a6512d3c1eac8c5f913f5b85280222f8 100644 (file)
@@ -134,6 +134,7 @@ typedef enum {
 typedef enum {
        WEBRTC_BUNDLE_POLICY_NONE,                 /**<  None */
        WEBRTC_BUNDLE_POLICY_MAX_BUNDLE,           /**<  Max-bundle */
+       WEBRTC_BUNDLE_POLICY_MAX_COMPAT,           /**<  Max-compat (Since 9.0) */
 } webrtc_bundle_policy_e;
 
 /**
index 364f2612113ae737efc80bc05f994ab31835eee5..3481ca56bb812fbec0640e225ffeec5acbf84fe5 100644 (file)
@@ -76,14 +76,6 @@ typedef enum {
  */
 #define WEBRTC_SNAPSHOT_OPTION_NONE    -1
 
-/**
- * @internal
- * @brief Definition for WebRTC bundle policy - 'max-compat'.
- * @since_tizen 7.0
- * @remarks It corresponds with the RTCBundlePolicy enum described in https://www.w3.org/TR/webrtc/#rtcbundlepolicy-enum.
- */
-#define WEBRTC_BUNDLE_POLICY_MAX_COMPAT 2
-
 /**
  * @internal
  * @brief Enumeration for WebRTC signaling message type.
@@ -555,19 +547,6 @@ int webrtc_set_rtp_packet_drop_probability(webrtc_h webrtc, bool sender, float p
  */
 int webrtc_get_rtp_packet_drop_probability(webrtc_h webrtc, bool sender, float *probability);
 
-/**
- * @brief Sets the 'max-compat' bundle policy.
- * @since_tizen 7.0
- * @param[in] webrtc       WebRTC handle
- * @return @c 0 on success,
- *         otherwise a negative error value
- * @retval #WEBRTC_ERROR_NONE    Successful
- * @retval #WEBRTC_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #WEBRTC_ERROR_INVALID_STATE Invalid state
- * @pre @a webrtc state must be set to #WEBRTC_STATE_IDLE.
- */
-int webrtc_set_bundle_policy_max_compat(webrtc_h webrtc);
-
 /**
  * @internal
  * @brief Starts the WebRTC synchronously.
index b2b1f077fb901ad1fe3ddbf934d2a134e798ffa9..3761ee12becdab0f6a071805d97fc7344c0ca61b 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-webrtc
 Summary:    A WebRTC library in Tizen Native API
-Version:    1.1.20
+Version:    1.1.21
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index 18759216a398b44b31ac68698dbbbf5830d67d65..e9db0c90035692dd57beefeb1d7b0a27a7de20fa 100644 (file)
@@ -1184,7 +1184,7 @@ int webrtc_set_bundle_policy(webrtc_h webrtc, webrtc_bundle_policy_e policy)
        webrtc_s *_webrtc = (webrtc_s *)webrtc;
 
        RET_VAL_IF(_webrtc == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "webrtc is NULL");
-       RET_VAL_IF(policy > WEBRTC_BUNDLE_POLICY_MAX_BUNDLE, WEBRTC_ERROR_INVALID_PARAMETER, "invalid policy(%d)", policy);
+       RET_VAL_IF(policy > WEBRTC_BUNDLE_POLICY_MAX_COMPAT, WEBRTC_ERROR_INVALID_PARAMETER, "invalid policy(%d)", policy);
 
        locker = g_mutex_locker_new(&_webrtc->mutex);
 
index 0c559567c925e9a8e9d92a6fd8c2eeeddfeac620..4a1268ba7bf56866084f1972bbb476bc5a64b7c6 100644 (file)
@@ -608,21 +608,6 @@ int webrtc_get_rtp_packet_drop_probability(webrtc_h webrtc, bool sender, float *
        return _get_packet_drop_probability(webrtc, sender, probability);
 }
 
-int webrtc_set_bundle_policy_max_compat(webrtc_h webrtc)
-{
-       g_autoptr(GMutexLocker) locker = NULL;
-       webrtc_s *_webrtc = (webrtc_s *)webrtc;
-
-       RET_VAL_IF(_webrtc->state != WEBRTC_STATE_IDLE, WEBRTC_ERROR_INVALID_STATE, "the state should be IDLE");
-
-       /* Until it is released to public header, use the gst value directly. */
-       g_object_set(G_OBJECT(_webrtc->gst.webrtcbin), "bundle-policy", GST_WEBRTC_BUNDLE_POLICY_MAX_COMPAT, NULL);
-
-       LOG_INFO("webrtc[%p] policy[%s]", webrtc, "MAX-COMPAT");
-
-       return WEBRTC_ERROR_NONE;
-}
-
 int webrtc_start_sync(webrtc_h webrtc)
 {
        int ret = WEBRTC_ERROR_NONE;
index bad2081abfa98f4eb0db4a0f7fd4f98e26a96626..fdb7c0317c0f9f2448e6cfa910bf54c9c1d43b68 100644 (file)
@@ -1423,15 +1423,10 @@ static void _webrtc_get_turn_servers(int index)
 
 static void _webrtc_set_bundle_policy(int index, int policy)
 {
-       int ret = 0;
-
-       if (policy == 2) /* use internal API */
-               ret = webrtc_set_bundle_policy_max_compat(g_ad.conns[index].webrtc);
-       else
-               ret = webrtc_set_bundle_policy(g_ad.conns[index].webrtc, policy);
+       int ret = webrtc_set_bundle_policy(g_ad.conns[index].webrtc, policy);
        RET_IF(ret != WEBRTC_ERROR_NONE, "ret[0x%x]", ret);
 
-       g_print("%s success\n", policy == 2 ? "webrtc_set_bundle_policy_max_compat()" : "webrtc_set_bundle_policy()");
+       g_print("webrtc_set_bundle_policy() success\n");
 }
 
 static void _webrtc_get_bundle_policy(int index)
index 96649bcf7bfaa094369911f88e366e83d35a4493..d4769826821da6883a758a74edf6fe8b0b79f20a 100644 (file)
@@ -323,7 +323,7 @@ void display_menu_webrtc_common(void)
                g_print("*** input TURN server address.\n");
                break;
        case CURRENT_STATUS_SET_BUNDLE_POLICY:
-               g_print("*** input bundle policy.(0:none, 1:max-bundle, *2:max-compat (internal API))\n");
+               g_print("*** input bundle policy.(0:none, 1:max-bundle, 2:max-compat\n");
                break;
        case CURRENT_STATUS_SET_ICE_TRANSPORT_POLICY:
                g_print("*** input ICE transport policy.(0:all, 1:relay)\n");