Prosody RTP processing: API: sm_vidmprx_status

This function is deprecated.

Prototype Definition

int sm_vidmprx_status(struct sm_vidmprx_status_parms *statusp)

Parameters

*statusp
a structure of the following type:
typedef struct sm_vidmprx_status_parms {
	tSMVidMPrxId vidmprx;					/* in */
	enum kSMVidMPrxStatus {
		kSMVidMPrxStatusRunning,
		kSMVidMPrxStatusStopped,
		kSMVidMPrxStatusGotPorts,
		kSMVidMPrxStatusNewSSRC,
		kSMVidMPrxStatusUnhandledPayload,
		kSMVidMPrxStatusInternalError,
		kSMVidMPrxStatusGotPortsIPv6,
		kSMVidMPrxStatusNewSSRCIPv6,
		kSMVidMPrxStatusSTUNBindRequest,
		kSMVidMPrxStatusSTUNBindResponse,
	} status;						/* out */
	union {
		struct {
			int RTP_Port;				/* out */
			int RTCP_Port;				/* out */
			struct in_addr address;			/* out */
		} ports;					/* out */
		struct {
			tSM_INT no_data;			/* out */
		} run;						/* out */
		struct {
			struct in_addr address;			/* out */
			int port;				/* out */
			int ssrc;				/* out */
		} ssrc;						/* out */
		struct {
			int type;				/* out */
		} payload;					/* out */
		struct {
			int num_errors;				/* out */
		} internal_error;				/* out */
		struct {
			int RTP_Port;				/* out */
			int RTCP_Port;				/* out */
			struct in6_addr address;		/* out */
		} ports_ipv6;					/* out */
		struct {
			struct in6_addr address;		/* out */
			int port;				/* out */
			int ssrc;				/* out */
		} ssrc_ipv6;					/* out */
		struct {
			int recv_port;				/* out */
			enum kSMAddressType {
				kSMAddressTypeIPv4,
				kSMAddressTypeIPv6,
			} address_type;				/* out */
			union {
				struct in_addr ipv4;		/* out */
				struct in6_addr ipv6;		/* out */
			} address;				/* out */
			int port;				/* out */
			tSM_UT32 priority;			/* out */
			int use_candidate;			/* out */
			int remote_is_controlling;		/* out */
		} bind_request;					/* out */
		struct {
			int recv_port;				/* out */
			char transaction_id[12];		/* out */
			enum kSMVidMPrxSTUNResult {
				kSMVidMPrxSTUNResultSuccess,
				kSMVidMPrxSTUNResultError,
				kSMVidMPrxSTUNResultInvalid,
				kSMVidMPrxSTUNResultTimeout,
			} result;				/* out */
			tSM_INT error_code;			/* out */
			enum kSMAddressType address_type;	/* out */
			union {
				struct in_addr ipv4;		/* out */
				struct in6_addr ipv6;		/* out */
			} address;				/* out */
			int port;				/* out */
			int local_was_controlling;		/* out */
		} bind_response;				/* out */
	} u;							/* out */
} SM_VIDMPRX_STATUS_PARMS;

Description

Returns the current status of the VidMP[rx] or an error to indicate that an error has occurred.

When the VidMP[rx] event, obtained from sm_vidmprx_get_event(), is signalled the user must call this function to determine the nature of the status change. The change in status may indicate that an error occurred whilst processing a user request or it may be notifiying the user of a change to the previous state of the VidMP[rx].

Fields

