libmp3splt: Import splitpoints

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

Loading...
Searching...
No Matches
Import splitpoints
Using libmp3splt » Confirmation and error codes » Options » Input filename and paths » Splitpoints handling » Tags handling » Split functions

## Topics
| Export splitpoints

## Macros
#define | SPLT_FREEDB_SEARCH_TYPE_CDDB_CGI 1
#define | SPLT_FREEDB_GET_FILE_TYPE_CDDB_CGI 3
#define | SPLT_FREEDB_GET_FILE_TYPE_CDDB 4
#define | SPLT_FREEDB_CDDB_CGI_PORT 80
#define | SPLT_FREEDB2_CGI_SITE "tracktype.org/~cddb/cddb.cgi"

## Typedefs
typedef struct _splt_freedb_results | splt_freedb_results
typedef struct _splt_freedb_one_result | splt_freedb_one_result

## Enumerations
enum | splt_import_type { CUE_IMPORT , CDDB_IMPORT , AUDACITY_LABELS_IMPORT , PLUGIN_INTERNAL_IMPORT }

## Functions
splt_code | mp3splt_import (splt_state *state, splt_import_type type, const char *file)
splt_code | mp3splt_use_proxy (splt_state *state, const char *proxy_address, int proxy_port)
splt_code | mp3splt_use_base64_authentification (splt_state *state, const char *base64_authentification)
char * | mp3splt_encode_in_base64 (splt_state *state, const char *input, int *error)
void | mp3splt_clear_proxy (splt_state *state)
splt_freedb_results * | mp3splt_get_freedb_search (splt_state *state, const char *searched_string, splt_code *error, int search_type, const char *search_server, int port)
void | mp3splt_freedb_init_iterator (splt_freedb_results *freedb_results)
const splt_freedb_one_result * | mp3splt_freedb_next (splt_freedb_results *freedb_results)
int | mp3splt_freedb_get_id (const splt_freedb_one_result *result)
const char * | mp3splt_freedb_get_name (const splt_freedb_one_result *result)
int | mp3splt_freedb_get_number_of_revisions (const splt_freedb_one_result *result)
splt_code | mp3splt_write_freedb_file_result (splt_state *state, int disc_id, const char *output_file, int cddb_get_type, const char *cddb_get_server, int port)

## Detailed Description

## Macro Definition Documentation

## ◆ SPLT_FREEDB_SEARCH_TYPE_CDDB_CGI

#define SPLT_FREEDB_SEARCH_TYPE_CDDB_CGI 1

Search CDDB file using CDDB CGI protocol (tracktype.org).

See also
  mp3splt_get_freedb_search

Definition at line 1799 of file mp3splt.h.

## ◆ SPLT_FREEDB_GET_FILE_TYPE_CDDB_CGI

#define SPLT_FREEDB_GET_FILE_TYPE_CDDB_CGI 3

Get CDDB file using CDDB CGI protocol (tracktype.org or freedb.org).

See also
  mp3splt_write_freedb_file_result

Definition at line 1806 of file mp3splt.h.

## ◆ SPLT_FREEDB_GET_FILE_TYPE_CDDB

#define SPLT_FREEDB_GET_FILE_TYPE_CDDB 4

Get CDDB file using freedb.org CDDB protocol.

See also
  mp3splt_write_freedb_file_result

Definition at line 1813 of file mp3splt.h.

## ◆ SPLT_FREEDB_CDDB_CGI_PORT

#define SPLT_FREEDB_CDDB_CGI_PORT 80

Default port.

See also
  mp3splt_get_freedb_search
  mp3splt_write_freedb_file_result

Definition at line 1821 of file mp3splt.h.

## ◆ SPLT_FREEDB2_CGI_SITE

#define SPLT_FREEDB2_CGI_SITE "tracktype.org/~cddb/cddb.cgi"

URL of tracktype.org when using SPLT_FREEDB_SEARCH_TYPE_CDDB_CGI and SPLT_FREEDB_GET_FILE_TYPE_CDDB_CGI types.

See also
  mp3splt_get_freedb_search
  mp3splt_write_freedb_file_result

Definition at line 1830 of file mp3splt.h.

## Typedef Documentation

## ◆ splt_freedb_results

typedef struct _splt_freedb_results splt_freedb_results

Structure containing the freedb search results.

All members are private.

See also
  mp3splt_get_freedb_search
  mp3splt_freedb_init_iterator
  mp3splt_freedb_next

Definition at line 1840 of file mp3splt.h.

## ◆ splt_freedb_one_result

typedef struct _splt_freedb_one_result splt_freedb_one_result

Structure containing only one freedb result.

See also
  mp3splt_freedb_get_id
  mp3splt_freedb_get_name
  mp3splt_freedb_get_number_of_revisions

Definition at line 1849 of file mp3splt.h.

## Enumeration Type Documentation

## ◆ splt_import_type

enum splt_import_type

Type of the import.

See also
  mp3splt_import

Definition at line 1775 of file mp3splt.h.

## Function Documentation

## ◆ mp3splt_import()

splt_code mp3splt_import | ( | splt_state * | state,
|  | splt_import_type | type,
|  | const char * | file )

Import splitpoints from the `file` having the `type` into the `state`.

Parameters

  [in] | state | Main state.
  [in] | type | Type of the import.
  [in] | file | File to import.

