16 #include <arpa/inet.h> 18 #include <machine/endian.h> 19 #define __BYTE_ORDER BYTE_ORDER 20 #define __BIG_ENDIAN BIG_ENDIAN 21 #define __LITTLE_ENDIAN LITTLE_ENDIAN 29 #define RTP_HEADER_SIZE 12 34 #if __BYTE_ORDER == __BIG_ENDIAN 41 #elif __BYTE_ORDER == __LITTLE_ENDIAN 71 #define JANUS_RTP_EXTMAP_AUDIO_LEVEL "urn:ietf:params:rtp-hdrext:ssrc-audio-level" 73 #define JANUS_RTP_EXTMAP_TOFFSET "urn:ietf:params:rtp-hdrext:toffset" 75 #define JANUS_RTP_EXTMAP_ABS_SEND_TIME "http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time" 77 #define JANUS_RTP_EXTMAP_VIDEO_ORIENTATION "urn:3gpp:video-orientation" 79 #define JANUS_RTP_EXTMAP_CC_EXTENSIONS "http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01" 81 #define JANUS_RTP_EXTMAP_PLAYOUT_DELAY "http://www.webrtc.org/experiments/rtp-hdrext/playout-delay" 83 #define JANUS_RTP_EXTMAP_RTP_STREAM_ID "urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id" 123 gboolean *c, gboolean *f, gboolean *r1, gboolean *r0);
133 uint16_t *min_delay, uint16_t *max_delay);
143 char *sdes_item,
int sdes_len);
148 uint32_t a_last_ssrc, a_last_ts, a_base_ts, a_base_ts_prev,
149 v_last_ssrc,
v_last_ts, v_base_ts, v_base_ts_prev;
150 uint16_t a_last_seq, a_base_seq, a_base_seq_prev,
uint16_t v_last_seq
Definition: rtp.h:150
gint64 created
Definition: rtp.h:60
int janus_rtp_header_extension_parse_video_orientation(char *buf, int len, int id, gboolean *c, gboolean *f, gboolean *r1, gboolean *r0)
Helper to parse a video-orientation RTP extension (http://www.3gpp.org/ftp/Specs/html-info/26114.htm)
Definition: rtp.c:169
struct janus_rtp_header_extension janus_rtp_header_extension
RTP extension.
char * janus_rtp_payload(char *buf, int len, int *plen)
Helper to quickly access the RTP payload, skipping header and extensions.
Definition: rtp.c:19
uint32_t v_last_ts
Definition: rtp.h:148
struct rtp_header rtp_header
RTP Header (http://tools.ietf.org/html/rfc3550#section-5.1)
RTP packet.
Definition: rtp.h:57
void janus_rtp_header_update(janus_rtp_header *header, janus_rtp_switching_context *context, gboolean video, int step)
Use the context info to update the RTP header of a packet, if needed.
Definition: rtp.c:234
RTP context, in order to make sure SSRC changes result in coherent seq/ts increases.
Definition: rtp.h:147
gint64 v_last_time
Definition: rtp.h:153
gint64 last_retransmit
Definition: rtp.h:61
struct janus_rtp_packet janus_rtp_packet
RTP packet.
int janus_rtp_header_extension_parse_rtp_stream_id(char *buf, int len, int id, char *sdes_item, int sdes_len)
Helper to parse a rtp-stream-id RTP extension (https://tools.ietf.org/html/draft-ietf-avtext-rid-09) ...
Definition: rtp.c:207
struct janus_rtp_switching_context janus_rtp_switching_context
RTP context, in order to make sure SSRC changes result in coherent seq/ts increases.
gboolean v_seq_reset
Definition: rtp.h:152
rtp_header janus_rtp_header
Definition: rtp.h:54
char * data
Definition: rtp.h:58
const char * janus_rtp_header_extension_get_from_id(const char *sdp, int id)
Ugly and dirty helper to quickly get the RTP extension namespace associated with an id (extmap) in an...
Definition: rtp.c:68
int janus_rtp_header_extension_get_id(const char *sdp, const char *extension)
Ugly and dirty helper to quickly get the id associated with an RTP extension (extmap) in an SDP...
Definition: rtp.c:40
void janus_rtp_switching_context_reset(janus_rtp_switching_context *context)
Set (or reset) the context fields to their default values.
Definition: rtp.c:227
int janus_rtp_header_extension_parse_audio_level(char *buf, int len, int id, int *level)
Helper to parse a ssrc-audio-level RTP extension (https://tools.ietf.org/html/rfc6464) ...
Definition: rtp.c:156
gint length
Definition: rtp.h:59
int janus_rtp_header_extension_parse_playout_delay(char *buf, int len, int id, uint16_t *min_delay, uint16_t *max_delay)
Helper to parse a playout-delay RTP extension (https://webrtc.org/experiments/rtp-hdrext/playout-dela...
Definition: rtp.c:191