This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Max gerrit-no-reply at lists.osmocom.orgHello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1436 to look at the new patch set (#2). Enable adaptive jitter compensation * check RTP socket parameter and enable necessary jitter buffering * return the status of requested jitter buffering instead of always returning 0 * document function parameters and return value Change-Id: I87d4d9fe990683adbb02b64cb39b78de533d8046 --- M src/trau/osmo_ortp.c 1 file changed, 16 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/36/1436/2 diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c index 8171655..d4d4ff5 100644 --- a/src/trau/osmo_ortp.c +++ b/src/trau/osmo_ortp.c @@ -278,28 +278,35 @@ create_payload_types(); } +/*! \brief Set Osmocom RTP socket parameters + * \param[in] rs OsmoRTP socket + * \param[in] param defined which parameter to set + OSMO_RTP_P_JITBUF - enables regular jitter buffering + OSMO_RTP_P_JIT_ADAP - enables adaptive jitter buffering + * \param[in] val Size of jitter buffer (in ms), 0 means disable buffering + * \returns negative value on error, 0 or 1 otherwise + (depending on whether given jitter buffering is enabled) + */ int osmo_rtp_socket_set_param(struct osmo_rtp_socket *rs, enum osmo_rtp_param param, int val) { - int rc = 0; - switch (param) { + case OSMO_RTP_P_JIT_ADAP: + rtp_session_enable_adaptive_jitter_compensation(rs->sess, + (bool)val); + /* fall-through on-purpose - we have to set val anyway */ case OSMO_RTP_P_JITBUF: rtp_session_enable_jitter_buffer(rs->sess, (val) ? TRUE : FALSE); if (val) rtp_session_set_jitter_compensation(rs->sess, val); break; -#if 0 - case OSMO_RTP_P_JIT_ADAP: - rc = jitter_control_enable_adaptive(rs->sess, val); - break; -#endif default: return -EINVAL; } - - return rc; + if (param == OSMO_RTP_P_JIT_ADAP) + return rtp_session_adaptive_jitter_compensation_enabled(rs->sess); + return rtp_session_jitter_buffer_enabled(rs->sess); } /*! \brief Create a new RTP socket @@ -328,7 +335,6 @@ rtp_session_set_data(rs->sess, rs); rtp_session_set_profile(rs->sess, osmo_pt_profile); rtp_session_set_jitter_compensation(rs->sess, 100); - //jitter_control_enable_adaptive(rs->sess, 0); rtp_session_signal_connect(rs->sess, "ssrc_changed", (RtpCallback) ortp_sig_cb_ssrc, -- To view, visit https://gerrit.osmocom.org/1436 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I87d4d9fe990683adbb02b64cb39b78de533d8046 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Max <msuraev at sysmocom.de> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max <msuraev at sysmocom.de>