Confirmed users
398
edits
m (→Data and APIs) |
No edit summary |
||
| Line 39: | Line 39: | ||
virtual int recvAck(Buffer *buf) { return -1; } | virtual int recvAck(Buffer *buf) { return -1; } | ||
virtual int recvNak(Buffer *buf) { return -1; } | virtual int recvNak(Buffer *buf) { return -1; } | ||
void doneBuffer(Buffer *buf); // The processor have done on this buffer. | |||
Queue *queue; | Queue *queue; | ||
| Line 94: | Line 96: | ||
void *payload; // payload can be separated from Buffer itself, so we can apply Buffer to GL buffers...,etc. | void *payload; // payload can be separated from Buffer itself, so we can apply Buffer to GL buffers...,etc. | ||
}; | }; | ||
== Life of Buffers == | |||
Buffers are always(?) created by a BufferCreator requested by the associated queue. Once a buffer is created, it supposed to be sent to off-streams. The life of a buffer is managed by queues that the buffer pass. The processors of all queues should call QueueProcessor::doneBuffer() for every buffer to indicate they never need the buffer any more. Buffers will be free when all don't need them any more. | |||
== Configuration of Queues == | == Configuration of Queues == | ||