Prosody RTP processing: API: sm_vmprx_create

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 waiting for sm_vmprx_status() to return the port information. Any RTP data arriving at the VMP[rx] will be interpreted based on the codec configuration. The VMP[rx] will discard any incoming packets that do not match it's current configuration settings.

Only on Prosody S: On Linux, if a local IP address is passed into this function in the address argument, it must be present in the /etc/hosts file.

This requires the module vmprx to have been downloaded.

Fields

vmprx
The newly created VMP[rx].
module
A value obtained from sm_open_module() which indicates the module where the VMP[rx] is to be allocated.
address
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.