The following video-enhanced MSPP structures work with video RTP endpoints in the Video Messaging Server:
Use this structure to set configuration parameters for audio and video endpoints. The MSP_ENDPOINT_PARMS structure is used by mspCreateEndpoint.
The parameters that you specify in the MSP_ENDPOINT_PARMS structure depend on the type of endpoint you create. For example, if you create an MPEG-4 or H.263 video endpoint for IPv4, use the RTPRTCP_ENDPOINT_PARMS structure as a parameter for MSP_ENDPOINT_PARMS. If you create a video endpoint for IPv6, use the RTPRTCP_V6_ENDPOINT_PARMS structure as a parameter for MSP_ENDPOINT_PARMS.
typedef struct tag_MSP_ENDPOINT_PARMS
{
DWORD size; // size of MSP_ENDPOINT_PARAMS)
DWORD eParmType; // MSP_ENDPOINT_DS0, MSP_ENDPOINT_RTPFDX, etc
union
{
DS0_ENDPOINT_PARMS DS0;
PKTMEDIA_ENDPOINT_PARMS Pktmedia;
MONITOR_ENPOINT_PARMS Monitor;
RTPRTCP_ENDPOINT_PARMS RtpRtcp;
UDP_ENDPOINT_PARMS Udp;
T38UDP_ENDPOINT_PARMS T38Udp;
TPKT_ENDPOINT_PARMS Tpkt;
MUX_ENDPOINT_PARMS Mux;
UNDEFINED_ENDPOINT_PARMS Undefined;
// Structure may be expanded to define new Endpoints
RTPRTCP_V6_ENDPOINT_PARMS RtpRtcpV6
UPD_V6_ENDPOINT_PARMS UdpV6
} EP;
} MSP_ENDPOINT_PARAMETER;
For more information about mspCreateEndpoint, see the MSPP Service Developer's Reference Manual.
Use this structure to enable or disable the calculation of skew values based on incoming RTCP sender reports and RTP packets for full-duplex and simplex receive endpoints. This structure is used for both audio and video endpoints.
This structure is used with the MSP_CMD_RTPFDX_CALC_SKEW_OFFSET command, which is described in Configuring endpoints to use audio/video synchronization.
typedef struct {
U32 enable; // Set 4th bit to: 0=disable; 1=enable
} msp_ENDPOINT_RTPFDX_ENABLE_SKEW_CALC;
Field |
Default |
Description |
---|---|---|
enable |
0 |
Controls skew value calculations. Valid values are:
Use the RTCP_ENABLE_RCV_SKEW_CALC macro to set the appropriate bit. For more information, see MSP_ENDPOINT_PARMS. |
Use this video-specific structure to set a video skew value to be signaled in RTCP sender report packets for full-duplex and simplex send video RTP endpoints.
This structure is used with the MSP_CMD_RTPFDX_VIDEO_SKEW_TIME command, which is described in Enabling RTP endpoints to send video skew values to the IP destination.
typedef struct {
U32 vidSkew; // Set value to 0-4095ms in 5th-16th bits
} msp_ENDPOINT_RTPFDX_SET_VID_SKEW;
Field |
Default |
Description |
---|---|---|
vidSkew |
0 |
Video skew value in ms, using the 5th-16th bits of the DWORD. Valid values are 0 to 4095 ms. Use the RTCP_VIDEO_SKEW macro to set the appropriate skew value. If the skew value indicates video lead time, as opposed to video lag time, use the RTCP_VIDEO_LEADS_AUDIO macro as well. For more information about these macros, see RTPRTCP_ENDPOINT_PARMS. For more information about audio/video synchronization, see Configuring endpoints to use audio/video synchronization. |
Use this structure to set configuration parameters for an RTP IPv4 endpoint. This structure is used as a parameter for the MSP_ENDPOINT_PARMS structure, which is used with mspCreateEndpoint.
typedef struct tag_RTPRTCP_ENDPOINT_PARMS
{
DWORD size;
// QoS parameters
BYTE TypeOfService; // Default = 0, type of service in IP header
DWORD startRtcp; // Set this to non-zero to start RTCP
// session. RTCP_SESSION_PARMS structure must be
// filled in for the RTCP session
/* RTCP parameters */
RTCP_SESSION_PARMS rtcpParms;
DWORD RtpTsFreq; // Default=8000, timestamp frequency
// For a Video Endpoint, RtpTsFreq is fixed to 90000
// and cannot be modified
DWORD Session_bw; // Default=64000, session bandwidth
DWORD dtmf_event_control; // Control DTMF RTP Event generation
DWORD frameQuota; // RTP Assembly frame quota
// For a Video Endpoint, frameQuota is fixed to 1
// and cannot be modified
DWORD linkEvents; // Controls link events
RTP_PAYLOAD_MAP PayloadMap;
} RTPRTCP_ENDPOINT_PARMS;
Note: For more information on the RTCP_SESSION_PARMS structure, refer to the MSPP Service Developer's Reference Manual.
When using RTCP for audio/video synchronization purposes, the startRtcp parameter is used as a bit field containing several definitions. The following macros can be used to set the bits in the startRtcp field:
#define RTCP_ENABLE(x) (x)=1 //Sets value to 1
#define RTCP_SET_0_INTERVAL(x) ((x) | 2) //Sets 2nd bit
#define RTCP_VIDEO_LEADS_AUDIO(x) ((x) | 4) //Sets 3rd bit
#define RTCP_ENABLE_RCV_SKEW_CALC(x) ((x) | 8) //Sets 4th bit
#define RTCP_VIDEO_SKEW(x,y) ((x) | (((y) & 0x0fff) << 4))
//Sets 5th to 16th bits to value of y (max of 4095)
The following table describes how to use these macros to set bits in the startRtcp field:
Use this macro... |
To set this bit... |
Description |
RTCP_ENABLE |
0 |
Enables RTCP for an endpoint. Use this macro for both endpoints of the audio/video stream pair to be synchronized. |
RTCP_SET_0_INTERVAL |
1 |
Determines how quickly the RTCP Sender Report is sent:
Use this macro for both endpoints of the audio/video stream pair to be synchronized. NMS recommends that you always use this macro. |
RTCP_VIDEO_LEADS_AUDIO |
2 |
(Video endpoints only) Signals to the video endpoint whether the video data stream leads or lags the audio data stream. Set this bit to 1, if it is known that the skew between transmitted video and transmitted audio for a synchronization stream pair is such that video leads audio. Otherwise, do not use this macro. |
RTCP_ENABLE_RCV_SKEW_CALC |
3 |
Calculates an offset value that can be sent to the application as an unsolicited event, MSPEVN_SKEW_OFFSET. Use this macro for both endpoints of the audio/video stream pair to be synchronized. To determine the skew between audio and video, compare the returned offset values of the endpoints of the stream pair. |
RTCP_VIDEO_SKEW |
4 - 15 |
Sets a value between 0 and 4095 ms of video skew that will be communicated to the IP destination by RTCP Sender Reports. |
If the application enables RTCP reports through the startRtcp parameter in the RTPRTCP_ENDPOINT_PARMS structure, it must also include the following substructure:
typedef struct RTCP_RTCP_SESSION_PARMS
{
DWORD forwardPkts;
char cname[32];
char name[32];
char email[32];
char phone[32];
char location[32];
char tool[32];
char note[32];
} RTCP_SESSION_PARMS;
For more information about:
Using RTCP for audio/video synchronization purposes, see Configuring endpoints to use audio/video synchronization.
Creating endpoints, see Creating endpoints.
mspCreateEndpoint, see the MSPP Service Developer's Reference Manual.
Use this structure to set configuration parameters for an RTP IPv6 endpoint. This structure is used as a parameter for the MSP_ENDPOINT_PARMS structure, which is used with mspCreateEndpoint.
typedef struct tag_RTPRTCP_V6_ENDPOINT_PARMS
{
DWORD size;
BYTE trafficClass; // Indicates the class or priority of the IPv6 packet
DWORD flowLabel; // Indicates the specific sequence the IPv6 packet belongs to
DWORD startRtcp; // Set this to non-zero to start RTCP
// session. RTCP_SESSION_PARMS structure must be
// filled in for the RTCP session
/* RTCP parameters */
RTCP_SESSION_PARMS rtcpParms;
DWORD RtpTsFreq; // Default=8000, timestamp frequency
DWORD Session_bw; // Default=64000, session bandwidth
DWORD dtmf_event_control; // Control DTMF RTP Event generation
DWORD frameQuota; // RTP Assembly frame quota
DWORD linkEvents; // Controls link events
RTP_PAYLOAD_MAP PayloadMap;
} RTPRTCP_V6_ENDPOINT_PARMS;
When using RTCP for audio/video synchronization purposes, the startRtcp parameter is used as a bit field containing several definitions.
For more information about:
Using the startRtcp parameter, see RTPRTCP_ENDPOINT_PARMS.
Creating endpoints, see Creating endpoints.
mspCreateEndpoint, see the MSPP Service Developer's Reference Manual.