VLC 4.0.0-dev
No Matches
libvlc.h File Reference
Include dependency graph for libvlc.h:

Go to the source code of this file.

Data Structures

struct  vlc_exit
struct  libvlc_priv_t


#define vlc_backtrace()   vlc_trace(__func__, __FILE__, __LINE__)
#define vlc_custom_create(o, s, n)    vlc_custom_create(VLC_OBJECT(o), s, n)


typedef struct variable_t variable_t
typedef struct vlc_logger vlc_logger_t
typedef struct vlc_tracer vlc_tracer_t
typedef struct vlc_exit vlc_exit_t
typedef struct vlc_dialog_provider vlc_dialog_provider
 Private LibVLC instance data.
typedef struct vlc_keystore vlc_keystore
typedef struct vlc_actions_t vlc_actions_t
typedef struct vlc_playlist vlc_playlist_t
typedef struct vlc_media_source_provider_t vlc_media_source_provider_t
typedef struct intf_thread_t intf_thread_t
typedef struct libvlc_priv_t libvlc_priv_t


void system_Init (void)
 Initializes MME timer, Winsock.
void system_Configure (libvlc_int_t *, int, const char *const [])
void vlc_CPU_dump (vlc_object_t *)
void vlc_threads_setup (libvlc_int_t *)
void vlc_trace (const char *fn, const char *file, unsigned line)
 Print a backtrace to the standard error for debugging purpose.
int vlc_LogPreinit (libvlc_int_t *)
 Performs preinitialization of the messages logging subsystem.
void vlc_LogInit (libvlc_int_t *)
 Initializes the messages logging subsystem and drain the early messages to the configured log.
void vlc_ExitInit (vlc_exit_t *)
int vlc_object_init (vlc_object_t *obj, vlc_object_t *parent, const char *type_name)
 Initializes a VLC object.
void vlc_object_deinit (vlc_object_t *obj)
 Deinitializes a VLC object.
void * vlc_custom_create (vlc_object_t *p_this, size_t i_size, const char *psz_type)
 Creates a VLC object.
void * vlc_objres_new (size_t size, void(*release)(void *))
 Allocates an object resource.
void vlc_objres_push (vlc_object_t *obj, void *data)
 Pushes an object resource on the object resources stack.
void vlc_objres_clear (vlc_object_t *obj)
 Releases all resources of an object.
void vlc_objres_remove (vlc_object_t *obj, void *data, bool(*match)(void *, void *))
 Releases one object resource explicitly.
static libvlc_priv_tlibvlc_priv (libvlc_int_t *libvlc)
int intf_InsertItem (libvlc_int_t *, const char *mrl, unsigned optc, const char *const *optv, unsigned flags)
 Inserts an item in the playlist.
void intf_DestroyAll (libvlc_int_t *)
 Stops and destroys all interfaces, then the playlist.
int vlc_MetadataRequest (libvlc_int_t *libvlc, input_item_t *item, input_item_meta_request_option_t i_options, const struct vlc_metadata_cbs *cbs, void *cbs_userdata, int timeout, void *id)
void var_OptionParse (vlc_object_t *, const char *, bool trusted)
 Parse a stringified option This function parse a string option and create the associated object variable The option must be of the form "[no[-]]foo[=bar]" where foo is the option name and bar is the value of the option.


const char psz_vlc_changeset []

Macro Definition Documentation

◆ vlc_backtrace

#define vlc_backtrace ( )    vlc_trace(__func__, __FILE__, __LINE__)

◆ vlc_custom_create

#define vlc_custom_create (   o,
)     vlc_custom_create(VLC_OBJECT(o), s, n)

Typedef Documentation

◆ intf_thread_t

typedef struct intf_thread_t intf_thread_t

◆ libvlc_priv_t

typedef struct libvlc_priv_t libvlc_priv_t

◆ variable_t

typedef struct variable_t variable_t

◆ vlc_actions_t

typedef struct vlc_actions_t vlc_actions_t

◆ vlc_dialog_provider

Private LibVLC instance data.

◆ vlc_exit_t

typedef struct vlc_exit vlc_exit_t

◆ vlc_keystore

typedef struct vlc_keystore vlc_keystore

◆ vlc_logger_t

typedef struct vlc_logger vlc_logger_t

◆ vlc_media_source_provider_t

◆ vlc_playlist_t

typedef struct vlc_playlist vlc_playlist_t

◆ vlc_tracer_t

typedef struct vlc_tracer vlc_tracer_t

Function Documentation

◆ intf_DestroyAll()

void intf_DestroyAll ( libvlc_int_t libvlc)

◆ intf_InsertItem()

