Vuo
1.2.6
|
VuoCompositionLoader implementation.
Functions | |
bool | replaceComposition (const char *dylibPath, char *compositionDiff) |
Replaces the currently running composition (if any) with the given composition. | |
void | stopComposition (void) |
Sends a control request to the composition telling it to stop. | |
bool | loadResourceDylib (const char *resourceDylibPath) |
Loads the resource dylib at the given path and adds the resulting handle to the list of resource dylibs. | |
void | unloadResourceDylibs (void) |
Unloads all resource dylibs. | |
static bool | isStoppedInitially (void) |
Placeholder until vuoIsCurrentCompositionStopped becomes available. | |
static void | __attribute__ ((constructor)) VuoCompositionLoader_init(void) |
Get a reference to the main thread, so we can perform runtime thread assertions. | |
void | vuoLoaderControlReplySend (enum VuoLoaderControlReply reply, zmq_msg_t *messages, unsigned int messageCount) |
Sends a control reply message to the process controlling this composition loader. | |
void | vuoControlRequestSend (enum VuoControlRequest request, zmq_msg_t *messages, unsigned int messageCount) |
Sends a control request message to the running composition. | |
void | vuoControlReplyReceive (enum VuoControlReply expectedReply) |
Receives a control reply message from the running composition, and checks that it is the expected reply. | |
Variables | |
void * | ZMQLoaderControlContext = NULL |
The context for initializing sockets to control the composition loader. | |
void * | ZMQLoaderControl = NULL |
The socket for controlling the composition loader. | |
static void * | ZMQLoaderSelfReceive = 0 |
Used to break out of a ZMQLoaderControl poll. | |
static void * | ZMQLoaderSelfSend = 0 |
Used to break out of a ZMQLoaderControl poll. | |
void * | ZMQControlContext = NULL |
The context for initializing sockets to control the composition. | |
void * | ZMQControl = NULL |
The socket for controlling the composition. | |
char * | controlURL = NULL |
The URL that the composition will use to initialize its control socket. | |
char * | telemetryURL = NULL |
The URL that the composition will use to initialize its telemetry socket. | |
bool | isReplacing = false |
True if the composition is in the process of being replaced. | |
void * | dylibHandle = NULL |
A handle to the running composition. | |
void ** | resourceDylibHandles = NULL |
A list of handles to the running composition's resources. | |
size_t | resourceDylibHandlesSize = 0 |
The number of items in resourceDylibHandles . | |
size_t | resourceDylibHandlesCapacity = 0 |
The number of items that resourceDylibHandlesCapacity can currently hold. | |
pid_t | runnerPid = 0 |
Process ID of the runner that started the composition. | |
int | runnerPipe = -1 |
The file descriptor for the composition's end of the pipe used to detect if the runner's process ends. | |
bool | continueIfRunnerDies = false |
If true, the composition continues running if the runner's process ends. | |
bool | trialRestrictionsEnabled = true |
If true, some nodes may restrict how they can be used. | |
void * | VuoApp_mainThread = NULL |
A reference to the main thread. | |
char * | VuoApp_dylibPath = NULL |
The path of the most recently loaded composition dylib. | |
VuoIsCurrentCompositionStoppedType * | isStopped = isStoppedInitially |
Reference to vuoIsCurrentCompositionStopped() once it becomes available. | |
|
static |
Get a reference to the main thread, so we can perform runtime thread assertions.
|
static |
Placeholder until vuoIsCurrentCompositionStopped
becomes available.
bool loadResourceDylib | ( | const char * | resourceDylibPath | ) |
Loads the resource dylib at the given path and adds the resulting handle to the list of resource dylibs.
If resourceDylibPath
is the empty string, does nothing.
bool replaceComposition | ( | const char * | dylibPath, |
char * | compositionDiff | ||
) |
Replaces the currently running composition (if any) with the given composition.
The runtime takes ownership of compositionDiff.
void stopComposition | ( | void | ) |
Sends a control request to the composition telling it to stop.
void unloadResourceDylibs | ( | void | ) |
Unloads all resource dylibs.
void vuoControlReplyReceive | ( | enum VuoControlReply | expectedReply | ) |
Receives a control reply message from the running composition, and checks that it is the expected reply.
void vuoControlRequestSend | ( | enum VuoControlRequest | request, |
zmq_msg_t * | messages, | ||
unsigned int | messageCount | ||
) |
Sends a control request message to the running composition.
void vuoLoaderControlReplySend | ( | enum VuoLoaderControlReply | reply, |
zmq_msg_t * | messages, | ||
unsigned int | messageCount | ||
) |
Sends a control reply message to the process controlling this composition loader.
bool continueIfRunnerDies = false |
If true, the composition continues running if the runner's process ends.
char* controlURL = NULL |
The URL that the composition will use to initialize its control socket.
void* dylibHandle = NULL |
A handle to the running composition.
bool isReplacing = false |
True if the composition is in the process of being replaced.
VuoIsCurrentCompositionStoppedType* isStopped = isStoppedInitially |
Reference to vuoIsCurrentCompositionStopped()
once it becomes available.
void** resourceDylibHandles = NULL |
A list of handles to the running composition's resources.
size_t resourceDylibHandlesCapacity = 0 |
The number of items that resourceDylibHandlesCapacity
can currently hold.
size_t resourceDylibHandlesSize = 0 |
The number of items in resourceDylibHandles
.
pid_t runnerPid = 0 |
Process ID of the runner that started the composition.
int runnerPipe = -1 |
The file descriptor for the composition's end of the pipe used to detect if the runner's process ends.
char* telemetryURL = NULL |
The URL that the composition will use to initialize its telemetry socket.
bool trialRestrictionsEnabled = true |
If true, some nodes may restrict how they can be used.
char* VuoApp_dylibPath = NULL |
The path of the most recently loaded composition dylib.
void* VuoApp_mainThread = NULL |
A reference to the main thread.
void* ZMQControl = NULL |
The socket for controlling the composition.
void* ZMQControlContext = NULL |
The context for initializing sockets to control the composition.
void* ZMQLoaderControl = NULL |
The socket for controlling the composition loader.
void* ZMQLoaderControlContext = NULL |
The context for initializing sockets to control the composition loader.
|
static |
Used to break out of a ZMQLoaderControl poll.
|
static |
Used to break out of a ZMQLoaderControl poll.