Documentation of the core library of GPAC
Misc tools

System time CPU. More...

+ Collaboration diagram for Misc tools:


typedef void(* gf_on_progress_cbk) (const void *cbck, const char *title, u64 done, u64 total)
 Progress Callback. More...


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...

Detailed Description

This section documents time functionalities and CPU management in GPAC.

Typedef Documentation

◆ 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

cbckOpaque user data.
titlepreogress title.
doneCurrent amount performed of the action
totalTotal amount of the action.

Function Documentation

◆ gf_rand_init()

void gf_rand_init ( Bool  Reset)

Sets the starting point for generating a series of pseudorandom integers.

ResetRe-initializes the random number generator

◆ gf_rand()

u32 gf_rand ( )

PseudoRandom integer generation

a pseudorandom integer

◆ gf_get_user_name()

void gf_get_user_name ( char  buf[1024])

gets user name

bufbuffer 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.

titletitle string of the progress, or NULL for no progress
doneCurrent amount performed of the action.
totalTotal amount of the action.

◆ gf_set_progress_callback()

void gf_set_progress_callback ( void *  user_cbk,
gf_on_progress_cbk  prog_cbk 
user_cbkOpaque user data
prog_cbknew 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.

1 if a character is ready to be fetched, 0 otherwise.
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.

value of the character.
Function not available under WindowsCE nor SymbianOS

◆ gf_prompt_get_size()

GF_Err gf_prompt_get_size ( u32 width,
u32 height 

Gets the stdin prompt size (columns and rows)

widthset to number of rows in the TTY
heightset to number of columns in the TTY
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.

echo_offindicates whether echo should be turned on or off.
Function not available under WindowsCE nor SymbianOS