libmp3splt  0.9.2
Lossless library for splitting audio formats like mp3, ogg vorbis and FLAC.

Data Structures

struct  splt_plugin_info
 
struct  splt_plugin_func
 

Macros

#define MP3SPLT_MP3SPLT_H
 

Typedefs

typedef struct _splt_original_tags splt_original_tags
 

Variables

float splt_plugin_info::version
 
char * splt_plugin_info::name
 
char * splt_plugin_info::extension
 
char * splt_plugin_info::upper_extension
 
void(* splt_plugin_func::splt_pl_init )(splt_state *state, splt_code *error)
 
void(* splt_plugin_func::splt_pl_end )(splt_state *state, splt_code *error)
 
int(* splt_plugin_func::splt_pl_check_plugin_is_for_file )(splt_state *state, splt_code *error)
 
void(* splt_plugin_func::splt_pl_set_plugin_info )(splt_plugin_info *information, splt_code *error)
 
double(* splt_plugin_func::splt_pl_split )(splt_state *state, const char *final_fname, double begin_point, double end_point, splt_code *error, int save_end_point)
 
void(* splt_plugin_func::splt_pl_set_original_tags )(splt_state *state, splt_code *error)
 
void(* splt_plugin_func::splt_pl_clear_original_tags )(splt_original_tags *original_tags)
 
int(* splt_plugin_func::splt_pl_scan_silence )(splt_state *state, splt_code *error)
 
int(* splt_plugin_func::splt_pl_scan_trim_silence )(splt_state *state, splt_code *error)
 
void(* splt_plugin_func::splt_pl_search_syncerrors )(splt_state *state, splt_code *error)
 
int(* splt_plugin_func::splt_pl_offset_split )(splt_state *state, const char *output_fname, off_t begin, off_t end)
 
void(* splt_plugin_func::splt_pl_dewrap )(splt_state *state, int listonly, const char *dir, splt_code *error)
 
void(* splt_plugin_func::splt_pl_import_internal_sheets )(splt_state *state, splt_code *error)
 

Detailed Description

See splt_plugin_func for detailed description.

Macro Definition Documentation

◆ MP3SPLT_MP3SPLT_H

#define MP3SPLT_MP3SPLT_H

Allow several inclusions of this file.

Definition at line 2320 of file mp3splt.h.

Typedef Documentation

◆ splt_original_tags

typedef struct _splt_original_tags splt_original_tags

Structure containing the original tags of the input file.

Definition at line 2107 of file mp3splt.h.

Variable Documentation

◆ version

float splt_plugin_info::version

Plugin version.

Definition at line 2139 of file mp3splt.h.

◆ name

char* splt_plugin_info::name

Plugin name.

Definition at line 2143 of file mp3splt.h.

◆ extension

char* splt_plugin_info::extension

File extension handled by the plugin.

Definition at line 2147 of file mp3splt.h.

◆ upper_extension

char* splt_plugin_info::upper_extension

File extension handled by the plugin as uppercase.

Definition at line 2151 of file mp3splt.h.

◆ splt_pl_init

void(* splt_plugin_func::splt_pl_init) (splt_state *state, splt_code *error)

Initialise the plugin.

Mandatory.

Create the plugin data, open the input file and read headers.
Use the state->codec pointer to store the plugin data.

Parameters
[in]stateMain state.
[out]errorFill in possible error.

Definition at line 2184 of file mp3splt.h.

◆ splt_pl_end

void(* splt_plugin_func::splt_pl_end) (splt_state *state, splt_code *error)

Unitialise the plugin.

Mandatory.

Close the input file, free the plugin data.

Parameters
[in]stateMain state.
[out]errorFill in possible error.

Definition at line 2193 of file mp3splt.h.

◆ splt_pl_check_plugin_is_for_file

int(* splt_plugin_func::splt_pl_check_plugin_is_for_file) (splt_state *state, splt_code *error)

Checks if the plugin matches the input file.

Mandatory.

If stdin is supported, don't forget to check if the input filename is stdin.

Parameters
[in]stateMain state.
[out]errorFill in possible error.
Returns
SPLT_TRUE if the plugin matches the input file.

Definition at line 2203 of file mp3splt.h.

◆ splt_pl_set_plugin_info

void(* splt_plugin_func::splt_pl_set_plugin_info) (splt_plugin_info *information, splt_code *error)

Set plugin information into the information structure.

Mandatory.

Information like the plugin version, plugin name and file extension must be filled.

