Prosody RTP processing: API: sm_vmptx_config

Prototype Definition

int sm_vmptx_config(struct sm_vmptx_config_parms *configp)

Parameters

*configp
a structure of the following type:
typedef struct sm_vmptx_config_parms {
	tSMVMPtxId vmptx;					/* in */
	SOCKADDR_IN destination_rtp;				/* in */
	SOCKADDR_IN source_rtp;					/* in */
	int TOS_RTP;						/* in */
	SOCKADDR_IN destination_rtcp;				/* in */
	SOCKADDR_IN source_rtcp;				/* in */
	int TOS_RTCP;						/* in */
} SM_VMPTX_CONFIG_PARMS;

Description

Configures a VMP[tx] to send RTP and RTCP data to a device with the specified IP address and port numbers.

If the call completes successfully RTP data generated by the vmptx will be sent to the address and port as specified in destination_rtp. Any associated RTCP data will be delivered to the address and port specified by destination_rtcp. Specifying the source_rtp instructs the VMP[tx] to use the given IP address and port for outgoing RTP data. Specifying the source_rtcp instructs the VMP[tx] to use the given IP address and port for outgoing RTCP data.

This requires the module vmptx to have been downloaded.

Fields

vmptx
The VMP[tx] to configure
destination_rtp
The SOCKADDR_IN structure specifying the destination IP address and port for the RTP stream. A struct SOCKADDR_IN must be configured with an address family, an IP address and a port. Note that most operating systems define this structure such that fields are in network byte order. The structure must be correctly cast such that an IP V4 address is specified.
source_rtp
The SOCKADDR_IN structure allows you to specify the source IP address and port for the RTP stream. A struct SOCKADDR_IN must be configured with an address family. The IP address may be specified, or the value INADDR_ANY may be used to indicate that any suitable address may be used. The port number may be specified, or the value zero may be used to indicate that a suitable port number is to be automatically allocated and used. Note that most operating systems define this structure such that fields are in network byte order. The structure must be correctly cast such that an IP V4 address is specified.
TOS_RTP
The Type Of Service (TOS) indicator to be sent with RTP data
destination_rtcp
The SOCKADDR_IN structure specifying the destination IP address and port for the RTCP stream. A struct SOCKADDR_IN must be configured with an address family, an IP address and a port. Note that most operating systems define this structure such that fields are in network bytes order. The structure must be correctly cast such that an IP V4 address is specified.
source_rtcp
The SOCKADDR_IN structure allows you to specify the source IP address and port for the RTCP stream. A struct SOCKADDR_IN must be configured with an address family. The IP address may be specified, or the value INADDR_ANY may be used to indicate that any suitable address may be used. The port number may be specified, or the value zero may be used to indicate that a suitable port number is to be automatically allocated and used. Note that most operating systems define this structure such that fields are in network bytes order. The structure must be correctly cast such that an IP V4 address is specified.
TOS_RTCP
The Type Of Service (TOS) indicator to be sent with RTCP data

Returns

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


This function is part of the Prosody RTP processing API.