A method and apparatus for recording digital data streams. When a digital broadcast
data stream received by a set top box is transmitted through a communication interface
such as an IEEE-1394 bus to a streamer, program clock references contained in the
data stream become different from the actual arrival time of the digital data stream
because of different clock frequencies of the digital data stream and communication
interface. The difference is compensated before the digital data stream is recorded
on the streamer. The method in accordance with the present invention comprises
detecting program clock references contained in received digital transport stream
packets, creating the transport time reference of each transport stream packet
based upon the detected program clock references and arrival times of the transport
stream packets, and creating transport stream units by adding each of the created
transport time reference to the associated transport stream packet.