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

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_t * | libvlc_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:
| |
| 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 |
This file contains functions to create and destroy libvlc instances.
| static void GetFilenames | ( | libvlc_int_t * | p_vlc, | |
| unsigned | n, | |||
| const char * const | args[] | |||
| ) | [static] |
References make_URI(), msg_Warn, pl_Get, pl_Unlocked, playlist_AddExt(), PLAYLIST_INSERT, and VLC_INPUT_OPTION_TRUSTED.
Referenced by libvlc_InternalInit().
| 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 | ) |
Cleanup a libvlc instance.
The instance is not completely deallocated
| p_libvlc | the instance to clean |
References libvlc_priv_t::actions, b_daemon, config_AutoSaveConfigFile(), intf_DestroyAll(), libvlc_priv(), libvlc_Quit(), ml_Destroy(), module_EndBank(), module_unneed, msg_Dbg, playlist_t::p_libvlc, libvlc_priv_t::p_memcpy_module, libvlc_priv_t::p_ml, libvlc_priv_t::p_playlist, libvlc_priv_t::p_vlm, pl_Deactivate(), playlist_Destroy(), playlist_ServicesDiscoveryKillAll(), var_CreateGetNonEmptyString, var_InheritBool, vlc_DeinitActions(), VLC_OBJECT, vlc_object_release, and vlm_Delete().
| libvlc_int_t* libvlc_InternalCreate | ( | void | ) |
Allocate a libvlc instance, initialize global data if needed It also initializes the threading system.
References libvlc_priv_t::b_color, libvlc_priv_t::exit, getenv(), libvlc_priv_t::i_verbose, libvlc_priv(), libvlc_priv_t::ml_lock, libvlc_priv_t::p_dialog_provider, libvlc_priv_t::p_ml, libvlc_priv_t::p_playlist, libvlc_priv_t::p_vlm, vlc_custom_create, vlc_ExitInit(), and vlc_mutex_init().
| 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
| 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[] | |||
| ) |
Initialize a libvlc instance This function initializes a previously allocated libvlc instance:
< Item not found
References _, libvlc_priv_t::actions, asprintf(), libvlc_priv_t::b_color, b_daemon, libvlc_priv_t::b_stats, config_LoadCmdLine, config_LoadConfigFile, config_PrintHelp(), config_SaveConfigFile, GetFilenames(), getpid(), libvlc_priv_t::i_verbose, intf_Create, libvlc_priv(), make_URI(), ml_Create(), module_EndBank(), module_InitBank(), module_LoadPlugins, module_need, module_unneed, msg_Dbg, msg_Err, msg_Warn, libvlc_priv_t::p_memcpy_module, libvlc_priv_t::p_ml, libvlc_priv_t::p_vlm, pl_Unlocked, playlist_AddExt(), playlist_Create(), PLAYLIST_INSERT, playlist_ServicesDiscoveryAdd(), psz_vlc_changeset, strdup(), strsep(), system_Configure(), system_End(), system_Init(), utf8_fprintf(), var_Create, var_CreateGetNonEmptyString, var_Destroy, var_GetBool, var_InheritBool, var_InheritInteger, var_InheritString, var_SetBool, var_SetInteger, var_SetString, vlc_bindtextdomain(), vlc_CPU_dump(), vlc_fopen(), vlc_InitActions(), VLC_OBJECT, vlc_object_set_name, vlc_threads_setup(), VLC_VAR_ADDRESS, VLC_VAR_BOOL, VLC_VAR_DOINHERIT, VLC_VAR_INTEGER, VLC_VAR_STRING, VLC_VAR_VOID, and vlm_New.
| void* vlc_gc_init | ( | gc_object_t * | p_gc, | |
| void(*)(gc_object_t *) | pf_destruct | |||
| ) |
Atomically set the reference count to 1.
| p_gc | reference counted object | |
| pf_destruct | destruction calback |
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.
| p_gc | reference counted object |
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.
| p_gc | reference counted object. |
References gc_object_t::pf_destructor, gc_object_t::refs, and vlc_atomic_dec().
bool b_daemon = false [static] |
Referenced by libvlc_InternalAddIntf(), libvlc_InternalCleanup(), and libvlc_InternalInit().
1.7.1