19 #include <arpa/inet.h> 21 #include <machine/endian.h> 45 #if __BYTE_ORDER == __BIG_ENDIAN 50 #elif __BYTE_ORDER == __LITTLE_ENDIAN 359 int janus_rtcp_sdes(
char *packet,
int len,
const char *cname,
int cnamelen);
RTCP Report Block (http://tools.ietf.org/html/rfc3550#section-6.4.1)
Definition: rtcp.h:70
uint8_t blocktype
Block type (BT)
Definition: rtcp.h:189
uint32_t seqnr
Sequence number (only the first 8 bits are used, the other 24 are reserved)
Definition: rtcp.h:168
uint32_t tb
Definition: rtcp.h:224
uint32_t ehsnr
Definition: rtcp.h:74
rtcp_header header
Definition: rtcp.h:83
uint8_t len
Definition: rtcp.h:106
RTCP SDES (http://tools.ietf.org/html/rfc3550#section-6.5)
Definition: rtcp.h:98
RTCP BYE (http://tools.ietf.org/html/rfc3550#section-6.6)
Definition: rtcp.h:118
uint32_t ssrc
Definition: rtcp.h:93
rtcp_sdes_chunk chunk
Definition: rtcp.h:113
uint32_t janus_rtcp_context_get_lost_all(rtcp_context *ctx, gboolean remote)
Method to retrieve the total number of lost packets from an existing RTCP context.
Definition: rtcp.c:493
struct sender_info sender_info
RTCP Sender Information (http://tools.ietf.org/html/rfc3550#section-6.4.1)
uint16_t last_seq_nr
Definition: rtcp.h:214
RTCP Extended Report Block (https://tools.ietf.org/html/rfc3611#section-3)
Definition: rtcp.h:186
RTCP-FB (http://tools.ietf.org/html/rfc4585)
Definition: rtcp.h:173
uint32_t lost_remote
Definition: rtcp.h:239
uint16_t pid
Packet ID.
Definition: rtcp.h:136
rtcp_header header
Definition: rtcp.h:112
struct rtcp_fir rtcp_fir
RTCP FIR (http://tools.ietf.org/search/rfc5104#section-4.3.1.1)
guint32 janus_rtcp_get_receiver_ssrc(char *packet, int len)
Method to quickly retrieve the received SSRC (needed for demuxing RTCP in BUNDLE) ...
Definition: rtcp.c:80
uint32_t rtp_ts
Definition: rtcp.h:64
uint16_t blp
bitmask of following lost packets
Definition: rtcp.h:138
int64_t lsr_ts
Definition: rtcp.h:229
uint32_t janus_rtcp_get_remb(char *packet, int len)
Inspect an existing RTCP REMB message to retrieve the reported bitrate.
Definition: rtcp.c:741
int janus_rtcp_remb(char *packet, int len, uint32_t bitrate)
Method to generate a new RTCP REMB message to cap the reported bitrate.
Definition: rtcp.c:875
uint32_t ssrc
Sender SSRC.
Definition: rtcp.h:178
uint64_t transit
Definition: rtcp.h:221
uint16_t seq_cycle
Definition: rtcp.h:215
struct rtcp_sdes_chunk rtcp_sdes_chunk
RTCP SDES (http://tools.ietf.org/html/rfc3550#section-6.5)
struct report_block report_block
RTCP Report Block (http://tools.ietf.org/html/rfc3550#section-6.4.1)
struct rtcp_sdes rtcp_sdes
gboolean janus_rtcp_has_pli(char *packet, int len)
Method to check whether an RTCP message contains a PLI request.
Definition: rtcp.c:610
uint32_t bitrate
Num SSRC, Br Exp, Br Mantissa (bit mask)
Definition: rtcp.h:156
int janus_rtcp_fix_ssrc(rtcp_context *ctx, char *packet, int len, int fixssrc, uint32_t newssrcl, uint32_t newssrcr)
Method to fix an RTCP message (http://tools.ietf.org/html/draft-ietf-straw-b2bua-rtcp-00) ...
Definition: rtcp.c:150
struct rtcp_nack rtcp_nack
RTCP NACK (http://tools.ietf.org/html/rfc4585#section-6.2.1)
rtcp_sdes_item item
Definition: rtcp.h:114
gboolean janus_rtcp_has_fir(char *packet, int len)
Method to check whether an RTCP message contains a FIR request.
Definition: rtcp.c:582
uint32_t lsr
Definition: rtcp.h:76
uint8_t type
Definition: rtcp.h:105
int janus_rtcp_process_incoming_rtp(rtcp_context *ctx, char *packet, int len)
Method to quickly process the header of an incoming RTP packet to update the associated RTCP context...
Definition: rtcp.c:444
RTCP APP (http://tools.ietf.org/html/rfc3550#section-6.7)
Definition: rtcp.h:125
rtcp_header header
Common header.
Definition: rtcp.h:176
rtcp_header header
Definition: rtcp.h:120
uint16_t seq_no
Sequence number to send again.
Definition: rtcp.h:144
uint16_t length
Block length.
Definition: rtcp.h:193
uint32_t janus_rtcp_context_get_jitter(rtcp_context *ctx, gboolean remote)
Method to retrieve the jitter from an existing RTCP context.
Definition: rtcp.c:525
struct rtcp_app rtcp_app_t
RTCP APP (http://tools.ietf.org/html/rfc3550#section-6.7)
int janus_rtcp_parse(rtcp_context *ctx, char *packet, int len)
Method to parse/validate an RTCP message.
Definition: rtcp.c:24
RTCP Receiver Report (http://tools.ietf.org/html/rfc3550#section-6.4.2)
Definition: rtcp.h:90
uint32_t ssrc
Definition: rtcp.h:100
int janus_rtcp_nacks(char *packet, int len, GSList *nacks)
Method to generate a new RTCP NACK message to report lost packets.
Definition: rtcp.c:976
struct rtcp_fb rtcp_fb
RTCP-FB (http://tools.ietf.org/html/rfc4585)
RTCP NACK (http://tools.ietf.org/html/rfc4585#section-6.2.1)
Definition: rtcp.h:133
uint32_t received
Definition: rtcp.h:235
uint16_t pt
Definition: rtcp.h:218
uint32_t media
Media source.
Definition: rtcp.h:180
uint8_t typesp
Type-specific.
Definition: rtcp.h:191
char * janus_rtcp_filter(char *packet, int len, int *newlen)
Method to filter an outgoing RTCP message (http://tools.ietf.org/html/draft-ietf-straw-b2bua-rtcp-00)...
Definition: rtcp.c:382
struct rtcp_bye rtcp_bye_t
RTCP BYE (http://tools.ietf.org/html/rfc3550#section-6.6)
RTCP Extended Report (https://tools.ietf.org/html/rfc3611#section-2)
Definition: rtcp.h:200
int janus_rtcp_cap_remb(char *packet, int len, uint32_t bitrate)
Method to modify an existing RTCP REMB message to cap the reported bitrate.
Definition: rtcp.c:783
struct rtcp_remb rtcp_remb
RTCP REMB (http://tools.ietf.org/html/draft-alvestrand-rmcat-remb-03)
uint32_t ssrc
Definition: rtcp.h:128
struct rtcp_header rtcp_header
RTCP Header (http://tools.ietf.org/html/rfc3550#section-6.1)
Janus representation (linked list) of sequence numbers to send again.
Definition: rtcp.h:142
rtcp_type
RTCP Packet Types (http://www.networksorcery.com/enp/protocol/rtcp.htm)
Definition: rtcp.h:29
int janus_rtcp_fir_legacy(char *packet, int len, int *seqnr)
Method to generate a new legacy RTCP FIR (RFC2032) message to request a key frame.
Definition: rtcp.c:939
int janus_rtcp_pli(char *packet, int len)
Method to generate a new RTCP PLI message to request a key frame.
Definition: rtcp.c:962
uint32_t s_octets
Definition: rtcp.h:66
uint16_t base_seq
Definition: rtcp.h:216
uint32_t expected
Definition: rtcp.h:237
sender_info si
Definition: rtcp.h:85
RTCP REMB (http://tools.ietf.org/html/draft-alvestrand-rmcat-remb-03)
Definition: rtcp.h:151
uint32_t s_packets
Definition: rtcp.h:65
struct rtcp_sdes_item rtcp_sdes_item
int janus_rtcp_fir(char *packet, int len, int *seqnr)
Method to generate a new RTCP FIR message to request a key frame.
Definition: rtcp.c:917
GSList * janus_rtcp_get_nacks(char *packet, int len)
Method to parse an RTCP NACK message.
Definition: rtcp.c:641
uint32_t jitter
Definition: rtcp.h:75
uint32_t ntp_ts_msw
Definition: rtcp.h:62
struct extended_report_block extended_report_block
RTCP Extended Report Block (https://tools.ietf.org/html/rfc3611#section-3)
uint32_t ssrc
SSRC of the media sender that needs to send a key frame.
Definition: rtcp.h:166
uint32_t ntp_ts_lsw
Definition: rtcp.h:63
Internal RTCP state context (for RR/SR)
Definition: rtcp.h:209
rtcp_header header
Definition: rtcp.h:92
gboolean janus_rtcp_has_bye(char *packet, int len)
Method to check whether an RTCP message contains a BYE message.
Definition: rtcp.c:554
struct janus_nack * next
Next element in the linked list.
Definition: rtcp.h:146
uint32_t ssrc
Definition: rtcp.h:84
uint32_t ssrc
Definition: rtcp.h:203
uint32_t delay
Definition: rtcp.h:77
struct rtcp_xr rtcp_xr
RTCP Extended Report (https://tools.ietf.org/html/rfc3611#section-2)
struct rtcp_sr rtcp_sr
RTCP Sender Report (http://tools.ietf.org/html/rfc3550#section-6.4.1)
struct janus_nack janus_nack
Janus representation (linked list) of sequence numbers to send again.
int janus_rtcp_remove_nacks(char *packet, int len)
Method to remove an RTCP NACK message.
Definition: rtcp.c:692
uint8_t rtp_recvd
Definition: rtcp.h:212
int janus_rtcp_report_block(rtcp_context *ctx, report_block *rb)
Method to fill in a Report Block in a Receiver Report.
Definition: rtcp.c:531
int64_t last_sent
Definition: rtcp.h:232
double jitter_remote
Definition: rtcp.h:222
rtcp_header header
Definition: rtcp.h:202
guint32 janus_rtcp_get_sender_ssrc(char *packet, int len)
Method to quickly retrieve the sender SSRC (needed for demuxing RTCP in BUNDLE)
Definition: rtcp.c:28
uint32_t flcnpl
Definition: rtcp.h:73
struct rtcp_context rtcp_context
Internal RTCP state context (for RR/SR)
RTCP Sender Report (http://tools.ietf.org/html/rfc3550#section-6.4.1)
Definition: rtcp.h:81
uint32_t expected_prior
Definition: rtcp.h:238
struct rtcp_rr rtcp_rr
RTCP Receiver Report (http://tools.ietf.org/html/rfc3550#section-6.4.2)
uint32_t ssrc
Definition: rtcp.h:72
uint32_t janus_rtcp_context_get_lsr(rtcp_context *ctx)
Method to retrieve the LSR from an existing RTCP context.
Definition: rtcp.c:489
uint32_t received_prior
Definition: rtcp.h:236
rtcp_header header
Definition: rtcp.h:127
uint32_t lsr
Definition: rtcp.h:227
int janus_rtcp_sdes(char *packet, int len, const char *cname, int cnamelen)
Method to generate a new RTCP SDES message.
Definition: rtcp.c:848
RTCP FIR (http://tools.ietf.org/search/rfc5104#section-4.3.1.1)
Definition: rtcp.h:163
RTCP Sender Information (http://tools.ietf.org/html/rfc3550#section-6.4.1)
Definition: rtcp.h:60