Encapsulating cells includes receiving cells at a queue associated
with decision points. Each decision point corresponds to a number of cells and
is associated with a threshold criterion. The following operations are repeated
until a threshold criterion is satisfied. A number of cells corresponding to a
decision point are accumulated at the queue. Jitter associated with the cells at
the queue is predicted, and it is determined whether the predicted jitter satisfies
the threshold criterion associated with the decision point. If the predicted jitter
satisfies the threshold criterion, the cells are sent to a buffer coupled to the
queue. Otherwise, the cells continue to be accumulated at the queue. The cells
in the buffer are encapsulated.