Modules | |
Time tools | |
System time and CPU functions. | |
Defines | |
#define | GPAC_VERSION |
GPAC Version. | |
#define | GPAC_VERSION_INT |
GPAC Version. | |
#define | GF_SAFEALLOC(__ptr, __struct) |
Memory allocation. | |
#define | GF_4CC(a, b, c, d) |
4CC Formatting | |
Typedefs | |
typedef Bool(*) | gf_enum_dir_item (void *cbck, char *item_name, char *item_path) |
Directory Enumeration Callback. | |
typedef void(*) | gf_on_progress_cbk (void *cbck, char *title, u32 done, u32 total) |
Progress Callback. | |
Functions | |
const char * | gf_4cc_to_str (u32 type) |
4CC Printing | |
FILE * | gf_f64_open (const char *file_name, const char *mode) |
large file opening | |
u64 | gf_f64_tell (FILE *f) |
large file position query | |
u64 | gf_f64_seek (FILE *f, s64 pos, s32 whence) |
large file seeking | |
void | gf_rand_init (Bool Reset) |
PseudoRandom Integer Generation Initialization. | |
u32 | gf_rand () |
PseudoRandom Integer Generation. | |
void | gf_get_user_name (char *buf, u32 buf_size) |
user name | |
GF_Err | gf_enum_directory (const char *dir, Bool enum_directory, gf_enum_dir_item enum_dir, void *cbck, const char *filter) |
Directory enumeration. | |
void | gf_delete_file (char *fileName) |
File Deletion. | |
FILE * | gf_temp_file_new () |
File Deletion. | |
void | gf_set_progress (char *title, u32 done, u32 total) |
Progress formatting. | |
void | gf_set_progress_callback (void *user_cbk, gf_on_progress_cbk prog_cbk) |
Progress overwriting. | |
const char * | gf_gpac_version () |
#define GPAC_VERSION |
Macro giving GPAC version expressed as a printable string
#define GPAC_VERSION_INT |
Macro giving GPAC version expressed as an integer, where version X.Y.Z is coded as 0x00XXYYZZ
#define GF_SAFEALLOC | ( | __ptr, | |||
__struct | ) |
Macro allocating memory and zero-ing it
#define GF_4CC | ( | a, | |||
b, | |||||
c, | |||||
d | ) |
Macro formating a 4-character code (or 4CC) "abcd" as 0xAABBCCDD
typedef Bool(*) gf_enum_dir_item(void *cbck, char *item_name, char *item_path) |
The gf_enum_dir_item type is the type for the callback of the gf_enum_directory function
cbck | Opaque user data. | |
item_name | File or directory name. | |
item_path | File or directory full path and name from filesystem root. |
typedef void(*) gf_on_progress_cbk(void *cbck, char *title, u32 done, u32 total) |
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. |
const char* gf_4cc_to_str | ( | u32 | type | ) |
returns a 4CC printable form
FILE* gf_f64_open | ( | const char * | file_name, | |
const char * | mode | |||
) |
Opens a large file (>4GB)
file_name | Same semantics as fopen | |
mode | Same semantics as fopen |
u64 gf_f64_tell | ( | FILE * | f | ) |
Queries the current read/write position in a large file
f | Same semantics as ftell |
u64 gf_f64_seek | ( | FILE * | f, | |
s64 | pos, | |||
s32 | whence | |||
) |
Seeks the current read/write position in a large file
f | Same semantics as fseek | |
pos | Same semantics as fseek | |
whence | Same semantics as fseek |
void gf_rand_init | ( | Bool | Reset | ) |
Sets the starting point for generating a series of pseudorandom integers.
Reset | Re-initializes the random number generator |
u32 gf_rand | ( | ) |
Returns a pseudorandom integer.
void gf_get_user_name | ( | char * | buf, | |
u32 | buf_size | |||
) |
Gets current user (login) name.
GF_Err gf_enum_directory | ( | const char * | dir, | |
Bool | enum_directory, | |||
gf_enum_dir_item | enum_dir, | |||
void * | cbck, | |||
const char * | filter | |||
) |
Enumerates a directory content. Feedback is provided by the enum_dir_item function
dir | Directory to enumerate | |
enum_directory | If set, only directories will be enumerated, otherwise only files are. | |
enum_dir | gf_enum_dir_item callback function for enumeration. | |
cbck | Opaque user data passed to callback function. | |
filter | optional filter for file extensions. If a file extension without the dot '.' character is not found in the filter the file will be skipped. |
void gf_delete_file | ( | char * | fileName | ) |
Deletes a file from the disk.
fileName | absolute name of the file or name relative to the current working directory. |
FILE* gf_temp_file_new | ( | ) |
Creates a new temporary file in binary mode
void gf_set_progress | ( | char * | title, | |
u32 | done, | |||
u32 | 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.
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 | |||
) |
Iverwrites 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 stdout notification. |