42 lines
907 B
C
42 lines
907 B
C
struct node_type {
|
|
int vectorize;
|
|
int flags;
|
|
|
|
enum state state;
|
|
|
|
struct list instance;
|
|
|
|
size_t size;
|
|
size_t pool_size;
|
|
|
|
struct {
|
|
// Global, per node-type
|
|
int (*start)(struct super_node *sn);
|
|
int (*stop)();
|
|
} type;
|
|
|
|
// Function pointers
|
|
void * (*create)();
|
|
int (*init)();
|
|
int (*destroy)(struct node *n);
|
|
int (*parse)(struct node *n, json_t *cfg);
|
|
int (*check)(struct node *n);
|
|
char * (*print)(struct node *n);
|
|
int (*start)(struct node *n);
|
|
int (*stop)(struct node *n);
|
|
|
|
int (*read)(struct node *n, struct sample *smps[],
|
|
unsigned cnt, unsigned *release);
|
|
|
|
int (*write)(struct node *n, struct sample *smps[],
|
|
unsigned cnt, unsigned *release);
|
|
|
|
int (*reverse)(struct node *n);
|
|
|
|
int (*fd)(struct node *n);
|
|
|
|
// Memory Type
|
|
struct memory_type * (*memory_type)(struct node *n,
|
|
struct memory_type *parent);
|
|
};
|