mpg123 logo
download : svn :: features :: sf.net project - bug tracker :: news archive
libmpg123 API :: testing :: benchmarking :: faq :: links :: contact
Note: This API doc is automatically generated from the current development version that you can get via Subversion or as a daily snapshot from http://mpg123.org/snapshot. There may be differences (additions) compared to the latest stable release. See NEWS.libmpg123 and the overall NEWS file on libmpg123 versions and important changes between them.
Let me emphasize that the policy for libmpg123 is to always stay backwards compatible -- only additions are planned (and it's not yet planned to change the plans;-).

mpg123.h File Reference

#include <stdlib.h>
#include <sys/types.h>

Go to the source code of this file.


Data Structures

struct  mpg123_frameinfo
struct  mpg123_string
struct  mpg123_text
struct  mpg123_id3v2
struct  mpg123_id3v1

Defines

#define EXPORT
#define mpg123_open   mpg123_open_64
#define mpg123_open_fd   mpg123_open_fd_64
#define mpg123_decode_frame   mpg123_decode_frame_64
#define mpg123_tell   mpg123_tell_64
#define mpg123_tellframe   mpg123_tellframe_64
#define mpg123_tell_stream   mpg123_tell_stream_64
#define mpg123_seek   mpg123_seek_64
#define mpg123_feedseek   mpg123_feedseek_64
#define mpg123_seek_frame   mpg123_seek_frame_64
#define mpg123_timeframe   mpg123_timeframe_64
#define mpg123_index   mpg123_index_64
#define mpg123_position   mpg123_position_64
#define mpg123_length   mpg123_length_64
#define mpg123_set_filesize   mpg123_set_filesize_64
#define MPG123_ID3   0x3
#define MPG123_NEW_ID3   0x1
#define MPG123_ICY   0xc
#define MPG123_NEW_ICY   0x4

Typedefs

typedef struct mpg123_handle_struct mpg123_handle
typedef struct mpg123_pars_struct mpg123_pars

Enumerations

enum  mpg123_parms {
  MPG123_VERBOSE, MPG123_FLAGS,
  MPG123_ADD_FLAGS, MPG123_FORCE_RATE,
  MPG123_DOWN_SAMPLE, MPG123_RVA,
  MPG123_DOWNSPEED, MPG123_UPSPEED,
  MPG123_START_FRAME, MPG123_DECODE_FRAMES,
  MPG123_ICY_INTERVAL, MPG123_OUTSCALE,
  MPG123_TIMEOUT, MPG123_REMOVE_FLAGS,
  MPG123_RESYNC_LIMIT, MPG123_INDEX_SIZE
}
enum  mpg123_param_flags {
  MPG123_FORCE_MONO = 0x7, MPG123_MONO_LEFT = 0x1,
  MPG123_MONO_RIGHT = 0x2, MPG123_MONO_MIX = 0x4,
  MPG123_FORCE_STEREO = 0x8, MPG123_FORCE_8BIT = 0x10,
  MPG123_QUIET = 0x20, MPG123_GAPLESS = 0x40,
  MPG123_NO_RESYNC = 0x80, MPG123_SEEKBUFFER = 0x100,
  MPG123_FUZZY = 0x200, MPG123_FORCE_FLOAT = 0x400
}
enum  mpg123_param_rva {
  MPG123_RVA_OFF = 0, MPG123_RVA_MIX = 1,
  MPG123_RVA_ALBUM = 2, MPG123_RVA_MAX = MPG123_RVA_ALBUM
}
enum  mpg123_errors {
  MPG123_DONE = -12, MPG123_NEW_FORMAT = -11,
  MPG123_NEED_MORE = -10, MPG123_ERR = -1,
  MPG123_OK = 0, MPG123_BAD_OUTFORMAT,
  MPG123_BAD_CHANNEL, MPG123_BAD_RATE,
  MPG123_ERR_16TO8TABLE, MPG123_BAD_PARAM,
  MPG123_BAD_BUFFER, MPG123_OUT_OF_MEM,
  MPG123_NOT_INITIALIZED, MPG123_BAD_DECODER,
  MPG123_BAD_HANDLE, MPG123_NO_BUFFERS,
  MPG123_BAD_RVA, MPG123_NO_GAPLESS,
  MPG123_NO_SPACE, MPG123_BAD_TYPES,
  MPG123_BAD_BAND, MPG123_ERR_NULL,
  MPG123_ERR_READER, MPG123_NO_SEEK_FROM_END,
  MPG123_BAD_WHENCE, MPG123_NO_TIMEOUT,
  MPG123_BAD_FILE, MPG123_NO_SEEK,
  MPG123_NO_READER, MPG123_BAD_PARS,
  MPG123_BAD_INDEX_PAR, MPG123_OUT_OF_SYNC,
  MPG123_RESYNC_FAIL, MPG123_NO_8BIT,
  MPG123_BAD_ALIGN, MPG123_NULL_BUFFER,
  MPG123_NO_RELSEEK, MPG123_NULL_POINTER,
  MPG123_BAD_KEY, MPG123_NO_INDEX,
  MPG123_INDEX_FAIL, MPG123_BAD_DECODER_SETUP,
  MPG123_MISSING_FEATURE
}
enum  mpg123_enc_enum {
  MPG123_ENC_8 = 0x00f, MPG123_ENC_16 = 0x040,
  MPG123_ENC_32 = 0x100, MPG123_ENC_SIGNED = 0x080,
  MPG123_ENC_FLOAT = 0xe00, MPG123_ENC_SIGNED_16 = (MPG123_ENC_16|MPG123_ENC_SIGNED|0x10),
  MPG123_ENC_UNSIGNED_16 = (MPG123_ENC_16|0x20), MPG123_ENC_UNSIGNED_8 = 0x01,
  MPG123_ENC_SIGNED_8 = (MPG123_ENC_SIGNED|0x02), MPG123_ENC_ULAW_8 = 0x04,
  MPG123_ENC_ALAW_8 = 0x08, MPG123_ENC_SIGNED_32 = MPG123_ENC_32|MPG123_ENC_SIGNED|0x1000,
  MPG123_ENC_UNSIGNED_32 = MPG123_ENC_32|0x2000, MPG123_ENC_FLOAT_32 = 0x200,
  MPG123_ENC_FLOAT_64 = 0x400, MPG123_ENC_ANY
}
enum  mpg123_channelcount { MPG123_MONO = 1, MPG123_STEREO = 2 }
enum  mpg123_channels {
  MPG123_LEFT = 0x1, MPG123_RIGHT = 0x2,
  MPG123_LR = 0x3
}
enum  mpg123_vbr {
  MPG123_CBR = 0, MPG123_VBR,
  MPG123_ABR
}
enum  mpg123_version {
  MPG123_1_0 = 0, MPG123_2_0,
  MPG123_2_5
}
enum  mpg123_mode {
  MPG123_M_STEREO = 0, MPG123_M_JOINT,
  MPG123_M_DUAL, MPG123_M_MONO
}
enum  mpg123_flags {
  MPG123_CRC = 0x1, MPG123_COPYRIGHT = 0x2,
  MPG123_PRIVATE = 0x4, MPG123_ORIGINAL = 0x8
}
enum  mpg123_state { MPG123_ACCURATE = 1 }

Functions

int mpg123_init (void)
void mpg123_exit (void)
mpg123_handlempg123_new (const char *decoder, int *error)
void mpg123_delete (mpg123_handle *mh)
int mpg123_param (mpg123_handle *mh, enum mpg123_parms type, long value, double fvalue)
int mpg123_getparam (mpg123_handle *mh, enum mpg123_parms type, long *val, double *fval)
const char * mpg123_plain_strerror (int errcode)
const char * mpg123_strerror (mpg123_handle *mh)
int mpg123_errcode (mpg123_handle *mh)
const char ** mpg123_decoders ()
const char ** mpg123_supported_decoders ()
int mpg123_decoder (mpg123_handle *mh, const char *decoder_name)
const char * mpg123_current_decoder (mpg123_handle *mh)
void mpg123_rates (const long **list, size_t *number)
void mpg123_encodings (const int **list, size_t *number)
int mpg123_format_none (mpg123_handle *mh)
int mpg123_format_all (mpg123_handle *mh)
int mpg123_format (mpg123_handle *mh, long rate, int channels, int encodings)
int mpg123_format_support (mpg123_handle *mh, long rate, int encoding)
int mpg123_getformat (mpg123_handle *mh, long *rate, int *channels, int *encoding)
int mpg123_open (mpg123_handle *mh, const char *path)
int mpg123_open_fd (mpg123_handle *mh, int fd)
int mpg123_open_feed (mpg123_handle *mh)
int mpg123_close (mpg123_handle *mh)
int mpg123_read (mpg123_handle *mh, unsigned char *outmemory, size_t outmemsize, size_t *done)
int mpg123_feed (mpg123_handle *mh, const unsigned char *in, size_t size)
int mpg123_decode (mpg123_handle *mh, const unsigned char *inmemory, size_t inmemsize, unsigned char *outmemory, size_t outmemsize, size_t *done)
int mpg123_decode_frame (mpg123_handle *mh, off_t *num, unsigned char **audio, size_t *bytes)
off_t mpg123_tell (mpg123_handle *mh)
off_t mpg123_tellframe (mpg123_handle *mh)
off_t mpg123_tell_stream (mpg123_handle *mh)
off_t mpg123_seek (mpg123_handle *mh, off_t sampleoff, int whence)
off_t mpg123_feedseek (mpg123_handle *mh, off_t sampleoff, int whence, off_t *input_offset)
off_t mpg123_seek_frame (mpg123_handle *mh, off_t frameoff, int whence)
off_t mpg123_timeframe (mpg123_handle *mh, double sec)
int mpg123_index (mpg123_handle *mh, off_t **offsets, off_t *step, size_t *fill)
int mpg123_position (mpg123_handle *mh, off_t frame_offset, off_t buffered_bytes, off_t *current_frame, off_t *frames_left, double *current_seconds, double *seconds_left)
int mpg123_eq (mpg123_handle *mh, enum mpg123_channels channel, int band, double val)
double mpg123_geteq (mpg123_handle *mh, enum mpg123_channels channel, int band)
int mpg123_reset_eq (mpg123_handle *mh)
int mpg123_volume (mpg123_handle *mh, double vol)
int mpg123_volume_change (mpg123_handle *mh, double change)
int mpg123_getvolume (mpg123_handle *mh, double *base, double *really, double *rva_db)
int mpg123_info (mpg123_handle *mh, struct mpg123_frameinfo *mi)
size_t mpg123_safe_buffer ()
int mpg123_scan (mpg123_handle *mh)
off_t mpg123_length (mpg123_handle *mh)
int mpg123_set_filesize (mpg123_handle *mh, off_t size)
double mpg123_tpf (mpg123_handle *mh)
long mpg123_clip (mpg123_handle *mh)
int mpg123_getstate (mpg123_handle *mh, enum mpg123_state key, long *val, double *fval)
void mpg123_init_string (mpg123_string *sb)
void mpg123_free_string (mpg123_string *sb)
int mpg123_resize_string (mpg123_string *sb, size_t news)
int mpg123_grow_string (mpg123_string *sb, size_t news)
int mpg123_copy_string (mpg123_string *from, mpg123_string *to)
int mpg123_add_string (mpg123_string *sb, const char *stuff)
int mpg123_add_substring (mpg123_string *sb, const char *stuff, size_t from, size_t count)
int mpg123_set_string (mpg123_string *sb, const char *stuff)
int mpg123_set_substring (mpg123_string *sb, const char *stuff, size_t from, size_t count)
int mpg123_meta_check (mpg123_handle *mh)
int mpg123_id3 (mpg123_handle *mh, mpg123_id3v1 **v1, mpg123_id3v2 **v2)
int mpg123_icy (mpg123_handle *mh, char **icy_meta)
char * mpg123_icy2utf8 (const char *icy_text)
mpg123_handlempg123_parnew (mpg123_pars *mp, const char *decoder, int *error)
mpg123_parsmpg123_new_pars (int *error)
void mpg123_delete_pars (mpg123_pars *mp)
int mpg123_fmt_none (mpg123_pars *mp)
int mpg123_fmt_all (mpg123_pars *mp)
int mpg123_fmt (mpg123_pars *mh, long rate, int channels, int encodings)
int mpg123_fmt_support (mpg123_pars *mh, long rate, int encoding)
int mpg123_par (mpg123_pars *mp, enum mpg123_parms type, long value, double fvalue)
int mpg123_getpar (mpg123_pars *mp, enum mpg123_parms type, long *val, double *fval)
int mpg123_replace_buffer (mpg123_handle *mh, unsigned char *data, size_t size)
size_t mpg123_outblock (mpg123_handle *mh)
int mpg123_replace_reader (mpg123_handle *mh, ssize_t(*r_read)(int, void *, size_t), off_t(*r_lseek)(int, off_t, int))

Detailed Description

The header file for the libmpg123 MPEG Audio decoder

Definition in file mpg123.h.


Generated on Mon Dec 29 23:37:35 2008 for libmpg123 by  doxygen 1.5.4