43 CoInitializeEx( NULL, COINIT_MULTITHREADED );
106 assert( p_mta != NULL );
108 if ( i_refcount == 0 )
111 if ( i_refcount == 0 )
static void * var_CreateGetAddress(vlc_object_t *p_obj, const char *psz_name)
Create an address variable with inherit and get its value.
Definition: vlc_variables.h:584
Semaphore.
Definition: vlc_threads.h:498
#define vlc_global_lock(n)
Acquires a global mutex.
Definition: vlc_threads.h:1147
static void vlc_mta_release(vlc_object_t *p_parent)
Releases a reference to the MTA holder.
Definition: mta_holder.h:100
vlc_sem_t ready_sem
Definition: mta_holder.h:36
This file is a collection of common definitions and types.
int vlc_clone(vlc_thread_t *th, void *(*entry)(void *), void *data, int priority)
Creates and starts a new thread.
Definition: thread.c:167
int i_refcount
Definition: mta_holder.h:35
vlc_sem_t release_sem
Definition: mta_holder.h:37
static bool vlc_mta_acquire(vlc_object_t *p_parent)
Ensure an MTA context will be available until vlc_mta_release gets called.
Definition: mta_holder.h:62
Definition: mta_holder.h:32
#define vlc_global_unlock(n)
Releases a global mutex.
Definition: vlc_threads.h:1152
Thread handle.
Definition: vlc_threads.h:208
#define unlikely(p)
Predicted false condition.
Definition: vlc_common.h:223
struct vlc_mta_holder vlc_mta_holder
int vlc_sem_post(vlc_sem_t *sem)
Increments the value of a semaphore.
Definition: threads.c:484
#define VLC_OBJECT(x)
Type-safe vlc_object_t cast.
Definition: vlc_objects.h:70
void vlc_sem_wait(vlc_sem_t *sem)
Waits on a semaphore.
Definition: threads.c:500
#define vlc_object_instance(o)
Definition: vlc_objects.h:196
vlc_thread_t thread
Definition: mta_holder.h:34
static void * var_InheritAddress(vlc_object_t *obj, const char *name)
Definition: vlc_variables.h:720
static int var_SetAddress(vlc_object_t *p_obj, const char *psz_name, void *ptr)
Set the value of a pointer variable.
Definition: vlc_variables.h:360
VLC object common members.
Definition: vlc_objects.h:43
static void * MtaMainLoop(void *opaque)
Definition: mta_holder.h:40
void vlc_sem_init(vlc_sem_t *sem, unsigned value)
Initializes a semaphore.
Definition: threads.c:479
void vlc_join(vlc_thread_t handle, void **result)
Waits for a thread to complete (if needed), then destroys it.
Definition: thread.c:174
#define VLC_THREAD_PRIORITY_LOW
Definition: vlc_threads.h:248