Patent ID: 7539792

Claim:
A stream data buffer device suitable for a client program to access or store a stream data, comprising: a buffer having N numbered sub-buffers to store the stream data; a buffer agent having a sub-buffer table recording a state of a corresponding sub-buffer, wherein the state comprising a first state and a second state; and a FIFO queue to record numbers of the sub-buffers having the fist state, wherein when the client program receives and stores the stream data to the stream data buffer, the client program requests the buffer agent for a first sub-buffer having the second state to store the stream data, and after storage, the buffer agent changes the state of the first sub-buffer from the second state to the first state and transmits the number of the first sub-buffer to the FIFO queue; when a number of a second sub-buffer having the first state is available, the client program pops the number of the second sub-buffer out of the FIFO queue and accesses the data thereof, and the buffer agent changes the state of the second sub-buffer from the first state to the second state.