System time CPU.
More...
This section documents time functionalities and CPU management in GPAC.
◆ gf_on_progress_cbk
typedef void(* gf_on_progress_cbk) (const void *cbck, const char *title, u64 done, u64 total) |
The gf_on_progress_cbk type is the type for the callback of the gf_set_progress_callback function
- Parameters
-
cbck | Opaque user data. |
title | preogress title. |
done | Current amount performed of the action |
total | Total amount of the action. |
◆ gf_rand_init()
void gf_rand_init |
( |
Bool |
Reset | ) |
|
Sets the starting point for generating a series of pseudorandom integers.
- Parameters
-
Reset | Re-initializes the random number generator |
◆ gf_rand()
PseudoRandom integer generation
- Returns
- a pseudorandom integer
◆ gf_get_user_name()
void gf_get_user_name |
( |
char |
buf[1024] | ) |
|
gets user name
- Parameters
-
buf | buffer set to current user (login) name if available. |
◆ gf_set_progress()
void gf_set_progress |
( |
const char * |
title, |
|
|
u64 |
done, |
|
|
u64 |
total |
|
) |
| |
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.
- Parameters
-
title | title string of the progress, or NULL for no progress |
done | Current amount performed of the action. |
total | Total amount of the action. |
◆ gf_set_progress_callback()
- Parameters
-
user_cbk | Opaque user data |
prog_cbk | new callback function to use. Passing NULL restore default GPAC stderr notification. |
◆ gf_prompt_has_input()
Bool gf_prompt_has_input |
( |
| ) |
|
Checks if a character is pending in the prompt buffer.
- Returns
- 1 if a character is ready to be fetched, 0 otherwise.
- Note
- Function not available under WindowsCE nor SymbianOS
◆ gf_prompt_get_char()
char gf_prompt_get_char |
( |
| ) |
|
Gets the current character entered at prompt if any.
- Returns
- value of the character.
- Note
- Function not available under WindowsCE nor SymbianOS
◆ gf_prompt_get_size()
Gets the stdin prompt size (columns and rows)
- Parameters
-
width | set to number of rows in the TTY |
height | set to number of columns in the TTY |
- Returns
- error if any
◆ gf_prompt_set_echo_off()
void gf_prompt_set_echo_off |
( |
Bool |
echo_off | ) |
|
Turns the prompt character echo on/off - this is useful when entering passwords.
- Parameters
-
echo_off | indicates whether echo should be turned on or off. |
- Note
- Function not available under WindowsCE nor SymbianOS