BLOG | DOCUMENTATION | TRAC

Home --> Documentations --> PJMEDIA Reference

RTCP Feedback extension to RTCP session. More...

Data Structures

struct  pjmedia_rtcp_fb_cap
 
struct  pjmedia_rtcp_fb_info
 
struct  pjmedia_rtcp_fb_setting
 
struct  pjmedia_rtcp_fb_nack
 
struct  pjmedia_rtcp_fb_sli
 
struct  pjmedia_rtcp_fb_rpsi
 
struct  pjmedia_event_rx_rtcp_fb_data
 

Enumerations

enum  pjmedia_rtcp_fb_type {
  PJMEDIA_RTCP_FB_ACK,
  PJMEDIA_RTCP_FB_NACK,
  PJMEDIA_RTCP_FB_TRR_INT,
  PJMEDIA_RTCP_FB_OTHER
}
 

Functions

pj_status_t pjmedia_rtcp_fb_setting_default (pjmedia_rtcp_fb_setting *opt)
 
void pjmedia_rtcp_fb_setting_dup (pj_pool_t *pool, pjmedia_rtcp_fb_setting *dst, const pjmedia_rtcp_fb_setting *src)
 
void pjmedia_rtcp_fb_info_dup (pj_pool_t *pool, pjmedia_rtcp_fb_info *dst, const pjmedia_rtcp_fb_info *src)
 
pj_status_t pjmedia_rtcp_fb_encode_sdp (pj_pool_t *pool, pjmedia_endpt *endpt, const pjmedia_rtcp_fb_setting *opt, pjmedia_sdp_session *sdp_local, unsigned med_idx, const pjmedia_sdp_session *sdp_remote)
 
pj_status_t pjmedia_rtcp_fb_decode_sdp (pj_pool_t *pool, pjmedia_endpt *endpt, const void *opt, const pjmedia_sdp_session *sdp, unsigned med_idx, pjmedia_rtcp_fb_info *info)
 
pj_status_t pjmedia_rtcp_fb_decode_sdp2 (pj_pool_t *pool, pjmedia_endpt *endpt, const void *opt, const pjmedia_sdp_session *sdp, unsigned med_idx, int pt, pjmedia_rtcp_fb_info *info)
 
pj_status_t pjmedia_rtcp_fb_build_nack (pjmedia_rtcp_session *session, void *buf, pj_size_t *length, unsigned nack_cnt, const pjmedia_rtcp_fb_nack nack[])
 
pj_status_t pjmedia_rtcp_fb_build_pli (pjmedia_rtcp_session *session, void *buf, pj_size_t *length)
 
pj_status_t pjmedia_rtcp_fb_build_sli (pjmedia_rtcp_session *session, void *buf, pj_size_t *length, unsigned sli_cnt, const pjmedia_rtcp_fb_sli sli[])
 
pj_status_t pjmedia_rtcp_fb_build_rpsi (pjmedia_rtcp_session *session, void *buf, pj_size_t *length, const pjmedia_rtcp_fb_rpsi *rpsi)
 
pj_status_t pjmedia_rtcp_fb_parse_nack (const void *buf, pj_size_t length, unsigned *nack_cnt, pjmedia_rtcp_fb_nack nack[])
 
pj_status_t pjmedia_rtcp_fb_parse_pli (const void *buf, pj_size_t length)
 
pj_status_t pjmedia_rtcp_fb_parse_sli (const void *buf, pj_size_t length, unsigned *sli_cnt, pjmedia_rtcp_fb_sli sli[])
 
pj_status_t pjmedia_rtcp_fb_parse_rpsi (const void *buf, pj_size_t length, pjmedia_rtcp_fb_rpsi *rpsi)
 

Detailed Description

PJMEDIA implements RTCP Feedback specification (RFC 4585) to enable receivers to provide more immediate feedback to the senders.

Enumeration Type Documentation

◆ pjmedia_rtcp_fb_type

Enumeration of RTCP Feedback types. Each feedback type may have subtypes, which should be specified in feedback parameters.

Enumerator
PJMEDIA_RTCP_FB_ACK 

Positive acknowledgement feedbacks. Sample subtypes are Reference Picture Selection Indication (RPSI) and application layer feedbacks.

PJMEDIA_RTCP_FB_NACK 

Negative acknowledgement feedbacks. Sample subtypes are generic NACK, Picture Loss Indication (PLI), Slice Loss Indication (SLI), Reference Picture Selection Indication (RPSI), and application layer feedbacks.

PJMEDIA_RTCP_FB_TRR_INT 

Minimum interval between two regular RTCP packets.

PJMEDIA_RTCP_FB_OTHER 

Other feedback types.

Function Documentation

