There are a number of circumstances in which one might wish to carry multiple media flows within a single RTP data payload between two points. The two most important cases are: IP paths between Internet Telephony Gateways; special hardware devices such as CODECs with non-negotiable multiplexed media.
There are at least two ways to multiplex data in RTP packets. One could (e,g. in the telephony case) assume that all the samples have the same payload types, and are just offset in different end-to-end flows. Here we need a mapping table in the gateways, that indicates the offset for each payload type and a list of the flows in each packet. The second approach might be a more generic one suggested by Mark Handley recently in work in progress, which is to adapt the ideas from the previous section concerning RTP header compression and to allow for multiple compressed headers within a single RTP packet, one for each of the samples. This latter approach would not use precisely the same compression algorithm, since the fields differ for different reasons, but would permit multiple different media to be efficiently encapsulated in a single packet. This might address both types of application of RTP multiplexing more effectively.