*/
#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.
*/
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.
Name: capi-media-webrtc
Summary: A WebRTC library in Tizen Native API
-Version: 1.1.4
+Version: 1.1.5
Release: 0
Group: Multimedia/API
License: Apache-2.0
static bundle_policy_s __bundle_policies[] = {
[WEBRTC_BUNDLE_POLICY_NONE] = { "NONE", GST_WEBRTC_BUNDLE_POLICY_NONE },
[WEBRTC_BUNDLE_POLICY_MAX_BUNDLE] = { "MAX-BUNDLE", GST_WEBRTC_BUNDLE_POLICY_MAX_BUNDLE },
+ [WEBRTC_BUNDLE_POLICY_MAX_COMPAT] = { "MAX-COMPAT", GST_WEBRTC_BUNDLE_POLICY_MAX_COMPAT },
};
int webrtc_set_error_cb(webrtc_h webrtc, webrtc_error_cb callback, void *user_data)
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;
static bundle_policy_info_s _bundle_policy_info[] = {
[GST_WEBRTC_BUNDLE_POLICY_NONE] = { "NONE", WEBRTC_BUNDLE_POLICY_NONE },
[GST_WEBRTC_BUNDLE_POLICY_BALANCED] = { "BALANCED", -1 }, /* NOT SUPPORTED */
- [GST_WEBRTC_BUNDLE_POLICY_MAX_COMPAT] = { "MAX-COMPAT", -1 }, /* NOT SUPPORTED */
+ [GST_WEBRTC_BUNDLE_POLICY_MAX_COMPAT] = { "MAX-COMPAT", WEBRTC_BUNDLE_POLICY_MAX_COMPAT },
[GST_WEBRTC_BUNDLE_POLICY_MAX_BUNDLE] = { "MAX-BUNDLE", WEBRTC_BUNDLE_POLICY_MAX_BUNDLE },
};