vidmprx (Deprecated)
The VidMP[rx] to interrogate
status (Deprecated)
One of these values:
kSMVidMPrxStatusRunning
The VidMP[rx] is running normally.
kSMVidMPrxStatusStopped
Indicates that the VidMP[rx] has stopped processing RTP and that it is safe to destroy
kSMVidMPrxStatusGotPorts
Indicates that IPv4 port information is available. In addition to being reported with this status, this information can be retrieved with sm_vidmprx_get_ports() at any time until the VidMP[x] is stopped.
kSMVidMPrxStatusNewSSRC
Indicates that a new SSRC value from an IPv4 endpoint is being used.
kSMVidMPrxStatusUnhandledPayload
Indicates that a packet was received with a payload type that could not be handled
kSMVidMPrxStatusInternalError
Indicates that the VidMP[rx] encountered one or more internal errors when processing the incoming packet stream. These errors will result in the media stream output from the VidMP[rx] missing some data. Note that such errors are not fatal - the VidMP[rx] continues to run. These status reports are throttled in order to maintain a sensibly low rate of reporting even in the event of a high rate of errors.
kSMVidMPrxStatusGotPortsIPv6
Indicates that IPv6 port information is available. In addition to being reported with this status, this information can be retrieved with sm_vmprx_get_ports() at any time until the VMP[x] is stopped.
kSMVidMPrxStatusNewSSRCIPv6
Indicates that a new SSRC value from and IPv6 endpoint is being used.
kSMVidMPrxStatusSTUNBindRequest
Indicates that a STUN bind request has been received.
kSMVidMPrxStatusSTUNBindResponse
Indicates that a STUN bind response has been received.
u (Deprecated)
Additional information relating to the current status of the VidMP[rx]
ports
This field is only valid if the status is kSMVidMPrxStatusGotPorts
RTP_Port
The UDP port number on which this VidMP[rx] is listening for RTP
RTCP_Port
The UDP port number on which this VidMP[rx] is listening for RTCP
address
The address on which this VidMP[rx] is listening.
run
This field is only valid if the status is kSMVidMPrxStatusRunning
no_data
Non zero when the VidMP[rx] is experiencing a loss of data that has reached the threshold set by sm_vidmprx_config_dataloss()
ssrc
This field is only valid if the status is kSMVidMPrxStatusNewSSRC
address
The address from which the SSRC was received.
port
The UDP port number from which the SSRC was received.
ssrc
The new SSRC value.
payload
This field is only valid if the status is kSMVidMPrxStatusUnhandledPayload
type
The payload type identifier from the RTP packet
internal_error
This field is only valid if the status is kSMVidMPrxStatusInternalError
num_errors
The number of internal errors encountered by the VidMP[rx] covered by this status report.
ports_ipv6
This field is only valid if the status is kSMVidMPrxStatusGotPortsIPv6.
RTP_Port
The UDP port number on which this VidMP[rx] is listening for RTP
RTCP_Port
The UDP port number on which this VidMP[rx] is listening for RTCP
address
The address on which this VidMP[rx] is listening.
ssrc_ipv6
This field is only valid if the status is kSMVidMPrxStatusNewSSRCIPv6.
address
The address from which the SSRC was received.
port
The UDP port number from which the SSRC was received.
ssrc
The new SSRC value.
bind_request
This field is only valid if the status is kSMVidMPrxStatusSTUNBindRequest
recv_port
The port the STUN bind request was received on.
address_type
The type of the request's source address. One of these values:
kSMAddressTypeIPv4
An IPv4 address is present.
kSMAddressTypeIPv6
An IPv6 address is present.
address
ipv4
The IPv4 address from which the STUN bind request was received from. Only valid when type is kSMAddressTypeIPv4.
ipv6
The IPv6 address from which the STUN bind request was received from. Only valid when type is kSMAddressTypeIPv6.
port
The port from which the STUN bind request was received from.
priority
The priority value from the STUN bind request.
use_candidate
An indication of whether the STUN bind request included a USE-CANDIDATE attribute. Non-zero when the attribute is present.
remote_is_controlling
An indication of ICE role from the STUN bind request. It is zero if the remote agent is in the controlled role and non-zero otherwise.
bind_response
This field is only valid if the status is kSMVidMPrxStatusSTUNBindResult
recv_port
The port the STUN bind result was received on.
transaction_id
The transaction ID used for the request.
result
The result type. One of these values:
kSMVidMPrxSTUNResultSuccess
A valid success response was received.
kSMVidMPrxSTUNResultError
A valid error response was received.
kSMVidMPrxSTUNResultInvalid
A invalid response was received.
kSMVidMPrxSTUNResultTimeout
No response was received.
error_code
The value of the first ERROR-CODE attribute, or zero if no such attribute is present.
address_type
The type of the reflexive address in the response. One of these values:
kSMAddressTypeIPv4
An IPv4 address is present.
kSMAddressTypeIPv6
An IPv6 address is present.
address
ipv4
The reflexive IPv4 address. Only valid when address_type is kSMAddressTypeIPv4.
ipv6
The reflexive IPv6 address. Only valid when address_type is kSMAddressTypeIPv6.
port
The reflexive port.
local_was_controlling
An indication of local ICE role when the STUN bind request was sent. It is zero if the local agent was in the controlled role and non-zero otherwise.

Returns

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


This function is part of the Prosody RTP processing API.