mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Commit FS#12069 - Playback rework - first stages. Gives as thorough as possible a treatment of codec management, track change and metadata logic as possible while maintaining fairly narrow focus and not rewriting everything all at once. Please see the rockbox-dev mail archive on 2011-04-25 (Playback engine rework) for a more thorough manifest of what was addressed. Plugins and codecs become incompatible.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29785 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
dcf0f8de4a
commit
c537d5958e
62 changed files with 6047 additions and 4221 deletions
|
@ -28,14 +28,13 @@
|
|||
|
||||
|
||||
enum data_type {
|
||||
TYPE_UNKNOWN = 0, /* invalid type indicator */
|
||||
TYPE_ID3,
|
||||
TYPE_CODEC,
|
||||
TYPE_PACKET_AUDIO,
|
||||
TYPE_ATOMIC_AUDIO,
|
||||
TYPE_ID3,
|
||||
TYPE_CUESHEET,
|
||||
TYPE_BITMAP,
|
||||
TYPE_BUFFER,
|
||||
TYPE_UNKNOWN,
|
||||
};
|
||||
|
||||
/* Error return values */
|
||||
|
@ -63,6 +62,7 @@ bool buffering_reset(char *buf, size_t buflen);
|
|||
* bufclose : Close an open handle
|
||||
* bufseek : Set handle reading index, relatively to the start of the file
|
||||
* bufadvance: Move handle reading index, relatively to current position
|
||||
* bufftell : Return the handle's file read position
|
||||
* bufread : Copy data from a handle to a buffer
|
||||
* bufgetdata: Obtain a pointer for linear access to a "size" amount of data
|
||||
* bufgettail: Out-of-band get the last size bytes of a handle.
|
||||
|
@ -81,28 +81,40 @@ int bufalloc(const void *src, size_t size, enum data_type type);
|
|||
bool bufclose(int handle_id);
|
||||
int bufseek(int handle_id, size_t newpos);
|
||||
int bufadvance(int handle_id, off_t offset);
|
||||
off_t bufftell(int handle_id);
|
||||
ssize_t bufread(int handle_id, size_t size, void *dest);
|
||||
ssize_t bufgetdata(int handle_id, size_t size, void **data);
|
||||
ssize_t bufgettail(int handle_id, size_t size, void **data);
|
||||
ssize_t bufcuttail(int handle_id, size_t size);
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
* SECONDARY FUNCTIONS
|
||||
* ===================
|
||||
*
|
||||
* buf_handle_data_type: return the handle's data type
|
||||
* buf_is_handle: is the handle valid?
|
||||
* buf_pin_handle: Disallow/allow handle movement. Handle may still be removed.
|
||||
* buf_handle_offset: Get the offset of the first buffered byte from the file
|
||||
* buf_request_buffer_handle: Request buffering of a handle
|
||||
* buf_set_base_handle: Tell the buffering thread which handle is currently read
|
||||
* buf_length: Total size of ringbuffer
|
||||
* buf_used: Total amount of buffer space used (including allocated space)
|
||||
* buf_back_off_storage: tell buffering thread to take it easy
|
||||
****************************************************************************/
|
||||
|
||||
enum data_type buf_handle_data_type(int handle_id);
|
||||
ssize_t buf_handle_remaining(int handle_id);
|
||||
bool buf_is_handle(int handle_id);
|
||||
ssize_t buf_handle_offset(int handle_id);
|
||||
void buf_request_buffer_handle(int handle_id);
|
||||
void buf_set_base_handle(int handle_id);
|
||||
size_t buf_length(void);
|
||||
size_t buf_used(void);
|
||||
|
||||
|
||||
bool buf_pin_handle(int handle_id, bool pin);
|
||||
bool buf_signal_handle(int handle_id, bool signal);
|
||||
#ifdef HAVE_IO_PRIORITY
|
||||
void buf_back_off_storage(bool back_off);
|
||||
#endif
|
||||
|
||||
/* Settings */
|
||||
enum {
|
||||
|
@ -110,6 +122,7 @@ enum {
|
|||
BUFFERING_SET_CHUNKSIZE,
|
||||
};
|
||||
void buf_set_watermark(size_t bytes);
|
||||
size_t buf_get_watermark(void);
|
||||
|
||||
/* Debugging */
|
||||
struct buffering_debug {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue