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 SetPrePostProcessingRegisterCallback()
method
to register your callbacks. After registration, the callback behaviour
is as follows:
The RTP stack
calls the appropriate preprocessing callback, PreRtpProcessing()
or PreRtcpProcessing()
, after data is
received from the socket and before processing RTP headers.
The RTP stack
calls the appropriate postprocessing callback, PostRtpProcessing()
or PostRtcpProcessing()
, after completing
an RTP or RTCP packet and before sending it to the socket.