Functions | |
| 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) |
Note that sample-accurate seek only works when gapless support has been enabled at compile time; seek is frame-accurate otherwise. Also, seeking is not guaranteed to work for all streams (underlying stream may not support it).
| off_t mpg123_tell | ( | mpg123_handle * | mh | ) |
Returns the current position in samples. On the next read, you'd get that sample.
| off_t mpg123_tellframe | ( | mpg123_handle * | mh | ) |
Returns the frame number that the next read will give you data from.
| off_t mpg123_tell_stream | ( | mpg123_handle * | mh | ) |
Returns the current byte offset in the input stream.
| off_t mpg123_seek | ( | mpg123_handle * | mh, | |
| off_t | sampleoff, | |||
| int | whence | |||
| ) |
Seek to a desired sample offset. Set whence to SEEK_SET, SEEK_CUR or SEEK_END.
| off_t mpg123_feedseek | ( | mpg123_handle * | mh, | |
| off_t | sampleoff, | |||
| int | whence, | |||
| off_t * | input_offset | |||
| ) |
Seek to a desired sample offset in data feeding mode. This just prepares things to be right only if you ensure that the next chunk of input data will be from input_offset byte position.
| input_offset | The position it expects to be at the next time data is fed to mpg123_decode(). |
| off_t mpg123_seek_frame | ( | mpg123_handle * | mh, | |
| off_t | frameoff, | |||
| int | whence | |||
| ) |
Seek to a desired MPEG frame index. Set whence to SEEK_SET, SEEK_CUR or SEEK_END.
| off_t mpg123_timeframe | ( | mpg123_handle * | mh, | |
| double | sec | |||
| ) |
Return a MPEG frame offset corresponding to an offset in seconds. This assumes that the samples per frame do not change in the file/stream, which is a good assumption for any sane file/stream only.
| int mpg123_index | ( | mpg123_handle * | mh, | |
| off_t ** | offsets, | |||
| off_t * | step, | |||
| size_t * | fill | |||
| ) |
Give access to the frame index table that is managed for seeking. You are asked not to modify the values... unless you are really aware of what you are doing.
| offsets | pointer to the index array | |
| step | one index byte offset advances this many MPEG frames | |
| fill | number of recorded index offsets; size of the array |
| 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 | |||
| ) |
Get information about current and remaining frames/seconds. WARNING: This function is there because of special usage by standalone mpg123 and may be removed in the final version of libmpg123! You provide an offset (in frames) from now and a number of output bytes served by libmpg123 but not yet played. You get the projected current frame and seconds, as well as the remaining frames/seconds. This does _not_ care about skipped samples due to gapless playback.
1.5.4