![]() |
libgpac
Documentation of the core library of GPAC
|
#include <gpac/tools.h>#include <gpac/network.h>#include <gpac/config_file.h>#include <time.h>#include <sys/stat.h>#include <sys/time.h>#include <dirent.h>#include <unistd.h>#include <sys/times.h>#include <sys/resource.h>#include <errno.h>#include <locale.h>#include <gpac/revision.h>#include <termios.h>#include <sys/ioctl.h>#include <gpac/thread.h>#include <gpac/list.h>#include <fcntl.h>#include <gpac/token.h>
Include dependency graph for os_divers.c:Macros | |
| #define | SLEEP_ABS_SELECT 1 |
| #define | GPAC_FULL_VERSION GPAC_VERSION "-rev" GPAC_GIT_REVISION |
| #define | GPAC_COPYRIGHT "(c) 2000-2024 Telecom Paris distributed under LGPL v2.1+ - https://gpac.io" |
Functions | |
| GF_EXPORT const char * | gf_gpac_version () |
| GF_EXPORT const char * | gf_gpac_copyright () |
| GF_EXPORT const char * | gf_gpac_copyright_cite () |
| GF_EXPORT u32 | gf_gpac_abi_major () |
| GF_EXPORT u32 | gf_gpac_abi_minor () |
| GF_EXPORT u32 | gf_gpac_abi_micro () |
| GF_EXPORT u32 | gf_sys_clock () |
| System clock query. | |
| GF_EXPORT u64 | gf_sys_clock_high_res () |
| High precision system clock query. | |
| GF_Err | gf_sys_enable_rmtws (Bool start) |
| GF_EXPORT void | gf_sleep (u32 ms) |
| Sleeps thread/process. | |
| GF_EXPORT void | gf_rand_init (Bool Reset) |
| PseudoRandom Integer Generation Initialization. | |
| GF_EXPORT u32 | gf_rand () |
| GF_EXPORT void | gf_utc_time_since_1970 (u32 *sec, u32 *msec) |
| gets UTC time | |
| GF_EXPORT void | gf_get_user_name (char buf[1024]) |
| GF_EXPORT char * | my_str_upr (char *str) |
| GF_EXPORT char * | my_str_lwr (char *str) |
| static void | init_keyboard () |
| static void | close_keyboard (Bool new_line) |
| GF_EXPORT void | gf_prompt_set_echo_off (Bool echo_off) |
| turns prompt echo on/off | |
| GF_EXPORT Bool | gf_prompt_has_input () |
| Prompt checking. | |
| GF_EXPORT char | gf_prompt_get_char () |
| Prompt character flush. | |
| GF_EXPORT GF_Err | gf_prompt_get_size (u32 *width, u32 *height) |
| Get prompt TTY size. | |
| GF_EXPORT struct tm * | gf_gmtime (const time_t *time) |
| gets time from UTC timestamp | |
| GF_EXPORT Bool | gf_log_use_file () |
| Checks if logs are stored to file. | |
| static void | progress_quiet (const void *cbck, const char *title, u64 done, u64 total) |
| void | gpac_disable_progress () |
| GF_EXPORT Bool | gf_sys_is_test_mode () |
| checks if test mode is enabled | |
| GF_EXPORT Bool | gf_sys_old_arch_compat () |
| checks if compatibility with old arch is enabled | |
| GF_EXPORT void | gf_log_reset_file () |
| Resets log file Resets log file if any log file name was specified, by closing and reopening a new file. | |
| Bool | gf_sys_has_filter_global_args () |
| Bool | gf_sys_has_filter_global_meta_args () |
| GF_EXPORT GF_Err | gf_sys_set_args (s32 argc, const char **argv) |
| System arguments. | |
| GF_EXPORT void | gf_sys_mark_arg_used (s32 arg_idx, Bool used) |
| Mark arg as used. | |
| GF_EXPORT Bool | gf_sys_is_arg_used (s32 arg_idx) |
| Check if arg is marked as used. | |
| GF_EXPORT u32 | gf_sys_is_quiet () |
| checks if running in quiet mode | |
| GF_EXPORT u32 | gf_sys_get_argc () |
| Get number of args. | |
| GF_EXPORT const char ** | gf_sys_get_argv () |
| Get program arguments. | |
| GF_EXPORT const char * | gf_sys_get_arg (u32 arg) |
| Get number of args. | |
| GF_EXPORT const char * | gf_sys_find_global_arg (const char *arg) |
| Locate a global filter arg. | |
| GF_EXPORT GF_Err | gf_blob_get_ex (GF_Blob *blob, u8 **out_data, u32 *out_size, u32 *out_flags) |
| GF_EXPORT GF_Err | gf_blob_get (const char *blob_url, u8 **out_data, u32 *out_size, u32 *out_flags) |
| GF_EXPORT GF_Err | gf_blob_release_ex (GF_Blob *blob) |
| GF_EXPORT GF_Err | gf_blob_release (const char *blob_url) |
| GF_EXPORT char * | gf_blob_register (GF_Blob *blob) |
| GF_EXPORT void | gf_blob_unregister (GF_Blob *blob) |
| GF_EXPORT GF_BlobRangeStatus | gf_blob_query_range (GF_Blob *blob, u64 start_offset, u32 size) |
| void | gf_init_global_config (const char *profile) |
| void | gf_uninit_global_config (Bool discard_config) |
| GF_Config * | gf_sys_get_lang_file () |
| GF_EXPORT const char * | gf_sys_localized (const char *sec_name, const char *key_name, const char *def_val) |
| static void | gf_sys_refresh_cache () |
| GF_EXPORT GF_Err | gf_sys_init (GF_MemTrackerType mem_tracker_type, const char *profile) |
| System setup. | |
| void | gf_net_close_capture () |
| GF_EXPORT void | gf_sys_close () |
| System closing. | |
| Bool | gf_sys_get_rti_os (u32 refresh_time_ms, GF_SystemRTInfo *rti, u32 flags) |
| GF_EXPORT Bool | gf_sys_get_rti (u32 refresh_time_ms, GF_SystemRTInfo *rti, u32 flags) |
| Gets Run-Time info. | |
| const char * | gf_get_default_cache_directory_ex (Bool do_create) |
| GF_EXPORT const char * | gf_get_default_cache_directory () |
| GF_EXPORT Bool | gf_sys_get_battery_state (Bool *onBattery, u32 *onCharge, u32 *level, u32 *batteryLifeTime, u32 *batteryFullLifeTime) |
| GF_EXPORT void | gf_net_set_ntp_shift (s32 shift) |
| offsets NTP time by a given amount of seconds | |
| GF_EXPORT void | gf_net_get_ntp (u32 *sec, u32 *frac) |
| gets NTP time | |
| GF_EXPORT u64 | gf_net_get_ntp_ts () |
| gets NTP time | |
| GF_EXPORT s32 | gf_net_ntp_diff_ms (u64 ntp_a, u64 ntp_b) |
| GF_EXPORT s32 | gf_net_get_ntp_diff_ms (u64 ntp) |
| GF_EXPORT u64 | gf_net_ntp_add_usec (u64 ntp, s32 usec) |
| GF_EXPORT u64 | gf_net_get_ntp_ms () |
| gets NTP time in milliseconds | |
| GF_EXPORT s32 | gf_net_get_timezone () |
| gets timezone adjustment in seconds | |
| GF_EXPORT Bool | gf_net_time_is_dst () |
| gets timezone daylight saving time status | |
| static time_t | gf_mktime_utc (struct tm *tm) |
| GF_EXPORT u64 | gf_net_parse_date (const char *val) |
| parses date | |
| GF_EXPORT u64 | gf_net_get_utc_ts (u32 year, u32 month, u32 day, u32 hour, u32 min, u32 sec) |
| returns 64-bit UTC timestamp from year, month, day, hour, min and sec | |
| GF_EXPORT u64 | gf_net_ntp_to_utc (u64 ntp) |
| converts an ntp timestamp into UTC time in milliseconds | |
| GF_EXPORT u64 | gf_net_get_utc () |
| gets UTC time in milliseconds | |
| GF_EXPORT GF_Err | gf_bin128_parse (const char *string, bin128 value) |
| parses 128 bit from string | |
| GF_EXPORT GF_Err | gf_file_load_data_filep (FILE *file, u8 **out_data, u32 *out_size) |
| reads a file into memory | |
| GF_EXPORT GF_Err | gf_file_load_data (const char *file_name, u8 **out_data, u32 *out_size) |
| reads a file into memory | |
| GF_EXPORT u32 | gf_sys_get_process_id () |
| Gets process ID. | |
| GF_EXPORT Bool | gf_sys_check_process_id (u32 pid) |
| Checks a process is valid. | |
| GF_EXPORT GF_LockStatus | gf_sys_create_lockfile (const char *lockname) |
| Creates a lock file. | |
| GF_EXPORT int | gf_getch () |
| Portable getch() | |
| GF_EXPORT Bool | gf_read_line_input (char *line, int maxSize, Bool showContent) |
| Reads a line of input from stdin. | |
| GF_EXPORT GF_Err | gf_creds_check_password (const char *user, char *password) |
| GF_EXPORT Bool | gf_creds_check_membership (const char *username, const char *users, const char *groups) |
| #define SLEEP_ABS_SELECT 1 |
| #define GPAC_FULL_VERSION GPAC_VERSION "-rev" GPAC_GIT_REVISION |
| #define GPAC_COPYRIGHT "(c) 2000-2024 Telecom Paris distributed under LGPL v2.1+ - https://gpac.io" |
|
static |
Here is the caller graph for this function:
|
static |
Here is the caller graph for this function:
Here is the caller graph for this function:| void gpac_disable_progress | ( | ) |
Here is the call graph for this function:
Here is the caller graph for this function:| Bool gf_sys_has_filter_global_args | ( | ) |
Here is the caller graph for this function:| Bool gf_sys_has_filter_global_meta_args | ( | ) |
Here is the caller graph for this function:| GF_EXPORT GF_Err gf_blob_get_ex | ( | GF_Blob * | blob, |
| u8 ** | out_data, | ||
| u32 * | out_size, | ||
| u32 * | blob_flags | ||
| ) |
Retrieves data associated with a blob. If success, gf_blob_release_ex must be called after this
| blob | the blob object |
| out_data | if success, set to blob data pointer |
| out_size | if success, set to blob data size |
| blob_flags | if success, set to blob flags - may be NULL |
Here is the call graph for this function:
Here is the caller graph for this function:| GF_EXPORT GF_Err gf_blob_get | ( | const char * | blob_url, |
| u8 ** | out_data, | ||
| u32 * | out_size, | ||
| u32 * | blob_flags | ||
| ) |
Retrieves data associated with a blob url. If success, gf_blob_release must be called after this
| blob_url | URL of blob object (ie gmem://p) |
| out_data | if success, set to blob data pointer |
| out_size | if success, set to blob data size |
| blob_flags | if success, set to blob flags - may be NULL |
Here is the call graph for this function:
Here is the caller graph for this function:Releases blob data
| blob | the blob object |
Here is the call graph for this function:
Here is the caller graph for this function:Releases blob data
| blob_url | URL of blob object (ie gmem://p) |
Here is the call graph for this function:
Here is the caller graph for this function:Registers a new blob
| blob | blob object |
Here is the call graph for this function:
Here is the caller graph for this function:Unegisters a blob. This must be called before destroying a registered blob
| blob | blob object |
Here is the call graph for this function:
Here is the caller graph for this function:| GF_EXPORT GF_BlobRangeStatus gf_blob_query_range | ( | GF_Blob * | blob, |
| u64 | start_offset, | ||
| u32 | size | ||
| ) |
Checks if a given byte range is valid in blob
| blob | blob object |
| start_offset | start offset of data to check in blob |
| size | size of data to check in blob |
Here is the caller graph for this function:| void gf_init_global_config | ( | const char * | profile | ) |
Here is the call graph for this function:
Here is the caller graph for this function:| void gf_uninit_global_config | ( | Bool | discard_config | ) |
Here is the call graph for this function:
Here is the caller graph for this function:| GF_Config * gf_sys_get_lang_file | ( | ) |
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Here is the call graph for this function:
Here is the caller graph for this function:| void gf_net_close_capture | ( | ) |
Here is the call graph for this function:
Here is the caller graph for this function:| Bool gf_sys_get_rti_os | ( | u32 | refresh_time_ms, |
| GF_SystemRTInfo * | rti, | ||
| u32 | flags | ||
| ) |
Here is the call graph for this function:
Here is the caller graph for this function:| const char * gf_get_default_cache_directory_ex | ( | Bool | do_create | ) |
Here is the call graph for this function:
Here is the caller graph for this function:| GF_EXPORT Bool gf_sys_get_battery_state | ( | Bool * | onBattery, |
| u32 * | onCharge, | ||
| u32 * | level, | ||
| u32 * | batteryLifeTime, | ||
| u32 * | batteryFullLifeTime | ||
| ) |
gets battery state
| onBattery | set to GF_TRUE if running on battery |
| onCharge | set to GF_TRUE if battery is charging |
| level | set to battery charge percent |
| batteryLifeTime | set to battery lifetime |
| batteryFullLifeTime | set to battery full lifetime |
Here is the caller graph for this function:
|
static |
Here is the caller graph for this function:parses 128 bit from string
Parses 128 bit from string
| string | the string containing the value in hexa. Non alphanum characters are skipped |
| value | the value parsed |
Here is the caller graph for this function:| GF_EXPORT int gf_getch | ( | ) |
Portable getch()
Returns immediately a typed char from stdin
Here is the caller graph for this function:Reads a line of input from stdin.
| line | the buffer to fill |
| maxSize | the maximum size of the line to read |
| showContent | boolean indicating if the line read should be printed on stderr or not |
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| GF_SystemRTInfo the_rti |
|
static |
|
static |
|
static |
|
static |
|
static |
| const char** gpac_argv = NULL |
| Bool* gpac_argv_state = NULL |
|
extern |
|
extern |
|
extern |
| const char* gpac_log_file_name =NULL |
|
extern |
| GF_Mutex* logs_mx = NULL |
|
static |
| char gf_prog_lf = '\r' |
|
extern |
| RMT_WS* rmtws_handle =NULL |
| GF_List* all_blobs = NULL |
|
static |
|
static |
|
extern |
|
extern |
|
static |
|
static |