Parameters
[in]splt_plugin_infoPlugin information to be filled. Parameter is already allocated.
[out]errorFill in possible error.

Definition at line 2212 of file mp3splt.h.

◆ splt_pl_split

double(* splt_plugin_func::splt_pl_split) (splt_state *state, const char *final_fname, double begin_point, double end_point, splt_code *error, int save_end_point)

Main split function.

Mandatory.

Parameters
[in]stateMain state.
[in]final_fnameOutput filename to be written for this split.
[in]begin_pointBegin point where the split starts as seconds.hundreths.
[in]end_pointEnd point where the split ends as seconds.hundreths.
[out]errorFill in possible error.
[in]save_end_pointIs equal to SPLT_TRUE if optimisation can be done for saving the end point seek for the next call to this function. This avoids looking for the next begin point seek since it will be equal to the previous saved end point seek.
Returns
The real end point split; in most cases, it is equal to the end_point.

Definition at line 2226 of file mp3splt.h.

◆ splt_pl_set_original_tags

void(* splt_plugin_func::splt_pl_set_original_tags) (splt_state *state, splt_code *error)

Set the original tags into the state from the input file.

splt_tu_set_original_tags_field has to be used to set the original tags.
You can also save all the original tags in the state using splt_tu_set_original_tags_data, in case you want to write them all in the output file, for the tags that are not supported by the library's structure.

Parameters
[in]stateMain state.
[out]errorFill in possible error.

Definition at line 2239 of file mp3splt.h.

◆ splt_pl_clear_original_tags

void(* splt_plugin_func::splt_pl_clear_original_tags) (splt_original_tags *original_tags)

Frees the memory of the tags previously set in the splt_pl_set_original_tags function.

Free the original_tags->all_original_tags data previously set with splt_tu_set_original_tags_data.

Parameters
[in]original_tagsOriginal tags structure containing the original tags data to be freed.

Definition at line 2248 of file mp3splt.h.

◆ splt_pl_scan_silence

int(* splt_plugin_func::splt_pl_scan_silence) (splt_state *state, splt_code *error)

Scan the input file for silence.

The input file has to be scanned for silence and for each time/audio level, a generic silence processor will be called.
The processor handles the mp3splt silence detection logic.

Parameters
[in]stateMain state.
[out]errorFill in possible error.
Returns
The number of silence spots found.

Definition at line 2260 of file mp3splt.h.

◆ splt_pl_scan_trim_silence

int(* splt_plugin_func::splt_pl_scan_trim_silence) (splt_state *state, splt_code *error)

Scan the input file for trimming using silence detection.

The implementation of this function is straight forward after implementing splt_pl_scan_silence, since the silence detection is the same.
Only the generic silence processor changes.

Parameters
[in]stateMain state.
[out]errorFill in possible error.
Returns
The number of silence spots found.

Definition at line 2272 of file mp3splt.h.

◆ splt_pl_search_syncerrors

void(* splt_plugin_func::splt_pl_search_syncerrors) (splt_state *state, splt_code *error)

Search for synchronisation errors.

Currently only mp3 supports synchronisation errors split.

Parameters
[in]stateMain state.
[out]errorFill in possible error.

Definition at line 2281 of file mp3splt.h.

◆ splt_pl_offset_split

int(* splt_plugin_func::splt_pl_offset_split) (splt_state *state, const char *output_fname, off_t begin, off_t end)

Split the input filename by offsets.

Currently only used when splitting mp3 files using the synchronisation error mode.

Parameters
[in]stateMain state.
[in]output_fnameOutput filename.
[in]beginBegin offset of the portion to be split.
[in]endEnd offset of the portion to be split.
Returns
Possible error.

Definition at line 2293 of file mp3splt.h.

◆ splt_pl_dewrap

void(* splt_plugin_func::splt_pl_dewrap) (splt_state *state, int listonly, const char *dir, splt_code *error)

Unwrap the input file into the directory dir.

Currently only mp3 supports wrapped files.

Parameters
[in]stateMain state.
[in]listonlyIf equal to SPLT_TRUE, then the wrapped files found are stored in the state without actually splitting.
[in]dirOutput directory where the wrapped files have to be stored.
[out]errorFill in possible error.

Definition at line 2305 of file mp3splt.h.

◆ splt_pl_import_internal_sheets

void(* splt_plugin_func::splt_pl_import_internal_sheets) (splt_state *state, splt_code *error)

Import splitpoints from internal sheets.

Parameters
[in]stateMain state.
[out]errorFill in possible error.

Definition at line 2312 of file mp3splt.h.