summaryrefslogtreecommitdiff
path: root/apps/playlist.h (follow)
Commit message (Collapse)AuthorAge
* Reenable database ramcache and playlist dircacheMichael Sevakis2017-01-17
| | | | | | | | | | | | | | Playlist dircache references should be back in working order. Reenabling dircache references in the database ramcache is not yet done as it requires quite a bit of rework. Otherwise, the database in RAM is functional again. Some buffer compatibility changes have been made for database commit because the dircache buffer can no longer be stolen, only freed by an API call. Change-Id: Ib57c3e98cb23e798d4439e9da7ebd73826e733a4
* playlist: Get rid of plugin buffer use in playlist_save().Thomas Martitz2014-04-15
| | | | | | | | | | | | | The plugin buffer was used only to avoid reparsing the playlist, so non-essential. But when it was used it conflicted with the playlist viewer which already uses the plugin buffer for playlist purposes simultaneously. It only works by accident. Since the reparse avoidance is non-essential don't do it for now. A temp buffer can be passed to playlist_save() to enable it but the only caller (as of now) does not do that. Change-Id: I3f75f89d8551e1ec38800268b273105faba0efbf
* Implement time-based resume and playback start.Michael Sevakis2014-03-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | This complements offset-based resume and playback start funcionality. The implementation is global on both HWCODEC and SWCODEC. Basically, if either the specified elapsed or offset are non-zero, it indicates a mid-track resume. To resume by time only, set elapsed to nonzero and offset to zero. To resume by offset only, set offset to nonzero and elapsed to zero. Which one the codec uses and which has priority is up to the codec; however, using an elapsed time covers more cases: * Codecs not able to use an offset such as VGM or other atomic formats * Starting playback at a nonzero elapsed time from a source that contains no offset, such as a cuesheet The change re-versions pretty much everything from tagcache to nvram. Change-Id: Ic7aebb24e99a03ae99585c5e236eba960d163f38 Reviewed-on: http://gerrit.rockbox.org/516 Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Tested: Michael Sevakis <jethead71@rockbox.org>
* Use crc32 of filename to resume tracksRichard Quirk2013-01-02
| | | | | | | | | | | | | | | | | As well as using an index, which breaks when a file is added or removed, use the crc32 of the filename. When the crc32 check passes the index is used directly. When it fails, the slow path is taken checking each file name in the playlist until the right crc is found. If that fails the playlist is started from the beginning. See http://www.rockbox.org/tracker/6411 Bump plugin API and nvram version numbers Change-Id: I156f61a9f1ac428b4a682bc680379cb6b60b1b10 Reviewed-on: http://gerrit.rockbox.org/372 Tested-by: Jonathan Gordon <rockbox@jdgordon.info> Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
* 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
* Add conditionals for functions only needed on SWCODEC targets.Boris Gjenero2011-12-15
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31296 a1c6a512-1295-4272-9138-f99709370657
* GSoC/Buflib: Enable compaction in buflib.Thomas Martitz2011-08-30
| | | | | | | | | | | | | | | | | | | This enables the ability to allocate (and free) memory dynamically without fragmentation, through compaction. This means allocations can move and fragmentation be reduced. Most changes are preparing Rockbox for this, which many times means adding a move callback which can temporarily disable movement when the corresponding code is in a critical section. For now, the audio buffer allocation has a central role, because it's the one having allocated most. This buffer is able to shrink itself, for which it needs to stop playback for a very short moment. For this, audio_buffer_available() returns the size of the audio buffer which can possibly be used by other allocations because the audio buffer can shrink. lastfm scrobbling and timestretch can now be toggled at runtime without requiring a reboot. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30381 a1c6a512-1295-4272-9138-f99709370657
* GSoC/Buflib: Add buflib memory alocator to the core.Thomas Martitz2011-08-30
| | | | | | | | | | | | | | | | | The buflib memory allocator is handle based and can free and compact, move or resize memory on demand. This allows to effeciently allocate memory dynamically without an MMU, by avoiding fragmentation through memory compaction. This patch adds the buflib library to the core, along with convinience wrappers to omit the context parameter. Compaction is not yet enabled, but will be in a later patch. Therefore, this acts as a replacement for buffer_alloc/buffer_get_buffer() with the benifit of a debug menu. See buflib.h for some API documentation. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30380 a1c6a512-1295-4272-9138-f99709370657
* Dircache: Don't expose struct dircache_entry and pointers into the cache, ↵Thomas Martitz2011-06-20
| | | | | | | | | use IDs instead. Only integer IDs are exposed from dircache with this. This way the cache is isolated from other modules. This is needed for my buflib gsoc project. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30038 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
* Fix red and yellow. Move resume_index from mp3entry to playlist_info struct. ↵Andree Buschmann2011-04-07
| | | | | | Bump codec api. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29691 a1c6a512-1295-4272-9138-f99709370657
* Fix FS#12043. Next track was resumed when pausing and shutting down the ↵Andree Buschmann2011-04-06
| | | | | | player in the last seconds of a track. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29682 a1c6a512-1295-4272-9138-f99709370657
* All kernel objects in code shared amongs targets (core, plugins, codecs) ↵Michael Sevakis2011-02-14
| | | | | | should be declared SHAREDBSS_ATTR as any core could potentially touch them even though they seem only to involve threads on one core. The exception is target code for particular CPUs where proper allocation is fixed. playlist.c was a little odd too-- use one mutex for the current playlist and a separate one for created playlists (still pondering the necessity of more than one). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29305 a1c6a512-1295-4272-9138-f99709370657
* Fix FS#11175. playlist_peek() wasn't thread safe (due to a static filename ↵Magnus Holmgren2010-08-11
| | | | | | buffer), so frequent calls from the main thread would cause the audio thread to buffer the wrong track. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27773 a1c6a512-1295-4272-9138-f99709370657
* Minor const police raid.Steve Bavin2010-05-07
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25879 a1c6a512-1295-4272-9138-f99709370657
* FS#10756 - Free unused init codeThomas Martitz2010-03-03
| | | | | | | Introduce a new .init section for initialisation code, so that it can be copied to an area which is later overwritten before calling. The stack/bss can then overwrite that code, effectively freeing the code size that the initialisation routines need. Gives a few kB ram usage back. Only implemented for PP and as3525 so far. More targets could be added, as well as more functions. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25013 a1c6a512-1295-4272-9138-f99709370657
* Fix FS#9660 - make warn on playlist erase work correctly when creating a new ↵Jonathan Gordon2009-12-21
| | | | | | playlist from the database (a bit of a hack, but not bad enough to outright reject) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24089 a1c6a512-1295-4272-9138-f99709370657
* Committing FS#10717 by Tomasz Kowalyczyk: add PLAYLIST_INSERT_LAST_SHUFFLED ↵Dave Hooper2009-10-28
| | | | | | (appends the inserted folder into shuffled order to end of playlist) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23385 a1c6a512-1295-4272-9138-f99709370657
* playlist start can only have 1 return value (0), so make it return nothing.Thomas Martitz2009-05-31
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21142 a1c6a512-1295-4272-9138-f99709370657
* Split id3.c/h into metadata.c/h and metadata/mp3.c. Updated all references. ↵Björn Stenberg2008-10-15
| | | | | | Moved mp3data.c/h from firmware to apps. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18814 a1c6a512-1295-4272-9138-f99709370657
* Minor clean up, move common define to a header file and use TIME_AFTER macroNils Wallménius2008-10-12
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18783 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
* Const police raid.Steve Bavin2008-05-12
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17474 a1c6a512-1295-4272-9138-f99709370657
* Renamed remove_all_tracks to playlist_remove_all_tracks to make it ↵Bertrik Sikken2008-04-20
| | | | | | consistent with the naming of the other functions in playlist.c git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17186 a1c6a512-1295-4272-9138-f99709370657
* Remove unused playlist_checkend(), it really should never be needed.Steve Bavin2008-04-07
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17023 a1c6a512-1295-4272-9138-f99709370657
* Fix for FS#8601 by pondlife: the disk no longer spins up on a track change ↵Nicolas Pennequin2008-04-02
| | | | | | when dircache is disabled. This issue was introduced by me in r16019 by adding a call to playlist_peek() in audio_check_new_track(). This fix adds a new playlist API call to work around the problem until we find a better solution. There are also a few simplifications and comment corrections. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16930 a1c6a512-1295-4272-9138-f99709370657
* Accept FS#6464 by Chris Taylor. Adds a "Play Next" playlist insertionJonathan Gordon2006-12-26
| | | | | | | | | option which replaces the current playlist with the new selection but keeps the current track queued so playback doesnt stop. (minor fixes by me) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11842 a1c6a512-1295-4272-9138-f99709370657
* Read .m3u playlist files using the default code page (unless they start with ↵Magnus Holmgren2006-11-29
| | | | | | a BOM) rather than UTF-8. Change default playlist suffix to .m3u8 (playlists are always saved using UTF-8). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11626 a1c6a512-1295-4272-9138-f99709370657
* Only sync playlist once when adding bunch of files from tagcache.Miika Pekkarinen2006-08-10
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10508 a1c6a512-1295-4272-9138-f99709370657
* Patch #5179 by Sebastian Henriksen and Hardeep Sidhu - Playlist catalogLinus Nielsen Feltzing2006-07-18
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10232 a1c6a512-1295-4272-9138-f99709370657
* Allow insert shuffled option for directories when playlist is empty. Based ↵Hardeep Sidhu2006-04-19
| | | | | | on patch #3011 by Jonathan Gordon. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9728 a1c6a512-1295-4272-9138-f99709370657
* Added a cache for playlist control commands. On non-dircache systems, ↵Hardeep Sidhu2006-02-05
| | | | | | behaviour should be the same as before (all commands except shuffle flushed immediately). On dircache systems, commands are only flushed when disk is accessed or during shutdown. This especially reduces disk accesses when playing queued files and should fix the problem with gapless playback. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8584 a1c6a512-1295-4272-9138-f99709370657
* Added dircache support to playlist. Now playlist filename pointers areMiika Pekkarinen2005-11-17
| | | | | | | | automatically accuired from dircache. WPS UI response with dircache enabled should be instant. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7931 a1c6a512-1295-4272-9138-f99709370657
* patch 1328447: folder skip routines in playlist API plus next/prev folder ↵Anton Oleynikov2005-11-02
| | | | | | navigation for iRiver's remote git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7735 a1c6a512-1295-4272-9138-f99709370657
* iRiver: Fixed broken items skipping on playlist: Now skipping andMiika Pekkarinen2005-10-21
| | | | | | | | | marking them as bad instead of deleting the entries from playlist. Faster buffered track skipping and preventing glitches from previous tracks (still something might occur though, please report them). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7647 a1c6a512-1295-4272-9138-f99709370657
* Moved resume info updating to the mpeg/playback threads so that it's saved ↵Hardeep Sidhu2005-07-04
| | | | | | even when not in the WPS git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7018 a1c6a512-1295-4272-9138-f99709370657
* Added new shuffle repeat mode that reshuffles playlist before repeating. ↵Hardeep Sidhu2005-06-25
| | | | | | Also added new shuffled insert mode that randomly inserts selected track(s) somewhere between current track and end of playlist. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6861 a1c6a512-1295-4272-9138-f99709370657
* Put back the playlist creation options in the main menuLinus Nielsen Feltzing2005-06-24
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6854 a1c6a512-1295-4272-9138-f99709370657
* long policyJean-Philippe Bernardy2005-02-12
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5934 a1c6a512-1295-4272-9138-f99709370657
* Const policed pointer arguments to functions, part 3Jens Arnold2004-08-18
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4999 a1c6a512-1295-4272-9138-f99709370657
* Modified playlist handling to allow for multiple playlists to be edited at ↵Hardeep Sidhu2004-01-26
| | | | | | the same time. Added support in playlist viewer for viewing/editing playlists on disk (accessed via ON+PLAY->Playlist->View on a playlist). Added menu in playlist viewer for changing a few settings and saving playlist. Added File Options menu in playlist viewer ON+PLAY menu. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4276 a1c6a512-1295-4272-9138-f99709370657
* Added Benjamin Metzlers bookmarking feature (patch #669440)Björn Stenberg2004-01-14
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4227 a1c6a512-1295-4272-9138-f99709370657
* Added viewer for currently playing playlist. Accessed from Menu->Playlist ↵Hardeep Sidhu2003-12-10
| | | | | | Options->View Current Playlist. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4124 a1c6a512-1295-4272-9138-f99709370657
* Don't write playlist shuffle settings immediately to disk. Instead, save ↵Hardeep Sidhu2003-12-09
| | | | | | them in global settings and only flush to disk when the playlist is modified \(e.g. insert,delete\). As part of the changes the resume index was changed from an int to a short to give an extra 2 bytes in RTC ram to be used for another playlist index. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4121 a1c6a512-1295-4272-9138-f99709370657
* Added "Ask" option to recursive dir insert which, if enabled, will ask users ↵Hardeep Sidhu2003-07-02
| | | | | | whether they want to recursively insert selected dir. Also, renamed "Insert first" and "Queue first" to "Insert next" and "Queue next" respectively. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3799 a1c6a512-1295-4272-9138-f99709370657
* Added dynamic playlists. ON+PLAY->Playlist on a track, directory, or ↵Hardeep Sidhu2003-07-01
| | | | | | playlist from file browser to see available options. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3796 a1c6a512-1295-4272-9138-f99709370657
* Configurable dir browser file buffer size. No more 400-file limit. No more ↵Linus Nielsen Feltzing2003-05-09
| | | | | | whining. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3661 a1c6a512-1295-4272-9138-f99709370657
* Changed to runtime playlist initializationBjörn Stenberg2003-04-24
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3602 a1c6a512-1295-4272-9138-f99709370657
* Keep the playlist open all the time, to reduce mid-song times caused by theDaniel Stenberg2003-04-23
| | | | | | | | | closure and reopening of the playlist. Consider this slightly experimental. Can you detect a speed difference? git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3592 a1c6a512-1295-4272-9138-f99709370657
* Better handling of next/prevLinus Nielsen Feltzing2003-04-11
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3528 a1c6a512-1295-4272-9138-f99709370657