PiPo - Plugin Interface for Processing Objects
|
Classes | |
class | Attr |
class | EnumAttr |
PiPo enumerator attribute base class. More... | |
class | Parent |
Public Types | |
enum | Type { Undefined, Bool, Enum, Int, Float, Double, String } |
enum | Enumerate |
Public Member Functions | |
PiPo (Parent *parent, PiPo *receiver=NULL) | |
PiPo (const PiPo &other) | |
virtual | ~PiPo (void) |
void | setParent (Parent *parent) |
Sets PiPo parent. More... | |
int | propagateStreamAttributes (bool hasTimeTags, double rate, double offset, unsigned int width, unsigned int height, const char **labels, bool hasVarSize, double domain, unsigned int maxFrames) |
Propagates a module's output stream attributes to its reciever. More... | |
int | propagateReset (void) |
Propagates the reset control event. More... | |
int | propagateFrames (double time, double weight, PiPoValue *values, unsigned int size, unsigned int num) |
Propagates a module's output frames to its reciever. More... | |
int | propagateFinalize (double inputEnd) |
Propagates the finalize control event. More... | |
PiPo * | getReceiver (unsigned int index=0) |
Gets a PiPo modules receiver (call only by the PiPo host) More... | |
virtual void | setReceiver (PiPo *receiver, bool add=false) |
Sets a PiPo modules receiver (call only by the PiPo host) More... | |
virtual int | streamAttributes (bool hasTimeTags, double rate, double offset, unsigned int width, unsigned int height, const char **labels, bool hasVarSize, double domain, unsigned int maxFrames)=0 |
Configures a PiPo module according to the input stream attributes and propagate output stream attributes. More... | |
virtual int | reset (void) |
Resets processing (optional) More... | |
virtual int | frames (double time, double weight, PiPoValue *values, unsigned int size, unsigned int num)=0 |
Processes a single frame or a block of frames. More... | |
virtual int | segment (double time, bool start) |
Signals segment start or end. More... | |
virtual int | finalize (double inputEnd) |
Finalizes processing (optinal) More... | |
void | streamAttributesChanged (Attr *attr) |
void | signalError (std::string errorMsg) |
signal error message to be output by the host More... | |
void | addAttr (PiPo *pipo, const char *name, const char *descr, Attr *attr, bool clear=false) |
Gets number of attributes. More... | |
Attr * | getAttr (unsigned int index) |
Gets PiPo attribute by index. More... | |
Attr * | getAttr (const char *name) |
Gets PiPo attribute by name. More... | |
bool | setAttr (unsigned int index, int value, bool silently=false) |
bool | setAttr (unsigned int index, int *values, unsigned int numValues, bool silently=false) |
bool | setAttr (unsigned int index, double val, bool silently=false) |
bool | setAttr (unsigned int index, double *values, unsigned int numValues, bool silently=false) |
unsigned int | getNumAttrs (void) |
Gets number of attributes. More... | |
void | cloneAttrs (PiPo *other) |
Copies current parent and attributes values. More... | |
void | cloneAttr (PiPo::Attr *attr) |
Copies current value(s) of given attribute. More... | |
enum PiPo::Enumerate |
enum PiPo::Type |
|
inline |
|
inlinevirtual |
|
inline |
Gets number of attributes.
|
inline |
Copies current value(s) of given attribute.
other | PiPo to clone |
|
inline |
Copies current parent and attributes values.
other | PiPo to clone |
|
inlinevirtual |
Finalizes processing (optinal)
PiPo module: Any implementation of this method requires a propagateFinalize() method call and returns its return value.
PiPo host: A terminating receiver module provided by a PiPo host usally simply returns 0.
inputEnd | end time of the finalized input stream |
|
pure virtual |
Processes a single frame or a block of frames.
PiPo module: An implementation of this method may call propagateFrames(), typically like this:
PiPo host: A terminating receiver module provided by a PiPo host handles the received frames and usally returns 0.
time | time-tag for a single frame or a block of frames |
weight | weight associated to frame or block |
values | interleaved frames values, row by row (interleaving channels or columns), frame by frame |
size | total size of each of all frames (size = number of elements = width * height = number of channels for audio) |
num | number of frames (number of samples for audio input) |
|
inline |
|
inline |
|
inline |
Gets number of attributes.
|
inline |
|
inline |
Propagates the finalize control event.
This method is called in the finalize() method of a PiPo module.
|
inline |
Propagates a module's output frames to its reciever.
This method is called in the frames() method of a PiPo module.
time | time-tag for a single frame or a block of frames |
weight | weight for this frame (currently unused) |
values | interleaved frames values, row by row (interleaving channels or columns), frame by frame |
size | total size of each frame (number of values = width * height) |
num | number of frames |
|
inline |
|
inline |
Propagates a module's output stream attributes to its reciever.
This method is called in the streamAttributes() method of a PiPo module.
hasTimeTags | a boolean representing whether the elements of the stream are time-tagged |
rate | the frame rate (highest average rate for time-tagged streams) |
offset | the lag of the output stream relative to the input |
width | the frame width (also number of channels or data matrix columns) |
height | the frame height (or number of matrix rows) |
labels | optional labels for the frames' channels or columns |
hasVarSize | a boolean representing whether the frames have a variable height (respecting the given frame height as maximum) |
domain | extent of a frame in the given domain (e.g. duration or frequency range) |
maxFrames | maximum number of frames in a block exchanged between two modules |
|
inlinevirtual |
Resets processing (optional)
PiPo module: Any implementation of this method requires a propagateReset() method call and returns its return value.
PiPo host: A terminating receiver module provided by a PiPo host usally simply returns 0.
|
inlinevirtual |
Signals segment start or end.
PiPo module: An implementation of this method calls propagateFrames() at the end of the segment.
In the case of two sucessive calls to segment(), the second call implitly ends the last segment.
If the module did not receive any frames - at all or since the last segment end -, the method should return 0 to the call segment(0.0, end) without calling propagateFrames(). This permits the host to check whether a module implements the segment method or not.
time | time of segment start of end |
start | flag, true for segment start, false for segment end |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
|
inline |
signal error message to be output by the host
|
pure virtual |
Configures a PiPo module according to the input stream attributes and propagate output stream attributes.
PiPo module: Any implementation of this method requires a propagateStreamAttributes() method call and returns its return value, typically like this:
PiPo host: A terminating receiver module provided by a PiPo host handles the final output stream attributes and usally returns 0.
hasTimeTags | a boolean representing whether the elements of the stream are time-tagged |
rate | the frame rate (highest average rate for time-tagged streams, sample rate for audio input) |
offset | the lag of the output stream relative to the input |
width | the frame width (number of channels for audio or data matrix columns) |
height | the frame height (or number of matrix rows, always 1 for audio) |
labels | optional labels for the frames' channels or columns |
hasVarSize | a boolean representing whether the frames have a variable height (respecting the given frame height as maximum) |
domain | extent of a frame in the given domain (e.g. duration or frequency range) |
maxFrames | maximum number of frames in a block exchanged between two modules (window size for audio) |
|
inline |