Prosody RTP processing: API: sm_vmprx_config_dataloss

Prototype Definition

int sm_vmprx_config_dataloss(struct sm_vmprx_dataloss_parms *datalossp)

Parameters

*datalossp
a structure of the following type:
typedef struct sm_vmprx_dataloss_parms {
	tSMVMPrxId vmprx;					/* in */
	tSM_INT loss_threshold;					/* in */
} SM_VMPRX_DATALOSS_PARMS;

Description

Configures the data loss threshold for a VMP[rx]. When the VMP[rx] is running, sm_vmprx_status(), indicates whether or not data is currently being received. If no valid data is available for at least the data loss threshold since the last valid data, the status indicates that data is not being received. The status changes to indicate that data is being received when a valid data packet is received.

Packets which are discarded (for example, duplicates or those which fail authentication) are not considered valid data.

A data loss threshold of zero disables the reporting of data loss.

The VMP[rx] event is signalled when the first data packet is received, any time subsequently when the data loss threshold is reached, and any time when data arrives after data loss. When a VMP[rx] is first configured, it is already experiencing data loss (because there has obviously been no data for the data loss period, since there has never been data), so the VMP[rx] event is not signalled. If an application wants to have a data loss timeout to guard against no data ever being received, it needs to implement its own timer.

Fields

vmprx
The VMP[rx] to be configured
loss_threshold
The threshold to use (in mS).

Returns

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


This function is part of the Prosody RTP processing API.