From: Sangchul Lee Date: Mon, 9 Jan 2023 05:01:35 +0000 (+0900) Subject: webrtc: Add missing codes for updating transceiver X-Git-Tag: accepted/tizen/unified/20230111.174556^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5a11936f6fdc2fd9c6480cb7e3b5b88c5be87302;p=platform%2Fcore%2Fapi%2Fwebrtc.git webrtc: Add missing codes for updating transceiver The same codes from webrtc_create_offer[answer]() are added to webrtc_create_offer[answer]_async(). [Version] 0.3.280 [Issue type] Bug fix Change-Id: I582139cff77237ec9237a6473cdd7efd347a3b47 Signed-off-by: Sangchul Lee --- diff --git a/packaging/capi-media-webrtc.spec b/packaging/capi-media-webrtc.spec index 22925912..25ee1624 100644 --- a/packaging/capi-media-webrtc.spec +++ b/packaging/capi-media-webrtc.spec @@ -1,6 +1,6 @@ Name: capi-media-webrtc Summary: A WebRTC library in Tizen Native API -Version: 0.3.279 +Version: 0.3.280 Release: 0 Group: Multimedia/API License: Apache-2.0 diff --git a/src/webrtc.c b/src/webrtc.c index c082d625..f7b1ddd2 100644 --- a/src/webrtc.c +++ b/src/webrtc.c @@ -1632,6 +1632,11 @@ int webrtc_create_offer_async(webrtc_h webrtc, bundle *options, webrtc_session_d RET_VAL_IF(_webrtc->state != WEBRTC_STATE_NEGOTIATING, WEBRTC_ERROR_INVALID_STATE, "the state should be NEGOTIATING"); + LOG_INFO("webrtc[%p] options[%p] callback[%p] user_data[%p]", webrtc, options, callback, user_data); + + _update_transceivers_fec(webrtc, true); + _update_transceivers_for_offer(webrtc); + return _webrtcbin_create_session_description_async(webrtc, true, callback, user_data); } @@ -1648,6 +1653,10 @@ int webrtc_create_answer_async(webrtc_h webrtc, bundle *options, webrtc_session_ RET_VAL_IF(_webrtc->state != WEBRTC_STATE_NEGOTIATING, WEBRTC_ERROR_INVALID_STATE, "the state should be NEGOTIATING"); RET_VAL_IF(!_webrtcbin_have_remote_offer(_webrtc), WEBRTC_ERROR_INVALID_STATE, "remote offer should be set"); + LOG_INFO("webrtc[%p] options[%p] callback[%p] user_data[%p]", webrtc, options, callback, user_data); + + _update_transceivers_fec(webrtc, false); + return _webrtcbin_create_session_description_async(webrtc, false, callback, user_data); }