#ifdef HAVE_STDLIB_H
# include <stdlib.h> /* realloc() */
#endif
+#include "libvlc.h"
/*****************************************************************************
* Private types
return VLC_SUCCESS;
}
+
+/**
+ * Gets a process-wide mutex, creates it if needed.
+ */
+vlc_mutex_t *var_GetGlobalMutex( const char *name )
+{
+ libvlc_global_data_t *p_global = vlc_global();
+ vlc_value_t val;
+
+ if( var_Create( p_global, name, VLC_VAR_MUTEX ) )
+ return NULL;
+
+ var_Get( p_global, name, &val );
+ return val.p_address;
+}
+
+
/**
* Register a callback in a variable
*