◆ pjmedia_rtcp_fb_setting_default()

pj_status_t pjmedia_rtcp_fb_setting_default ( pjmedia_rtcp_fb_setting opt)

Initialize RTCP Feedback setting with default values.

Parameters
optThe RTCP Feedback setting to be initialized.
Returns
PJ_SUCCESS on success.

◆ pjmedia_rtcp_fb_setting_dup()

void pjmedia_rtcp_fb_setting_dup ( pj_pool_t pool,
pjmedia_rtcp_fb_setting dst,
const pjmedia_rtcp_fb_setting src 
)

Duplicate RTCP Feedback setting.

Parameters
poolPool to be used for duplicating the config.
dstDestination configuration.
srcSource configuration.
Returns
PJ_SUCCESS on success.

◆ pjmedia_rtcp_fb_info_dup()

void pjmedia_rtcp_fb_info_dup ( pj_pool_t pool,
pjmedia_rtcp_fb_info dst,
const pjmedia_rtcp_fb_info src 
)

Duplicate RTCP Feedback info.

Parameters
poolPool to be used for duplicating the info.
dstDestination info.
srcSource info.
Returns
PJ_SUCCESS on success.

◆ pjmedia_rtcp_fb_encode_sdp()

pj_status_t pjmedia_rtcp_fb_encode_sdp ( pj_pool_t pool,
pjmedia_endpt endpt,
const pjmedia_rtcp_fb_setting opt,
pjmedia_sdp_session sdp_local,
unsigned  med_idx,
const pjmedia_sdp_session sdp_remote 
)

Encode RTCP Feedback specific information into local SDP according to the provided RTCP Feedback setting. This is useful to signal remote endpoint that local endpoint is capable and willing to receive RTCP Feedback packets as described in the local SDP.

Parameters
poolPool object to allocate memory in updating local SDP.
endptThe media endpoint.
optRTCP Feedback setting.
sdp_localThe local SDP to be filled in information from the media transport.
med_idxThe SDP media index.
sdp_remoteRemote SDP or NULL if local is offerer.
Returns
PJ_SUCCESS on success.

◆ pjmedia_rtcp_fb_decode_sdp()

pj_status_t pjmedia_rtcp_fb_decode_sdp ( pj_pool_t pool,
pjmedia_endpt endpt,
const void *  opt,
const pjmedia_sdp_session sdp,
unsigned  med_idx,
pjmedia_rtcp_fb_info info 
)

Decode RTCP Feedback specific information from SDP media.

Parameters
poolPool object to allocate memory.
endptThe media endpoint.
optOptions, currently it must be NULL.
sdpThe SDP.
med_idxThe SDP media index.
infoThe RTCP-FB info fetched from SDP.
Returns
PJ_SUCCESS on success.

◆ pjmedia_rtcp_fb_decode_sdp2()

pj_status_t pjmedia_rtcp_fb_decode_sdp2 ( pj_pool_t pool,
pjmedia_endpt endpt,
const void *  opt,
const pjmedia_sdp_session sdp,
unsigned  med_idx,
int  pt,
pjmedia_rtcp_fb_info info 
)

Decode RTCP Feedback specific information from SDP media for the specified payload type. If the payload type is set to negative value, it will decode RTCP Feedback info for all payload types in the SDP media.

Parameters
poolPool object to allocate memory.
endptThe media endpoint.
optOptions, currently it must be NULL.
sdpThe SDP.
med_idxThe SDP media index.
ptThe payload type.
infoThe RTCP-FB info fetched from SDP.
Returns
PJ_SUCCESS on success.

◆ pjmedia_rtcp_fb_build_nack()

pj_status_t pjmedia_rtcp_fb_build_nack ( pjmedia_rtcp_session session,
void *  buf,
pj_size_t length,
unsigned  nack_cnt,
const pjmedia_rtcp_fb_nack  nack[] 
)

Build an RTCP Feedback Generic NACK packet. This packet can be appended to other RTCP packets, e.g: RTCP RR/SR, to compose a compound RTCP packet. See also RFC 4585 Section 6.2.1 about Generic NACK message.

Parameters
sessionThe RTCP session.
bufThe buffer to receive RTCP Feedback packet.
lengthOn input, it will contain the buffer length. On output, it will contain the generated RTCP Feedback packet length.
nack_cntThe number of RTCP Feedback Generic NACK messages.
nackThe array of RTCP Feedback Generic NACK messages.
Returns
PJ_SUCCESS on success.

◆ pjmedia_rtcp_fb_build_pli()

pj_status_t pjmedia_rtcp_fb_build_pli ( pjmedia_rtcp_session session,
void *  buf,
pj_size_t length 
)

