28 # define VLC_COMMON_H 1 67 # define VLC_GCC_VERSION(maj,min) \ 68 ((__GNUC__ > (maj)) || (__GNUC__ == (maj) && __GNUC_MINOR__ >= (min))) 71 # define VLC_GCC_VERSION(maj,min) (0) 75 #if defined( _WIN32 ) && defined( __USE_MINGW_ANSI_STDIO ) 86 #define snprintf __mingw_snprintf 87 #define vsnprintf __mingw_vsnprintf 88 #define swprintf _snwprintf 93 # define VLC_DEPRECATED __attribute__((deprecated)) 94 # if VLC_GCC_VERSION(6,0) 95 # define VLC_DEPRECATED_ENUM __attribute__((deprecated)) 97 # define VLC_DEPRECATED_ENUM 100 # if defined( _WIN32 ) && !defined( __clang__ ) 101 # define VLC_FORMAT(x,y) __attribute__ ((format(gnu_printf,x,y))) 103 # define VLC_FORMAT(x,y) __attribute__ ((format(printf,x,y))) 105 # define VLC_FORMAT_ARG(x) __attribute__ ((format_arg(x))) 106 # define VLC_MALLOC __attribute__ ((malloc)) 107 # define VLC_USED __attribute__ ((warn_unused_result)) 119 # define VLC_DEPRECATED 129 # define VLC_DEPRECATED_ENUM 141 # define VLC_FORMAT(x,y) 152 # define VLC_FORMAT_ARG(x) 188 #if defined (__ELF__) || defined (__MACH__) 189 # define VLC_WEAK __attribute__((weak)) 202 #if defined (__GNUC__) || defined (__clang__) 203 # define likely(p) __builtin_expect(!!(p), 1) 204 # define unlikely(p) __builtin_expect(!!(p), 0) 205 # define unreachable() __builtin_unreachable() 214 # define likely(p) (!!(p)) 223 # define unlikely(p) (!!(p)) 235 # define unreachable() ((void)0) 249 #define vlc_assert_unreachable() (vlc_assert(!"unreachable"), unreachable()) 265 # define vlc_assert(pred) assert(pred) 267 # define vlc_assert(pred) ((void)0) 272 # define VLC_EXTERN extern "C" 277 #if defined (_WIN32) && defined (DLL_EXPORT) 278 # define VLC_EXPORT __declspec(dllexport) 279 #elif defined (__GNUC__) 280 # define VLC_EXPORT __attribute__((visibility("default"))) 291 #define VLC_API VLC_EXTERN VLC_EXPORT 305 #ifdef WORDS_BIGENDIAN 306 # define VLC_FOURCC( a, b, c, d ) \ 307 ( ((uint32_t)d) | ( ((uint32_t)c) << 8 ) \ 308 | ( ((uint32_t)b) << 16 ) | ( ((uint32_t)a) << 24 ) ) 309 # define VLC_TWOCC( a, b ) \ 310 ( (uint16_t)(b) | ( (uint16_t)(a) << 8 ) ) 313 # define VLC_FOURCC( a, b, c, d ) \ 314 ( ((uint32_t)a) | ( ((uint32_t)b) << 8 ) \ 315 | ( ((uint32_t)c) << 16 ) | ( ((uint32_t)d) << 24 ) ) 316 # define VLC_TWOCC( a, b ) \ 317 ( (uint16_t)(a) | ( (uint16_t)(b) << 8 ) ) 330 memcpy( psz_fourcc, &fcc, 4 );
462 struct { int32_t x; int32_t
y; } coords;
470 #define VLC_SUCCESS (-0) 472 #define VLC_EGENERIC (-1) 474 #define VLC_ENOMEM (-2) 476 #define VLC_ETIMEOUT (-3) 478 #define VLC_ENOMOD (-4) 480 #define VLC_ENOOBJ (-5) 482 #define VLC_ENOVAR (-6) 484 #define VLC_EBADVAR (-7) 486 #define VLC_ENOITEM (-8) 509 #if defined( _WIN32 ) 512 # define PATH_MAX MAX_PATH 514 # include <windows.h> 518 #include <sys/syslimits.h> 519 #include <AvailabilityMacros.h> 523 # define OS2EMX_PLAIN_CHAR 526 # include <os2safe.h> 542 # define __MAX(a, b) ( ((a) > (b)) ? (a) : (b) ) 545 # define __MIN(a, b) ( ((a) < (b)) ? (a) : (b) ) 549 #define VLC_CLIP(v, min, max) __MIN(__MAX((v), (min)), (max)) 559 return (v + (align - 1)) & ~(align - 1);
562 #if defined(__clang__) && __has_attribute(diagnose_if) 563 static inline size_t vlc_align(
size_t v,
size_t align)
564 __attribute__((diagnose_if(((align & (align - 1)) || (align == 0)),
565 "align must be power of 2",
"error")));
570 static inline int64_t
GCD ( int64_t a, int64_t b )
585 if( a&(~255) )
return (-a)>>31;
594 #define VLC_INT_FUNC(basename) \ 595 VLC_INT_FUNC_TYPE(basename, unsigned, ) \ 596 VLC_INT_FUNC_TYPE(basename, unsigned long, l) \ 597 VLC_INT_FUNC_TYPE(basename, unsigned long long, ll) 599 #if defined (__GNUC__) || defined (__clang__) 600 # define VLC_INT_FUNC_TYPE(basename,type,suffix) \ 601 VLC_USED static inline int vlc_##basename##suffix(type x) \ 603 return __builtin_##basename##suffix(x); \ 608 VLC_USED
static inline int vlc_clzll(
unsigned long long x)
610 int i =
sizeof (x) * 8;
620 VLC_USED
static inline int vlc_clzl(
unsigned long x)
622 return vlc_clzll(x) - ((
sizeof (
long long) -
sizeof (
long)) * 8);
625 VLC_USED
static inline int vlc_clz(
unsigned x)
627 return vlc_clzll(x) - ((
sizeof (
long long) -
sizeof (
int)) * 8);
632 unsigned i =
sizeof (x) * 8;
644 for (
unsigned i = 4 *
sizeof (x); i > 0; i /= 2)
660 # define VLC_INT_FUNC_TYPE(basename,type,suffix) \ 661 VLC_USED static inline int vlc_##basename##suffix(type x) \ 663 return vlc_##basename##_generic(x); \ 672 # define VLC_INT_GENERIC(func,x) \ 674 unsigned char: func(x), \ 675 signed char: func(x), \ 676 unsigned short: func(x), \ 677 signed short: func(x), \ 678 unsigned int: func(x), \ 679 signed int: func(x), \ 680 unsigned long: func##l(x), \ 681 signed long: func##l(x), \ 682 unsigned long long: func##ll(x), \ 683 signed long long: func##ll(x)) 698 unsigned char: (vlc_clz(x) - (sizeof (unsigned) - 1) * 8), \ 699 unsigned short: (vlc_clz(x) \ 700 - (sizeof (unsigned) - sizeof (unsigned short)) * 8), \ 701 unsigned: vlc_clz(x), \ 702 unsigned long: vlc_clzl(x), \ 703 unsigned long long: vlc_clzll(x)) 715 # define ctz(x) VLC_INT_GENERIC(vlc_ctz, x) 724 # define parity(x) VLC_INT_GENERIC(vlc_parity, x) 733 # define vlc_popcount(x) \ 735 signed char: vlc_popcount((unsigned char)(x)), \ 736 signed short: vlc_popcount((unsigned short)(x)), \ 737 default: VLC_INT_GENERIC(vlc_popcount ,x)) 739 VLC_USED
static inline int vlc_popcount(
unsigned char x)
744 VLC_USED
static inline int vlc_popcount(
unsigned short x)
749 VLC_USED
static inline int vlc_popcount(
unsigned long x)
754 VLC_USED
static inline int vlc_popcount(
unsigned long long x)
764 return (x << 8) | (x >> 8);
771 #if defined (__GNUC__) || defined(__clang__) 772 return __builtin_bswap32 (x);
774 return ((x & 0x000000FF) << 24)
775 | ((x & 0x0000FF00) << 8)
776 | ((x & 0x00FF0000) >> 8)
777 | ((x & 0xFF000000) >> 24);
785 #if defined (__GNUC__) || defined(__clang__) 786 return __builtin_bswap64 (x);
787 #elif !defined (__cplusplus) 788 return ((x & 0x00000000000000FF) << 56)
789 | ((x & 0x000000000000FF00) << 40)
790 | ((x & 0x0000000000FF0000) << 24)
791 | ((x & 0x00000000FF000000) << 8)
792 | ((x & 0x000000FF00000000) >> 8)
793 | ((x & 0x0000FF0000000000) >> 24)
794 | ((x & 0x00FF000000000000) >> 40)
795 | ((x & 0xFF00000000000000) >> 56);
797 return ((x & 0x00000000000000FFULL) << 56)
798 | ((x & 0x000000000000FF00ULL) << 40)
799 | ((x & 0x0000000000FF0000ULL) << 24)
800 | ((x & 0x00000000FF000000ULL) << 8)
801 | ((x & 0x000000FF00000000ULL) >> 8)
802 | ((x & 0x0000FF0000000000ULL) >> 24)
803 | ((x & 0x00FF000000000000ULL) >> 40)
804 | ((x & 0xFF00000000000000ULL) >> 56);
813 static inline bool uadd_overflow(
unsigned a,
unsigned b,
unsigned *res)
815 #if VLC_GCC_VERSION(5,0) || defined(__clang__) 816 return __builtin_uadd_overflow(a, b, res);
823 static inline bool uaddl_overflow(
unsigned long a,
unsigned long b,
826 #if VLC_GCC_VERSION(5,0) || defined(__clang__) 827 return __builtin_uaddl_overflow(a, b, res);
834 static inline bool uaddll_overflow(
unsigned long long a,
unsigned long long b,
835 unsigned long long *res)
837 #if VLC_GCC_VERSION(5,0) || defined(__clang__) 838 return __builtin_uaddll_overflow(a, b, res);
859 # define add_overflow(a,b,r) \ 861 unsigned: uadd_overflow(a, b, (unsigned *)(r)), \ 862 unsigned long: uaddl_overflow(a, b, (unsigned long *)(r)), \ 863 unsigned long long: uaddll_overflow(a, b, (unsigned long long *)(r))) 865 static inline bool add_overflow(
unsigned a,
unsigned b,
unsigned *res)
870 static inline bool add_overflow(
unsigned long a,
unsigned long b,
876 static inline bool add_overflow(
unsigned long long a,
unsigned long long b,
877 unsigned long long *res)
883 #if !(VLC_GCC_VERSION(5,0) || defined(__clang__)) 887 static inline bool umul_overflow(
unsigned a,
unsigned b,
unsigned *res)
889 #if VLC_GCC_VERSION(5,0) || defined(__clang__) 890 return __builtin_umul_overflow(a, b, res);
893 return b > 0 && a > (UINT_MAX / b);
897 static inline bool umull_overflow(
unsigned long a,
unsigned long b,
900 #if VLC_GCC_VERSION(5,0) || defined(__clang__) 901 return __builtin_umull_overflow(a, b, res);
904 return b > 0 && a > (ULONG_MAX / b);
908 static inline bool umulll_overflow(
unsigned long long a,
unsigned long long b,
909 unsigned long long *res)
911 #if VLC_GCC_VERSION(5,0) || defined(__clang__) 912 return __builtin_umulll_overflow(a, b, res);
915 return b > 0 && a > (ULLONG_MAX / b);
933 #define mul_overflow(a,b,r) \ 935 unsigned: umul_overflow(a, b, (unsigned *)(r)), \ 936 unsigned long: umull_overflow(a, b, (unsigned long *)(r)), \ 937 unsigned long long: umulll_overflow(a, b, (unsigned long long *)(r))) 939 static inline bool mul_overflow(
unsigned a,
unsigned b,
unsigned *res)
944 static inline bool mul_overflow(
unsigned long a,
unsigned long b,
950 static inline bool mul_overflow(
unsigned long long a,
unsigned long long b,
951 unsigned long long *res)
960 #define FREENULL(a) do { free( a ); a = NULL; } while(0) 962 #define EMPTY_STR(str) (!str || !*str) 969 #ifdef WORDS_BIGENDIAN 970 # define hton16(i) ((uint16_t)(i)) 971 # define hton32(i) ((uint32_t)(i)) 972 # define hton64(i) ((uint64_t)(i)) 974 # define hton16(i) vlc_bswap16(i) 975 # define hton32(i) vlc_bswap32(i) 976 # define hton64(i) vlc_bswap64(i) 978 #define ntoh16(i) hton16(i) 979 #define ntoh32(i) hton32(i) 980 #define ntoh64(i) hton64(i) 984 static inline uint16_t
U16_AT (
const void *p)
988 memcpy (&x, p,
sizeof (x));
994 static inline uint32_t
U32_AT (
const void *p)
998 memcpy (&x, p,
sizeof (x));
1004 static inline uint64_t
U64_AT (
const void *p)
1008 memcpy (&x, p,
sizeof (x));
1012 #define GetWBE(p) U16_AT(p) 1013 #define GetDWBE(p) U32_AT(p) 1014 #define GetQWBE(p) U64_AT(p) 1018 static inline uint16_t
GetWLE (
const void *p)
1022 memcpy (&x, p,
sizeof (x));
1023 #ifdef WORDS_BIGENDIAN 1031 static inline uint32_t
GetDWLE (
const void *p)
1035 memcpy (&x, p,
sizeof (x));
1036 #ifdef WORDS_BIGENDIAN 1044 static inline uint64_t
GetQWLE (
const void *p)
1048 memcpy (&x, p,
sizeof (x));
1049 #ifdef WORDS_BIGENDIAN 1056 static inline void SetWBE (
void *p, uint16_t w)
1059 memcpy (p, &w,
sizeof (w));
1063 static inline void SetDWBE (
void *p, uint32_t dw)
1066 memcpy (p, &dw,
sizeof (dw));
1070 static inline void SetQWBE (
void *p, uint64_t qw)
1073 memcpy (p, &qw,
sizeof (qw));
1077 static inline void SetWLE (
void *p, uint16_t w)
1079 #ifdef WORDS_BIGENDIAN 1082 memcpy (p, &w,
sizeof (w));
1086 static inline void SetDWLE (
void *p, uint32_t dw)
1088 #ifdef WORDS_BIGENDIAN 1091 memcpy (p, &dw,
sizeof (dw));
1095 static inline void SetQWLE (
void *p, uint64_t qw)
1097 #ifdef WORDS_BIGENDIAN 1100 memcpy (p, &qw,
sizeof (qw));
1104 #define VLC_UNUSED(x) (void)(x) 1110 # if defined( __MINGW32__ ) 1111 # if !defined( _OFF_T_ ) 1112 typedef long long _off_t;
1113 typedef _off_t off_t;
1119 # define off_t long long 1124 # define O_NONBLOCK 0 1129 # define swab(a,b,c) swab((char*) (a), (char*) (b), (c)) 1139 #define container_of(ptr, type, member) \ 1140 ((type *)(((char *)(ptr)) - offsetof(type, member))) 1145 return mul_overflow(count, size, &size) ? NULL : malloc(size);
1151 return mul_overflow(count, size, &size) ? NULL : realloc(ptr, size);
1159 VLC_FORMAT_ARG(1) VLC_FORMAT_ARG(2);
1161 #define vlc_pgettext( ctx, id ) \ 1162 vlc_pgettext_aux( ctx "\004" id, id ) 1165 static inline const
char *
vlc_pgettext_aux( const
char *ctx, const
char *
id )
1168 return (tr == ctx) ? id : tr;
1174 static inline void *
xmalloc(
size_t len)
1176 void *ptr = malloc(len);
1177 if (
unlikely(ptr == NULL && len > 0))
1182 static inline void *
xrealloc(
void *ptr,
size_t len)
1184 void *nptr = realloc(ptr, len);
1185 if (
unlikely(nptr == NULL && len > 0))
1190 static inline char *
xstrdup (
const char *str)
1192 char *ptr =
strdup (str);
1213 #if defined( _WIN32 ) || defined( __OS2__ ) 1214 # define DIR_SEP_CHAR '\\' 1215 # define DIR_SEP "\\" 1216 # define PATH_SEP_CHAR ';' 1217 # define PATH_SEP ";" 1219 # define DIR_SEP_CHAR '/' 1220 # define DIR_SEP "/" 1221 # define PATH_SEP_CHAR ':' 1222 # define PATH_SEP ":" 1225 #define LICENSE_MSG \ 1226 _("This program comes with NO WARRANTY, to the extent permitted by " \ 1227 "law.\nYou may redistribute it under the terms of the GNU General " \ 1228 "Public License;\nsee the file named COPYING for details.\n" \ 1229 "Written by the VideoLAN team; see the AUTHORS file.\n")
static int64_t GCD(int64_t a, int64_t b)
Greatest common divisor.
Definition: vlc_common.h:570
#define add_overflow(a, b, r)
Overflowing addition.
Definition: vlc_common.h:857
#define hton32(i)
Definition: vlc_common.h:973
const char * VLC_CompileHost(void)
Definition: version.c:44
#define clz(x)
Count leading zeroes.
Definition: vlc_common.h:694
static bool umulll_overflow(unsigned long long a, unsigned long long b, unsigned long long *res)
Definition: vlc_common.h:906
Definition: vlc_addons.h:72
Video picture.
Definition: vlc_picture.h:127
static int vlc_popcount_generic(unsigned long long x)
Definition: vlc_common.h:649
Definition: vlc_vlm.h:176
char * strdup(const char *)
struct vod_media_t vod_media_t
Definition: vlc_common.h:438
struct playlist_item_t playlist_item_t
Definition: vlc_common.h:345
Internal state for block queues.
Definition: fifo.c:38
#define ntoh16(i)
Definition: vlc_common.h:976
Video subtitle region.
Definition: vlc_subpicture.h:59
static int vlc_clzl(unsigned long x)
Definition: vlc_common.h:620
#define parity(x)
Parity.
Definition: vlc_common.h:722
static void * xrealloc(void *ptr, size_t len)
Definition: vlc_common.h:1180
static uint64_t GetQWLE(const void *p)
Reads 64 bits in little-endian order.
Definition: vlc_common.h:1042
Definition: vlc_configuration.h:53
static int vlc_popcountl(unsigned long x)
Definition: vlc_common.h:667
static void SetQWBE(void *p, uint64_t qw)
Writes 64 bits in network byte order.
Definition: vlc_common.h:1068
Configuration item.
Definition: vlc_configuration.h:76
static const char * vlc_pgettext_aux(const char *ctx, const char *id)
Definition: vlc_common.h:1163
#define VLC_FORMAT_ARG(x)
Format string translation function annotation.
Definition: vlc_common.h:152
static int vlc_ctz_generic(unsigned long long x)
Definition: vlc_common.h:630
Video subtitle.
Definition: vlc_subpicture.h:166
VLC object variables and callbacks interface.
Definition: vlc_objects.h:115
static uint64_t U64_AT(const void *p)
Reads 64 bits in network byte order.
Definition: vlc_common.h:1002
static int vlc_popcountll(unsigned long long x)
Definition: vlc_common.h:667
Main service discovery structure to build a SD module.
Definition: vlc_services_discovery.h:59
const char * vlc_ngettext(const char *s, const char *p, unsigned long n)
Definition: textdomain.c:88
static int vlc_clz(unsigned x)
Definition: vlc_common.h:625
Definition: vlc_image.h:39
Internal module descriptor.
Definition: modules.h:75
static char * xstrdup(const char *str)
Definition: vlc_common.h:1188
VLC value structure.
Definition: vlc_common.h:455
static uint16_t vlc_bswap16(uint16_t x)
Byte swap (16 bits)
Definition: vlc_common.h:760
static bool uaddl_overflow(unsigned long a, unsigned long b, unsigned long *res)
Definition: vlc_common.h:821
This file describes the programming interface for the configuration module.
Definition: renderer_discovery.c:34
Timestamps without long-term rounding errors.
Definition: vlc_tick.h:226
bool vlc_ureduce(unsigned *, unsigned *, uint64_t, uint64_t, uint64_t)
This file defines of values used in interface, vout, aout and vlc core functions. ...
static void SetDWLE(void *p, uint32_t dw)
Writes 32 bits in little endian order.
Definition: vlc_common.h:1084
static int vlc_parity_generic(unsigned long long x)
Definition: vlc_common.h:642
audio_format_t audio_sample_format_t
Definition: vlc_common.h:379
Definition: vlc_input.h:52
static uint16_t GetWLE(const void *p)
Reads 16 bits in little-endian order.
Definition: vlc_common.h:1016
const char * vlc_gettext(const char *msgid)
In-tree plugins share their gettext domain with LibVLC.
Definition: textdomain.c:79
const char * VLC_CompileBy(void)
Definition: version.c:43
Definition: fourcc_gen.c:34
static void SetWBE(void *p, uint16_t w)
Writes 16 bits in network byte order.
Definition: vlc_common.h:1054
Definition: vlc_configuration.h:331
Definition: vlc_es_out.h:143
#define VLC_INT_FUNC(basename)
Definition: vlc_common.h:594
#define VLC_MALLOC
Heap allocated result function annotation.
Definition: vlc_common.h:167
Stream output access_output.
Definition: vlc_sout.h:69
#define VLC_USED
Used result function annotation.
Definition: vlc_common.h:185
The update object.
Definition: update.h:158
Definition: vlc_url.h:145
static void SetDWBE(void *p, uint32_t dw)
Writes 32 bits in network byte order.
Definition: vlc_common.h:1061
Viewpoints.
Definition: vlc_viewpoint.h:41
#define hton16(i)
Definition: vlc_common.h:972
static uint32_t GetDWLE(const void *p)
Reads 32 bits in little-endian order.
Definition: vlc_common.h:1029
Common VLC object defintions.
static bool umull_overflow(unsigned long a, unsigned long b, unsigned long *res)
Definition: vlc_common.h:895
static uint16_t U16_AT(const void *p)
Reads 16 bits in network byte order.
Definition: vlc_common.h:982
#define unlikely(p)
Predicted false condition.
Definition: vlc_common.h:223
size_t count
Definition: core.c:402
Video output thread descriptor.
Definition: vlc_vout.h:60
Definition: vlc_input_item.h:53
float f_float
Definition: vlc_common.h:459
int32_t y
Definition: vlc_common.h:462
#define hton64(i)
Definition: vlc_common.h:974
int(* vlc_list_callback_t)(vlc_object_t *, char const *, int, vlc_value_t *, void *)
Definition: vlc_common.h:500
struct playlist_t playlist_t
Definition: vlc_common.h:344
Opaque structure representing an ES (Elementary Stream) track.
Definition: es_out.c:92
static bool uadd_overflow(unsigned a, unsigned b, unsigned *res)
Definition: vlc_common.h:811
bool b_bool
Definition: vlc_common.h:458
Definition: vlc_sout.h:192
video_format_t video_frame_format_t
Definition: vlc_common.h:385
static void SetQWLE(void *p, uint64_t qw)
Writes 64 bits in little endian order.
Definition: vlc_common.h:1093
Definition: vlm_internal.h:77
const char * VLC_Compiler(void)
Definition: version.c:45
Definition: vlc_input_item.h:44
#define ntoh64(i)
Definition: vlc_common.h:978
Audio output object.
Definition: vlc_aout.h:140
static uint32_t vlc_bswap32(uint32_t x)
Byte swap (32 bits)
Definition: vlc_common.h:767
stream_t definition
Definition: vlc_stream.h:46
Muxer structure.
Definition: vlc_sout.h:117
Subpicture unit descriptor.
Definition: vlc_spu.h:47
#define ctz(x)
Count trailing zeroes.
Definition: vlc_common.h:713
Definition: vlc_codec.h:103
static int vlc_clzll(unsigned long long x)
Definition: vlc_common.h:608
Structure describing a filter.
Definition: vlc_filter.h:72
static uint64_t vlc_bswap64(uint64_t x)
Byte swap (64 bits)
Definition: vlc_common.h:781
Definition: vlc_renderer_discovery.h:165
static size_t vlc_align(size_t v, size_t align)
Make integer v a multiple of align.
Definition: vlc_common.h:557
uint32_t vlc_fourcc_t
The vlc_fourcc_t type.
Definition: vlc_common.h:303
int(* vlc_callback_t)(vlc_object_t *, char const *, vlc_value_t, vlc_value_t, void *)
Definition: vlc_common.h:491
#define vlc_popcount(x)
Bit weight / population count.
Definition: vlc_common.h:731
Thread primitive declarations.
static void * vlc_alloc(size_t count, size_t size)
Definition: vlc_common.h:1141
#define ntoh32(i)
Definition: vlc_common.h:977
Stream output instance (FIXME: should be private to src/ to avoid invalid unsynchronized access) ...
Definition: vlc_sout.h:48
#define VLC_API
Exported API call annotation.
Definition: vlc_common.h:291
Definition: vlc_block.h:117
static uint32_t U32_AT(const void *p)
Reads 32 bits in network byte order.
Definition: vlc_common.h:992
int64_t i_int
Definition: vlc_common.h:457
static void * vlc_reallocarray(void *ptr, size_t count, size_t size)
Definition: vlc_common.h:1147
void * p_address
Definition: vlc_common.h:461
This file defines functions, structures and macros for handling arrays in vlc.
#define mul_overflow(a, b, r)
Overflowing multiplication.
Definition: vlc_common.h:931
static uint8_t clip_uint8_vlc(int32_t a)
Definition: vlc_common.h:583
static bool umul_overflow(unsigned a, unsigned b, unsigned *res)
Definition: vlc_common.h:885
static void vlc_fourcc_to_char(vlc_fourcc_t fcc, char *psz_fourcc)
Translate a vlc_fourcc into its string representation.
Definition: vlc_common.h:328
struct vod_t vod_t
Definition: vlc_common.h:437
VLC object common members.
Definition: vlc_objects.h:43
char * psz_string
Definition: vlc_common.h:460
static void * xmalloc(size_t len)
Definition: vlc_common.h:1172
static bool uaddll_overflow(unsigned long long a, unsigned long long b, unsigned long long *res)
Definition: vlc_common.h:832
Definition: vlc_codec.h:244
static void SetWLE(void *p, uint16_t w)
Writes 16 bits in little endian order.
Definition: vlc_common.h:1075
Definition: vlc_iso_lang.h:30