Prosody RTP processing: API: sm_vmprx_create

This function is only in Prosody version 2 (TiNG).

Prototype Definition

int sm_vmprx_create(struct sm_vmprx_create_parms *vmprxp)

Parameters

*vmprxp
a structure of the following type:
typedef struct sm_vmprx_create_parms {
	tSMVMPrxId vmprx;					/* out */
	tSMModuleId module;					/* in */
	struct in_addr address;					/* in */
} SM_VMPRX_CREATE_PARMS;

Description

Allocates, on a specific module, a new VMP[rx] to receive incoming RTP data. If the call completes successfully, the parameter vmprx will be set to the identifier for that vmprx.

A VMP[rx] is automatically allocated a port number for incoming RTP data, this information may be obtained by calling sm_vmprx_get_ports() or by waiting for sm_vmprx_status() to return the port information. Any RTP data arriving at the VMP[rx] will be interpreted based on the cofiguration supplied by sm_vmprx_config_codec(). The VMP[rx] will discard any incoming packets that do not match it's current configuration settings.

This requires the module vmprx to have been downloaded.

Fields

vmprx (Only in Prosody version 2 (TiNG))
The newly created VMP[rx].
module (Only in Prosody version 2 (TiNG))
A value obtained from sm_open_module() which indicates the module where the VMP[rx] is to be allocated.
address (Only in Prosody version 2 (TiNG))
The address on which this VMP[rx] is to listen.

Returns

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


This function is part of the Prosody RTP processing API.