mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-04 16:31:15 -05:00
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
|
||||
|
1
src/process/VisualProcessor.cpp
Normal file
1
src/process/VisualProcessor.cpp
Normal file
@ -0,0 +1 @@
|
||||
#include "VisualProcessor.h"
|
41
src/process/VisualProcessor.h
Normal file
41
src/process/VisualProcessor.h
Normal 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;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user