libmp3splt  0.9.2
Lossless library for splitting audio formats like mp3, ogg vorbis and FLAC.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Import 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_resultsmp3splt_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_resultmp3splt_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

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

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

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

#define SPLT_FREEDB_CDDB_CGI_PORT   80

Default port.

See Also
mp3splt_get_freedb_search
mp3splt_write_freedb_file_result

Definition at line 1823 of file mp3splt.h.

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

Typedef Documentation

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 1842 of file mp3splt.h.

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 1851 of file mp3splt.h.

Enumeration Type Documentation

Type of the import.

See Also
mp3splt_import

Definition at line 1777 of file mp3splt.h.

Function Documentation

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]stateMain state.
[in]typeType of the import.
[in]fileFile to import.
Returns
Possible error.
See Also
mp3splt_split
splt_code mp3splt_use_proxy ( splt_state state,
const char *  proxy_address,
int  proxy_port 
)

Use proxy when accessing the internet.

Parameters
[in]stateMain state.
[in]proxy_addressProxy address.
[in]proxy_portPort of the proxy_address.
Returns
Possible error.
splt_code mp3splt_use_base64_authentification ( splt_state state,
const char *  base64_authentification 
)

Use proxy with base64 authentification.

Parameters
[in]stateMain state.
[in]base64_authentificationAuthentification credentials encoded in base64.
Returns
Possible error.
See Also
mp3splt_encode_in_base64
mp3splt_clear_proxy
mp3splt_use_proxy
char* mp3splt_encode_in_base64 ( splt_state state,
const char *  input,
int *  error 
)

Encode the input in base64.

Parameters
[in]stateMain state.
[in]inputInput to be encoded in base64.
[in]errorPossible error; can be NULL.
Returns
The input encoded as base64.
See Also
mp3splt_use_base64_authentification
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]stateMain 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 
)

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

Parameters
[in]stateMain state.
[in]searched_stringSearch string - might be artist or album.
[out]errorPossible error; can be NULL.
[in]search_typeType of the search. Only SPLT_FREEDB_SEARCH_TYPE_CDDB_CGI is supported for the moment.
[in]search_serverYou can use SPLT_FREEDB2_CGI_SITE as search server.
[in]portPort 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
void mp3splt_freedb_init_iterator ( splt_freedb_results freedb_results)

Initialisation of the iterator for use with mp3splt_freedb_next.

Parameters
[in]freedb_resultsFreedb results returned with mp3splt_get_freedb_search.
See Also
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_resultsFreedb 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
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.

const char* mp3splt_freedb_get_name ( const splt_freedb_one_result result)

Returns the name of the result.

int mp3splt_freedb_get_number_of_revisions ( const splt_freedb_one_result result)

Returns the number of revisions of the 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]stateMain state.
[in]disc_idID of the chosen disc provided by mp3splt_freedb_get_id.
[in]output_fileName of the output CDDB file that will be written.
[in]cddb_get_typeType of the download. Can be SPLT_FREEDB_GET_FILE_TYPE_CDDB or SPLT_FREEDB_GET_FILE_TYPE_CDDB_CGI.
[in]cddb_get_serverName of the server from the file is downloaded. Can be SPLT_FREEDB2_CGI_SITE (or freedb.org or freedb.org/~cddb/cddb.cgi).
[in]portPort 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