Prosody RTP processing: API: sm_vmprx_config_jitter_mode

Prototype Definition

int sm_vmprx_config_jitter_mode(struct sm_vmprx_config_jitter_mode_parms *jitterp)

Parameters

*jitterp
a structure of the following type:
typedef struct sm_vmprx_config_jitter_mode_parms {
	tSMVMPrxId vmprx;					/* in */
	enum kSMVMPrxJitterBufferMode {
		kSMVMPrxJitterBufferModeNormal,
		kSMVMPrxJitterBufferModeAdaptive,
	} mode;							/* in */
	union {
		struct {
			tSM_UT32 target_delay;			/* in */
			float freq_upper_tolerance;		/* in */
			float freq_lower_tolerance;		/* in */
		} adaptive;					/* in */
	} u;							/* in */
} SM_VMPRX_CONFIG_JITTER_MODE_PARMS;

Description

Allows an application to confgure the mode of the jitter buffer belonging to a VMP[rx].

When mode is kSMVMPrxJitterBufferModeAdaptive the jitter buffer will attempt to keep the delay it introduces to target_delay. The rate at which corrections to the delay are made depends on the packet jitter and the transmitters sample clock frequency. Packet jitter may cause unnecessary corrections. This is more likely when the allowed sample clock frequency tolerance range is large.

The sample clock frequency tolerances are specified as percentages of the expected sample clock frequency. For example, if the expected frequency is 8kHz and freq_upper_tolerance is 1.5 and freq_lower_tolerance is 0.5, then the jitter buffer will attempt to track sample clock frequencies between 8.12kHz and 7.96kHz.

Fields

vmprx
The VMP[rx] to be configured
mode
The mode of the jitter buffer. One of these values:
kSMVMPrxJitterBufferModeNormal
The normal jitter buffer mode.
kSMVMPrxJitterBufferModeAdaptive
The adaptive jitter buffer mode.
u
adaptive
This field is only valid if mode is kSMVMPrxJitterBufferModeAdaptive
target_delay
The target delay in milliseconds
freq_upper_tolerance
The upper limit of the sample clock frequency tolerance as a percentage
freq_lower_tolerance
The lower limit of the sample clock frequency tolerance as a percentage

Returns

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


This function is part of the Prosody RTP processing API.