# HG changeset patch # User Mychaela Falconia # Date 1727947564 0 # Node ID b07dba7b8a4fe2ea9e050ba0beac905f0b9c3cae # Parent bd32bb1e8dabeea0c53974484433e42bb2fe61e0 doc/EFR-library-API: document RTP input wrapper diff -r bd32bb1e8dab -r b07dba7b8a4f doc/EFR-library-API --- a/doc/EFR-library-API Thu Oct 03 08:22:41 2024 +0000 +++ b/doc/EFR-library-API Thu Oct 03 09:26:04 2024 +0000 @@ -185,6 +185,24 @@ EFR_decode_frame() calls both EFR_frame2params() and EFR_sid_classify() before passing the work to EFR_decode_params(). +Decoder RTP input +================= + +If a network element is receiving GSM-EFR input via RTP and needs to feed this +input to the decoder, the RTP payload handler needs to support both the basic +RTP format of ETSI TS 101 318 (also RFC 3551) and the extended RTP format of +TW-TS-001. Depending on the format received, and depending on bit flags in the +TEH octet in the case of TW-TS-001, the RTP input handler will need to call +either EFR_decode_frame() or EFR_decode_bfi_nodata() with correct bfi and taf +arguments. Seeing that this complex logic should be abstracted away from +applications into the library, we've added the following wrapper function: + +extern int EFR_decode_rtp(struct EFR_decoder_state *st, const uint8_t *rtp_pl, + unsigned rtp_pl_len, int16_t *pcm); + +The semantics and return value of this function are the same as its FRv1 +counterpart gsmfr_fulldec_rtp_in(), documented in FR1-library-API article. + State reset functions =====================