mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2026-06-05 15:35:01 -04:00
tex update lock, VisualData"Re"Distributor
This commit is contained in:
@@ -107,3 +107,25 @@ protected:
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<class OutputDataType = ReferenceCounter>
|
||||
class VisualDataReDistributor : public VisualProcessor<OutputDataType, OutputDataType> {
|
||||
protected:
|
||||
void process() {
|
||||
while (!VisualProcessor<OutputDataType, OutputDataType>::input->empty()) {
|
||||
if (!VisualProcessor<OutputDataType, OutputDataType>::isAnyOutputEmpty()) {
|
||||
return;
|
||||
}
|
||||
OutputDataType *inp;
|
||||
VisualProcessor<OutputDataType, OutputDataType>::input->pop(inp);
|
||||
|
||||
if (inp) {
|
||||
OutputDataType *outp = buffers.getBuffer();
|
||||
(*outp) = (*inp);
|
||||
inp->decRefCount();
|
||||
VisualProcessor<OutputDataType, OutputDataType>::distribute(outp);
|
||||
}
|
||||
}
|
||||
}
|
||||
ReBuffer<OutputDataType> buffers;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user