diff options
author | Mychaela N. Falconia <falcon@freecalypso.org> | 2023-03-24 00:46:12 +0000 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2023-03-25 08:04:04 +0000 |
commit | 7f91880534ef528860af1b97a04cbe65bd7c06d5 (patch) | |
tree | a3e10228063f93a7d310411500430e7054e730d2 /include | |
parent | 8969298a7755db2df4d3f824ca82f1c31d65380a (diff) |
codec: add osmo_efr_check_sid() function
Previously existing code provides osmo_fr_check_sid() and
osmo_hr_check_sid() functions for FR1 and HR1 codecs; these functions
are used by various RTP-touching programs in the Osmocom CNI suite
when they need to differentiate between speech and SID frames.
However, there was no corresponding function of this form for EFR
codec, with the result being that the same programs that handle
speech vs SID distinction correctly for FR1 and HR1 fail to do so
for EFR.
The present change adds an osmo_efr_check_sid() function to libosmocodec
that fully mirrors previously existing osmo_fr_check_sid() and
osmo_hr_check_sid(), providing the first step toward more correct
EFR handling in programs where a SID check may be needed.
Change-Id: Iab9fb60028f4135375287bc42f5da7ca7838b5f0
Diffstat (limited to 'include')
-rw-r--r-- | include/osmocom/codec/codec.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/osmocom/codec/codec.h b/include/osmocom/codec/codec.h index 58e3a296..65de20da 100644 --- a/include/osmocom/codec/codec.h +++ b/include/osmocom/codec/codec.h @@ -83,6 +83,7 @@ static inline bool osmo_amr_is_speech(enum osmo_amr_type ft) bool osmo_fr_check_sid(const uint8_t *rtp_payload, size_t payload_len); bool osmo_hr_check_sid(const uint8_t *rtp_payload, size_t payload_len); +bool osmo_efr_check_sid(const 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, |