Vuo
1.2.5
|
VuoRuntime interface.
Typedefs | |
typedef void( | VuoInitInProcessType )(void *ZMQContext, const char *controlURL, const char *telemetryURL, bool isPaused, pid_t runnerPid, int runnerPipe, bool continueIfRunnerDies, bool trialRestrictionsEnabled, const char *workingDirectory, void *compositionBinaryHandle, void *runtimePersistentState) |
Type for vuoInitInProcess. | |
typedef void *( | VuoFiniType )(void) |
Type for vuoFini. | |
typedef void( | VuoFiniRuntimePersistentStateType )(void *) |
Type for vuoFiniRuntimePersistentState. | |
typedef void( | VuoSendErrorType )(struct VuoCompositionState *, const char *) |
Type for vuoSendError. | |
typedef bool( | VuoIsCurrentCompositionStoppedType )(void) |
Type for vuoIsCurrentCompositionStopped. | |
Functions | |
void | vuoInit (int argc, char **argv) |
Parses command-line arguments, then calls vuoInitInProcess(). | |
void | vuoInitInProcess (void *ZMQContext, const char *controlURL, const char *telemetryURL, bool isPaused, pid_t runnerPid, int runnerPipe, bool continueIfRunnerDies, bool trialRestrictionsEnabled, const char *workingDirectory, void *compositionBinaryHandle, void *runtimePersistentState) |
Starts a composition running in the current process. | |
void * | vuoFini (void) |
Cleans up the ØMQ connections. | |
Variables | |
VuoSendErrorType | vuoSendError |
Sends a telemetry message indicating that an error has occurred. | |
VuoIsCurrentCompositionStoppedType | vuoIsCurrentCompositionStopped |
Returns true if the composition has not yet started or if it has stopped. | |
typedef void( VuoFiniRuntimePersistentStateType)(void *) |
Type for vuoFiniRuntimePersistentState.
typedef void*( VuoFiniType)(void) |
Type for vuoFini.
typedef void( VuoInitInProcessType)(void *ZMQContext, const char *controlURL, const char *telemetryURL, bool isPaused, pid_t runnerPid, int runnerPipe, bool continueIfRunnerDies, bool trialRestrictionsEnabled, const char *workingDirectory, void *compositionBinaryHandle, void *runtimePersistentState) |
Type for vuoInitInProcess.
typedef bool( VuoIsCurrentCompositionStoppedType)(void) |
Type for vuoIsCurrentCompositionStopped.
typedef void( VuoSendErrorType)(struct VuoCompositionState *, const char *) |
Type for vuoSendError.
void* vuoFini | ( | void | ) |
Cleans up the ØMQ connections.
To be called after the composition has stopped.
Returns a data structure containing runtime state that should persist across a live-coding reload. If this function is called for a live-coding reload, pass the return value to the next call to vuoInitInProcess(). Otherwise, pass it to vuoFiniRuntimePersistentState().
void vuoInit | ( | int | argc, |
char ** | argv | ||
) |
Parses command-line arguments, then calls vuoInitInProcess().
void vuoInitInProcess | ( | void * | ZMQContext, |
const char * | controlURL, | ||
const char * | telemetryURL, | ||
bool | isPaused, | ||
pid_t | runnerPid, | ||
int | runnerPipe, | ||
bool | continueIfRunnerDies, | ||
bool | trialRestrictionsEnabled, | ||
const char * | workingDirectory, | ||
void * | compositionBinaryHandle, | ||
void * | runtimePersistentState | ||
) |
Starts a composition running in the current process.
ZMQContext | A ØMQ context shared with the runner (since ØMQ only allows one context per process). If not needed, pass null. |
controlURL | The URL to which the runtime should bind the ØMQ socket that it uses to receive control requests and send replies. |
telemetryURL | The URL to which the runtime should bind the ØMQ socket that it uses to publish telemetry. |
isPaused | If true, the composition starts out paused, and it's up to the runner to unpause it. |
runnerPid | The process ID of the runner. |
runnerPipe | The file descriptor of the pipe that the runtime should use to check if the runner process has ended. If not needed, pass -1. |
continueIfRunnerDies | If true, the runtime should allow the composition to keep running if runnerPipe indicates that the runner process has ended. If false, the runtime should instead stop the composition. |
trialRestrictionsEnabled | If true, the composition should run in free-trial mode. |
workingDirectory | The directory that the composition should use to resolve relative paths. |
compositionBinaryHandle | The handle of the composition's dynamic library or executable returned by dlopen() . |
runtimePersistentState | If the composition is restarting for a live-coding reload, pass the value returned by the previous call to vuoFini(). Otherwise, pass null. |
VuoIsCurrentCompositionStoppedType vuoIsCurrentCompositionStopped |
Returns true if the composition has not yet started or if it has stopped.
Assumes that just one composition is running in the process.
VuoSendErrorType vuoSendError |
Sends a telemetry message indicating that an error has occurred.