| 32 | ---- |
| 33 | |
| 34 | == Implementation Notes == #changes |
| 35 | |
| 36 | === Changes in Media Transport Interface === |
| 37 | |
| 38 | Since the availability of SRTP changes contents of SDP (Session Description Protocol) and the SDP negotiation, we need to add new interfaces in PJMEDIA transport API to allow media transport to modify and negotiate SDP. Incidently this would work well with ICE too (previously we treat ICE as a special kind of media transport so it is treated differently, but with this new interfaces, all media transports will behave uniformly (anyway that's what API abstraction is for!)). |
| 39 | |
| 40 | New interfaces in media transport are as follows (please consult the PJMEDIA transport documentation for more info): |
| 41 | |
| 42 | media_create:: |
| 43 | This callback is called by application (or PJSUA-LIB) to allow the media transport to add more information in the SDP offer, before the offer is sent to remote. Additionally, for answerer side, this callback allows the media transport to reject the offer from the remote before this offer is processed by the SDP negotiator. |
| 44 | media_start:: |
| 45 | This callback is called after offer and answer are negotiated, and before the media is started. For answerer side, this callback will be called before the answer is sent to remote, to allow media transport to put additional info in the SDP. The media transport also has the final chance to negotiate the offer and answer before media is really started. |
| 46 | media_stop:: |
| 47 | This callback is called when the media is stopped, to allow the media transport to release its resources. |
| 48 | simulate_lost:: |
| 49 | This has nothing to do with SRTP, but since all media transports support this feature (packet loss simulation), we add this as a new interface. |
| 50 | |
| 51 | |
| 52 | === pjmedia_transport_srtp Implementation === |
| 53 | |
| 54 | ---- |
| 55 | |