Base data types of GPAC.
More...
This section documents the base data types of GPAC, as well as some macros wrapping platform-specific functionalities. For better portability, only use the base data types defined here.
◆ GF_Fraction
◆ GF_Fraction64
◆ _FILE_OFFSET_BITS
#define _FILE_OFFSET_BITS 64 |
◆ _LARGEFILE_SOURCE
#define _LARGEFILE_SOURCE |
◆ _LARGEFILE64_SOURCE
#define _LARGEFILE64_SOURCE |
◆ GPAC_HAS_FD
◆ GFINLINE
macro for cross-platform inlining of functions
◆ stricmp
#define stricmp strcasecmp |
◆ strnicmp
#define strnicmp strncasecmp |
◆ strupr
◆ strlwr
◆ GF_PATH_SEPARATOR
#define GF_PATH_SEPARATOR '/' |
default path separator of the current platform
◆ GF_MAX_PATH
default max filesystem path size of the current platform
◆ GF_MAX_DOUBLE
#define GF_MAX_DOUBLE DBL_MAX |
max positive possible value for Double
◆ GF_MIN_DOUBLE
max negative possible value for Double
◆ GF_MAX_FLOAT
#define GF_MAX_FLOAT FLT_MAX |
max positive possible value for Float
◆ GF_MIN_FLOAT
max negative possible value for Float
◆ GF_EPSILON_FLOAT
#define GF_EPSILON_FLOAT FLT_EPSILON |
smallest possible value for float
◆ GF_SHORT_MAX
#define GF_SHORT_MAX SHRT_MAX |
max possible value for s16
◆ GF_SHORT_MIN
#define GF_SHORT_MIN SHRT_MIN |
min possible value for s16
◆ GF_UINT_MAX
#define GF_UINT_MAX UINT_MAX |
max possible value for u32
◆ GF_INT_MAX
#define GF_INT_MAX INT_MAX |
max possible value for s32
◆ GF_INT_MIN
#define GF_INT_MIN INT_MIN |
min possible value for s32
◆ GF_UINT64_MAX
#define GF_UINT64_MAX ULLONG_MAX |
max possible value for u64
◆ GF_INT64_MAX
#define GF_INT64_MAX LLONG_MAX |
max possible value for s64
◆ GF_INT64_MIN
#define GF_INT64_MIN LLONG_MIN |
min possible value for s64
◆ MIN
#define MIN |
( |
|
X, |
|
|
|
Y |
|
) |
| ((X)<(Y)?(X):(Y)) |
get the smallest of two numbers
◆ MAX
#define MAX |
( |
|
X, |
|
|
|
Y |
|
) |
| ((X)>(Y)?(X):(Y)) |
get the biggest of two numbers
◆ ABSDIFF
#define ABSDIFF |
( |
|
a, |
|
|
|
b |
|
) |
| ( ( (a) > (b) ) ? ((a) - (b)) : ((b) - (a)) ) |
get the absolute difference betwee two numbers
◆ ABS
#define ABS |
( |
|
a | ) |
( ( (a) > 0 ) ? (a) : - (a) ) |
get the absolute value of a number
◆ LLD_SUF
macro for cross-platform suffix used for formatting s64 integers in logs and printf routines
◆ LLU_SUF
macro for cross-platform suffix used for formatting u64 integers in logs and printf routines
◆ LLX_SUF
macro for cross-platform suffix used for formatting u64 integers as hex in logs and printf routines
◆ PTR_TO_U_CAST
#define PTR_TO_U_CAST (u32) |
macro for cross-platform casting a pointer to an integer
◆ LLD
macro for cross-platform formatting of s64 integers in logs and printf routines
◆ LLU
macro for cross-platform formatting of u64 integers in logs and printf routines
◆ LLX
macro for cross-platform formatting of u64 integers as hexadecimal in logs and printf routines
◆ GF_EXPORT
macro for cross-platform signaling of exported function of libgpac
◆ gf_stringizer
#define gf_stringizer |
( |
|
x | ) |
|
Macro transforming its input name into a string
◆ GF_4CC
#define GF_4CC |
( |
|
a, |
|
|
|
b, |
|
|
|
c, |
|
|
|
d |
|
) |
| ((((u32)a)<<24)|(((u32)b)<<16)|(((u32)c)<<8)|((u32)d)) |
Macro formatting a 4-character code (or 4CC) "abcd" as 0xAABBCCDD
◆ GF_4CC_CSTR
Macro formating 4CC from compiler-constant string of 4 characters
◆ GF_4CC_MSIZE
minimum buffer size to hold any 4CC in string format
◆ u64
◆ s64
◆ u32
◆ s32
◆ u16
◆ s16
◆ u8
◆ s8
◆ Double
Double-precision floating point number
◆ Float
Single-precision floating point number
◆ bin128
◆ Bool
boolean value
Enumerator |
---|
GF_FALSE | |
GF_TRUE | |
◆ my_str_upr()
char* my_str_upr |
( |
char * |
str | ) |
|
gets upper case
- Parameters
-
- Returns
- uper case to free
◆ my_str_lwr()
char* my_str_lwr |
( |
char * |
str | ) |
|
gets lower case
- Parameters
-
- Returns
- lower case to free
◆ gf_4cc_to_str()
const char* gf_4cc_to_str |
( |
u32 |
type | ) |
|
converts four character code to string
- Parameters
-
type | a four character code |
- Returns
- a printable form of the code
◆ gf_4cc_to_str_safe()
const char* gf_4cc_to_str_safe |
( |
u32 |
type, |
|
|
char |
szType[GF_4CC_MSIZE] |
|
) |
| |
converts four character code to string in the provided buffer - thread-safe version of gf_4cc_to_str
- Parameters
-
type | a four character code |
szType | buffer to write the code to |
- Returns
- the onput buffer
◆ gf_4cc_parse()
u32 gf_4cc_parse |
( |
const char * |
val | ) |
|
converts a 4CC string to its 32 bits value
- Parameters
-
- Returns
- code value or 0 if error