Not Applicable
The present invention relates to packet switching in data communications networks and more particularly, to a method and apparatus for selectively processing and forwarding received packets in a media processor to reduce latency.
Packet based media processors are deployed to operate on packets of sampled, and sometimes compressed, media data being transmitted across packet switched networks. The types of media contained in the packets can include samples of voice, music, telephony signaling tones and modem signals. In many applications, the packets originate and terminate at gateway and endpoint devices that interface the packet switched networks to the synchronous circuit switched network. The gateway and endpoint devices are generally designed to perform certain functions required in packet-based media communications, such as de-jittering, line echo cancellation, decoding and sample clock regeneration.
Due to the nature of packet switched networks, it is not possible to ensure the arrival rate, arrival sequence, or even arrival itself of all packets in a particular media stream. The possibilities of uneven arrival rate (referred to as “jitter”), out-of-sequence arrival, and non-arrival or loss of packets create problems in re-creating the synchronous sampled media at a receiver such as a gateway or endpoint. Uncompensated jitter can result in significant distortion of the re-created media stream. Additionally, in most cases it is not practical to decode packets out of order or to ignore lost or late packets without degradation in perceived audio quality, for example, or bit errors in facsimile or data signals. Therefore, endpoint devices are typically forced to somehow compensate for these undesirable characteristics of the stream.
One common compensation technique is to employ buffering to smooth out the timing variations and sequence gaps of a received packet media stream. Received packets are placed into a buffer, termed a “jitter buffer”, in an asynchronous manner as they are received, and removed from the buffer at a constant rate to achieve the desired fidelity in re-creating the original analog signal. The buffer must be large enough to provide sufficient timing elasticity to enable fixed-rate removal of packets for specified worst-case values of jitter and mis-ordering. The buffer is generally filled to a specified depth before the fixed-rate removal of packets is initiated, to minimize the potential for buffer underflow during times of greater-than-nominal packet spacing. This initial filling represents a fixed delay experienced by the media that is never recovered.
For voice data traveling through packet switched networks, users are able to perceive a delay approaching 200 milliseconds, which is typically associated for example with very long distance circuit switched calls. If the delay is more than 200 milliseconds, it can begin to affect the natural feeling and dynamics of the conversation. Because of the duplex and bursty nature of voice, it may be acceptable to occasionally drop packets that may be late without affecting the overall perceived quality of the call. In some cases, then, voice packets may be judiciously dropped to reduce the delay experienced by a media stream. However, this approach is limited in its effectiveness. Additionally, for other media data such as modem signals, the end-to-end delay is not as important as is the need for smoothing and preventing discontinuities in the reconstructed signal that can result from late or out of order packet arrival.
Therefore, it is important to both minimize any delay introduced by intermediate processing devices in an end-to-end routing path of a packet media stream, and to provide for the best quality reconstructed signal by re-ordering packets where necessary.
In accordance with the present invention, a method and apparatus are disclosed for handling media packets that are received out of sequence at an intermediate media processing device, referred to as a “media server”, while minimizing the latency or delay introduced by the device. In part, the disclosed method and apparatus exploit the fact that a media server need not address jitter in a media stream, because the media both enters and exits the media server in packet form. Thus a media server can address the re-ordering of out-of-sequence packets without requiring the delay associated with jitter buffers as known in the art. Media servers can provide a variety of media processing functions, including the transcoding of media from one format into another. The disclosed method and apparatus are particularly suited for use in media servers performing media processing functions that themselves require or otherwise benefit from in-order delivery of input packets.
In the disclosed method, in-sequence packets that arrive at a media server are processed immediately upon arrival. Additionally, a re-ordering buffer is checked for packets whose processing was previously deferred because they arrived out of sequence. If there are packets waiting in the buffer that are now in sequence due to the processing and forwarding of the received packet, then those in-sequence buffered packets are processed and forwarded as well. It is assumed that the packet processing is at least as fast as real time, so that the packet processor can catch up when a sequence gap is closed by the receipt of a missing packet. Once the buffer is emptied, each newly received in-sequence packet can be processed and forwarded immediately.
Upon receipt of an out-of-sequence packet, i.e., a packet that is not next in sequence after the most recently processed and forwarded packet, processing of the out-of-sequence packet is deferred. In particular, the out-of-sequence packet is placed in the re-ordering buffer. Any subsequently received packets that are also out of sequence are also stored in the buffer. As described above, these buffered packets are normally processed in order immediately after receipt and processing of the missing packet(s).
When an out-of-sequence packet is placed in the buffer, a timer is initiated for the missing packet(s). If a pre-determined time passes without receiving a missing packet, the missing packet is declared lost, and the next-in-sequence received packet is processed and forwarded toward the destination. When one or more packets is declared lost, it results in missing packets in the output stream, which normally causes some deleterious effect on the reconstructed media at the destination. It should be noted that this negative effect is no worse than what would occur with a traditional jitter buffer. Normally, however, any “missing” packets are simply delayed a minor amount and are therefore eventually received at the media server within the predetermined time, in which case the output stream contains all the output packets in sequence, with gaps and compressions in the inter-packet timing corresponding to those in the stream of input packets received by the media server. These timing variations or jitter are compensated by a jitter buffer at the destination.
Other features, aspects and advantages of the presently disclosed method and apparatus will be apparent from the Detailed Description of the Invention that follows.
The invention will be more fully understood by reference to the following Detailed Description of the Invention in conjunction with the accompanying Drawing, of which:
The packets are marked with information that establishes their respective places in the sequence of packets that constitutes the media flow. This sequence marking may be done in various ways. The media transport protocol known as Real Time Protocol (RTP), for example, has provisions for both a sequence number and a timestamp in each packet. Generally, either sequence numbering or timestamp comparisons can be used to order the packets.
As shown in
Upon subsequently receiving packet 3 before expiration of the timer, the media server determines that packet 3 is in sequence, because all preceding packets (i.e., packets 1 and 2 in the example of
The packet processing at the media server is accomplished at least at real-time speed, which is necessary if there is to be any tolerance for mis-ordering. Additionally, the re-ordering buffer is sufficiently deep to accommodate normal fluctuations in the inter-packet interval at the receiver without overflowing.
In some cases, a packet whose delayed arrival is responsible for a current sequence gap at the media server may never arrive, due to transmission errors or other network faults for example. A timer is employed to prevent the media server from waiting indefinitely for a missing packet. When an out-of-sequence packet is placed into the buffer, a timer is started for the missing packet(s). If a missing packet is received before the timer expires, then the received packet and buffered packet(s) are processed as described above. If a missing packet is not received before the timer expires, then it is declared lost, and processing begins with either the next packet in the sequence that is residing in the buffer or, if there are none in the buffer, the next packet received. No attempt is made to obtain the lost packet. Separate timers are used when multiple packets are missing simultaneously, and each timer is associated with one of the missing packets.
Referring again to
It will be appreciated that the contents of the jitter buffer vary considerably over the operational period shown in
It is possible for there to be multiple gaps in the packet sequence at the media server at a given time, in which case not all of the packets in the buffer will be in sequence. For example, if packets 3 and 5 are both delayed, the buffer may contain packets 4, 6 and 7 upon the receipt of packet 3. In such a case, packet 4 can be processed in order immediately after packet 3, because it is in sequence. The processing of buffered packets 6 and 7 must be further deferred, however, until packet 5 is either received or declared lost. If packet 5 is received, packets 5-7 are processed and forwarded in order; if packet 5 is declared lost, then only packets 6-7 are processed and forwarded. It should be noted that during the time that both packet 3 and packet 5 are missing, separate timers are running to track the amount of time spent waiting for the respective missing packet.
It will be apparent to those skilled in the art that modifications to and variations of the disclosed methods and apparatus are possible without departing from the inventive concepts disclosed herein, and therefore the invention should not be viewed as limited except to the full scope and spirit of the appended claims.
This application claims priority under 35 U.S.C. §119(e) to U.S. Provisional Patent Application No. 60/322,369 filed Sep. 14, 2001.
| Number | Name | Date | Kind |
|---|---|---|---|
| 4890222 | Kirk | Dec 1989 | A |
| 5237695 | Skokan et al. | Aug 1993 | A |
| 5384563 | Massey | Jan 1995 | A |
| 5404353 | Ben-Michael et al. | Apr 1995 | A |
| 5566180 | Eidson et al. | Oct 1996 | A |
| 5648970 | Kapoor | Jul 1997 | A |
| 5740174 | Somer | Apr 1998 | A |
| 5754754 | Dudley et al. | May 1998 | A |
| 5844890 | Delp et al. | Dec 1998 | A |
| 5875309 | Itkowsky et al. | Feb 1999 | A |
| 6157653 | Kline et al. | Dec 2000 | A |
| 6169732 | Hetherington et al. | Jan 2001 | B1 |
| 6215789 | Keenan et al. | Apr 2001 | B1 |
| 6236623 | Read et al. | May 2001 | B1 |
| 6246702 | Fellman et al. | Jun 2001 | B1 |
| 6272131 | Ofek | Aug 2001 | B1 |
| 6272151 | Gupta et al. | Aug 2001 | B1 |
| 6359899 | Krishnakumar et al. | Mar 2002 | B1 |
| 6363065 | Thornton et al. | Mar 2002 | B1 |
| 6370159 | Eidson | Apr 2002 | B1 |
| 6374336 | Peters et al. | Apr 2002 | B1 |
| 6377573 | Shaffer et al. | Apr 2002 | B1 |
| 6377579 | Ofek | Apr 2002 | B1 |
| 6389010 | Kubler et al. | May 2002 | B1 |
| 6389468 | Muller et al. | May 2002 | B1 |
| 7061913 | Abrol et al. | Jun 2006 | B1 |
| 20020031126 | Crichton et al. | Mar 2002 | A1 |
| Number | Date | Country | |
|---|---|---|---|
| 20030053461 A1 | Mar 2003 | US |
| Number | Date | Country | |
|---|---|---|---|
| 60322369 | Sep 2001 | US |