Functions | Variables

libvlc.c File Reference

This file contains functions to create and destroy libvlc instances. More...

Include dependency graph for libvlc.c:

Functions

void * vlc_gc_init (gc_object_t *p_gc, void(*pf_destruct)(gc_object_t *))
 Atomically set the reference count to 1.
void * vlc_hold (gc_object_t *p_gc)
 Atomically increment the reference count.
void vlc_release (gc_object_t *p_gc)
 Atomically decrement the reference count and, if it reaches zero, destroy.
static void GetFilenames (libvlc_int_t *, unsigned, const char *const [])
libvlc_int_tlibvlc_InternalCreate (void)
 Allocate a libvlc instance, initialize global data if needed It also initializes the threading system.
int libvlc_InternalInit (libvlc_int_t *p_libvlc, int i_argc, const char *ppsz_argv[])
 Initialize a libvlc instance This function initializes a previously allocated libvlc instance:

  • CPU detection
  • gettext initialization
  • message queue, module bank and playlist initialization
  • configuration and commandline parsing.

void libvlc_InternalCleanup (libvlc_int_t *p_libvlc)
 Cleanup a libvlc instance.
void libvlc_InternalDestroy (libvlc_int_t *p_libvlc)
 Destroy everything.
int libvlc_InternalAddIntf (libvlc_int_t *p_libvlc, char const *psz_module)
 Add an interface plugin and run it.

Variables

static bool b_daemon = false

Detailed Description

This file contains functions to create and destroy libvlc instances.


Function Documentation

static void GetFilenames ( libvlc_int_t p_vlc,
unsigned  n,
const char * const  args[] 
) [static]
int libvlc_InternalAddIntf ( libvlc_int_t p_libvlc,
char const *  psz_module 
)

Add an interface plugin and run it.

References _, b_daemon, intf_Create, msg_Err, msg_Info, var_CreateGetNonEmptyString, and var_Destroy.

void libvlc_InternalCleanup ( libvlc_int_t p_libvlc  ) 
libvlc_int_t* libvlc_InternalCreate ( void   ) 
void libvlc_InternalDestroy ( libvlc_int_t p_libvlc  ) 

Destroy everything.

This function requests the running threads to finish, waits for their termination, and destroys their structure. It stops the thread systems: no instance can run after this has run

Parameters:
p_libvlc the instance to destroy

References libvlc_priv_t::exit, libvlc_priv(), libvlc_priv_t::ml_lock, system_End(), vlc_ExitDestroy(), vlc_internals, vlc_mutex_destroy(), and vlc_object_release.

int libvlc_InternalInit ( libvlc_int_t p_libvlc,
int  i_argc,
const char *  ppsz_argv[] 
)
void* vlc_gc_init ( gc_object_t p_gc,
void(*)(gc_object_t *)  pf_destruct 
)

Atomically set the reference count to 1.

Parameters:
p_gc reference counted object
pf_destruct destruction calback
Returns:
p_gc.

References gc_object_t::pf_destructor, gc_object_t::refs, and vlc_atomic_set().

void* vlc_hold ( gc_object_t p_gc  ) 

Atomically increment the reference count.

Parameters:
p_gc reference counted object
Returns:
p_gc.

References gc_object_t::refs, and vlc_atomic_inc().

void vlc_release ( gc_object_t p_gc  ) 

Atomically decrement the reference count and, if it reaches zero, destroy.

Parameters:
p_gc reference counted object.

References gc_object_t::pf_destructor, gc_object_t::refs, and vlc_atomic_dec().


Variable Documentation

bool b_daemon = false [static]
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines