|
VLC 4.0.0-dev
|
This file is a collection of common definitions and types. More...
Go to the source code of this file.
Data Structures | |
| struct | vlc_rational_t |
Macros | |
| #define | VLC_USED |
| #define | VLC_MALLOC |
| #define | VLC_DEPRECATED |
| #define | VLC_DEPRECATED_ENUM |
| Deprecated enum member annotation. | |
| #define | VLC_FORMAT(x, y) |
| String format function annotation. | |
| #define | VLC_FORMAT_ARG(x) |
| Format string translation function annotation. | |
| #define | VLC_WEAK |
| Weak symbol annotation. | |
| #define | likely(p) (!!(p)) |
| Predicted true condition. | |
| #define | unlikely(p) (!!(p)) |
| Predicted false condition. | |
| #define | unreachable() ((void)0) |
| Impossible branch. | |
| #define | vlc_assert_unreachable() (vlc_assert(!"unreachable"), unreachable()) |
| Impossible branch assertion. | |
| #define | vlc_assert(pred) ((void)0) |
| Run-time assertion. | |
| #define | VLC_EXTERN |
| #define | VLC_EXPORT |
| #define | VLC_API VLC_EXTERN VLC_EXPORT |
| Exported API call annotation. | |
| #define | VLC_FOURCC(a, b, c, d) |
| #define | VLC_TWOCC(a, b) ( (uint16_t)(a) | ( (uint16_t)(b) << 8 ) ) |
| #define | VLC_SUCCESS 0 |
| No error. | |
| #define | VLC_EGENERIC (-2 * (1 << (sizeof (int) * 8 - 2))) /* INT_MIN */ |
| Unspecified error. | |
| #define | VLC_ENOMEM (-ENOMEM) |
| Not enough memory. | |
| #define | VLC_ETIMEOUT (-ETIMEDOUT) |
| Timeout. | |
| #define | VLC_ENOENT (-ENOENT) |
| Not found. | |
| #define | VLC_EINVAL (-EINVAL) |
| Bad variable value. | |
| #define | VLC_EACCES (-EACCES) |
| Operation forbidden. | |
| #define | VLC_ENOTSUP (-ENOTSUP) |
| Operation not supported. | |
| #define | VLC_CLIP(v, min, max) __MIN(__MAX((v), (min)), (max)) |
| #define | VLC_INT_FUNC(basename) |
| #define | VLC_INT_FUNC_TYPE(basename, type, suffix) |
| #define | VLC_INT_GENERIC(func, x) |
| #define | ctz(x) VLC_INT_GENERIC(vlc_ctz, x) |
| Count trailing zeroes. | |
| #define | parity(x) VLC_INT_GENERIC(vlc_parity, x) |
| Parity. | |
| #define | vlc_popcount(x) |
| Bit weight / population count. | |
| #define | add_overflow(a, b, r) |
| Overflowing addition. | |
| #define | mul_overflow(a, b, r) |
| Overflowing multiplication. | |
| #define | FREENULL(a) do { free( a ); a = NULL; } while(0) |
| #define | EMPTY_STR(str) (!str || !*str) |
| #define | ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) |
| #define | hton16(i) vlc_bswap16(i) |
| #define | hton32(i) vlc_bswap32(i) |
| #define | hton64(i) vlc_bswap64(i) |
| #define | ntoh16(i) hton16(i) |
| #define | ntoh32(i) hton32(i) |
| #define | ntoh64(i) hton64(i) |
| #define | GetWBE(p) U16_AT(p) |
| #define | GetDWBE(p) U32_AT(p) |
| #define | GetQWBE(p) U64_AT(p) |
| #define | VLC_UNUSED(x) (void)(x) |
| #define | container_of(ptr, type, member) ((type *)(((char *)(ptr)) - offsetof(type, member))) |
| #define | vlc_pgettext(ctx, id) vlc_pgettext_aux( ctx "\004" id, id ) |
| #define | DIR_SEP_CHAR '/' |
| #define | DIR_SEP "/" |
| #define | PATH_SEP_CHAR ':' |
| #define | PATH_SEP ":" |
| #define | LICENSE_MSG |
| #define | ARRAY_STATIC_SIZE static |
Functions | |
| static void | vlc_fourcc_to_char (vlc_fourcc_t fcc, char *psz_fourcc) |
| Translate a vlc_fourcc into its string representation. | |
| static size_t | vlc_align (size_t v, size_t align) |
| Make integer v a multiple of align. | |
| static int64_t | GCD (int64_t a, int64_t b) |
| Greatest common divisor. | |
| static uint8_t | clip_uint8_vlc (int32_t a) |
| static int | vlc_ctz_generic (unsigned long long x) |
| static int | vlc_parity_generic (unsigned long long x) |
| static int | vlc_popcount_generic (unsigned long long x) |
| static int | vlc_ctz (unsigned x) |
| static int | vlc_ctzl (unsigned long x) |
| static int | vlc_ctzll (unsigned long long x) |
| static int | vlc_parity (unsigned x) |
| static int | vlc_parityl (unsigned long x) |
| static int | vlc_parityll (unsigned long long x) |
| static int | vlc_popcount (unsigned x) |
| static int | vlc_popcountl (unsigned long x) |
| static int | vlc_popcountll (unsigned long long x) |
| static uint16_t | vlc_bswap16 (uint16_t x) |
| Byte swap (16 bits) | |
| static uint32_t | vlc_bswap32 (uint32_t x) |
| Byte swap (32 bits) | |
| static uint64_t | vlc_bswap64 (uint64_t x) |
| Byte swap (64 bits) | |
| static bool | uadd_overflow (unsigned a, unsigned b, unsigned *res) |
| static bool | uaddl_overflow (unsigned long a, unsigned long b, unsigned long *res) |
| static bool | uaddll_overflow (unsigned long long a, unsigned long long b, unsigned long long *res) |
| static bool | umul_overflow (unsigned a, unsigned b, unsigned *res) |
| static bool | umull_overflow (unsigned long a, unsigned long b, unsigned long *res) |
| static bool | umulll_overflow (unsigned long long a, unsigned long long b, unsigned long long *res) |
| static uint16_t | U16_AT (const void *p) |
| Reads 16 bits in network byte order. | |
| static uint32_t | U32_AT (const void *p) |
| Reads 32 bits in network byte order. | |
| static uint64_t | U64_AT (const void *p) |
| Reads 64 bits in network byte order. | |
| static uint16_t | GetWLE (const void *p) |
| Reads 16 bits in little-endian order. | |
| static uint32_t | GetDWLE (const void *p) |
| Reads 32 bits in little-endian order. | |
| static uint64_t | GetQWLE (const void *p) |
| Reads 64 bits in little-endian order. | |
| static void | SetWBE (void *p, uint16_t w) |
| Writes 16 bits in network byte order. | |
| static void | SetDWBE (void *p, uint32_t dw) |
| Writes 32 bits in network byte order. | |
| static void | SetQWBE (void *p, uint64_t qw) |
| Writes 64 bits in network byte order. | |
| static void | SetWLE (void *p, uint16_t w) |
| Writes 16 bits in little endian order. | |
| static void | SetDWLE (void *p, uint32_t dw) |
| Writes 32 bits in little endian order. | |
| static void | SetQWLE (void *p, uint64_t qw) |
| Writes 64 bits in little endian order. | |
| bool | vlc_ureduce (unsigned *, unsigned *, uint64_t, uint64_t, uint64_t) |
| static void * | vlc_alloc (size_t count, size_t size) |
| static void * | vlc_reallocarray (void *ptr, size_t count, size_t size) |
| const char * | vlc_gettext (const char *msgid) |
| In-tree plugins share their gettext domain with LibVLC. | |
| const char * | vlc_ngettext (const char *s, const char *p, unsigned long n) |
| static const char * | vlc_pgettext_aux (const char *ctx, const char *id) |
| static void * | xmalloc (size_t len) |
| static void * | xrealloc (void *ptr, size_t len) |
| static char * | xstrdup (const char *str) |
| const char * | VLC_CompileBy (void) |
| const char * | VLC_CompileHost (void) |
| const char * | VLC_Compiler (void) |
This file is a collection of common definitions and types.
| #define ARRAY_SIZE | ( | x | ) | (sizeof(x) / sizeof((x)[0])) |
| #define ARRAY_STATIC_SIZE static |
| #define container_of | ( | ptr, | |
| type, | |||
| member | |||
| ) | ((type *)(((char *)(ptr)) - offsetof(type, member))) |
| #define DIR_SEP "/" |
| #define DIR_SEP_CHAR '/' |
| #define EMPTY_STR | ( | str | ) | (!str || !*str) |
| #define FREENULL | ( | a | ) | do { free( a ); a = NULL; } while(0) |
| #define hton16 | ( | i | ) | vlc_bswap16(i) |
| #define hton32 | ( | i | ) | vlc_bswap32(i) |
| #define hton64 | ( | i | ) | vlc_bswap64(i) |
| #define LICENSE_MSG |
| #define ntoh16 | ( | i | ) | hton16(i) |
| #define ntoh32 | ( | i | ) | hton32(i) |
| #define ntoh64 | ( | i | ) | hton64(i) |
| #define PATH_SEP ":" |
| #define PATH_SEP_CHAR ':' |
| #define VLC_FOURCC | ( | a, | |
| b, | |||
| c, | |||
| d | |||
| ) |
| #define vlc_pgettext | ( | ctx, | |
| id | |||
| ) | vlc_pgettext_aux( ctx "\004" id, id ) |
| #define VLC_TWOCC | ( | a, | |
| b | |||
| ) | ( (uint16_t)(a) | ( (uint16_t)(b) << 8 ) ) |
| #define VLC_UNUSED | ( | x | ) | (void)(x) |
| typedef struct addon_entry_t addon_entry_t |
| typedef struct audio_format_t audio_format_t |
| typedef struct audio_output audio_output_t |
| typedef audio_format_t audio_sample_format_t |
| typedef struct vlc_fifo_t block_fifo_t |
| typedef struct vlc_frame_t block_t |
| typedef struct config_category_t config_category_t |
| typedef struct config_chain_t config_chain_t |
| typedef struct es_format_t es_format_t |
| typedef struct es_out_id_t es_out_id_t |
| typedef struct image_handler_t image_handler_t |
| typedef struct info_category_t info_category_t |
| typedef struct input_attachment_t input_attachment_t |
| typedef struct input_item_node_t input_item_node_t |
| typedef struct input_item_t input_item_t |
| typedef struct input_source_t input_source_t |
| typedef struct input_stats_t input_stats_t |
| typedef struct iso639_lang_t iso639_lang_t |
| typedef struct libvlc_int_t libvlc_int_t |
| typedef struct module_config_t module_config_t |
| typedef struct seekpoint_t seekpoint_t |
| typedef struct services_discovery_t services_discovery_t |
| typedef struct session_descriptor_t session_descriptor_t |
| typedef struct sout_access_out_t sout_access_out_t |
| typedef struct sout_input_t sout_input_t |
| typedef struct sout_mux_t sout_mux_t |
| typedef struct sout_packetizer_input_t sout_packetizer_input_t |
| typedef struct sout_stream_t sout_stream_t |
| typedef struct subpicture_region_t subpicture_region_t |
| typedef struct subpicture_t subpicture_t |
| typedef struct subs_format_t subs_format_t |
| typedef struct video_format_t video_format_t |
| typedef video_format_t video_frame_format_t |
| typedef struct video_palette_t video_palette_t |
| typedef struct vlc_es_id_t vlc_es_id_t |
| typedef struct vlc_fifo_t vlc_fifo_t |
| typedef uint32_t vlc_fourcc_t |
The vlc_fourcc_t type.
See http://www.webartz.com/fourcc/ for a very detailed list.
| typedef struct vlc_hash_md5_ctx vlc_hash_md5_t |
| typedef struct vlc_meta_t vlc_meta_t |
| typedef struct vlc_object_t vlc_object_t |
| typedef struct vlc_renderer_discovery_t vlc_renderer_discovery_t |
| typedef struct vlc_renderer_item_t vlc_renderer_item_t |
| typedef struct vlc_viewpoint_t vlc_viewpoint_t |
| typedef struct vlm_message_t vlm_message_t |
| typedef struct vod_media_t vod_media_t |
| typedef struct vout_thread_t vout_thread_t |
| typedef struct xml_reader_t xml_reader_t |
|
inlinestatic |
Reads 32 bits in little-endian order.
References p, and vlc_bswap32().
|
inlinestatic |
Reads 64 bits in little-endian order.
References p, and vlc_bswap64().
|
inlinestatic |
Reads 16 bits in little-endian order.
References p, and vlc_bswap16().
|
inlinestatic |
Writes 32 bits in network byte order.
Referenced by h264_chainsplit_MTAP(), h264_deaggregate_STAP(), h265_deaggregate_AP(), h26x_wrap_prefix(), vlc_h2_frame_alloc(), vlc_h2_frame_goaway(), vlc_h2_frame_rst_stream(), vlc_h2_frame_settings(), and vlc_h2_frame_window_update().
|
inlinestatic |
Writes 32 bits in little endian order.
References p, and vlc_bswap32().
|
inlinestatic |
|
inlinestatic |
Writes 64 bits in little endian order.
References p, and vlc_bswap64().
|
inlinestatic |
Writes 16 bits in network byte order.
Referenced by vlc_h2_frame_settings(), and xiph_decode().
|
inlinestatic |
Writes 16 bits in little endian order.
References p, and vlc_bswap16().
|
inlinestatic |
|
inlinestatic |
Reads 32 bits in network byte order.
Referenced by parse_signature_v4_packet().
|
inlinestatic |
|
inlinestatic |
References count, and mul_overflow.
Referenced by aout_DevicesList(), config_GetIntChoices(), config_LoadCmdLine(), config_SortConfig(), ControlSetEsList(), EsOutVaPrivControlLocked(), GetCCDescLocked(), GetFallback(), httpd_StreamSetHTTPHeaders(), input_EsOutTimeshiftNew(), input_GetAttachments(), input_item_CopyOptions(), input_resource_HoldVouts(), IPCHelperThread(), module_config_get(), spu_SelectSubpictures(), ThumbnailerToFilesRun(), timestamp_FifoNew(), TsStorageNew(), vlc_actions_get_keycodes(), vlc_GetCPUCount(), vlc_http_msg_h2_frame(), vlc_idna_to_ascii(), vlc_input_title_Duplicate(), vlc_player_GetEsIdList(), vlc_player_SelectEsIdList(), vlc_player_title_list_Create(), vlc_player_vout_HoldAll(), vlc_playlist_NewMetaArray(), vlc_poll_i11e(), vlc_preparser_GenerateThumbnailToFiles(), vlc_rd_get_names(), and vlc_sd_GetNames().
| const char * VLC_CompileBy | ( | void | ) |
Referenced by Version().
| const char * VLC_CompileHost | ( | void | ) |
Referenced by Version().
| const char * VLC_Compiler | ( | void | ) |
Referenced by Version().
|
inlinestatic |
Translate a vlc_fourcc into its string representation.
This function assumes there is enough room in psz_fourcc to store 4 characters in.
| fcc | a vlc_fourcc_t |
| psz_fourcc | string to store string representation of vlc_fourcc in |
| const char * vlc_gettext | ( | const char * | msgid | ) |
In-tree plugins share their gettext domain with LibVLC.
References likely.
Referenced by aout_New(), config_GetIntChoices(), config_GetPszChoices(), config_Write(), decoder_New(), EsOutProgramMeta(), EsOutUpdateInfo(), LanguageGetName(), vlc_config_cat_GetHelp(), vlc_config_subcat_GetHelp(), vlc_config_subcat_GetName(), vlc_http_res_req(), vlc_keycode2str(), vlc_meta_TypeToLocalizedString(), vlc_pgettext_aux(), vlc_player_AddAssociatedMedia(), vlc_playlist_PlaybackOrderChanged(), vlc_playlist_PlaybackRepeatChanged(), vout_CreateVars(), and vout_InitInterlacingSupport().
| const char * vlc_ngettext | ( | const char * | s, |
| const char * | p, | ||
| unsigned long | n | ||
| ) |
References likely.
|
inlinestatic |
References vlc_gettext().
|
inlinestatic |
References count, and mul_overflow.
Referenced by vlc_vector_reallocdata_().
| bool vlc_ureduce | ( | unsigned * | , |
| unsigned * | , | ||
| uint64_t | , | ||
| uint64_t | , | ||
| uint64_t | |||
| ) |
|
inlinestatic |
References unlikely.
Referenced by httpd_ClientNew(), httpd_ClientSend(), httpd_HandlerCallBack(), httpd_StreamCallBack(), httpd_StreamHeader(), httpdLoop(), var_AddCallback(), var_AddListCallback(), var_Change(), and vlc_plugin_desc_cb().
|
inlinestatic |
References unlikely.
Referenced by httpd_HandlerCallBack().