From ec8f192fec548dd87522946319d80e4f3bc4e35c Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 31 May 2016 14:50:21 +0200 Subject: Add functions to detect HR/FR SID frames Add functions which check if given FR or HR frame (packed in RTP) contains SID (SIlence Descriptor) and corresponding tests. Related: OS#22 Change-Id: I4051e3c0d4fb9ee93d7e9e0ef4abaf9f18e227ca Reviewed-on: https://gerrit.osmocom.org/160 Tested-by: Jenkins Builder Reviewed-by: Harald Welte --- include/osmocom/codec/codec.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/osmocom/codec/codec.h') diff --git a/include/osmocom/codec/codec.h b/include/osmocom/codec/codec.h index b7bcc788..f7a8ad96 100644 --- a/include/osmocom/codec/codec.h +++ b/include/osmocom/codec/codec.h @@ -1,6 +1,7 @@ #pragma once #include +#include #include @@ -41,6 +42,8 @@ enum osmo_amr_quality { AMR_GOOD = 1 }; +bool osmo_fr_check_sid(uint8_t *rtp_payload, size_t payload_len); +bool osmo_hr_check_sid(uint8_t *rtp_payload, size_t payload_len); int osmo_amr_rtp_enc(uint8_t *payload, uint8_t cmr, enum osmo_amr_type ft, enum osmo_amr_quality bfi); int osmo_amr_rtp_dec(const uint8_t *payload, int payload_len, uint8_t *cmr, -- cgit v1.2.3