From patchwork Wed May 18 13:54:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gerrit-no-reply@lists.osmocom.org X-Patchwork-Id: 623581 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.osmocom.org (lists.osmocom.org [IPv6:2a01:4f8:191:444b::2:7]) by ozlabs.org (Postfix) with ESMTP id 3r8wgB1R45z9sDk for ; Wed, 18 May 2016 23:54:46 +1000 (AEST) Received: from lists.osmocom.org (lists.osmocom.org [144.76.43.76]) by lists.osmocom.org (Postfix) with ESMTP id 2F18363D6; Wed, 18 May 2016 13:54:42 +0000 (UTC) X-Original-To: openbsc@lists.osmocom.org Delivered-To: openbsc@lists.osmocom.org Received: from 127.0.1.12 (unknown [127.0.1.12]) by lists.osmocom.org (Postfix) with ESMTPA id 460D463D0 for ; Wed, 18 May 2016 13:54:40 +0000 (UTC) Date: Wed, 18 May 2016 13:54:40 +0000 From: Max Message-ID: X-Gerrit-MessageType: newchange Subject: [PATCH] libosmo-abis[master]: Extend osmo_rtp_send_frame API X-Gerrit-Change-Id: I23e6dccfad5643e662391a0a2abebbb45597ffd9 X-Gerrit-ChangeURL: X-Gerrit-Commit: 252019e25771b012a3ff84ef07192bf96983490c MIME-Version: 1.0 Content-Disposition: inline User-Agent: Gerrit/2.12.2-31-gb331dbd-dirty X-BeenThere: openbsc@lists.osmocom.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Development of OpenBSC, OsmoBSC, OsmoNITB, OsmoCSCN" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: msuraev@sysmocom.de Errors-To: openbsc-bounces@lists.osmocom.org Sender: "OpenBSC" Review at https://gerrit.osmocom.org/82 Extend osmo_rtp_send_frame API Add boolean parameter to osmo_rtp_send_frame() to explicitly set marker bit in RTP header. Previously it was always unset which resulted in degradation of speech quality for codecs with explicit talkspurt events (was tested with AMR's ONSET). Related: OS#1562 Change-Id: I23e6dccfad5643e662391a0a2abebbb45597ffd9 --- M TODO-RELEASE M include/osmocom/trau/osmo_ortp.h M src/trau/osmo_ortp.c 3 files changed, 8 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/82/82/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index 43b1e8e..2ba3b29 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -1 +1,2 @@ #library what description / commit summary line +libosmo-abis API change signature of osmo_rtp_send_frame diff --git a/include/osmocom/trau/osmo_ortp.h b/include/osmocom/trau/osmo_ortp.h index 9512759..58d2860 100644 --- a/include/osmocom/trau/osmo_ortp.h +++ b/include/osmocom/trau/osmo_ortp.h @@ -2,6 +2,7 @@ #define _OSMO_ORTP_H #include +#include #include #include @@ -66,7 +67,8 @@ int osmo_rtp_socket_set_pt(struct osmo_rtp_socket *rs, int payload_type); int osmo_rtp_socket_free(struct osmo_rtp_socket *rs); int osmo_rtp_send_frame(struct osmo_rtp_socket *rs, const uint8_t *payload, - unsigned int payload_len, unsigned int duration); + unsigned int payload_len, unsigned int duration, + bool marker); int osmo_rtp_socket_poll(struct osmo_rtp_socket *rs); int osmo_rtp_get_bound_ip_port(struct osmo_rtp_socket *rs, diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c index 3313798..cb167d7 100644 --- a/src/trau/osmo_ortp.c +++ b/src/trau/osmo_ortp.c @@ -23,6 +23,7 @@ */ #include +#include #include #include @@ -415,7 +416,8 @@ * \returns 0 on success, <0 in case of error. */ int osmo_rtp_send_frame(struct osmo_rtp_socket *rs, const uint8_t *payload, - unsigned int payload_len, unsigned int duration) + unsigned int payload_len, unsigned int duration, + bool marker) { mblk_t *mblk; int rc; @@ -428,6 +430,7 @@ if (!mblk) return -ENOMEM; + rtp_set_markbit(mblk, marker); rc = rtp_session_sendm_with_ts(rs->sess, mblk, rs->tx_timestamp); rs->tx_timestamp += duration;