VLC 4.0.0-dev
|
Before it can do anything useful, LibVLC must be initialized. More...
Modules | |
LibVLC error handling | |
LibVLC asynchronous events | |
LibVLC emits asynchronous events. | |
LibVLC logging | |
libvlc_log_* functions provide access to the LibVLC messages log. | |
Data Structures | |
struct | libvlc_module_description_t |
Description of a module. More... | |
Typedefs | |
typedef struct libvlc_instance_t | libvlc_instance_t |
This structure is opaque. More... | |
typedef int64_t | libvlc_time_t |
typedef struct libvlc_module_description_t | libvlc_module_description_t |
Description of a module. More... | |
Functions | |
libvlc_instance_t * | libvlc_new (int argc, const char *const *argv) |
Create and initialize a libvlc instance. More... | |
void | libvlc_release (libvlc_instance_t *p_instance) |
Decrement the reference count of a libvlc instance, and destroy it if it reaches zero. More... | |
libvlc_instance_t * | libvlc_retain (libvlc_instance_t *p_instance) |
Increments the reference count of a libvlc instance. More... | |
int | libvlc_abi_version (void) |
Get the ABI version of the libvlc library. More... | |
int | libvlc_add_intf (libvlc_instance_t *p_instance, const char *name) |
Try to start a user interface for the libvlc instance. More... | |
void | libvlc_set_exit_handler (libvlc_instance_t *p_instance, void(*cb)(void *), void *opaque) |
Registers a callback for the LibVLC exit event. More... | |
void | libvlc_set_user_agent (libvlc_instance_t *p_instance, const char *name, const char *http) |
Sets the application name. More... | |
void | libvlc_set_app_id (libvlc_instance_t *p_instance, const char *id, const char *version, const char *icon) |
Sets some meta-information about the application. More... | |
const char * | libvlc_get_version (void) |
Retrieve libvlc version. More... | |
const char * | libvlc_get_compiler (void) |
Retrieve libvlc compiler version. More... | |
const char * | libvlc_get_changeset (void) |
Retrieve libvlc changeset. More... | |
void | libvlc_free (void *ptr) |
Frees an heap allocation returned by a LibVLC function. More... | |
void | libvlc_module_description_list_release (libvlc_module_description_t *p_list) |
Release a list of module descriptions. More... | |
libvlc_module_description_t * | libvlc_audio_filter_list_get (libvlc_instance_t *p_instance) |
Returns a list of audio filters that are available. More... | |
libvlc_module_description_t * | libvlc_video_filter_list_get (libvlc_instance_t *p_instance) |
Returns a list of video filters that are available. More... | |
Before it can do anything useful, LibVLC must be initialized.
You can create one (or more) instance(s) of LibVLC in a given process, with libvlc_new() and destroy them with libvlc_release().
typedef struct libvlc_instance_t libvlc_instance_t |
This structure is opaque.
It represents a libvlc instance
typedef struct libvlc_module_description_t libvlc_module_description_t |
Description of a module.
typedef int64_t libvlc_time_t |
int libvlc_abi_version | ( | void | ) |
Get the ABI version of the libvlc library.
This is different than the VLC version, which is the version of the whole VLC package. The value is the same as LIBVLC_ABI_VERSION_INT used when compiling.
int libvlc_add_intf | ( | libvlc_instance_t * | p_instance, |
const char * | name | ||
) |
Try to start a user interface for the libvlc instance.
p_instance | the instance |
name | interface name, or NULL for default |
libvlc_module_description_t * libvlc_audio_filter_list_get | ( | libvlc_instance_t * | p_instance | ) |
Returns a list of audio filters that are available.
p_instance | libvlc instance |
void libvlc_free | ( | void * | ptr | ) |
Frees an heap allocation returned by a LibVLC function.
If you know you're using the same underlying C run-time as the LibVLC implementation, then you can call ANSI C free() directly instead.
ptr | the pointer |
const char * libvlc_get_changeset | ( | void | ) |
Retrieve libvlc changeset.
Example: "aa9bce0bc4"
const char * libvlc_get_compiler | ( | void | ) |
Retrieve libvlc compiler version.
Example: "gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu6)"
const char * libvlc_get_version | ( | void | ) |
Retrieve libvlc version.
Example: "1.1.0-git The Luggage"
void libvlc_module_description_list_release | ( | libvlc_module_description_t * | p_list | ) |
Release a list of module descriptions.
p_list | the list to be released |
libvlc_instance_t * libvlc_new | ( | int | argc, |
const char *const * | argv | ||
) |
Create and initialize a libvlc instance.
This functions accept a list of "command line" arguments similar to the main(). These arguments affect the LibVLC instance default configuration.
On POSIX systems, the SIGCHLD signal must not be ignored, i.e. the signal handler must set to SIG_DFL or a function pointer, not SIG_IGN. Also while LibVLC is active, the wait() function shall not be called, and any call to waitpid() shall use a strictly positive value for the first parameter (i.e. the PID). Failure to follow those rules may lead to a deadlock or a busy loop. Also on POSIX systems, it is recommended that the SIGPIPE signal be blocked, even if it is not, in principles, necessary, e.g.:
On Microsoft Windows, setting the default DLL directories to SYSTEM32 exclusively is strongly recommended for security reasons:
argc | the number of arguments (should be 0) |
argv | list of arguments (should be NULL) |
void libvlc_release | ( | libvlc_instance_t * | p_instance | ) |
Decrement the reference count of a libvlc instance, and destroy it if it reaches zero.
p_instance | the instance to destroy |
libvlc_instance_t * libvlc_retain | ( | libvlc_instance_t * | p_instance | ) |
Increments the reference count of a libvlc instance.
The initial reference count is 1 after libvlc_new() returns.
p_instance | the instance to reference |
void libvlc_set_app_id | ( | libvlc_instance_t * | p_instance, |
const char * | id, | ||
const char * | version, | ||
const char * | icon | ||
) |
Sets some meta-information about the application.
See also libvlc_set_user_agent().
p_instance | LibVLC instance |
id | Java-style application identifier, e.g. "com.acme.foobar" |
version | application version numbers, e.g. "1.2.3" |
icon | application icon name, e.g. "foobar" |
void libvlc_set_exit_handler | ( | libvlc_instance_t * | p_instance, |
void(*)(void *) | cb, | ||
void * | opaque | ||
) |
Registers a callback for the LibVLC exit event.
This is mostly useful if the VLC playlist and/or at least one interface are started with libvlc_playlist_play() or libvlc_add_intf() respectively. Typically, this function will wake up your application main loop (from another thread).
p_instance | LibVLC instance |
cb | callback to invoke when LibVLC wants to exit, or NULL to disable the exit handler (as by default) |
opaque | data pointer for the callback |
void libvlc_set_user_agent | ( | libvlc_instance_t * | p_instance, |
const char * | name, | ||
const char * | http | ||
) |
Sets the application name.
LibVLC passes this as the user agent string when a protocol requires it.
p_instance | LibVLC instance |
name | human-readable application name, e.g. "FooBar player 1.2.3" |
http | HTTP User Agent, e.g. "FooBar/1.2.3 Python/2.6.0" |
libvlc_module_description_t * libvlc_video_filter_list_get | ( | libvlc_instance_t * | p_instance | ) |
Returns a list of video filters that are available.
p_instance | libvlc instance |