Visual Processor prototype
link data -> visuals with common processing pipeline, chainable
This commit is contained in:
parent
924f519d42
commit
a8e24d5537
|
@ -257,6 +257,7 @@ SET (cubicsdr_sources
|
|||
src/visual/SpectrumContext.cpp
|
||||
src/visual/WaterfallCanvas.cpp
|
||||
src/visual/WaterfallContext.cpp
|
||||
src/process/VisualProcessor.cpp
|
||||
src/ui/GLPanel.cpp
|
||||
external/rtaudio/RtAudio.cpp
|
||||
external/lodepng/lodepng.cpp
|
||||
|
@ -304,6 +305,7 @@ SET (cubicsdr_headers
|
|||
src/visual/SpectrumContext.h
|
||||
src/visual/WaterfallCanvas.h
|
||||
src/visual/WaterfallContext.h
|
||||
src/process/VisualProcessor.h
|
||||
src/ui/GLPanel.h
|
||||
src/ui/UITestCanvas.cpp
|
||||
src/ui/UITestCanvas.h
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
#include "VisualProcessor.h"
|
|
@ -0,0 +1,41 @@
|
|||
#pragma once
|
||||
|
||||
#include "CubicSDRDefs.h"
|
||||
#include "ThreadQueue.h"
|
||||
|
||||
typedef ThreadQueue<ReferenceCounter *> VisualDataQueue;
|
||||
|
||||
class VisualProcessor {
|
||||
public:
|
||||
void setInput(VisualDataQueue *vis_in) {
|
||||
// set input queue
|
||||
}
|
||||
|
||||
void attachOutput(VisualDataQueue *vis_out) {
|
||||
// attach an output queue
|
||||
}
|
||||
|
||||
void removeOutput(VisualDataQueue *vis_out) {
|
||||
// remove an output queue
|
||||
}
|
||||
|
||||
void pushInput(ReferenceCounter *input) {
|
||||
// push input data
|
||||
}
|
||||
|
||||
virtual void process() {
|
||||
// process input to output
|
||||
// distribute(output);
|
||||
}
|
||||
|
||||
protected:
|
||||
void distribute(ReferenceCounter *output) {
|
||||
// distribute outputs
|
||||
}
|
||||
|
||||
VisualDataQueue * input;
|
||||
std::vector<VisualDataQueue *> outputs;
|
||||
|
||||
std::mutex busy_update;
|
||||
};
|
||||
|
Loading…
Reference in New Issue