3.1.5.12.1 Processing of RTP Packets When FEC Is Used

The RTP packet MUST be added to the tail of RTP-Queue.

If the current number of packets in RTP-Queue exceeds the value of RTP-Queue-Limit, then the RTP packet at the head of RTP-Queue MUST be removed from RTP-Queue and processed according to the rules in section 3.1.5.12.2.

For every RTP packet in RTP-Queue that contains FEC data, the client SHOULD perform the following procedure:

  • The client SHOULD use the SN Base and Mask fields of the RTP payload format header for FEC (defined in section 2.2.2.4) to determine the Sequence Number field (defined in [RFC3550] section 5.1) values of RTP packets that were used in generating the FEC RTP packet. The collection of Sequence Number field values thus determined is referred to as the Current Span.

  • The client SHOULD search RTP-Queue for RTP packets that contain FEC data that were generated by the RTP packets in the Current Span. The packets that are found are referred to as the Current FEC Packets.

  • The client SHOULD search RTP-Queue to determine whether any of the RTP packets in the Current Span are missing.

  • If no packets in the Current Span are missing, then the client MUST remove each of the RTP packets that belong to the Current Span from RTP-Queue, and process each of them according to the rules in section 3.1.5.12.2; the Current FEC Packets MUST be discarded without processing.

  • If one or more of the RTP packets in the Current Span are missing, then recovery by using the Vandermonde Matrix Algorithm (section 2.2.2.2) is possible if the count of Current FEC Packets is greater than or equal to the count of RTP packets that are missing from the Current Span. If recovery is possible, the client SHOULD use the Vandermonde Matrix Algorithm (section 2.2.2.2) to reconstruct the missing RTP packets. Then, the client MUST remove each of the RTP packets that belong to the Current Span from RTP-Queue and process each one of them as well as any RTP packets that were reconstructed, according to the rules in section 3.1.5.12.2, and the Current FEC Packets MUST be discarded without processing.