Commit efa8f5d5 authored by Mickaël Turnel's avatar Mickaël Turnel
Browse files

Fix/nack context

parent 1556e592
......@@ -1890,7 +1890,7 @@ static void video_config_read(LinphoneCore *lc){
linphone_core_enable_video_source_reuse(lc, !!lp_config_get_int(lc->config,"video","reuse_source",0));
linphone_core_set_video_policy(lc,&vpol);
lc->video_conf.nack_context_enabled = !!lp_config_get_int(lc->config,"video","nack_context_enabled",0);
lc->video_conf.retransmission_on_nack_enabled = !!lp_config_get_int(lc->config,"video","retransmission_on_nack_enabled",0);
#endif
}
......@@ -3377,16 +3377,16 @@ void linphone_core_enable_ipv6(LinphoneCore *lc, bool_t val){
}
}
bool_t linphone_core_nack_context_enabled(LinphoneCore *lc) {
return lc->video_conf.nack_context_enabled;
bool_t linphone_core_retransmission_on_nack_enabled(LinphoneCore *lc) {
return lc->video_conf.retransmission_on_nack_enabled;
}
void linphone_core_enable_nack_context(LinphoneCore *lc, bool_t val) {
if (lc->video_conf.nack_context_enabled != val) {
lc->video_conf.nack_context_enabled = val;
void linphone_core_enable_retransmission_on_nack(LinphoneCore *lc, bool_t val) {
if (lc->video_conf.retransmission_on_nack_enabled != val) {
lc->video_conf.retransmission_on_nack_enabled = val;
if (linphone_core_ready(lc)) {
lp_config_set_int(lc->config, "video", "nack_context_enabled", (int)val);
lp_config_set_int(lc->config, "video", "retransmission_on_nack_enabled", (int)val);
}
}
}
......
......@@ -337,7 +337,7 @@ struct video_config{
bool_t display;
bool_t selfview; /*during calls*/
bool_t reuse_preview_source;
bool_t nack_context_enabled;
bool_t retransmission_on_nack_enabled;
};
struct text_config{
......
......@@ -1645,15 +1645,17 @@ LINPHONE_PUBLIC void linphone_core_enable_ipv6(LinphoneCore *lc, bool_t val);
* Tells whether NACK context is enabled or not.
* @param[in] lc #LinphoneCore object
* @return A boolean value telling whether NACK context is enabled or not
* @ingroup media_parameters
**/
LINPHONE_PUBLIC bool_t linphone_core_nack_context_enabled(LinphoneCore *lc);
LINPHONE_PUBLIC bool_t linphone_core_retransmission_on_nack_enabled(LinphoneCore *lc);
/**
* Turns NACK context on or off.
* @param[in] lc #LinphoneCore object
* @param[in] val A boolean value telling whether to enable NACK context
* @ingroup media_parameters
**/
LINPHONE_PUBLIC void linphone_core_enable_nack_context(LinphoneCore *lc, bool_t val);
LINPHONE_PUBLIC void linphone_core_enable_retransmission_on_nack(LinphoneCore *lc, bool_t val);
/**
* Tells whether Wifi only mode is enabled or not
......
......@@ -1764,7 +1764,6 @@ void MediaSessionPrivate::setupRtcpFb (SalMediaDescription *md) {
if (!sal_stream_description_active(&md->streams[i]))
continue;
md->streams[i].rtcp_fb.generic_nack_enabled = !!lp_config_get_int(linphone_core_get_config(q->getCore()->getCCore()), "rtp", "rtcp_fb_generic_nack_enabled", 0);
md->streams[i].rtcp_fb.immediate_nack_enabled = !!lp_config_get_int(linphone_core_get_config(q->getCore()->getCCore()), "rtp", "rtcp_fb_immediate_nack_enabled", 0);
md->streams[i].rtcp_fb.tmmbr_enabled = !!lp_config_get_int(linphone_core_get_config(q->getCore()->getCCore()), "rtp", "rtcp_fb_tmmbr_enabled", 1);
md->streams[i].implicit_rtcp_fb = getParams()->getPrivate()->implicitRtcpFbEnabled();
for (const bctbx_list_t *it = md->streams[i].payloads; it != nullptr; it = bctbx_list_next(it)) {
......@@ -2422,10 +2421,6 @@ void MediaSessionPrivate::configureRtpSessionForRtcpFb (const SalStreamDescripti
rtp_session_enable_avpf_feature(session, ORTP_AVPF_FEATURE_GENERIC_NACK, true);
else
rtp_session_enable_avpf_feature(session, ORTP_AVPF_FEATURE_GENERIC_NACK, false);
if (stream->rtcp_fb.immediate_nack_enabled)
rtp_session_enable_avpf_feature(session, ORTP_AVPF_FEATURE_IMMEDIATE_NACK, true);
else
rtp_session_enable_avpf_feature(session, ORTP_AVPF_FEATURE_IMMEDIATE_NACK, false);
if (stream->rtcp_fb.tmmbr_enabled)
rtp_session_enable_avpf_feature(session, ORTP_AVPF_FEATURE_TMMBR, true);
else
......@@ -3525,8 +3520,8 @@ void MediaSessionPrivate::startVideoStream (CallSession::State targetState) {
}
}
if (linphone_core_nack_context_enabled(q->getCore()->getCCore())) {
video_stream_enable_nack_context(videoStream);
if (linphone_core_retransmission_on_nack_enabled(q->getCore()->getCCore())) {
video_stream_enable_retransmission_on_nack(videoStream, TRUE);
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment