RTP Demux Filters

[This is preliminary documentation and subject to change.]

The RTP Demux Filter is used to demultiplex RTP packets received from a multicast conference into separate streams. It also serves as a point of control through which the application can select which streams are important (and thus are rendered) and which are not. This filter exposes a single input pin, which is of type MEDIATYPE_RTP_Multiple_Stream/MEDIASUBTYPE_RTP_Payload_Mixed. It can expose an application-configured number of output pins, each of which is of payload type MEDIATYPE_RTP_Single_Stream/MEDIASUBTYPE_RTP_Payload_XXXX.

Each output pin corresponds to a single sender in an RTP session, which must be transmitting RTP packets whose PT value matches the assigned media subtype of the pin. The quantity of pins and the assignment of each pin to a particular sender are determined by the application.

The number of pins and their media types may only be set when the filter is in a stopped state. However, the assignment of each stream to a particular pin may be changed dynamically.

This solves the problem of changing media types within a particular stream, in that a particular Demux filter could have two different MEDIASUBTYPE_RTP_Payload_XXXX type output pins. For example, one pin might be configured for MEDIASUBTYPE_RTP_Payload_G711 and one for MEDIASUBTYPE_RTP_Payload_G723. Each would be connected to the appropriate RTP Receive Payload Handler (RPH) filter followed by a decoder and other necessary filters. If a sender that was transmitting a stream of type G.711 changed PT to G.723, it would be possible to change the pin. Its RTP packets are delivered to ensure that the packets are given to the correct payload handler. As no reconnection of filters would be necessary, this can be done without stopping the filter graph.

Some pins may be not be assigned to any particular stream. These pins may be used by the application as a pool to dynamically assign the stream to pins. Sporadic speakers in a large conference can then be rendered without forcing allocation of separate codecs and renderers for each speaker. To further support this feature, the RTP Demux filter can be configured to automatically map new streams to available pins with the appropriate media type.

This filter uses DirectShow notifications to indicate to the application when new SSRCs have been arrived. This filter also indicates automatic mapping of new streams to pins and later unmapping (due to timeouts) of streams via the same methods.