reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
rtcp.c File Reference

Real-time Transport Control Protocol. More...

#include <string.h>
#include <re_types.h>
#include <re_fmt.h>
#include <re_mem.h>
#include <re_mbuf.h>
#include <re_list.h>
#include <re_sa.h>
#include <re_rtp.h>
#include "rtcp.h"

Go to the source code of this file.

Functions

static int rtcp_quick_send (struct rtp_sock *rs, enum rtcp_type type, uint32_t count,...)
 
int rtcp_send_app (struct rtp_sock *rs, const char name[4], const uint8_t *data, size_t len)
 Send an RTCP Application-Defined (APP) packet.
 
int rtcp_send_fir (struct rtp_sock *rs, uint32_t ssrc)
 Send a Full INTRA-frame Request (FIR) packet.
 
int rtcp_send_nack (struct rtp_sock *rs, uint16_t fsn, uint16_t blp)
 Send an RTCP NACK packet.
 
int rtcp_send_pli (struct rtp_sock *rs, uint32_t fb_ssrc)
 Send an RTCP Picture Loss Indication (PLI) packet.
 
const char * rtcp_type_name (enum rtcp_type type)
 
const char * rtcp_sdes_name (enum rtcp_sdes_type sdes)
 
int rtcp_msg_print (struct re_printf *pf, const struct rtcp_msg *msg)
 Print an RTCP Message.
 

Detailed Description

Real-time Transport Control Protocol.

Copyright (C) 2010 Creytiv.com

Definition in file rtcp.c.

Function Documentation

◆ rtcp_msg_print()

int rtcp_msg_print ( struct re_printf *  pf,
const struct rtcp_msg *  msg 
)

Print an RTCP Message.

Parameters
pfPrint handler for debug output
msgRTCP Message
Returns
0 if success, otherwise errorcode

Definition at line 153 of file rtcp.c.

◆ rtcp_quick_send()

static int rtcp_quick_send ( struct rtp_sock *  rs,
enum rtcp_type  type,
uint32_t  count,
  ... 
)
static

Definition at line 17 of file rtcp.c.

◆ rtcp_sdes_name()

const char * rtcp_sdes_name ( enum rtcp_sdes_type  sdes)

Definition at line 127 of file rtcp.c.

◆ rtcp_send_app()

int rtcp_send_app ( struct rtp_sock *  rs,
const char  name[4],
const uint8_t *  data,
size_t  len 
)

Send an RTCP Application-Defined (APP) packet.

Parameters
rsRTP Socket
nameAscii name (4 octets)
dataApplication-dependent data
lenNumber of bytes of data
Returns
0 for success, otherwise errorcode

Definition at line 55 of file rtcp.c.

◆ rtcp_send_fir()

int rtcp_send_fir ( struct rtp_sock *  rs,
uint32_t  ssrc 
)

Send a Full INTRA-frame Request (FIR) packet.

Parameters
rsRTP Socket
ssrcSynchronization source identifier for the sender of this packet
Returns
0 for success, otherwise errorcode

Definition at line 71 of file rtcp.c.

◆ rtcp_send_nack()

int rtcp_send_nack ( struct rtp_sock *  rs,
uint16_t  fsn,
uint16_t  blp 
)

Send an RTCP NACK packet.

Parameters
rsRTP Socket
fsnFirst Sequence Number lost
blpBitmask of lost packets
Returns
0 for success, otherwise errorcode

Definition at line 86 of file rtcp.c.

◆ rtcp_send_pli()

int rtcp_send_pli ( struct rtp_sock *  rs,
uint32_t  fb_ssrc 
)

Send an RTCP Picture Loss Indication (PLI) packet.

Parameters
rsRTP Socket
fb_ssrcFeedback SSRC
Returns
0 for success, otherwise errorcode

Definition at line 100 of file rtcp.c.

◆ rtcp_type_name()

const char * rtcp_type_name ( enum rtcp_type  type)

Definition at line 107 of file rtcp.c.