int intf_InsertItem ( libvlc_int_t libvlc,
const char *  mrl,
unsigned  optc,
const char *const *  optv,
unsigned  flags 

Inserts an item in the playlist.

This function is used during initialization. It inserts an item to the beginning of the playlist. That is meant to compensate for the reverse parsing order of the command line.

References input_item_AddOptions(), input_item_New, input_item_Release(), libvlc_GetMainPlaylist(), unlikely, vlc_playlist_InsertOne(), vlc_playlist_Lock(), vlc_playlist_Unlock(), and VLC_SUCCESS.

Referenced by GetFilenames(), and libvlc_InternalInit().

◆ libvlc_priv()

◆ system_Configure()

◆ system_Init()

void system_Init ( void  )

Initializes MME timer, Winsock.

References _fmode_bin, getenv(), setenv(), and system_InitWSA().

Referenced by config_GetBaseDir(), and libvlc_InternalInit().

◆ var_OptionParse()

void var_OptionParse ( vlc_object_t p_obj,
const char *  psz_option,
bool  trusted 

Parse a stringified option This function parse a string option and create the associated object variable The option must be of the form "[no[-]]foo[=bar]" where foo is the option name and bar is the value of the option.

p_objthe object in which the variable must be created
psz_optionthe option to parse
trustedwhether the option is set by a trusted input or not

References vlc_value_t::b_bool, config_GetType(), config_IsSafe(), vlc_value_t::f_float, vlc_value_t::i_int, i_type, msg_Err, psz_name, vlc_value_t::psz_string, psz_value, strcasecmp(), strdup(), strtoll(), var_Create(), var_Set(), vlc_atof_c(), VLC_VAR_BOOL, VLC_VAR_FLOAT, VLC_VAR_INTEGER, and VLC_VAR_STRING.

Referenced by input_item_ApplyOptions(), and var_LocationParse().

◆ vlc_CPU_dump()

◆ vlc_custom_create()

void * vlc_custom_create ( vlc_object_t p_this,
size_t  i_size,
const char *  psz_type 

Creates a VLC object.

Note that because the object name pointer must remain valid, potentially even after the destruction of the object (through the message queues), this function CANNOT be exported to plugins as is. In this case, the old vlc_object_create() must be used instead.

p_thisan existing VLC object
i_sizebyte size of the object structure
psz_typeobject type name
the created object, or NULL.

References unlikely, and vlc_object_init().

◆ vlc_ExitInit()

void vlc_ExitInit ( vlc_exit_t exit)

◆ vlc_LogInit()

void vlc_LogInit ( libvlc_int_t vlc)

Initializes the messages logging subsystem and drain the early messages to the configured log.

References discard_log, vlc_LogModuleCreate(), vlc_LogSwitch(), and VLC_OBJECT.

Referenced by libvlc_InternalInit().

◆ vlc_LogPreinit()

int vlc_LogPreinit ( libvlc_int_t vlc)

Performs preinitialization of the messages logging subsystem.

Early log messages will be stored in memory until the subsystem is fully initialized with vlc_LogInit(). This enables logging before the configuration and modules bank are ready.

0 on success, -1 on error.

References unlikely, vlc_LogEarlyOpen(), vlc_LogSpam(), vlc_LogSwitch(), vlc_LogSwitchCreate(), and VLC_OBJECT.

Referenced by libvlc_InternalInit().

◆ vlc_MetadataRequest()

int vlc_MetadataRequest ( libvlc_int_t libvlc,
input_item_t item,
input_item_meta_request_option_t  i_options,
const struct vlc_metadata_cbs cbs,
void *  cbs_userdata,
int  timeout,
void *  id 

◆ vlc_object_deinit()

void vlc_object_deinit ( vlc_object_t obj)

Deinitializes a VLC object.

This frees resources allocated by vlc_object_init().

References vlc_object_internals::resources, var_DestroyAll(), vlc_internals, vlc_restorecancel(), and vlc_savecancel().

Referenced by main(), and vlc_object_delete().

◆ vlc_object_init()

int vlc_object_init ( vlc_object_t obj,
vlc_object_t parent,
const char *  type_name 

Initializes a VLC object.

objstorage space for object to initialize [OUT]
parentparent object (or NULL to initialize the root) [IN]
type_nameobject type name
The type name pointer must remain valid even after the object is deinitialized, as it might be passed by address to log message queue. Using constant string literals is appropriate.
Return values
0on success
-1on (out of memory) error

Referenced by main().

◆ vlc_objres_clear()

void vlc_objres_clear ( vlc_object_t obj)

◆ vlc_objres_new()

void * vlc_objres_new ( size_t  size,
void(*)(void *)  release 

Allocates an object resource.

sizestorage size in bytes of the resource data
releasecallback to release the resource
a pointer to the (uninitialized) storage space, or NULL on error

References vlc_res::payload, vlc_res::release, and unlikely.

Referenced by vlc_obj_malloc().

◆ vlc_objres_push()

void vlc_objres_push ( vlc_object_t obj,
void *  data 

Pushes an object resource on the object resources stack.

objobject to allocate the resource for
dataresource base address (as returned by vlc_objres_new())

References container_of, vlc_res::payload, vlc_res::prev, and vlc_obj_res().

Referenced by vlc_obj_malloc().

◆ vlc_objres_remove()

void vlc_objres_remove ( vlc_object_t obj,
void *  data,
bool(*)(void *, void *)  match 

Releases one object resource explicitly.

If a resource associated with an object needs to be released explicitly earlier than normal, call this function. This is relatively slow and should be avoided.

objobject whose resource to release
dataprivate data for the comparison function
matchcomparison function to match the targeted resource

References vlc_res::payload, vlc_res::prev, vlc_res::release, and vlc_obj_res().

Referenced by vlc_obj_free().

◆ vlc_threads_setup()

void vlc_threads_setup ( libvlc_int_t p_libvlc)

◆ vlc_trace()

void vlc_trace ( const char *  fn,
const char *  file,
unsigned  line 

Print a backtrace to the standard error for debugging purpose.

References ARRAY_SIZE, and fsync().

Referenced by vlc_thread_fatal().

Variable Documentation

◆ psz_vlc_changeset

const char psz_vlc_changeset[]

Referenced by Version(), and vlc_LogSpam().