FreeCalypso > hg > themwi-rtp-lib
comparison include/endp.h @ 29:3e01a71b7c7c
implement RTCP Rx
| author | Mychaela Falconia <falcon@freecalypso.org> |
|---|---|
| date | Mon, 08 Jul 2024 02:55:32 +0000 |
| parents | a0b89c028053 |
| children | 9fd693f234f8 |
comparison
equal
deleted
inserted
replaced
| 28:defe58aa537c | 29:3e01a71b7c7c |
|---|---|
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 #include <stdbool.h> | 10 #include <stdbool.h> |
| 11 | 11 |
| 12 #include <osmocom/core/osmo_io.h> | 12 #include <osmocom/core/osmo_io.h> |
| 13 #include <osmocom/core/socket.h> | 13 #include <osmocom/core/socket.h> |
| 14 #include <osmocom/core/timer.h> | |
| 14 | 15 |
| 15 #include <themwi/rtp/twjit.h> | 16 #include <themwi/rtp/twjit.h> |
| 16 | 17 |
| 17 struct twrtp_endp_tx { | 18 struct twrtp_endp_tx { |
| 18 uint32_t ssrc; | 19 uint32_t ssrc; |
| 20 uint16_t seq; | 21 uint16_t seq; |
| 21 bool started; | 22 bool started; |
| 22 bool restart; | 23 bool restart; |
| 23 }; | 24 }; |
| 24 | 25 |
| 26 struct twrtp_endp_rtcp_rx { | |
| 27 uint32_t sr_ssrc; | |
| 28 uint16_t sr_ntp_sec; | |
| 29 uint16_t sr_ntp_fract; | |
| 30 struct timespec sr_rx_time; | |
| 31 uint32_t rr_lost_word; | |
| 32 uint32_t rr_jitter; | |
| 33 bool got_sr; | |
| 34 bool got_rr; | |
| 35 }; | |
| 36 | |
| 25 struct twrtp_endp_stats { | 37 struct twrtp_endp_stats { |
| 26 uint32_t rx_rtp_pkt; | 38 uint32_t rx_rtp_pkt; |
| 27 uint32_t rx_rtp_badsrc; | 39 uint32_t rx_rtp_badsrc; |
| 28 uint32_t rx_rtcp_pkt; | 40 uint32_t rx_rtcp_pkt; |
| 29 uint32_t rx_rtcp_badsrc; | 41 uint32_t rx_rtcp_badsrc; |
| 42 uint32_t rx_rtcp_invalid; | |
| 43 uint32_t rx_rtcp_wrong_ssrc; | |
| 30 uint32_t tx_rtp_pkt; | 44 uint32_t tx_rtp_pkt; |
| 31 uint32_t tx_rtp_bytes; | 45 uint32_t tx_rtp_bytes; |
| 32 uint32_t tx_rtcp_pkt; | 46 uint32_t tx_rtcp_pkt; |
| 33 }; | 47 }; |
| 34 | 48 |
| 40 struct osmo_io_fd *iofd_rtcp; | 54 struct osmo_io_fd *iofd_rtcp; |
| 41 struct osmo_sockaddr rtp_remote; | 55 struct osmo_sockaddr rtp_remote; |
| 42 struct osmo_sockaddr rtcp_remote; | 56 struct osmo_sockaddr rtcp_remote; |
| 43 /* Rx and Tx state */ | 57 /* Rx and Tx state */ |
| 44 struct twrtp_jibuf_inst *twjit; | 58 struct twrtp_jibuf_inst *twjit; |
| 45 /* RTCP Rx structure to be inserted here */ | 59 struct twrtp_endp_rtcp_rx rtcp_rx; |
| 46 struct twrtp_endp_tx tx; | 60 struct twrtp_endp_tx tx; |
| 47 /* always have to have stats */ | 61 /* always have to have stats */ |
| 48 struct twrtp_endp_stats stats; | 62 struct twrtp_endp_stats stats; |
| 49 /* bool flags at the end for structure packing optimization */ | 63 /* bool flags at the end for structure packing optimization */ |
| 50 bool register_done; | 64 bool register_done; |
