![]() |
libgpac
Documentation of the core library of GPAC
|
System time CPU. More...
Typedefs | |
typedef void(* | gf_on_progress_cbk) (const void *cbck, const char *title, u64 done, u64 total) |
Progress Callback. More... | |
Functions | |
void | gf_rand_init (Bool Reset) |
PseudoRandom Integer Generation Initialization. More... | |
u32 | gf_rand () |
void | gf_get_user_name (char buf[1024]) |
void | gf_set_progress (const char *title, u64 done, u64 total) |
Progress formatting. More... | |
void | gf_set_progress_callback (void *user_cbk, gf_on_progress_cbk prog_cbk) |
Progress overwriting Overwrites the progress signaling function by a user-defined one. More... | |
Bool | gf_prompt_has_input () |
Prompt checking. More... | |
char | gf_prompt_get_char () |
Prompt character flush. More... | |
GF_Err | gf_prompt_get_size (u32 *width, u32 *height) |
Get prompt TTY size. More... | |
void | gf_prompt_set_echo_off (Bool echo_off) |
turns prompt echo on/off More... | |
System time CPU.
This section documents time functionalities and CPU management in GPAC.
Progress Callback.
The gf_on_progress_cbk type is the type for the callback of the gf_set_progress_callback function
cbck | Opaque user data. |
title | preogress title. |
done | Current amount performed of the action |
total | Total amount of the action. |
void gf_rand_init | ( | Bool | Reset | ) |
PseudoRandom Integer Generation Initialization.
Sets the starting point for generating a series of pseudorandom integers.
Reset | Re-initializes the random number generator |
u32 gf_rand | ( | ) |
PseudoRandom integer generation
void gf_get_user_name | ( | char | buf[1024] | ) |
gets user name
buf | buffer set to current user (login) name if available. |
Progress formatting.
Signals progress in GPAC's operations. Note that progress signaling with this function is not thread-safe, the main purpose is to use it for authoring tools only.
title | title string of the progress, or NULL for no progress |
done | Current amount performed of the action. |
total | Total amount of the action. |
void gf_set_progress_callback | ( | void * | user_cbk, |
gf_on_progress_cbk | prog_cbk | ||
) |
Progress overwriting Overwrites the progress signaling function by a user-defined one.
user_cbk | Opaque user data |
prog_cbk | new callback function to use. Passing NULL restore default GPAC stderr notification. |
Bool gf_prompt_has_input | ( | ) |
Prompt checking.
Checks if a character is pending in the prompt buffer.
char gf_prompt_get_char | ( | ) |
Prompt character flush.
Gets the current character entered at prompt if any.
Get prompt TTY size.
Gets the stdin prompt size (columns and rows)
width | set to number of rows in the TTY |
height | set to number of columns in the TTY |
void gf_prompt_set_echo_off | ( | Bool | echo_off | ) |
turns prompt echo on/off
Turns the prompt character echo on/off - this is useful when entering passwords.
echo_off | indicates whether echo should be turned on or off. |