4 #include <osmocom/core/endian.h>
8 #if OSMO_IS_LITTLE_ENDIAN
13 uint8_t payload_type:7,
15 #elif OSMO_IS_BIG_ENDIAN
27 } __attribute__((packed));
43 } __attribute__((packed));
50 } __attribute__((packed));
54 #define RTP_MSGB_SIZE 1500
62 int osmo_rtp_handle_tx_set_sequence(
struct osmo_rtp_handle *h, uint16_t seq);
63 int osmo_rtp_handle_tx_set_ssrc(
struct osmo_rtp_handle *h, uint32_t ssrc);
64 int osmo_rtp_handle_tx_set_timestamp(
struct osmo_rtp_handle *h, uint32_t timestamp);
66 struct rtp_hdr *osmo_rtp_get_hdr(
struct msgb *msg);
67 void *osmo_rtp_get_payload(
struct rtp_hdr *rtph,
struct msgb *msg, uint32_t *plen);
69 struct msgb *osmo_rtp_build(
struct osmo_rtp_handle *h, uint8_t payload_type, uint32_t payload_len,
const void *data, uint32_t duration);
71 int osmo_rtp_snprintf(
char *buf,
size_t size,
struct msgb *msg);
74 #define RTP_PT_RTCP 72
76 #define RTP_PT_GSM_FULL 3
77 #define RTP_PT_GSM_FULL_PAYLOAD_LEN 33
78 #define RTP_PT_GSM_FULL_DURATION 160
80 #define RTP_PT_GSM_HALF 96
82 #define RTP_PT_GSM_EFR 97
83 #define RTP_PT_GSM_EFR_PAYLOAD_LEN 31
84 #define RTP_PT_GSM_EFR_DURATION 160