A method of preparing data streams to facilitate seamless switching by a
switching device to produce an output data stream without any switching
artifacts. Bi-directional switching between any plurality of data streams
is supported The data streams are divided into segments, wherein the
segments include synchronized starting points and end points. The data
rate is increased before an end point of a segment. Gaps may be inserted
between the segments. Increasing the data rate can include increasing a
bandwidth of the plurality of data streams, for example by multiplexing,
or compressing the data. The present invention can be used with media
data streams, for example with MPEG encoded transport streams.