Typedefs | |
typedef struct splt_progres | splt_progress |
typedef struct splt_progres splt_progress |
Structure containing all information needed to display a progress bar.
All members are private.
It is passed as parameter to the callback function registered with mp3splt_set_progress_function.
enum splt_message_type |
Type of the message sent to the client.
Enumerator | |
---|---|
SPLT_MESSAGE_INFO |
Info message. |
SPLT_MESSAGE_WARNING |
Warning message. |
SPLT_MESSAGE_DEBUG |
Debug message. |
Type of messages sent to the client using the callback registered with mp3splt_set_progress_function.
Enumerator | |
---|---|
SPLT_PROGRESS_PREPARE |
Preparing to split a song. |
SPLT_PROGRESS_CREATE |
Creating the output file. |
SPLT_PROGRESS_SEARCH_SYNC |
Searching for synchronisation errors - when using SPLT_OPTION_ERROR_MODE. |
SPLT_PROGRESS_SCAN_SILENCE |
Scanning for silence - when using SPLT_OPTION_SILENCE_MODE, SPLT_OPT_AUTO_ADJUST, mp3splt_set_silence_points or mp3splt_set_trim_silence_points. |
splt_code mp3splt_set_message_function | ( | splt_state * | state, |
void(*)(const char *message, splt_message_type type, void *cb_data) | message_cb, | ||
void * | cb_data | ||
) |
Register callback function used to send text messages to the client.
[in] | state | Main state. |
[in] | message_cb | Callback function to be called. |
[in] | cb_data | User data sent through message_cb . |
Parameters of the callback message_cb
function:
message
Text message received.
type
Type of the text message received.
cb_data
The user data passed to the mp3splt_set_message_function.
splt_code mp3splt_set_split_filename_function | ( | splt_state * | state, |
void(*)(const char *filename, void *cb_data) | file_cb, | ||
void * | cb_data | ||
) |
Register callback function that is called when an output file is created.
[in] | state | Main state. |
[in] | file_cb | Callback function to be called. |
[in] | cb_data | User data sent through file_cb . |
Parameters of the callback file_cb
function:
filename
Output filename that has been created.
cb_data
The user data passed to the mp3splt_set_split_filename_function.
splt_code mp3splt_set_pretend_to_split_write_function | ( | splt_state * | state, |
void(*)(const void *ptr, size_t size, size_t nmemb, void *cb_data) | write_cb, | ||
void * | cb_data | ||
) |
Register callback function that is called when SPLT_OPT_PRETEND_TO_SPLIT is SPLT_TRUE.
This callback function allows getting the bytes that would have been written. Please note that currently the mp3 Xing header is skipped when setting the input not seekable with SPLT_OPT_INPUT_NOT_SEEKABLE.
[in] | state | Main state. |
[in] | write_cb | Callback function to be called. |
[in] | cb_data | User data sent through write_cb . |
Parameters of the callback write_cb
function:
ptr
Bytes that would have been written to the output file.
size
Size of one element stored in ptr
.
nmemb
Number of elements to be written from ptr
.
cb_data
The user data passed to the mp3splt_set_pretend_to_split_write_function.
splt_code mp3splt_set_progress_function | ( | splt_state * | state, |
void(*)(splt_progress *p_bar, void *cb_data) | progress_cb, | ||
void * | cb_data | ||
) |
Register callback function called to keep track of the current progress.
[in] | state | Main state. |
[in] | progress_cb | Callback function to be called. |
[in] | cb_data | User data sent through progress_cb . |
Parameters of the callback progress_cb
function:
p_bar
Progress bar informations.
cb_data
The user data passed to the mp3splt_set_progress_function.
int mp3splt_progress_get_type | ( | const splt_progress * | p_bar | ) |
char* mp3splt_progress_get_filename_shorted | ( | const splt_progress * | p_bar | ) |
int mp3splt_progress_get_current_split | ( | const splt_progress * | p_bar | ) |
int mp3splt_progress_get_max_splits | ( | const splt_progress * | p_bar | ) |
int mp3splt_progress_get_silence_found_tracks | ( | const splt_progress * | p_bar | ) |
float mp3splt_progress_get_silence_db_level | ( | const splt_progress * | p_bar | ) |
float mp3splt_progress_get_percent_progress | ( | const splt_progress * | p_bar | ) |
splt_code mp3splt_set_silence_level_function | ( | splt_state * | state, |
void(*)(long time, float level, void *user_data) | get_silence_cb, | ||
void * | user_data | ||
) |
Register callback function that is called when looking for silence detection.
[in] | state | Main state. |
[in] | get_silence_cb | Callback function to be called. |
[in] | user_data | User data sent through get_silence_cb . |
Parameters of the callback get_silence_cb
function:
time
Current time in hundreths of seconds.
level
Current silence level.
user_data
The user data passed to the mp3splt_set_silence_level_function.