Visual Processor prototype

link data -> visuals with common processing pipeline, chainable
This commit is contained in:
Charles J. Cliffe 2015-07-27 21:20:44 -04:00
parent 924f519d42
commit a8e24d5537
3 changed files with 44 additions and 0 deletions

View File

@ -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

View File

@ -0,0 +1 @@
#include "VisualProcessor.h"

View File

@ -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;
};