Vuo  2.0.0
Functions | Variables
VuoCompositionState.c File Reference

Description

VuoCompositionState implementation.

Definition in file VuoCompositionState.c.

Go to the source code of this file.

Functions

struct VuoCompositionStatevuoCreateCompositionState (void *runtimeState, const char *compositionIdentifier)
 Creates a composition state. More...
 
void * vuoGetCompositionStateRuntimeState (struct VuoCompositionState *compositionState)
 Gets the composition state's runtimeState field. More...
 
const char * vuoGetCompositionStateCompositionIdentifier (struct VuoCompositionState *compositionState)
 Gets the composition state's compositionIdentifier field. More...
 
void vuoFreeCompositionState (struct VuoCompositionState *compositionState)
 Frees the composition state (but not its fields). More...
 
static void __attribute__ ((constructor))
 Initializes vuoCompositionStateKey. More...
 
void vuoAddCompositionStateToThreadLocalStorage (const struct VuoCompositionState *compositionState)
 Stores compositionState in thread-local storage, making it available via a call to vuoCopyCompositionStateFromThreadLocalStorage() on the same thread. More...
 
void vuoRemoveCompositionStateFromThreadLocalStorage (void)
 Removes the stored composition state (if any) in thread-local storage, making it no longer available to vuoCopyCompositionStateFromThreadLocalStorage(). More...
 
void * vuoCopyCompositionStateFromThreadLocalStorage (void)
 Retrieves a copy of a composition state previously stored by vuoAddCompositionStateToThreadLocalStorage() on the current thread, or null if no composition state is found. More...
 

Variables

pthread_key_t vuoCompositionStateKey
 Key used to store and retrieve composition state from thread-local state. More...
 

Function Documentation

◆ __attribute__()

static void __attribute__ ( (constructor)  )
static

Initializes vuoCompositionStateKey.

Definition at line 56 of file VuoCompositionState.c.

◆ vuoAddCompositionStateToThreadLocalStorage()

void vuoAddCompositionStateToThreadLocalStorage ( const struct VuoCompositionState compositionState)

Stores compositionState in thread-local storage, making it available via a call to vuoCopyCompositionStateFromThreadLocalStorage() on the same thread.

Definition at line 67 of file VuoCompositionState.c.

◆ vuoCopyCompositionStateFromThreadLocalStorage()

void* vuoCopyCompositionStateFromThreadLocalStorage ( void  )

Retrieves a copy of a composition state previously stored by vuoAddCompositionStateToThreadLocalStorage() on the current thread, or null if no composition state is found.

The returned VuoCompositionState's compositionIdentifier field is null.

Definition at line 91 of file VuoCompositionState.c.

◆ vuoCreateCompositionState()

struct VuoCompositionState* vuoCreateCompositionState ( void *  runtimeState,
const char *  compositionIdentifier 
)

Creates a composition state.

The composition state does not take ownership of runtimeState or compositionIdentifier.

Definition at line 16 of file VuoCompositionState.c.

◆ vuoFreeCompositionState()

void vuoFreeCompositionState ( struct VuoCompositionState compositionState)

Frees the composition state (but not its fields).

Definition at line 43 of file VuoCompositionState.c.

◆ vuoGetCompositionStateCompositionIdentifier()

const char* vuoGetCompositionStateCompositionIdentifier ( struct VuoCompositionState compositionState)

Gets the composition state's compositionIdentifier field.

Definition at line 35 of file VuoCompositionState.c.

◆ vuoGetCompositionStateRuntimeState()

void* vuoGetCompositionStateRuntimeState ( struct VuoCompositionState compositionState)

Gets the composition state's runtimeState field.

Definition at line 27 of file VuoCompositionState.c.

◆ vuoRemoveCompositionStateFromThreadLocalStorage()

void vuoRemoveCompositionStateFromThreadLocalStorage ( void  )

Removes the stored composition state (if any) in thread-local storage, making it no longer available to vuoCopyCompositionStateFromThreadLocalStorage().

Definition at line 78 of file VuoCompositionState.c.

Variable Documentation

◆ vuoCompositionStateKey

pthread_key_t vuoCompositionStateKey

Key used to store and retrieve composition state from thread-local state.

Definition at line 51 of file VuoCompositionState.c.