  We study near optimal error correction codes for real-time communication. In
our setup the encoder must operate on an incoming source stream in a sequential
manner, and the decoder must reconstruct each source packet within a fixed
playback deadline of $T$ packets. The underlying channel is a packet erasure
channel that can introduce both burst and isolated losses.
  We first consider a class of channels that in any window of length ${T+1}$
introduce either a single erasure burst of a given maximum length $B,$ or a
certain maximum number $N$ of isolated erasures. We demonstrate that for a
fixed rate and delay, there exists a tradeoff between the achievable values of
$B$ and $N,$ and propose a family of codes that is near optimal with respect to
this tradeoff. We also consider another class of channels that introduce both a
burst {\em and} an isolated loss in each window of interest and develop the
associated streaming codes.
  All our constructions are based on a layered design and provide significant
improvements over baseline codes in simulations over the Gilbert-Elliott
channel.
