Set the timestamp frequency for an RTP endpoint by changing the rtpTsFreq parameter in the MSP_CMD_RTPFDX_CONFIG command.
The default timestamp frequency is 90,000 Hz. To set a frequency value other than the default, use a value other than zero or all ones (0xFFFFFFFF).
Note: This feature is for all video full-duplex and simplex send RTP endpoints. The procedure and example are shown for full-duplex endpoints.
The following table describes how to set timestamp frequencies:
|
Step |
Action |
|
1 |
Disable the RTP endpoint by invoking mspDisableEndpoint. |
|
2 |
Create the MSP_CMD_RTPFDX_CONFIG command, and send it to the CG board. The MSP_CMD_RTPFDX_CONFIG command uses the standard MSPP msp_ENDPOINT_RTPFDX_CONFIG structure to set the timestamp frequency. For more information, see Creating and sending MSPP commands and the MSPP Service Developer's Reference Manual. |
|
3 |
Enable the RTP endpoint by invoking mspEnable. |
The following event can be returned:
|
Event |
Description |
|
MSPEVN_SENDCOMMAND_DONE |
MSP_CMD_RTPFDX_CONFIG command was successfully sent to the specified RTP endpoint on the CG board. |
The following example shows how to set the timestamp frequency for an RTP endpoint with the MSP handle ephd:
msp_ENDPOINT_RTPFDX_CONFIG mConfig;
CTA_EVENT event;
DWORD ret, expectedEvent
memset(&mConfig, 0xFF, sizeof(mConfig));
mConfig.rtpTsFreq = H2NMS_DWORD(97000) ;
ret = mspDisableEndpoint(ephd);
ret = mspSendCommand(ephd, mspBuildCommand(MSP_ENDPOINT_RTPFDX_VIDEO_H263,
MSP_CMD_RTPFDX_CONFIG), &mConfig, sizeof(mConfig));
if (ret != SUCCESS)
printf("\n\t ERROR: mspSendCommand returned failure.\n");
expectedEvent = (MSPEVN_SENDCOMMAND_DONE | MSP_CMD_RTPFDX_CONFIG);
if (WaitForSpecificEvent(gw, ctaQueueHd, expectedEvent, &event) != 0)
printf("\n\tERROR: mspSendCommand failed to send valid completion event\n");
ret = mspEnableEndpoint(ephd);