wiki:JBuf_Spec

Version 2 (modified by bennylp, 15 years ago) (diff)

--

Jitter Buffer Specification

Table of Contents

  1. Specifications
    1. Continuous flow
    2. Adaptive to jitter change
    3. Low latency
    4. Duplicate/old frame
    5. Non octet-aligned
    6. Sequence number jump/restart
    7. DTX
    8. Minimum prefetching
    9. Fixed mode operation

This short article describes the specification for the jitter buffer.


Specifications

Continuous flow

The main function of a jitter buffer is to ensure that it's user receive as continuous as possible flow of incoming frames regardless of the jitter in the incoming packet arrival time. The jitter buffer MUST provide this function.

Adaptive to jitter change

The jitter buffer MUST be able to adapt to change in network jitter, increasing or decreasing the prefetch value as necessary.

Low latency

The jitter buffer MUST attempt to provide the minimum buffering possible on the incoming packet (without sacrificing the continuous flow requirement above), to minimize latency.

Duplicate/old frame

The jitter buffer MUST be able to detect the arrival of duplicate or old frame.

A duplicate frame is a frame which has the same frame number of an existing frame in it's buffer. In this case, the handling depends on the value of discarded argument in pjmedia_jbuf_put_frame2() function:

  • if non-zero (TRUE), jitter buffer MUST ignore the duplicate frame and set the discarded argument of pjmedia_jbuf_put_frame2().
  • if FALSE, the jitter buffer will override the old frame with this newer frame.

An old frame is a frame which sequence number is older than what is currently "played" (returned by the jitter buffer to it's user). Old frame is always discarded, and discarded argument of pjmedia_jbuf_put_frame2() function will be set.

Non octet-aligned

The jitter buffer MUST be able to store frames that are not octet/byte aligned.

Sequence number jump/restart

The jitter buffer MUST be able to detect large jump in sequence number and restart it's state.

DTX

The jitter buffer MUST be able to handle discontinuous transmission (DTX) without triggering restart. Note that user MAY use RTP timestamp or sequence number as frame sequence number of the jitter buffer frames, hence DTX MAY or MAY NOT be reflected with a jump in the frame sequence number.

Minimum prefetching

The jitter buffer MUST obey the minimum prefetching value as set by it's user.

Fixed mode operation

The jitter buffer MUST be able to operate in fixed/non-adaptive mode. This can be done by calling pjmedia_jbuf_set_fixed() function.