Data Structures | Typedefs | Functions

libvlc_internal.h File Reference

Include dependency graph for libvlc_internal.h:

Go to the source code of this file.

Data Structures

struct  libvlc_vlm_t
struct  libvlc_instance_t

Typedefs

typedef void(* libvlc_vlm_release_func_t )(libvlc_instance_t *)
typedef struct libvlc_vlm_t libvlc_vlm_t

Functions

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 *, int, 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 *)
 Cleanup a libvlc instance.
void libvlc_InternalDestroy (libvlc_int_t *)
 Destroy everything.
int libvlc_InternalAddIntf (libvlc_int_t *, const char *)
 Add an interface plugin and run it.
void libvlc_InternalWait (libvlc_int_t *)
 Waits until the LibVLC instance gets an exit signal.
void libvlc_SetExitHandler (libvlc_int_t *, void(*)(void *), void *)
 Registers a callback for the LibVLC exit event.
void libvlc_init_threads (void)
void libvlc_deinit_threads (void)
libvlc_event_manager_tlibvlc_event_manager_new (void *p_obj, libvlc_instance_t *p_libvlc_inst)
void libvlc_event_manager_release (libvlc_event_manager_t *p_em)
void libvlc_event_manager_register_event_type (libvlc_event_manager_t *p_em, libvlc_event_type_t event_type)
void libvlc_event_send (libvlc_event_manager_t *p_em, libvlc_event_t *p_event)
void libvlc_event_attach_async (libvlc_event_manager_t *p_event_manager, libvlc_event_type_t event_type, libvlc_callback_t pf_callback, void *p_user_data)
static libvlc_time_t from_mtime (mtime_t time)
static mtime_t to_mtime (libvlc_time_t time)

Typedef Documentation

typedef struct libvlc_vlm_t libvlc_vlm_t

Function Documentation

static libvlc_time_t from_mtime ( mtime_t  time  )  [inline, static]
void libvlc_deinit_threads ( void   ) 

References libvlc_setup_threads().

Referenced by libvlc_new(), and libvlc_release().

void libvlc_event_attach_async ( libvlc_event_manager_t p_event_manager,
libvlc_event_type_t  event_type,
libvlc_callback_t  pf_callback,
void *  p_user_data 
)

References event_attach().

Referenced by install_media_player_observer().

libvlc_event_manager_t* libvlc_event_manager_new ( void *  p_obj,
libvlc_instance_t p_libvlc_inst 
)
void libvlc_event_manager_register_event_type ( libvlc_event_manager_t p_em,
libvlc_event_type_t  event_type 
)
void libvlc_event_manager_release ( libvlc_event_manager_t p_em  ) 
void libvlc_event_send ( libvlc_event_manager_t p_em,
libvlc_event_t p_event 
)
void libvlc_init_threads ( void   ) 

References libvlc_setup_threads().

Referenced by libvlc_new().

int libvlc_InternalAddIntf ( libvlc_int_t ,
const char *   
)

Add an interface plugin and run it.

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

Referenced by libvlc_add_intf().

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(), libvlc_priv_t::timer_lock, vlc_ExitDestroy(), vlc_internals, vlc_mutex_destroy(), and vlc_object_release.

Referenced by libvlc_new(), and libvlc_release().

int libvlc_InternalInit ( libvlc_int_t ,
int  ,
const char *  ppsz_argv[] 
)
void libvlc_InternalWait ( libvlc_int_t p_libvlc  ) 

Waits until the LibVLC instance gets an exit signal.

This normally occurs when the user "exits" an interface plugin. But it can also be triggered by the special vlc://quit item, the update checker, or the playlist engine.

References libvlc_priv_t::exit, vlc_exit::handler, vlc_exit::killed, libvlc_priv(), vlc_exit::lock, vlc_exit::opaque, vlc_cond_destroy(), vlc_cond_init(), vlc_cond_wait(), vlc_mutex_lock(), and vlc_mutex_unlock().

Referenced by libvlc_wait().

void libvlc_SetExitHandler ( libvlc_int_t p_libvlc,
void(*)(void *)  handler,
void *  opaque 
)

Registers a callback for the LibVLC exit event.

Note:
This function conflicts with libvlc_InternalWait(). Use either or none of them, but not both.

References libvlc_priv_t::exit, vlc_exit::handler, vlc_exit::killed, libvlc_priv(), vlc_exit::lock, vlc_exit::opaque, vlc_mutex_lock(), and vlc_mutex_unlock().

Referenced by libvlc_set_exit_handler().

static mtime_t to_mtime ( libvlc_time_t  time  )  [inline, static]
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines