16#include <osmocom/core/msgb.h>
17#include <osmocom/core/socket.h>
136 uint32_t rx_rtp_badsrc;
137 uint32_t rx_rtcp_pkt;
138 uint32_t rx_rtcp_badsrc;
139 uint32_t rx_rtcp_invalid;
140 uint32_t rx_rtcp_wrong_ssrc;
142 uint32_t tx_rtp_bytes;
143 uint32_t tx_rtcp_pkt;
151struct osmo_twjit_config;
160 const struct osmo_twjit_config *twjit_config);
165 const struct osmo_sockaddr *rtp_addr,
bool bind_rtcp);
167 const struct osmo_sockaddr *rtp_addr);
179typedef bool (*osmo_twrtp_raw_rx_cb)(
struct osmo_twrtp *endp,
void *user_data,
188 unsigned payload_len, uint8_t payload_type,
189 bool marker,
bool auto_marker,
bool send_rtcp);
198 const char *name,
const char *email,
const char *phone,
199 const char *loc,
const char *tool,
const char *note);
int osmo_twrtp_get_rtp_fd(struct osmo_twrtp *endp)
Retrieve file descriptor for RTP UDP socket.
Definition: twrtp.c:1203
int32_t osmo_twrtp_rr_lost_cumulative(struct osmo_twrtp *endp)
Info from received RTCP RR: cumulative number of packets lost.
Definition: twrtp.c:1123
uint32_t osmo_twrtp_rr_lost_word(struct osmo_twrtp *endp)
Info from received RTCP RR: lost packets word.
Definition: twrtp.c:1109
int osmo_twrtp_supply_fds(struct osmo_twrtp *endp, int rtp_fd, int rtcp_fd)
Equip twrtp endpoint with RTP and RTCP sockets (supplied file descriptors)
Definition: twrtp.c:298
int osmo_twrtp_tx_forward(struct osmo_twrtp *endp, struct msgb *msg)
Forward RTP packet between endpoints.
Definition: twrtp.c:739
void osmo_twrtp_tx_restart(struct osmo_twrtp *endp)
Reset output stream cadence.
Definition: twrtp.c:721
int osmo_twrtp_set_dscp(struct osmo_twrtp *endp, uint8_t dscp)
Set DSCP (Differentiated Services Code Point) for emitted RTP and RTCP packets.
Definition: twrtp.c:1237
void osmo_twrtp_destroy(struct osmo_twrtp *endp)
Destroy a twrtp endpoint.
Definition: twrtp.c:253
void osmo_twrtp_set_auto_rtcp_interval(struct osmo_twrtp *endp, uint16_t interval)
Configure automatic emission of periodic RTCP SR packets.
Definition: twrtp.c:975
int osmo_twrtp_set_sdes(struct osmo_twrtp *endp, const char *cname, const char *name, const char *email, const char *phone, const char *loc, const char *tool, const char *note)
Set SDES strings for RTCP SR and RR packet generation.
Definition: twrtp.c:1000
int osmo_twrtp_set_socket_prio(struct osmo_twrtp *endp, int prio)
Set socket priority for emitted RTP and RTCP packets.
Definition: twrtp.c:1260
void osmo_twrtp_tx_skip(struct osmo_twrtp *endp)
Incur an intentional gap in the emitted RTP stream.
Definition: twrtp.c:704
void osmo_twrtp_set_raw_rx_cb(struct osmo_twrtp *endp, osmo_twrtp_raw_rx_cb cb, void *user_data)
Set callback function for unbuffered/non-delayed Rx path.
Definition: twrtp.c:555
struct osmo_twjit * osmo_twrtp_get_twjit(struct osmo_twrtp *endp)
Get twjit from twrtp.
Definition: twrtp.c:1174
int osmo_twrtp_set_remote(struct osmo_twrtp *endp, const struct osmo_sockaddr *rtp_addr)
Set RTP remote address.
Definition: twrtp.c:449
int osmo_twrtp_bind_local(struct osmo_twrtp *endp, const struct osmo_sockaddr *rtp_addr, bool bind_rtcp)
Equip twrtp endpoint with locally bound RTP and RTCP sockets.
Definition: twrtp.c:375
const struct osmo_twrtp_stats * osmo_twrtp_get_stats(struct osmo_twrtp *endp)
Retrieve lifetime stats from twrtp instance.
Definition: twrtp.c:1189
void osmo_twrtp_twjit_rx_ctrl(struct osmo_twrtp *endp, bool rx_enable)
Enable or disable Rx via twjit.
Definition: twrtp.c:509
int osmo_twrtp_send_rtcp_rr(struct osmo_twrtp *endp)
Emit RTCP RR packet.
Definition: twrtp.c:964
bool osmo_twrtp_got_rtcp_rr(struct osmo_twrtp *endp)
Have we received any RTCP RR?
Definition: twrtp.c:1093
struct msgb * osmo_twrtp_twjit_rx_poll(struct osmo_twrtp *endp)
Fixed-timing output poll from the twrtp endpoint's twjit buffer.
Definition: twrtp.c:527
uint32_t osmo_twrtp_rr_jitter_max(struct osmo_twrtp *endp)
Info from received RTCP RR: interarrival jitter, highest received.
Definition: twrtp.c:1150
struct osmo_twrtp * osmo_twrtp_create(void *ctx, uint16_t clock_khz, uint16_t quantum_ms, bool random_ts_seq, const struct osmo_twjit_config *twjit_config)
\addgroup twrtp
Definition: twrtp.c:217
int osmo_twrtp_get_rtcp_fd(struct osmo_twrtp *endp)
Retrieve file descriptor for RTCP UDP socket.
Definition: twrtp.c:1219
int osmo_twrtp_tx_quantum(struct osmo_twrtp *endp, const uint8_t *payload, unsigned payload_len, uint8_t payload_type, bool marker, bool auto_marker, bool send_rtcp)
Emit RTP packet carrying a locally sourced quantum of speech/data.
Definition: twrtp.c:606
uint32_t osmo_twrtp_rr_jitter_last(struct osmo_twrtp *endp)
Info from received RTCP RR: interarrival jitter, most recent.
Definition: twrtp.c:1139
Info collected from the incoming RTP data stream for the purpose of generating RTCP reception report ...
Definition: twjit.h:100
Stats collected during the lifetime of a twjit instance.
Definition: twjit.h:59
Stats collected during the lifetime of a twrtp instance.
Definition: twrtp.h:132