summaryrefslogtreecommitdiff
path: root/apps/playlist.h
AgeCommit message (Collapse)Author
2020-07-24[3/4] Completely remove HWCODEC supportSolomon Peachy
'swcodec' is now always set (and recording_swcodec for recording-capable units) in feature.txt so the manual and language strings don't need to all be fixed up. Change-Id: Ib2c9d5d157af8d33653e2d4b4a12881b9aa6ddb0
2020-05-20Playlist Viewer Fix FS#13197William Wilgus
While playing a track the playlist viewer may not have a big enough temporary buffer to load and display 'max_files_in_playlist' entries This patch attempts to load as many entries as possible If tracks were already playing (dynamic playlist or otherwise) The original code only gave half the plugin buffer to a playlist loaded from file On some targets half the plugin buffer is not enough to load all entries… Now we attempt to get as many entries possible while at least leaving a small buffer (MAX_PATH) for the name buffer Change-Id: Ic06eaabc4e2550f076d625957d6d073790852743
2017-01-17Reenable database ramcache and playlist dircacheMichael Sevakis
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
2014-04-15playlist: Get rid of plugin buffer use in playlist_save().Thomas Martitz
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
2014-03-10Implement time-based resume and playback start.Michael Sevakis
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>
2013-01-02Use crc32 of filename to resume tracksRichard Quirk
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>
2011-12-19Add more INIT_ATTR and add config.h includes to header files with INIT_ATTR.Boris Gjenero
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31370 a1c6a512-1295-4272-9138-f99709370657
2011-12-15Add conditionals for functions only needed on SWCODEC targets.Boris Gjenero
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31296 a1c6a512-1295-4272-9138-f99709370657
2011-08-30GSoC/Buflib: Enable compaction in buflib.Thomas Martitz
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
2011-08-30GSoC/Buflib: Add buflib memory alocator to the core.Thomas Martitz
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
2011-06-20Dircache: Don't expose struct dircache_entry and pointers into the cache, ↵Thomas Martitz
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
2011-04-27Commit FS#12069 - Playback rework - first stages. Gives as thorough as ↵Michael Sevakis
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
2011-04-07Fix red and yellow. Move resume_index from mp3entry to playlist_info struct. ↵Andree Buschmann
Bump codec api. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29691 a1c6a512-1295-4272-9138-f99709370657
2011-04-06Fix FS#12043. Next track was resumed when pausing and shutting down the ↵Andree Buschmann
player in the last seconds of a track. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29682 a1c6a512-1295-4272-9138-f99709370657
2011-02-14All kernel objects in code shared amongs targets (core, plugins, codecs) ↵Michael Sevakis
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
2010-08-11Fix FS#11175. playlist_peek() wasn't thread safe (due to a static filename ↵Magnus Holmgren
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
2010-05-07Minor const police raid.Steve Bavin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25879 a1c6a512-1295-4272-9138-f99709370657
2010-03-03FS#10756 - Free unused init codeThomas Martitz
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
2009-12-21Fix FS#9660 - make warn on playlist erase work correctly when creating a new ↵Jonathan Gordon
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
2009-10-28Committing FS#10717 by Tomasz Kowalyczyk: add PLAYLIST_INSERT_LAST_SHUFFLED ↵Dave Hooper
(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
2009-05-31playlist start can only have 1 return value (0), so make it return nothing.Thomas Martitz
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21142 a1c6a512-1295-4272-9138-f99709370657
2008-10-15Split id3.c/h into metadata.c/h and metadata/mp3.c. Updated all references. ↵Björn Stenberg
Moved mp3data.c/h from firmware to apps. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18814 a1c6a512-1295-4272-9138-f99709370657
2008-10-12Minor clean up, move common define to a header file and use TIME_AFTER macroNils Wallménius
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18783 a1c6a512-1295-4272-9138-f99709370657
2008-06-28Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg
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
2008-05-12Const police raid.Steve Bavin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17474 a1c6a512-1295-4272-9138-f99709370657
2008-04-20Renamed remove_all_tracks to playlist_remove_all_tracks to make it ↵Bertrik Sikken
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
2008-04-07Remove unused playlist_checkend(), it really should never be needed.Steve Bavin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17023 a1c6a512-1295-4272-9138-f99709370657
2008-04-02Fix for FS#8601 by pondlife: the disk no longer spins up on a track change ↵Nicolas Pennequin
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
2006-12-26Accept FS#6464 by Chris Taylor. Adds a "Play Next" playlist insertionJonathan Gordon
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
2006-11-29Read .m3u playlist files using the default code page (unless they start with ↵Magnus Holmgren
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
2006-08-10Only sync playlist once when adding bunch of files from tagcache.Miika Pekkarinen
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10508 a1c6a512-1295-4272-9138-f99709370657
2006-07-18Patch #5179 by Sebastian Henriksen and Hardeep Sidhu - Playlist catalogLinus Nielsen Feltzing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10232 a1c6a512-1295-4272-9138-f99709370657
2006-04-19Allow insert shuffled option for directories when playlist is empty. Based ↵Hardeep Sidhu
on patch #3011 by Jonathan Gordon. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9728 a1c6a512-1295-4272-9138-f99709370657
2006-02-05Added a cache for playlist control commands. On non-dircache systems, ↵Hardeep Sidhu
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
2005-11-17Added dircache support to playlist. Now playlist filename pointers areMiika Pekkarinen
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
2005-11-02patch 1328447: folder skip routines in playlist API plus next/prev folder ↵Anton Oleynikov
navigation for iRiver's remote git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7735 a1c6a512-1295-4272-9138-f99709370657
2005-10-21iRiver: Fixed broken items skipping on playlist: Now skipping andMiika Pekkarinen
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
2005-07-04Moved resume info updating to the mpeg/playback threads so that it's saved ↵Hardeep Sidhu
even when not in the WPS git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7018 a1c6a512-1295-4272-9138-f99709370657
2005-06-25Added new shuffle repeat mode that reshuffles playlist before repeating. ↵Hardeep Sidhu
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
2005-06-24Put back the playlist creation options in the main menuLinus Nielsen Feltzing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6854 a1c6a512-1295-4272-9138-f99709370657
2005-02-12long policyJean-Philippe Bernardy
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5934 a1c6a512-1295-4272-9138-f99709370657
2004-08-18 Const policed pointer arguments to functions, part 3Jens Arnold
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4999 a1c6a512-1295-4272-9138-f99709370657
2004-01-26Modified playlist handling to allow for multiple playlists to be edited at ↵Hardeep Sidhu
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
2004-01-14Added Benjamin Metzlers bookmarking feature (patch #669440)Björn Stenberg
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4227 a1c6a512-1295-4272-9138-f99709370657
2003-12-10Added viewer for currently playing playlist. Accessed from Menu->Playlist ↵Hardeep Sidhu
Options->View Current Playlist. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4124 a1c6a512-1295-4272-9138-f99709370657
2003-12-09Don't write playlist shuffle settings immediately to disk. Instead, save ↵Hardeep Sidhu
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
2003-07-02Added "Ask" option to recursive dir insert which, if enabled, will ask users ↵Hardeep Sidhu
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
2003-07-01Added dynamic playlists. ON+PLAY->Playlist on a track, directory, or ↵Hardeep Sidhu
playlist from file browser to see available options. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3796 a1c6a512-1295-4272-9138-f99709370657
2003-05-09Configurable dir browser file buffer size. No more 400-file limit. No more ↵Linus Nielsen Feltzing
whining. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3661 a1c6a512-1295-4272-9138-f99709370657
2003-04-24Changed to runtime playlist initializationBjörn Stenberg
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3602 a1c6a512-1295-4272-9138-f99709370657