# Ensuring a smooth transition when the video source changes

Ensure a smooth transition when the video source changes by stopping the video transmission in the direction of the PSTN after the current frame has been fully received. This ensures that the 3G-324 Interface sends the video data to the remote terminal at a frame boundary.

After you receive confirmation that the video transmission has been stopped (through the MSPEVN_VIDEO_RX_STOPPED event), you can safely disable the RTP endpoint, if necessary.

Note: This feature is for full-duplex and simplex receive H.263 RTP endpoints only. The procedure and example are shown for full-duplex endpoints.

To ensure a smooth transition when the video source changes, create the MSP_CMD_RTPFDX_STOP_VIDEO_RX command, and send it to the CG board. This command has no associated structures.

For more information see Creating and sending MSPP commands.

The following events can be returned:

Event | Description
MSPEVN_SENDCOMMAND_DONE | The MSP_CMD_RTPFDX_STOP_VIDEO_RX command was successfully sent to the specified RTP endpoint on the CG board.
MSPEVN_VIDEO_RX_STOPPED | Indicates one of the following: A frame boundary has been detected in the video flowing through the RTP endpoint from the IP side to the MUX, after the application issued the MSP_CMD_RTPFDX_STOP_VIDEO_RX command. The video RTP endpoint timed out awaiting a frame boundary after the application issued the MSP_CMD_RTPFDX_STOP_VIDEO_RX command.

#### Example

The following example shows how to stop video transmission for the endpoint with the MSP handle ephd:

ret = mspSendCommand(ephd, mspBuildCommand(MSP_ENDPOINT_RTPFDX_VIDEO_H263,
MSP_CMD_RTPFDX_STOP_VIDEO_RX), NULL, 0);
ret = WaitForSpecificEvent(gw, ctaQueueHd,
(MSPEVN_SENDCOMMAND_DONE |
MSP_CMD_RTPFDX_STOP_VIDEO_RX),
&event );
ret = WaitForSpecificEvent(gw, ctaQueueHd,
MSPEVN_VIDEO_RX_STOPPED,
&event );