ReactOS 0.4.16-dev-122-g325d74c
|
Functions | |
MPG123_EXPORT int | mpg123_replace_buffer (mpg123_handle *mh, void *data, size_t size) |
MPG123_EXPORT size_t | mpg123_outblock (mpg123_handle *mh) |
MPG123_EXPORT int | mpg123_replace_reader (mpg123_handle *mh, ssize_t(*r_read)(int, void *, size_t), off_t(*r_lseek)(int, off_t, int)) |
MPG123_EXPORT int | mpg123_replace_reader_handle (mpg123_handle *mh, ssize_t(*r_read)(void *, void *, size_t), off_t(*r_lseek)(void *, off_t, int), void(*cleanup)(void *)) |
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...
MPG123_EXPORT 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.
mh | handle |
Definition at line 653 of file libmpg123.c.
MPG123_EXPORT int mpg123_replace_buffer | ( | mpg123_handle * | mh, |
void * | 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. Note that the required buffer size could be bigger than expected from output encoding if libmpg123 has to convert from primary decoder output (p.ex. 32 bit storage for 24 bit output).
Note: The type of data changed to a void pointer in mpg123 1.26.0 (API version 45).
mh | handle |
data | pointer to user buffer |
size | of buffer in bytes |
Definition at line 219 of file frame.c.
MPG123_EXPORT 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 mpg123_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). Note: As it would be troublesome to mess with this while having a file open, this implies mpg123_close().
mh | handle |
r_read | callback for reading (behaviour like POSIX read) |
r_lseek | callback for seeking (like POSIX lseek) |
Definition at line 601 of file lfs_wrap.c.
MPG123_EXPORT int mpg123_replace_reader_handle | ( | mpg123_handle * | mh, |
ssize_t(*)(void *, void *, size_t) | r_read, | ||
off_t(*)(void *, off_t, int) | r_lseek, | ||
void(*)(void *) | cleanup | ||
) |
Replace I/O functions with your own ones operating on some kind of handle instead of integer descriptors. The handle is a void pointer, so you can pass any data you want... mpg123_open_handle() is the call you make to use the I/O defined here. There is no fallback to internal read/seek here. Note: As it would be troublesome to mess with this while having a file open, this mpg123_close() is implied here.
mh | handle |
r_read | callback for reading (behaviour like POSIX read) |
r_lseek | callback for seeking (like POSIX lseek) |
cleanup | A callback to clean up an I/O handle on mpg123_close, can be NULL for none (you take care of cleaning your handles). |
Definition at line 632 of file lfs_wrap.c.
Referenced by mpg123_open(), mpg123_open_fd(), and mpg123_open_handle().
int mpg123_frameinfo::abr_rate |
mpg123_string* mpg123_id3v2::album |
Album string (pointer into text_list).
Definition at line 1432 of file mpg123.h.
Referenced by null_id3_links().
mpg123_string* mpg123_id3v2::artist |
Artist string (pointer into text_list).
Definition at line 1431 of file mpg123.h.
Referenced by null_id3_links().
int mpg123_frameinfo::bitrate |
mpg123_string* mpg123_id3v2::comment |
Pointer to last encountered comment text with empty description.
Definition at line 1435 of file mpg123.h.
Referenced by null_id3_links().
mpg123_text* mpg123_id3v2::comment_list |
size_t mpg123_id3v2::comments |
pointer to the image data
Definition at line 1419 of file mpg123.h.
Referenced by free_mpg123_picture(), and init_mpg123_picture().
mpg123_string mpg123_text::description |
Empty for the generic comment...
Definition at line 1379 of file mpg123.h.
Referenced by free_mpg123_text(), init_mpg123_text(), process_comment(), and process_extra().
mpg123_string mpg123_picture::description |
description string
Definition at line 1416 of file mpg123.h.
Referenced by free_mpg123_picture(), and init_mpg123_picture().
mpg123_text* mpg123_id3v2::extra |
The array of extra (TXXX) fields.
Definition at line 1442 of file mpg123.h.
Referenced by init_id3().
size_t mpg123_id3v2::extras |
Number of extra text (TXXX) fields.
Definition at line 1443 of file mpg123.h.
Referenced by init_id3().
size_t mpg123_string::fill |
number of used bytes (including closing zero byte)
Definition at line 1195 of file mpg123.h.
Referenced by mpg123_copy_string(), process_comment(), and process_extra().
enum mpg123_flags mpg123_frameinfo::flags |
int mpg123_frameinfo::framesize |
mpg123_string* mpg123_id3v2::genre |
Genre String (pointer into text_list). The genre string(s) may very well need postprocessing, esp. for ID3v2.3.
Definition at line 1434 of file mpg123.h.
Referenced by null_id3_links().
char mpg123_text::id[4] |
The ID3v2 text field id, like TALB, TPE2, ... (4 characters, no string termination).
Definition at line 1378 of file mpg123.h.
Referenced by init_mpg123_text(), process_comment(), and process_extra().
char mpg123_text::lang[3] |
Three-letter language code (not terminated).
Definition at line 1377 of file mpg123.h.
Referenced by init_mpg123_text(), and process_comment().
int mpg123_frameinfo::layer |
mpg123_string mpg123_picture::mime_type |
MIME type
Definition at line 1417 of file mpg123.h.
Referenced by free_mpg123_picture(), and init_mpg123_picture().
enum mpg123_mode mpg123_frameinfo::mode |
int mpg123_frameinfo::mode_ext |
char* mpg123_string::p |
pointer to the string data
Definition at line 1193 of file mpg123.h.
Referenced by mpg123_copy_string(), process_comment(), and process_extra().
mpg123_picture* mpg123_id3v2::picture |
Array of ID3v2 pictures fields (APIC). Only populated if MPG123_PICTURE flag is set!
Definition at line 1444 of file mpg123.h.
Referenced by init_id3().
size_t mpg123_id3v2::pictures |
Number of picture (APIC) fields.
Definition at line 1446 of file mpg123.h.
Referenced by init_id3().
size_t mpg123_picture::size |
char mpg123_id3v1::tag[3] |
mpg123_string mpg123_text::text |
...
Definition at line 1380 of file mpg123.h.
Referenced by free_mpg123_text(), init_mpg123_text(), process_comment(), and process_extra().
mpg123_text* mpg123_id3v2::text |
Array of ID3v2 text fields (including USLT)
Definition at line 1440 of file mpg123.h.
Referenced by init_id3().
size_t mpg123_id3v2::texts |
mpg123_string* mpg123_id3v2::title |
Title string (pointer into text_list).
Definition at line 1430 of file mpg123.h.
Referenced by null_id3_links().
char mpg123_picture::type |
mpg123_id3_pic_type value
Definition at line 1415 of file mpg123.h.
Referenced by init_mpg123_picture().
enum mpg123_vbr mpg123_frameinfo::vbr |
enum mpg123_version mpg123_frameinfo::version |
3 or 4 for ID3v2.3 or ID3v2.4.
Definition at line 1429 of file mpg123.h.
Referenced by init_id3(), and parse_new_id3().
mpg123_string* mpg123_id3v2::year |
The year as a string (pointer into text_list).
Definition at line 1433 of file mpg123.h.
Referenced by null_id3_links().