MIO multisink initializer and utilities. More...
#include <airframe/mio.h>
Go to the source code of this file.
Macros | |
#define | mio_smc(_s_) (GPOINTER_TO_UINT((_s_)->cfg)) |
Convenience macro to retrieve the subordinate sink count for a given multisink. | |
#define | mio_smn(_s_, _n_) (((MIOSink *)(_s_)->vsp)[(_n_)]) |
Convenience macro to access a given subordinate sink by index for a given multisink. More... | |
Functions | |
gboolean | mio_sink_init_multi (MIOSink *sink, const char *spec, MIOType vsp_type, void *cfg, GError **err) |
Initialize a multisink for writing to multiple subordinate sinks. More... | |
MIO multisink initializer and utilities.
#define mio_smn | ( | _s_, | |
_n_ | |||
) | (((MIOSink *)(_s_)->vsp)[(_n_)]) |
Convenience macro to access a given subordinate sink by index for a given multisink.
Evaluates to a structure; use the address operator to get a pointer to the subordinate sink.
gboolean mio_sink_init_multi | ( | MIOSink * | sink, |
const char * | spec, | ||
MIOType | vsp_type, | ||
void * | cfg, | ||
GError ** | err | ||
) |
Initialize a multisink for writing to multiple subordinate sinks.
A multisink simply distributes its operations (next, close, free) among its subordinates. This function creates a multisink with all of its subordinate sinks zeroed - after initializing, each subordinate sink must in turn be initialized by a specific sink initializer.
sink | pointer to MIOSink to initialize. This MIOSink will be overwritten. |
spec | input specifier to initialize MIOSource with. Ignored; may be NULL. |
vsp_type | requested sink pointer type, or MIO_T_ANY for default. Must be ANY or MULTISINK. |
cfg | Number of subordinate sinks to allocate cast to a void pointer using GUINT_TO_POINTER. |
err | An error description pointer. |