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 low level I/O


Functions

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

You may want to do tricky stuff with I/O that does not work with mpg123's default file access or you want to make it decode into your own pocket...

Function Documentation

int mpg123_replace_buffer ( mpg123_handle mh,
unsigned char *  data,
size_t  size 
)

Replace default internal buffer with user-supplied buffer. Instead of working on it's own private buffer, mpg123 will directly use the one you provide for storing decoded audio.

size_t mpg123_outblock ( mpg123_handle mh  ) 

The max size of one frame's decoded output with current settings. Use that to determine an appropriate minimum buffer size for decoding one frame.

int mpg123_replace_reader ( mpg123_handle mh,
ssize_t(*)(int, void *, size_t)  r_read,
off_t(*)(int, off_t, int)  r_lseek 
)

Replace low-level stream access functions; read and lseek as known in POSIX. You can use this to make any fancy file opening/closing yourself, using open_fd to set the file descriptor for your read/lseek (doesn't need to be a "real" file descriptor...). Setting a function to NULL means that the default internal read is used (active from next mpg123_open call on).


Generated on Wed Sep 3 13:03:37 2008 for libmpg123 by  doxygen 1.5.4