Returns
  Possible error.

See also
  mp3splt_split

## ◆ mp3splt_use_proxy()

splt_code mp3splt_use_proxy | ( | splt_state * | state,
|  | const char * | proxy_address,
|  | int | proxy_port )

Use proxy when accessing the internet.

Parameters

  [in] | state | Main state.
  [in] | proxy_address | Proxy address.
  [in] | proxy_port | Port of the `proxy_address`.

Returns
  Possible error.

## ◆ mp3splt_use_base64_authentification()

splt_code mp3splt_use_base64_authentification | ( | splt_state * | state,
|  | const char * | base64_authentification )

Use proxy with base64 authentification.

Parameters

  [in] | state | Main state.
  [in] | base64_authentification | Authentification credentials encoded in base64.

Returns
  Possible error.

See also
  mp3splt_encode_in_base64
  mp3splt_clear_proxy
  mp3splt_use_proxy

## ◆ mp3splt_encode_in_base64()

char * mp3splt_encode_in_base64 | ( | splt_state * | state,
|  | const char * | input,
|  | int * | error )

Encode the `input` in base64.

Parameters

  [in] | state | Main state.
  [in] | input | Input to be encoded in base64.
  [in] | error | Possible error; can be NULL.

Returns
  The `input` encoded as base64.

See also
  mp3splt_use_base64_authentification

## ◆ mp3splt_clear_proxy()

void mp3splt_clear_proxy | ( | splt_state * | state | ) |

Clears the proxy data from the `state`.

For security purposes, use this function as soon as the proxy is not needed any more.

Parameters

  [in] | state | Main state.

## ◆ mp3splt_get_freedb_search()

splt_freedb_results * mp3splt_get_freedb_search | ( | splt_state * | state,
|  | const char * | searched_string,
|  | splt_code * | error,
|  | int | search_type,
|  | const char * | search_server,
|  | int | port )

Search on the internet for the `searched_string` and returns the results.

Parameters

  [in] | state | Main state.
  [in] | searched_string | Search string - might be artist or album.
  [out] | error | Possible error; can be NULL.
  [in] | search_type | Type of the search. Only SPLT_FREEDB_SEARCH_TYPE_CDDB_CGI is supported for the moment.
  [in] | search_server | You can use SPLT_FREEDB2_CGI_SITE as search server.
  [in] | port | Port of the `search_server`. Can be SPLT_FREEDB_CDDB_CGI_PORT.

Returns
  The search results.

See also
  mp3splt_freedb_init_iterator
  mp3splt_freedb_next
  mp3splt_write_freedb_file_result

## ◆ mp3splt_freedb_init_iterator()

void mp3splt_freedb_init_iterator | ( | splt_freedb_results * | freedb_results | ) |

Initialisation of the iterator for use with mp3splt_freedb_next.

Parameters

  [in] | freedb_results | Freedb results returned with mp3splt_get_freedb_search.

See also
  mp3splt_freedb_next

## ◆ mp3splt_freedb_next()

const splt_freedb_one_result * mp3splt_freedb_next | ( | splt_freedb_results * | freedb_results | ) |

Returns the next freedb result from the `freedb_results`.

Parameters

  [in] | freedb_results | Freedb results to be processed.

Returns
  Next freedb result of `freedb_results` or NULL if none found or no result remains.

See also
  mp3splt_freedb_get_id
  mp3splt_freedb_get_name
  mp3splt_freedb_get_number_of_revisions

## ◆ mp3splt_freedb_get_id()

int mp3splt_freedb_get_id | ( | const splt_freedb_one_result * | result | ) |

Returns the ID of the `result`.

The ID is needed when using mp3splt_write_freedb_file_result.

## ◆ mp3splt_freedb_get_name()

const char * mp3splt_freedb_get_name | ( | const splt_freedb_one_result * | result | ) |

Returns the name of the `result`.

## ◆ mp3splt_freedb_get_number_of_revisions()

int mp3splt_freedb_get_number_of_revisions | ( | const splt_freedb_one_result * | result | ) |

Returns the number of revisions of the `result`.

## ◆ mp3splt_write_freedb_file_result()

splt_code mp3splt_write_freedb_file_result | ( | splt_state * | state,
|  | int | disc_id,
|  | const char * | output_file,
|  | int | cddb_get_type,
|  | const char * | cddb_get_server,
|  | int | port )

Downloads the CDDB file of the `disc_id` and writes it to a file.

Parameters

  [in] | state | Main state.
  [in] | disc_id | ID of the chosen disc provided by mp3splt_freedb_get_id.
  [in] | output_file | Name of the output CDDB file that will be written.
  [in] | cddb_get_type | Type of the download. Can be SPLT_FREEDB_GET_FILE_TYPE_CDDB or SPLT_FREEDB_GET_FILE_TYPE_CDDB_CGI.
  [in] | cddb_get_server | Name of the server from the file is downloaded. Can be SPLT_FREEDB2_CGI_SITE (or freedb.org or freedb.org/~cddb/cddb.cgi).
  [in] | port | Port of the `cddb_get_server`. Can be SPLT_FREEDB_CDDB_CGI_PORT (or 8880) for example.

Returns
  Possible error.

See also
  mp3splt_get_freedb_search