Build an RTCP Feedback Picture Loss Indication (PLI) packet. This packet can be appended to other RTCP packets, e.g: RTCP RR/SR, to compose a compound RTCP packet. See also RFC 4585 Section 6.3.1 about PLI FB message.

Parameters
sessionThe RTCP session.
bufThe buffer to receive RTCP Feedback packet.
lengthOn input, it will contain the buffer length. On output, it will contain the generated RTCP Feedback packet length.
Returns
PJ_SUCCESS on success.

◆ pjmedia_rtcp_fb_build_sli()

pj_status_t pjmedia_rtcp_fb_build_sli ( pjmedia_rtcp_session session,
void *  buf,
pj_size_t length,
unsigned  sli_cnt,
const pjmedia_rtcp_fb_sli  sli[] 
)

Build an RTCP Feedback Slice Loss Indication (SLI) packet. This packet can be appended to other RTCP packets, e.g: RTCP RR/SR, to compose a compound RTCP packet. See also RFC 4585 Section 6.3.2 about SLI FB message.

Parameters
sessionThe RTCP session.
bufThe buffer to receive RTCP Feedback packet.
lengthOn input, it will contain the buffer length. On output, it will contain the generated RTCP Feedback packet length.
sli_cntThe number of RTCP Feedback SLI messages.
sliThe array of RTCP Feedback SLI messages.
Returns
PJ_SUCCESS on success.

◆ pjmedia_rtcp_fb_build_rpsi()

pj_status_t pjmedia_rtcp_fb_build_rpsi ( pjmedia_rtcp_session session,
void *  buf,
pj_size_t length,
const pjmedia_rtcp_fb_rpsi rpsi 
)

Build an RTCP Feedback Reference Picture Selection Indication (RPSI) packet. This packet can be appended to other RTCP packets, e.g: RTCP RR/SR, to compose a compound RTCP packet. See also RFC 4585 Section 6.3.3 about RPSI FB message.

Parameters
sessionThe RTCP session.
bufThe buffer to receive RTCP Feedback packet.
lengthOn input, it will contain the buffer length. On output, it will contain the generated RTCP Feedback packet length.
rpsiThe RTCP Feedback RPSI message.
Returns
PJ_SUCCESS on success.

◆ pjmedia_rtcp_fb_parse_nack()

pj_status_t pjmedia_rtcp_fb_parse_nack ( const void *  buf,
pj_size_t  length,
unsigned *  nack_cnt,
pjmedia_rtcp_fb_nack  nack[] 
)

Check whether the specified payload contains RTCP feedback generic NACK message, and parse the payload if it does.

Parameters
bufThe payload buffer.
lengthThe payload length.
nack_cntOn input, it specifies the maximum number of generic NACK messages. On output, it specifies the number of parsed generic NACK messages.
nackThe array of RTCP Feedback Generic NACK messages.
Returns
PJ_SUCCESS if the payload contains generic NACK message and has been parsed successfully.

◆ pjmedia_rtcp_fb_parse_pli()

pj_status_t pjmedia_rtcp_fb_parse_pli ( const void *  buf,
pj_size_t  length 
)

Check whether the specified payload contains RTCP feedback Picture Loss Indication (PLI) message.

Parameters
bufThe payload buffer.
lengthThe payload length.
Returns
PJ_SUCCESS if the payload contains PLI message.

◆ pjmedia_rtcp_fb_parse_sli()

pj_status_t pjmedia_rtcp_fb_parse_sli ( const void *  buf,
pj_size_t  length,
unsigned *  sli_cnt,
pjmedia_rtcp_fb_sli  sli[] 
)

Check whether the specified payload contains RTCP feedback Slice Loss Indication (SLI) message, and parse the payload if it does.

Parameters
bufThe payload buffer.
lengthThe payload length.
sli_cntOn input, it specifies the maximum number of SLI messages. On output, it specifies the number of parsed SLI messages.
sliThe array of RTCP Feedback SLI messages.
Returns
PJ_SUCCESS if the payload contains SLI messages and has been parsed successfully.

◆ pjmedia_rtcp_fb_parse_rpsi()

pj_status_t pjmedia_rtcp_fb_parse_rpsi ( const void *  buf,
pj_size_t  length,
pjmedia_rtcp_fb_rpsi rpsi 
)

Check whether the specified payload contains RTCP feedback Reference Picture Selection Indication (RPSI) message, and parse the payload if it does.

Parameters
bufThe payload buffer.
lengthThe payload length.
rpsiThe parsed RTCP Feedback RPSI messages.
Returns
PJ_SUCCESS if the payload contains SLI messages and has been parsed successfully.

 


PJMEDIA small footprint Open Source media stack
Copyright (C) 2006-2008 Teluu Inc.