VLC
3.0.21
|
Go to the source code of this file.
Data Structures | |
struct | vlc_exit |
struct | libvlc_priv_t |
struct | counter_sample_t |
struct | counter_t |
Macros | |
#define | vlc_backtrace() vlc_trace(__func__, __FILE__, __LINE__) |
#define | vlc_custom_create(o, s, n) vlc_custom_create(VLC_OBJECT(o), s, n) |
#define | vlc_object_set_name(o, n) vlc_object_set_name(VLC_OBJECT(o), n) |
#define | vlc_object_set_destructor(a, b) vlc_object_set_destructor (VLC_OBJECT(a), b) |
#define | ZOOM_SECTION N_("Zoom") |
#define | ZOOM_QUARTER_KEY_TEXT N_("1:4 Quarter") |
#define | ZOOM_HALF_KEY_TEXT N_("1:2 Half") |
#define | ZOOM_ORIGINAL_KEY_TEXT N_("1:1 Original") |
#define | ZOOM_DOUBLE_KEY_TEXT N_("2:1 Double") |
#define | libvlc_stats(o) (libvlc_priv((VLC_OBJECT(o))->obj.libvlc)->b_stats) |
Typedefs | |
typedef struct variable_t | variable_t |
typedef struct vlc_logger_t | vlc_logger_t |
typedef struct vlc_exit | vlc_exit_t |
typedef void(* | vlc_destructor_t) (struct vlc_object_t *) |
typedef struct vlc_dialog_provider | vlc_dialog_provider |
Private LibVLC instance data. More... | |
typedef struct vlc_keystore | vlc_keystore |
typedef struct vlc_actions_t | vlc_actions_t |
typedef struct libvlc_priv_t | libvlc_priv_t |
typedef struct counter_sample_t | counter_sample_t |
typedef struct counter_t | counter_t |
Functions | |
void | system_Init (void) |
Initializes MME timer, Winsock. More... | |
void | system_Configure (libvlc_int_t *, int, const char *const []) |
void | vlc_CPU_init (void) |
Determines the CPU capabilities and stores them in cpu_flags. More... | |
void | vlc_CPU_dump (vlc_object_t *) |
int | vlc_clone_detach (vlc_thread_t *, void *(*)(void *), void *, int) |
int | vlc_set_priority (vlc_thread_t, int) |
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. More... | |
void | vlc_assert_locked (vlc_mutex_t *) |
Asserts that a mutex is locked by the calling thread. More... | |
int | vlc_LogPreinit (libvlc_int_t *) |
Performs preinitialization of the messages logging subsystem. More... | |
int | vlc_LogInit (libvlc_int_t *) |
Initializes the messages logging subsystem and drain the early messages to the configured log. More... | |
void | vlc_LogDeinit (libvlc_int_t *) |
void | vlc_ExitInit (vlc_exit_t *) |
void | vlc_ExitDestroy (vlc_exit_t *) |
void * | vlc_custom_create (vlc_object_t *p_this, size_t i_size, const char *psz_type) |
Creates a VLC object. More... | |
int | vlc_object_set_name (vlc_object_t *, const char *) |
Assign a name to an object for vlc_object_find_name(). More... | |
void | vlc_object_set_destructor (vlc_object_t *, vlc_destructor_t) |
Set the destructor of a vlc object. More... | |
void * | vlc_objres_new (size_t size, void(*release)(void *)) |
Allocates an object resource. More... | |
void | vlc_objres_push (vlc_object_t *obj, void *data) |
Pushes an object resource on the object resources stack. More... | |
void | vlc_objres_clear (vlc_object_t *obj) |
Releases all resources of an object. More... | |
void | vlc_objres_remove (vlc_object_t *obj, void *data, bool(*match)(void *, void *)) |
Releases one object resource explicitly. More... | |
static libvlc_priv_t * | libvlc_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. More... | |
void | intf_DestroyAll (libvlc_int_t *) |
Stops and destroys all interfaces, then the playlist. More... | |
int | vlc_MetadataRequest (libvlc_int_t *libvlc, input_item_t *item, input_item_meta_request_option_t i_options, 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. More... | |
counter_t * | stats_CounterCreate (int) |
Create a statistics counter. More... | |
void | stats_Update (counter_t *, uint64_t, uint64_t *) |
Update a counter element with new values. More... | |
void | stats_CounterClean (counter_t *) |
void | stats_ComputeInputStats (input_thread_t *, input_stats_t *) |
void | stats_ReinitInputStats (input_stats_t *) |
Variables | |
const char | psz_vlc_changeset [] |
#define libvlc_stats | ( | o | ) | (libvlc_priv((VLC_OBJECT(o))->obj.libvlc)->b_stats) |
#define vlc_backtrace | ( | ) | vlc_trace(__func__, __FILE__, __LINE__) |
#define vlc_custom_create | ( | o, | |
s, | |||
n | |||
) | vlc_custom_create(VLC_OBJECT(o), s, n) |
#define vlc_object_set_destructor | ( | a, | |
b | |||
) | vlc_object_set_destructor (VLC_OBJECT(a), b) |
#define vlc_object_set_name | ( | o, | |
n | |||
) | vlc_object_set_name(VLC_OBJECT(o), n) |
#define ZOOM_DOUBLE_KEY_TEXT N_("2:1 Double") |
#define ZOOM_HALF_KEY_TEXT N_("1:2 Half") |
#define ZOOM_ORIGINAL_KEY_TEXT N_("1:1 Original") |
#define ZOOM_QUARTER_KEY_TEXT N_("1:4 Quarter") |
#define ZOOM_SECTION N_("Zoom") |
typedef struct counter_sample_t counter_sample_t |
typedef struct libvlc_priv_t libvlc_priv_t |
typedef struct variable_t variable_t |
typedef struct vlc_actions_t vlc_actions_t |
typedef void(* vlc_destructor_t) (struct vlc_object_t *) |
typedef struct vlc_dialog_provider vlc_dialog_provider |
Private LibVLC instance data.
typedef struct vlc_exit vlc_exit_t |
typedef struct vlc_keystore vlc_keystore |
typedef struct vlc_logger_t vlc_logger_t |
anonymous enum |
void intf_DestroyAll | ( | libvlc_int_t * | libvlc | ) |
Stops and destroys all interfaces, then the playlist.
libvlc | the LibVLC instance |
References AddIntfCallback(), config_ChainDestroy(), libvlc_priv(), lock, module_unneed, intf_thread_t::p_cfg, intf_thread_t::p_module, intf_thread_t::p_next, pl_priv, libvlc_priv_t::playlist, playlist_Destroy(), var_DelCallback, vlc_mutex_lock(), vlc_mutex_unlock(), and vlc_object_release.
Referenced by libvlc_InternalCleanup().
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. Unlike playlist_Add() and variants, it inserts an item to the beginning of the playlist. That is meant to compensate for the reverse parsing order of the command line.
< No error
References input_item_AddOptions(), input_item_New, input_item_Release(), intf_GetPlaylist(), playlist_t::p_playing, playlist_Lock(), playlist_NodeAddInput(), playlist_Unlock(), unlikely, and VLC_SUCCESS.
Referenced by GetFilenames(), and libvlc_InternalInit().
|
inlinestatic |
References container_of.
Referenced by get_dialog_provider(), get_memory_keystore(), InputEvent(), intf_DestroyAll(), intf_GetPlaylist(), IPCHelperThread(), libvlc_ArtRequest(), libvlc_InternalActionsClean(), libvlc_InternalActionsInit(), libvlc_InternalCleanup(), libvlc_InternalCreate(), libvlc_InternalDestroy(), libvlc_InternalDialogClean(), libvlc_InternalDialogInit(), libvlc_InternalInit(), libvlc_InternalKeystoreClean(), libvlc_InternalKeystoreInit(), libvlc_InternalPlay(), libvlc_MetadataCancel(), libvlc_MetadataRequest(), libvlc_Quit(), libvlc_SetExitHandler(), vlc_actions_get_key_names(), vlc_LogInit(), vlc_LogPreinit(), vlc_LogSet(), vlm_Delete(), and vlm_New().
void stats_ComputeInputStats | ( | input_thread_t * | , |
input_stats_t * | |||
) |
References input_thread_private_t::counters, input_thread_private_t::counters_lock, input_stats_t::f_demux_bitrate, input_stats_t::f_input_bitrate, input_stats_t::f_send_bitrate, input_stats_t::i_decoded_audio, input_stats_t::i_decoded_video, input_stats_t::i_demux_corrupted, input_stats_t::i_demux_discontinuity, input_stats_t::i_demux_read_bytes, input_stats_t::i_displayed_pictures, input_stats_t::i_lost_abuffers, input_stats_t::i_lost_pictures, input_stats_t::i_played_abuffers, input_stats_t::i_read_bytes, input_stats_t::i_read_packets, input_stats_t::i_sent_bytes, input_stats_t::i_sent_packets, input_priv(), libvlc_stats, input_stats_t::lock, input_thread_private_t::p_decoded_audio, input_thread_private_t::p_decoded_video, input_thread_private_t::p_demux_bitrate, input_thread_private_t::p_demux_corrupted, input_thread_private_t::p_demux_discontinuity, input_thread_private_t::p_demux_read, input_thread_private_t::p_displayed_pictures, input_thread_private_t::p_input_bitrate, input_thread_private_t::p_lost_abuffers, input_thread_private_t::p_lost_pictures, input_thread_private_t::p_played_abuffers, input_thread_private_t::p_read_bytes, input_thread_private_t::p_read_packets, input_thread_private_t::p_sout_send_bitrate, input_thread_private_t::p_sout_sent_bytes, input_thread_private_t::p_sout_sent_packets, stats_GetRate(), stats_GetTotal(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by MainLoopStatistics().
void stats_CounterClean | ( | counter_t * | ) |
References counter_t::i_samples, counter_t::pp_samples, and TAB_CLEAN.
counter_t* stats_CounterCreate | ( | int | i_compute_type | ) |
Create a statistics counter.
i_compute_type | the aggregation type. One of STATS_LAST (always keep the last value), STATS_COUNTER (increment by the passed value), STATS_MAX (keep the maximum passed value), STATS_MIN, or STATS_DERIVATIVE (keep a time derivative of the value) |
References counter_t::i_compute_type, counter_t::i_samples, counter_t::last_update, and counter_t::pp_samples.
void stats_ReinitInputStats | ( | input_stats_t * | ) |
References input_stats_t::f_average_demux_bitrate, input_stats_t::f_average_input_bitrate, input_stats_t::f_demux_bitrate, input_stats_t::f_input_bitrate, input_stats_t::f_send_bitrate, input_stats_t::i_decoded_audio, input_stats_t::i_decoded_video, input_stats_t::i_demux_corrupted, input_stats_t::i_demux_discontinuity, input_stats_t::i_demux_read_bytes, input_stats_t::i_demux_read_packets, input_stats_t::i_displayed_pictures, input_stats_t::i_lost_abuffers, input_stats_t::i_lost_pictures, input_stats_t::i_played_abuffers, input_stats_t::i_read_bytes, input_stats_t::i_read_packets, input_stats_t::i_sent_bytes, input_stats_t::i_sent_packets, input_stats_t::lock, vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by stats_NewInputStats().
void stats_Update | ( | counter_t * | p_counter, |
uint64_t | val, | ||
uint64_t * | new_val | ||
) |
Update a counter element with new values.
p_counter | the counter to update |
val | the vlc_value union containing the new value to aggregate. For more information on how data is aggregated, |
val_new | a pointer that will be filled with new data |
References CLOCK_FREQ, counter_sample_t::date, counter_t::i_compute_type, counter_t::i_samples, counter_t::last_update, mdate(), counter_t::pp_samples, STATS_COUNTER, STATS_DERIVATIVE, TAB_APPEND, TAB_ERASE, TAB_INSERT, unlikely, and counter_sample_t::value.
Referenced by AStreamReadBlock(), AStreamReadStream(), EsOutSend(), and input_CreateFilename().
void system_Configure | ( | libvlc_int_t * | , |
int | , | ||
const char * const | [] | ||
) |
References hpipeIPC, IPC_CMD_ENQUEUE, IPC_CMD_GO, IPCHelperThread(), msg_Dbg, msg_Err, msg_Info, s_jvm, strdup(), system_ConfigureDbus(), system_End(), tidIPCFirst, tidIPCHelper, var_Create, var_InheritBool, var_SetAddress, VLC_IPC_PIPE, vlc_path2uri(), and VLC_VAR_ADDRESS.
Referenced by libvlc_InternalInit().
void system_Init | ( | void | ) |
Initializes MME timer, Winsock.
References _fmode_bin, getenv(), LoadLibraryFlags, setenv(), and system_InitWSA().
Referenced by config_GetLibDir(), and libvlc_InternalInit().
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_obj | the object in which the variable must be created |
psz_option | the option to parse |
trusted | whether 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, strdup(), strtoll(), us_atof(), var_Create(), var_Set(), VLC_VAR_BOOL, VLC_VAR_FLOAT, VLC_VAR_INTEGER, and VLC_VAR_STRING.
Referenced by input_item_ApplyOptions(), and var_LocationParse().
void vlc_assert_locked | ( | vlc_mutex_t * | ) |
Asserts that a mutex is locked by the calling thread.
References RUNNING_ON_VALGRIND.
Referenced by aout_OutputAssertLocked(), aout_OutputUnlock(), DecoderUpdateFormatLocked(), InputItemFindCat(), InputItemVaAddInfo(), vlc_fifo_DequeueAllUnlocked(), vlc_fifo_DequeueUnlocked(), and vlc_fifo_QueueUnlocked().
int vlc_clone_detach | ( | vlc_thread_t * | , |
void * | *)(void *, | ||
void * | , | ||
int | |||
) |
void vlc_CPU_dump | ( | vlc_object_t * | ) |
References msg_Dbg, vlc_memstream::stream, vlc_memstream_close(), vlc_memstream_open(), and vlc_memstream_puts().
Referenced by libvlc_InternalInit().
void vlc_CPU_init | ( | void | ) |
Determines the CPU capabilities and stores them in cpu_flags.
The result can be retrieved with vlc_CPU().
References cpu_flags.
Referenced by _DLL_InitTerm(), DllMain(), and vlc_CPU().
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_this | an existing VLC object |
i_size | byte size of the object structure |
psz_type | object type name |
References vlc_object_internals::first, vlc_common_members::flags, vlc_common_members::force, vlc_common_members::header, vlc_common_members::libvlc, likely, vlc_object_internals::next, vlc_object_t::obj, vlc_common_members::object_type, vlc_common_members::parent, vlc_object_internals::pf_destructor, vlc_object_internals::prev, vlc_object_internals::psz_name, vlc_object_internals::refs, vlc_object_internals::resources, vlc_object_internals::tree_lock, TreeCommand(), unlikely, var_AddCallback, var_Create, vlc_object_internals::var_lock, vlc_object_internals::var_root, vlc_object_internals::var_wait, VarsCommand(), vlc_cond_init(), vlc_internals, vlc_mutex_init(), vlc_mutex_lock(), vlc_mutex_unlock(), vlc_object_hold(), vlc_restorecancel(), vlc_savecancel(), VLC_VAR_ISCOMMAND, and VLC_VAR_STRING.
Referenced by vlc_object_create().
void vlc_ExitDestroy | ( | vlc_exit_t * | ) |
References vlc_exit::lock, and vlc_mutex_destroy().
Referenced by libvlc_InternalDestroy().
void vlc_ExitInit | ( | vlc_exit_t * | ) |
References vlc_exit::handler, vlc_exit::lock, vlc_exit::opaque, and vlc_mutex_init().
Referenced by libvlc_InternalCreate().
void vlc_LogDeinit | ( | libvlc_int_t * | ) |
Referenced by libvlc_InternalCleanup().
int vlc_LogInit | ( | libvlc_int_t * | vlc | ) |
Initializes the messages logging subsystem and drain the early messages to the configured log.
References libvlc_priv(), vlc_logger_t::lock, vlc_logger_t::log, libvlc_priv_t::logger, vlc_logger_t::module, vlc_logger_t::sys, unlikely, vlc_LogEarlyClose(), vlc_logger_load(), vlc_module_load, vlc_rwlock_unlock(), vlc_rwlock_wrlock(), vlc_vaLogDiscard(), and vlc_vaLogEarly().
Referenced by libvlc_InternalInit().
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.
References libvlc_priv(), vlc_logger_t::lock, vlc_logger_t::log, libvlc_priv_t::logger, msg_Dbg, psz_vlc_changeset, unlikely, vlc_custom_create, vlc_LogEarlyOpen(), vlc_rwlock_init(), and vlc_vaLogDiscard().
Referenced by libvlc_InternalInit().
int vlc_MetadataRequest | ( | libvlc_int_t * | libvlc, |
input_item_t * | item, | ||
input_item_meta_request_option_t | i_options, | ||
int | timeout, | ||
void * | id | ||
) |
< Not enough memory
< No error
void vlc_object_set_destructor | ( | vlc_object_t * | p_this, |
vlc_destructor_t | pf_destructor | ||
) |
Set the destructor of a vlc object.
This function sets the destructor of the vlc object. It will be called when the object is destroyed when the its refcount reaches 0. (It is called by the internal function vlc_object_destroy())
References vlc_object_internals::pf_destructor, and vlc_internals.
int vlc_object_set_name | ( | vlc_object_t * | , |
const char * | |||
) |
Assign a name to an object for vlc_object_find_name().
< No error
< Not enough memory
References name, name_lock, vlc_object_internals::psz_name, strdup(), VLC_ENOMEM, vlc_internals, vlc_mutex_lock(), vlc_mutex_unlock(), and VLC_SUCCESS.
void vlc_objres_clear | ( | vlc_object_t * | obj | ) |
Releases all resources of an object.
All resources added with vlc_objres_add() are released in reverse order. The resource list is reset to empty.
obj | object whose resources to release |
References container_of, vlc_res::payload, vlc_res::release, and vlc_objres_pop().
Referenced by module_load(), and vlc_module_unload().
void* vlc_objres_new | ( | size_t | size, |
void(*)(void *) | release | ||
) |
Allocates an object resource.
size | storage size in bytes of the resource data |
release | callback to release the resource |
References add_overflow, and unlikely.
Referenced by vlc_obj_alloc_common(), and vlc_obj_malloc().
void vlc_objres_push | ( | vlc_object_t * | obj, |
void * | data | ||
) |
Pushes an object resource on the object resources stack.
obj | object to allocate the resource for |
data | resource 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_alloc_common(), and vlc_obj_malloc().
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.
obj | object whose resource to release |
data | private data for the comparison function |
match | comparison 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().
int vlc_set_priority | ( | vlc_thread_t | , |
int | |||
) |
< No error
< No error
< Unspecified error
< No error
< No error
< Unspecified error
< No error
References vlc_thread_t::handle, rt_offset, rt_priorities, VLC_EGENERIC, and VLC_SUCCESS.
Referenced by Run().
void vlc_threads_setup | ( | libvlc_int_t * | ) |
References ABOVE_NORMAL_PRIORITY_CLASS, lock, mdate_default(), mdate_selected, msg_Dbg, rt_offset, rt_priorities, SelectClockSource(), setup_lock, var_InheritBool, var_InheritInteger, vlc_mutex_lock(), vlc_mutex_unlock(), VLC_OBJECT, and VLC_STATIC_MUTEX.
Referenced by libvlc_InternalInit(), and mdate_default().
void vlc_trace | ( | const char * | fn, |
const char * | file, | ||
unsigned | line | ||
) |
Print a backtrace to the standard error for debugging purpose.
References fsync().
Referenced by vlc_thread_fatal().
const char psz_vlc_changeset[] |
Referenced by Version(), vlc_LogPreinit(), and vlc_LogSet().