Securing RTP with SRTP

This topic explains how to use callbacks to secure RTP communications.

If you have registered preprocessing and postprocessing callbacks, the RTP stack calls them when sending or receiving RTP data. Therefore, your application can implement Secure RTP by adding encryption and authentication steps after reception and before sending.

Your callback class must derive from MPrePostProcessingCallback and implement its four methods. Call the [[[ERROR: [NOKX000E] Unable to find definition for key reference 'RRtpSession']]]SetPrePostProcessingRegisterCallback() method to register your callbacks. After registration, the callback behaviour is as follows:

  • The RTP stack calls the appropriate preprocessing callback, [[[ERROR: [NOKX000E] Unable to find definition for key reference 'RRtpSession']]]PreRtpProcessing() or [[[ERROR: [NOKX000E] Unable to find definition for key reference 'RRtpSession']]]PreRtcpProcessing(), after data is received from the socket and before processing RTP headers.

  • The RTP stack calls the appropriate postprocessing callback, [[[ERROR: [NOKX000E] Unable to find definition for key reference 'RRtpSession']]]PostRtpProcessing() or [[[ERROR: [NOKX000E] Unable to find definition for key reference 'RRtpSession']]]PostRtcpProcessing() , after completing an RTP or RTCP packet and before sending it to the socket.

Related concepts