15#include <osmocom/core/socket.h>
28 uint32_t rx_rtp_badsrc;
30 uint32_t rx_rtcp_badsrc;
31 uint32_t rx_rtcp_invalid;
32 uint32_t rx_rtcp_wrong_ssrc;
34 uint32_t tx_rtp_bytes;
48osmo_twrtp_create(
void *ctx, uint16_t clock_khz, uint16_t quantum_ms,
51void osmo_twrtp_destroy(
struct osmo_twrtp *endp);
53int osmo_twrtp_supply_fds(
struct osmo_twrtp *endp,
int rtp_fd,
int rtcp_fd);
55int osmo_twrtp_bind_local_ipv4(
struct osmo_twrtp *endp,
56 const struct in_addr *ip, uint16_t port);
57int osmo_twrtp_bind_local_ipv6(
struct osmo_twrtp *endp,
58 const struct in6_addr *ip6, uint16_t port);
59int osmo_twrtp_bind_local_sin(
struct osmo_twrtp *endp,
60 const struct sockaddr_in *sin);
61int osmo_twrtp_bind_local_sin6(
struct osmo_twrtp *endp,
62 const struct sockaddr_in6 *sin6);
64void osmo_twrtp_set_remote_ipv4(
struct osmo_twrtp *endp,
65 const struct in_addr *ip, uint16_t port);
66void osmo_twrtp_set_remote_ipv6(
struct osmo_twrtp *endp,
67 const struct in6_addr *ip6, uint16_t port);
68void osmo_twrtp_set_remote_sin(
struct osmo_twrtp *endp,
69 const struct sockaddr_in *sin);
70void osmo_twrtp_set_remote_sin6(
struct osmo_twrtp *endp,
71 const struct sockaddr_in6 *sin6);
75void osmo_twrtp_twjit_rx_enable(
struct osmo_twrtp *endp);
76void osmo_twrtp_twjit_rx_disable(
struct osmo_twrtp *endp);
79struct msgb *osmo_twrtp_twjit_rx_poll(
struct osmo_twrtp *endp);
81void osmo_twrtp_new_twjit_config(
struct osmo_twrtp *endp,
87typedef void (*osmo_twrtp_raw_rx_cb)(
struct osmo_twrtp *endp,
void *user_data,
90void osmo_twrtp_set_raw_rx_cb(
struct osmo_twrtp *endp, osmo_twrtp_raw_rx_cb cb,
95int osmo_twrtp_tx_quantum(
struct osmo_twrtp *endp,
const uint8_t *payload,
96 unsigned payload_len, uint8_t payload_type,
97 bool marker,
bool auto_marker,
bool send_rtcp);
98void osmo_twrtp_tx_skip(
struct osmo_twrtp *endp);
99void osmo_twrtp_tx_restart(
struct osmo_twrtp *endp);
101int osmo_twrtp_tx_forward(
struct osmo_twrtp *endp,
struct msgb *msg);
105int osmo_twrtp_set_sdes(
struct osmo_twrtp *endp,
const char *cname,
106 const char *name,
const char *email,
const char *phone,
107 const char *loc,
const char *tool,
const char *note);
108void osmo_twrtp_set_auto_rtcp_interval(
struct osmo_twrtp *endp,
111int osmo_twrtp_send_rtcp_rr(
struct osmo_twrtp *endp);
118bool osmo_twrtp_got_rtcp_rr(
struct osmo_twrtp *endp);
121uint32_t osmo_twrtp_rr_lost_word(
struct osmo_twrtp *endp);
122int32_t osmo_twrtp_rr_lost_cumulative(
struct osmo_twrtp *endp);
123uint32_t osmo_twrtp_rr_jitter_last(
struct osmo_twrtp *endp);
124uint32_t osmo_twrtp_rr_jitter_max(
struct osmo_twrtp *endp);
129osmo_twrtp_get_twjit_stats(
struct osmo_twrtp *endp);
132osmo_twrtp_get_twjit_rr_info(
struct osmo_twrtp *endp);
134bool osmo_twrtp_twjit_got_input(
struct osmo_twrtp *endp);
138int osmo_twrtp_set_dscp(
struct osmo_twrtp *endp, uint8_t dscp);
139int osmo_twrtp_set_socket_prio(
struct osmo_twrtp *endp,
int prio);
Definition: twrtp_private.h:50