Prosody RTP processing: API: sm_vmptx_set_csrc

Prototype Definition

int sm_vmptx_set_csrc(struct sm_vmptx_set_csrc_parms *csrcp)

Parameters

*csrcp
a structure of the following type:
typedef struct sm_vmptx_set_csrc_parms {
	tSMVMPtxId vmptx;					/* in */
	unsigned repeat_delay;					/* in */
	unsigned packet_count;					/* in */
	enum kSMVMPTxCSRCType {
		kSMVMPTxCSRCTypeArray,
		kSMVMPTxCSRCTypeList,
	} type;							/* in */
	union {
		struct {
			int num_csrc;				/* in */
			int *csrc;				/* in */
		} csrc_array;					/* in */
		struct {
			tSMVMPTxCSRCListId csrc_list_id;	/* in */
			int exclude_ssrc;			/* in */
			int ssrc;				/* in */
		} csrc_list;					/* in */
	} u;							/* in */
} SM_VMPTX_SET_CSRC_PARMS;

Description

Sets the CSRC list to be sent in the RTP packets.

When type is kSMVMPTxCSRCTypeArray, the CSRC list is specified using num_csrc and csrc. If num_csrc is zero then no CSRC list will be sent.

When type is kSMVMPTxCSRCTypeList, the field csrc_list_id must be a list object created using sm_vmptx_create_csrc_list(), or kSMNullVMPTxCSRCListId to clear the CSRC list. Any changes to the list object will automatically be reflected in the RTP packets being sent. Where this VMP[tx] has a corresponding VMP[rx], the appropriate SSRC can be excluded from the CSRC list of the RTP packets sent by this VMP[tx]. When the field exclude_ssrc is non-zero, the SSRC passed in ssrc will not be included in the CSRC list of RTP packets sent by this VMP[tx] even if it is included in the CSRC list object. The list object and vmptx must have been allocated on the same tSMModuleId.

Fields

vmptx
The VMP[tx] to be configured
repeat_delay
The minimum delay (in ms) between blocks of packets with the CSRC list included. A delay of zero means every packet will include the CSRC list.
packet_count
The number of packets in each block to include the CSRC list.
type
One of these values:
kSMVMPTxCSRCTypeArray
The CSRC list is specified as an array.
kSMVMPTxCSRCTypeList
The CSRC list is specified using a CSRC list object.
u
csrc_array
This field is only valid if type is kSMVMPTxCSRCTypeArray.
num_csrc
The number of CSRCs in the array
csrc
A pointer to an array of CSRCs
csrc_list
This field is only valid if type is kSMVMPTxCSRCTypeList.
csrc_list_id
The CSRC list to use
exclude_ssrc
An indicator of whether to exclude the SSRC from CSRC list
ssrc
The SSRC to exclude from CSRC list

Returns

0 if call completed successfully, otherwise a standard error such as:


This function is part of the Prosody RTP processing API.