A data stream inputted to the inventive system from the outside is
supplied to a PID (packet ID) extracting circuit 1, in which a PID is
detected from a transport stream TS regardless of whether the transport
stream TS is a full transport stream TS or a partial transport stream TS.
The PID extracting circuit 1 transmits the thus extracted PID and data
stream to a TS replacing/deleting circuit 2. The TS replacing/deleting
circuit 2 has n 188-byte buffers and is able to set replaced TS packets
to the buffers. A control circuit 3 such as a CPU (central processing
unit) designates m PIDs relative to the respective buffers and designates
the respective PIDs as the PID of the packet to be deleted or the PID of
the packet to be replaced. Then, the TS replacing/deleting circuit 2
compares the PID received from the PID extracting circuit 1 with the PID
designated by the control circuit 3. If they are identical to each other,
then the PID that is set to be replaced is replaced and the PID that is
set to be deleted is deleted. Thus, the packet indicative of attribute of
data can be replaced satisfactorily.