summaryrefslogtreecommitdiff
path: root/apps/tagcache.h
AgeCommit message (Collapse)Author
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>
2012-07-31Fix database tool.Thomas Martitz
It was also broken functionally, probably since a while.So restore the functionality. Run it on the dap, the tcd files will be placed into .rockbox folder. Change-Id: Id7a6ce4389dfaf99799258902be80d630af0601c
2012-07-30Database: Support for multiple search roots.Thomas Martitz
Support multiple roots (i.e. scan folders) using the new folder_select() function. Amaximum of 12 dirs can be selected, however the setting (i.e. the entire folder list) cannot be longer than 80 chars. The setting works similar to the autoresume dirs: Directories are seperated by colons, e.g. "/Music:/Podcasts". Default is "/sdcard" on android, "/" on all other targets. Changes are made to the multiple-root logic in tagcache.c. This is to a) provide the logic at all on native targets and b) support more than one root before the scan even starts (until now it was used to add roots during scan due to symlinks). Change-Id: I64992c0678324536e8e64cd4427c8abbd8e8b39e
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-14FS#12378 : Remove various unused code, and comment out some unused code and ↵Boris Gjenero
data for reference or future use. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31256 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-07-31FS#12132 patch 6, part 2: tagnavi.config: Add support for "basename"Michael Hohmuth
in formats and conditions. The basename is the non-directory part of a file's pathname. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30230 a1c6a512-1295-4272-9138-f99709370657
2011-07-01Allocate indices directly in ramcache header. Add version code toMiika Pekkarinen
tagcache state dump header. Debug: hdr-structure corruption might happen after rebuilding of dircache. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30109 a1c6a512-1295-4272-9138-f99709370657
2011-06-06FS#12132 patch 4: Added a comment for the tagcache_search.type field.Michael Hohmuth
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29980 a1c6a512-1295-4272-9138-f99709370657
2011-05-10tagnavi.config: Add a logical-OR operator ("|") for tagnavi conditionals.Michael Hohmuth
Logical-AND ("&") always takes precedence over logical-OR. (Parentheses are not supported.) Fight binsize increase by storing some common expressions in local variables. This avoids repeated reevaluations involving memory accesses. check_clauses: Fail clause (return false) in case of errors (tag too long, DB entry deleted). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29851 a1c6a512-1295-4272-9138-f99709370657
2011-02-27Fix database import and exportMichael Hohmuth
Correct an omission that happened when the DB schema was changed last time. Add a comment to enum tag_type to prevent this from happening in the future. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29435 a1c6a512-1295-4272-9138-f99709370657
2011-01-17Fix player becoming unresponsive on Stop / Pause in some cases.Dominik Riebeling
Fix for FS#11856: In tagtree_buffer_event, do not wait for database to come online as that may never happen. Rather, wait until it either has come online or has decided that this will never happen. Added a new function to tagcache.c to export this information. Flyspray: FS#11865 Author: Michael Hohmuth git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29081 a1c6a512-1295-4272-9138-f99709370657
2011-01-02Commit part of FS#11748 by Michael Hohmuth. Adds support for automatically ↵Michael Giacomelli
resuming any song that is not played to completion at any point later in time, regardless of how many intermediate tracks are played. This is accomplished by expanding the database to record incompletely played tracks. Currently, the feature is simply on or off, in which case all tracks automatically resume, or they do not. The remainder of patches in the task expand this feature by allowing only certain file to automatically resume, only resuming in certain circumstances, etc but are not included until we reach agreement on what should be included. Additionally, the manual will need to be updated once we agree on the available settings. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28942 a1c6a512-1295-4272-9138-f99709370657
2010-09-30use correct condition for #if for tagcache_fill_tags().Teruaki Kawashima
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28188 a1c6a512-1295-4272-9138-f99709370657
2010-05-20accept FS#10992 by Rui Araújo to fix FS#10976 - make the <Untagged> string ↵Jonathan Gordon
translatable git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26192 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-06-20Keep simulators happy.Miika Pekkarinen
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21403 a1c6a512-1295-4272-9138-f99709370657
2009-06-20A bunch of stability fixes into tagcache engine and database browser. Mainly ↵Miika Pekkarinen
data retrieval problems, races, data corruption of sorted index files at the end with junk data, access to unitialized memory and so on. Should fix FS#8710 and may fix FS#8414. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21402 a1c6a512-1295-4272-9138-f99709370657
2009-06-06Add a system-wide BIT_N macro, implemented via an LUT on SH, and use it in ↵Andrew Mahone
the TAGCACHE_IS_* macros in place of per-set LUTs, removing duplication of data between those LUTs and the mask values used on other targets. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21195 a1c6a512-1295-4272-9138-f99709370657
2009-06-03Replace bitfield for tagcache tag sets with array of char on SH.Andrew Mahone
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21176 a1c6a512-1295-4272-9138-f99709370657
2009-06-03Replace arrays of tags that are numeric/sorted/uniqued with bitfields ↵Andrew Mahone
flagging each tag that is a member of the set, and replace the membership tests with a shift and bitwise and. The test is still done inside a function on SH, as this saves some space vs the macro used on other targets. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21175 a1c6a512-1295-4272-9138-f99709370657
2009-03-06Fix FS#9977 - Thanks to Brian Sutherland for intensive testing and effortThomas Martitz
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20214 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-08-29Fixed a possible index id destruction and temporary problems with the DB ↵Miika Pekkarinen
when DB has been loaded to ram, dircache enabled and statistics gathering ON. Fixed serial (affecting last played song order) being one too low after importing the changelog. A bit of code cleanup and comments also. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18363 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-03Renamed build_tagcache to tagcache_build to make it consistent with the ↵Bertrik Sikken
function naming of the other functions in tagcache.c git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17331 a1c6a512-1295-4272-9138-f99709370657
2008-05-03Made source files #include the header file that they implement to make sure ↵Bertrik Sikken
they are in sync. Made some local functions static. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17312 a1c6a512-1295-4272-9138-f99709370657
2008-03-25Tiny fix of spelling in comment.Steve Bavin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16800 a1c6a512-1295-4272-9138-f99709370657
2008-02-17Fixed red, forgot to commit header changes.Miika Pekkarinen
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16332 a1c6a512-1295-4272-9138-f99709370657
2007-12-18Preserve song statistics when moving files or altering metadata. Conditions ↵Miika Pekkarinen
required to apply: song length must not change AND either filenames (with path) must match or two of the following tags matches: artist, album, title. IMPORTANT: Currently dircache enabled and DB loaded to RAM is required for reliable operation of this feature. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15955 a1c6a512-1295-4272-9138-f99709370657
2007-12-16Added file modify time field to the DB. Now metadata changes should be ↵Miika Pekkarinen
detected with database autoupdate enabled. Runtime statistics are not yet preserved. Preserving statistics over moving of files and altering metadata is going to be implemented next. IMPORTANT: Export database before upgrading. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15946 a1c6a512-1295-4272-9138-f99709370657
2007-10-30some improvements to FS#8008 - see tracker entry for detailsRobert Kukla
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15371 a1c6a512-1295-4272-9138-f99709370657
2007-10-29rework my previous commit (FS#8008) to be able to work for any of the ↵Jonathan Gordon
strings in the id3 info struct, new ones need to be added to tagtree.c and tagnavi.config *currently available tags are* #title# #artist# #album# #genre# #composer# #albumartist# and #directory# git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15358 a1c6a512-1295-4272-9138-f99709370657
2007-10-29Accept FS#8008 - allows the current artist or album to be used in databse ↵Jonathan Gordon
searches (use the #artist# or #album# keywords in tagnavi.config) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15354 a1c6a512-1295-4272-9138-f99709370657
2007-10-21Fixed debug menu crashing. Show last file processed by tagcache engine in ↵Miika Pekkarinen
debug menu. Enabled autoupdating of deleted files for flash storage devices. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15244 a1c6a512-1295-4272-9138-f99709370657
2007-08-08Add support for grouping tags. From FS#7362.Dan Everton
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14242 a1c6a512-1295-4272-9138-f99709370657
2007-08-03Add support for parsing the disc number tag from metadata and use of it in ↵Dan Everton
the database. Patch originally from FS#4961 with some minor tweaks by me. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14154 a1c6a512-1295-4272-9138-f99709370657
2007-07-21Queue song statistical data to the tagcache system and update entirely in ↵Miika Pekkarinen
background. Fixes ratings disappearing or not saving in the DB at all. Fixes also UI delay when stopping playback and new statistics are committed to DB. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13955 a1c6a512-1295-4272-9138-f99709370657
2007-04-12Now track total playtime should be accessible as well by using Pm and Ps ↵Miika Pekkarinen
virtual tags. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13133 a1c6a512-1295-4272-9138-f99709370657
2007-04-12Added virtual tags in database to break track length to minutes and seconds.Miika Pekkarinen
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13132 a1c6a512-1295-4272-9138-f99709370657
2007-03-26Rating support for database and WPS (based on FS# 6301). A value between 0 ↵Robert Kukla
and 10 can be assigned to the currently playing track using the WPS context menu. This value is displayed in the WPS using the %rr tag (replacing autoscore) and can be used as "rating" in tagnavi.config (examples provided). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12922 a1c6a512-1295-4272-9138-f99709370657
2007-03-08Really don't try to initialise while the database status is unknownSteve Bavin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12684 a1c6a512-1295-4272-9138-f99709370657
2007-03-07Lead user through database initialisationSteve Bavin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12678 a1c6a512-1295-4272-9138-f99709370657
2007-03-01Introducing the root menu!Jonathan Gordon
Blind users: get a new voice file as there are lots of lang changes and new strings. FS#6630 or RootMenu on the wiki for more info. complaints to /dev/null :) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12528 a1c6a512-1295-4272-9138-f99709370657
2007-02-25Cleaned up code a bit, fixed possible bug during committing numeric indices ↵Miika Pekkarinen
and made code more fault tolerant. Added a new numeric tag making it possible to list recently added tracks. Export your DB. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12482 a1c6a512-1295-4272-9138-f99709370657
2007-02-15Shave a few bytes off the binary size, especially on hwcodec targetsLinus Nielsen Feltzing
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12323 a1c6a512-1295-4272-9138-f99709370657
2007-02-13Make database endianess independent.Miika Pekkarinen
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12297 a1c6a512-1295-4272-9138-f99709370657
2007-02-10FS#6638 - Album artist and comment patch for WPS and tagcache. ExportMiika Pekkarinen
your database before updating because initialization is needed. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12255 a1c6a512-1295-4272-9138-f99709370657
2006-11-25Tag cache renamed to the less cryptic "Database" throughout the UI and ↵Jonas Häggqvist
manual. No functional changes. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11588 a1c6a512-1295-4272-9138-f99709370657
2006-11-19Check if file has already been removed from DB when manually invokingMiika Pekkarinen
reverse scan. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11556 a1c6a512-1295-4272-9138-f99709370657