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

Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Enumerator | Variables
Creating libmp3splt plugins
Using libmp3splt » Confirmation and error codes » Options » Input filename and paths » Splitpoints handling » Tags handling » Split functions » Import splitpoints » Export splitpoints » Wrap utilities » Other utilities

## 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 2318 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 2155 of file mp3splt.h.

## Variable Documentation

## ◆ version

float splt_plugin_info::version

Plugin version.

Definition at line 2137 of file mp3splt.h.

## ◆ name

char* splt_plugin_info::name

Plugin name.

Definition at line 2141 of file mp3splt.h.

## ◆ extension

char* splt_plugin_info::extension

File extension handled by the plugin.

Definition at line 2145 of file mp3splt.h.

## ◆ upper_extension

char* splt_plugin_info::upper_extension

File extension handled by the plugin as uppercase.

Definition at line 2149 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] | state | Main state.
  [out] | error | Fill in possible error.

Definition at line 2182 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] | state | Main state.
  [out] | error | Fill in possible error.

Definition at line 2191 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] | state | Main state.
  [out] | error | Fill in possible error.

Returns
  SPLT_TRUE if the plugin matches the input file.

Definition at line 2201 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_info | Plugin information to be filled. Parameter is already allocated.
  [out] | error | Fill in possible error.

Definition at line 2210 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] | state | Main state.
  [in] | final_fname | Output filename to be written for this split.
  [in] | begin_point | Begin point where the split starts as seconds.hundreths.
  [in] | end_point | End point where the split ends as seconds.hundreths.
  [out] | error | Fill in possible error.
  [in] | save_end_point | Is 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 2224 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] | state | Main state.
  [out] | error | Fill in possible error.

Definition at line 2237 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_tags | Original tags structure containing the original tags data to be freed.

Definition at line 2246 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] | state | Main state.
  [out] | error | Fill in possible error.

Returns
  The number of silence spots found.

Definition at line 2258 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] | state | Main state.
  [out] | error | Fill in possible error.

Returns
  The number of silence spots found.

Definition at line 2270 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] | state | Main state.
  [out] | error | Fill in possible error.

Definition at line 2279 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] | state | Main state.
  [in] | output_fname | Output filename.
  [in] | begin | Begin offset of the portion to be split.
  [in] | end | End offset of the portion to be split.

Returns
  Possible error.

Definition at line 2291 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] | state | Main state.
  [in] | listonly | If equal to SPLT_TRUE, then the wrapped files found are stored in the `state` without actually splitting.
  [in] | dir | Output directory where the wrapped files have to be stored.
  [out] | error | Fill in possible error.

Definition at line 2303 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] | state | Main state.
  [out] | error | Fill in possible error.

Definition at line 2310 of file mp3splt.h.