4 #include <osmocom/core/endian.h>
8 #if OSMO_IS_LITTLE_ENDIAN
13 uint8_t payload_type:7,
15 #elif OSMO_IS_BIG_ENDIAN
17 uint8_t version:2, padding:1, extension:1, csrc_count:4;
18 uint8_t marker:1, payload_type:7;
24 } __attribute__((packed));
40 } __attribute__((packed));
47 } __attribute__((packed));
51 #define RTP_MSGB_SIZE 1500
59 int osmo_rtp_handle_tx_set_sequence(
struct osmo_rtp_handle *h, uint16_t seq);
60 int osmo_rtp_handle_tx_set_ssrc(
struct osmo_rtp_handle *h, uint32_t ssrc);
61 int osmo_rtp_handle_tx_set_timestamp(
struct osmo_rtp_handle *h, uint32_t timestamp);
63 struct rtp_hdr *osmo_rtp_get_hdr(
struct msgb *msg);
64 void *osmo_rtp_get_payload(
struct rtp_hdr *rtph,
struct msgb *msg, uint32_t *plen);
66 struct msgb *osmo_rtp_build(
struct osmo_rtp_handle *h, uint8_t payload_type, uint32_t payload_len,
const void *data, uint32_t duration);
68 int osmo_rtp_snprintf(
char *buf,
size_t size,
struct msgb *msg);
71 #define RTP_PT_RTCP 72
73 #define RTP_PT_GSM_FULL 3
74 #define RTP_PT_GSM_FULL_PAYLOAD_LEN 33
75 #define RTP_PT_GSM_FULL_DURATION 160
77 #define RTP_PT_GSM_HALF 96
79 #define RTP_PT_GSM_EFR 97
80 #define RTP_PT_GSM_EFR_PAYLOAD_LEN 31
81 #define RTP_PT_GSM_EFR_DURATION 160
85 #define RTP_PT_CSDATA 120