aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2016-05-31 14:50:21 +0200
committerHarald Welte <laforge@gnumonks.org>2016-06-01 10:44:06 +0000
commitec8f192fec548dd87522946319d80e4f3bc4e35c (patch)
treeac65b412cc0bd44cb14ffd36ab5419d9b8a7310f /include
parent720ac4a4e1768cd928eb9d9265c0417f6865bc1b (diff)
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 <laforge@gnumonks.org>
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/codec/codec.h3
1 files changed, 3 insertions, 0 deletions
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 <stdint.h>
+#include <stdbool.h>
#include <osmocom/core/utils.h>
@@ -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,