summaryrefslogtreecommitdiff
path: root/apps/buffering.h (follow)
Commit message (Collapse)AuthorAge
* Remove I/O priority. It is harmful when used with the new file code.Michael Sevakis2014-08-30
| | | | | | | | | | HAVE_IO_PRIORITY was defined for native targets with dircache. It is already effectively disabled for the most part since dircache no longer lowers its thread's I/O priority. It existed primarily for the aforementioned configuration. Change-Id: Ia04935305397ba14df34647c8ea29c2acaea92aa
* Buffering: Remove buf_ridx and buf_widx; these data are verbose.Michael Sevakis2014-04-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is trivial to obtain all required information from the allocated handles without maintaining global indexes. In fact, it is less complicated and increases general thread safety. Other miscellaneous changes (some are nice to do at this time due to required alterations, with some particularly more relevant than others): * Handle value 0 will no longer be returned as a valid handle but all failures will still return a negative value. Creates consistency with buflib and removes the need to explicitly initialize them. * Linking a new handle is delayed until explicitly added by the code that called add_handle, keeping it invisible until every operation succeeds, which is safer thread-wise. If anything fails, the handle itself may just be abandoned rather than reqiring it be freed. * Dump the special handling to slow buffering when the PCM buffer is low that calls PCM buffer functions. It doesn't seem to help much of anything these days and it's a bit of a nasty hack to directly tie those bits together. It can of course be put back (again!) if there really is a need for it. * Make data waiters ping the buffering thread more than just once if the request is taking too long. Somehow I figured out how the requests could get forgotten about but can't remember why months later after making the change in my branch. :-) * Neaten up some code by using (inline) functions and packing down parameters; remember handle allocation and movement attributes in the handle itself rather than figuring it out each time they're needed. Change-Id: Ibf863370da3dd805132fc135e0ad104953365183 Reviewed-on: http://gerrit.rockbox.org/764 Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Tested: Michael Sevakis <jethead71@rockbox.org>
* Add more INIT_ATTR and add config.h includes to header files with INIT_ATTR.Boris Gjenero2011-12-19
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31370 a1c6a512-1295-4272-9138-f99709370657
* Provide a reasonable fix for FS#12093 - Playback hanging after ↵Michael Sevakis2011-05-09
| | | | | | codec/playback rework. Also, get rid of an impossible buffering case (BUF_USED is always less than buffer_len) and remove a buffering API that is not used anywhere and shouldn't be needed (plugin API has to be incompatible). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29849 a1c6a512-1295-4272-9138-f99709370657
* Commit FS#12069 - Playback rework - first stages. Gives as thorough as ↵Michael Sevakis2011-04-27
| | | | | | 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
* Purge buffer and codec APIs existing exclusively in support of mpa.codec and ↵Michael Sevakis2011-03-16
| | | | | | fix that to not require them: buf_get_offset and ci.advance_buffer_loc. Sort APIs; everything must become incompatible. :( git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29595 a1c6a512-1295-4272-9138-f99709370657
* Disable buffering codecs (and code generally) on RaaA.Thomas Martitz2011-02-09
| | | | | | | It's not useful to do it since you need to write back the code to disk to be able to load it from memory, it also requires writing to an executable directory. Keep it for the simulator for the sake of simulating. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29261 a1c6a512-1295-4272-9138-f99709370657
* Rework albumart buffering internally to allow for mutliple albumart sizes.Thomas Martitz2009-10-16
| | | | | | | | Playback now has a few albumart slots. Anything (most importantly: skins) can obtain such a slot. The slot has fields for the size which is passed to bufopen then to image_load to buffer the albumart with the proper size. Currently there's 1 slot. We can increase it for remotes if we want. Custom statusbar will increase it. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23209 a1c6a512-1295-4272-9138-f99709370657
* Show the watermark in the "Show buffering thread" screen (in bytes).Thomas Martitz2009-02-23
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20096 a1c6a512-1295-4272-9138-f99709370657
* Accept FS#9480 - centralise and organise the events in the apps/ layer. Jonathan Gordon2008-10-16
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18819 a1c6a512-1295-4272-9138-f99709370657
* Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg2008-06-28
| | | | | | | | | later. We still need to hunt down snippets used that are not. 1324 modified files... http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
* Migrate the buffering code to the new events system.Nicolas Pennequin2008-04-03
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16950 a1c6a512-1295-4272-9138-f99709370657
* Revert my earlier const madness, we'll keep the parameter lists simple.Steve Bavin2008-03-28
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16863 a1c6a512-1295-4272-9138-f99709370657
* More consts that require no functional change.Steve Bavin2008-03-26
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16814 a1c6a512-1295-4272-9138-f99709370657
* Fix FS8069, because Nico_P made it easyBrandon Low2007-11-28
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15840 a1c6a512-1295-4272-9138-f99709370657
* Buffering callbacks rework. There is now one callback for all the events ↵Nicolas Pennequin2007-11-26
| | | | | | | | | that can occur. Callbacks are now registred only once instead of being removed after having been called. Fix FS#8092 by flushing the audio when a rebuffer is needed. Also add some comments here and there. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15816 a1c6a512-1295-4272-9138-f99709370657
* Album art support. Based on FS#3045, but heavily modified to adapt to MoB ↵Nicolas Pennequin2007-11-11
| | | | | | | | | | | | and for cleanness. The cover pictures are loaded from external bitmaps. JPEG and embedded art are not supported. The pictures will only be drawn on the main display. There is no resizing but it is possible to specify the WPS bitmap size in the bitmap names (e.g. cover.100x100.bmp). The bitmaps are stored in the main buffer and read directly from there. Currently, duplicate bitmaps will simply be present several times in the buffer, but this will be improved. To enable for a target, #define HAVE_ALBUMART in its config file. For more information, see the wiki page: http://www.rockbox.org/wiki/AlbumArt. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15572 a1c6a512-1295-4272-9138-f99709370657
* Remove conf_filechunk, it should never have been a setting and its ↵Brandon Low2007-11-05
| | | | | | implementation doesn't do what it claims any way git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15478 a1c6a512-1295-4272-9138-f99709370657
* Remove unused conf_preseek from buffering.c and all of its accountraments. ↵Brandon Low2007-11-05
| | | | | | This is _not_ a setting. This is a guessing tool used by either playback or buffering to serve its clients better. Use the REBUFFER_GUESS size in resume to help obviate pondlife's bug. This will also need to be used when FS8092 gets fixed correctly with a complete rebuffer for backward movements. It may also belong in buffering not playback, haven't decided for sure git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15475 a1c6a512-1295-4272-9138-f99709370657
* Revert recent changes that are brokenBrandon Low2007-11-03
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15439 a1c6a512-1295-4272-9138-f99709370657
* Bump hid to 32bit to make sure it's safeBrandon Low2007-11-03
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15438 a1c6a512-1295-4272-9138-f99709370657
* Make handle id semantics more like file id. This may need to be revisited ↵Brandon Low2007-11-03
| | | | | | if we ever start storing long lived things on the buffer (if an item lives through 32k other items coming and going, there will be an id collision and things will break) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15437 a1c6a512-1295-4272-9138-f99709370657
* Use a recursive depth-first shrinkage function, limit handles accordinglyBrandon Low2007-11-03
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15414 a1c6a512-1295-4272-9138-f99709370657
* Make bufread and bufgetdata blocking. They now return when enough data is ↵Nicolas Pennequin2007-11-02
| | | | | | | | available or when EOF is reached. This improves the API and removes the need for several duplicate waiting loops. Also fix a few logfqueue messages. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15412 a1c6a512-1295-4272-9138-f99709370657
* Improve upon my hackity hack from before by separating audio into two types: ↵Brandon Low2007-11-02
| | | | | | that which may be large and can be streamed and that which is small and cannot be streamed. While modifying types, allow codecs to split across the buffer wrap and dig out/move around the code that reads a codec off of the buffer to facilitate that simple sounding change. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15408 a1c6a512-1295-4272-9138-f99709370657
* Prefix the error constants with ERR_Nicolas Pennequin2007-10-29
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15359 a1c6a512-1295-4272-9138-f99709370657
* Add #defines for error values. Makes the code easier to read.Nicolas Pennequin2007-10-28
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15348 a1c6a512-1295-4272-9138-f99709370657
* Make buffering initialization versus reset separate functions to avoid ↵Brandon Low2007-10-27
| | | | | | double initializing threads or mutexes more easily git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15327 a1c6a512-1295-4272-9138-f99709370657
* Finally commit Metadata on Buffer!Nicolas Pennequin2007-10-25
buffering.c and buffering.h implement the new buffering API. playback.c is translated to that API. For more information about the whole concept, see http://www.rockbox.org/wiki/MetadataOnBuffer. There should be no major visible changes, but most existing bugs remain (though fixing them should be easier now that playback.c is a bit less complex) and there probably will be new ones. Please report any problem! Next step is to adapt cuesheet support, which is partly disabled here, and of course fix as much bugs as possible. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15306 a1c6a512-1295-4272-9138-f99709370657