Commit graph

166 commits

Author SHA1 Message Date
Amaury Pouly
7430bb02a1 tagcache: fix once for all those stupid warnings.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25216 a1c6a512-1295-4272-9138-f99709370657
2010-03-16 12:15:44 +00:00
Amaury Pouly
f82c021b8b Fix several misused of 'struct dirent' instead of 'struct dircache_entry' in tagcache.c.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24707 a1c6a512-1295-4272-9138-f99709370657
2010-02-16 22:30:55 +00:00
Amaury Pouly
bb13650d66 Have tagcache_fill_tags also fill the length entry of the mp3entry structure.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24647 a1c6a512-1295-4272-9138-f99709370657
2010-02-14 12:45:59 +00:00
Andree Buschmann
4d5e88245a Remove more tabs
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24550 a1c6a512-1295-4272-9138-f99709370657
2010-02-07 18:38:47 +00:00
Amaury Pouly
75fc9ee84b FS#8967: Fix autoscore computation overflow when the playtime is huge.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24471 a1c6a512-1295-4272-9138-f99709370657
2010-02-02 20:49:35 +00:00
Jeffrey Goode
9d842683eb Comment out LOGF_ENABLE defines everywhere, replace evil comments
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23497 a1c6a512-1295-4272-9138-f99709370657
2009-11-03 16:25:03 +00:00
Thomas Martitz
774bacc692 Correct wrong usage of event callbacks all over the place. It's not supposed to return anything, and should take a data parameter.
Fixing it because correcting the event api prototypes causes many warnings.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23301 a1c6a512-1295-4272-9138-f99709370657
2009-10-20 21:54:44 +00:00
Bertrik Sikken
d24d885aa4 Use wrap-safe TIME_BEFORE/TIME_AFTER macros to compare times with current_time, instead of comparing them directly.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23246 a1c6a512-1295-4272-9138-f99709370657
2009-10-18 15:50:30 +00:00
Nils Wallménius
3d4701a6e4 FS#10080
* Move strncpy() from core to the pluginlib
* Introduce strlcpy() and use that instead in most places (use memcpy in a few) in core and some plugins
* Drop strncpy() from the codec api as no codec used it
* Bump codec and plugin api versions


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21863 a1c6a512-1295-4272-9138-f99709370657
2009-07-14 13:57:45 +00:00
Thomas Martitz
ff8f681f03 Do not delete tagcache entries on bootup with dircache enabled but auto-update disabled.
This fixes for example disappearing database if you happen to boot without µSD.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21644 a1c6a512-1295-4272-9138-f99709370657
2009-07-04 23:20:51 +00:00
Jonas Häggqvist
54929e8871 Crude logging for the sim in database creation/updating - to aid in debugging
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21638 a1c6a512-1295-4272-9138-f99709370657
2009-07-04 19:28:47 +00:00
Magnus Holmgren
a538b89060 Second attempt at fixing FS#10396. Turns out that gcc for coldfire choose to inline a function with a big appetite for stack. The previous fix improved things a bit, but not nearly enough.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21580 a1c6a512-1295-4272-9138-f99709370657
2009-06-30 21:32:38 +00:00
Magnus Holmgren
8c22a60290 Small change to significantly reduce stack usage during database scanning. This should fix FS#10396.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21576 a1c6a512-1295-4272-9138-f99709370657
2009-06-30 17:39:03 +00:00
Miika Pekkarinen
8e2bdcaab6 A bunch of stability fixes into tagcache engine and database browser. Mainly 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-20 16:17:54 +00:00
Miika Pekkarinen
5c2413165c Fixed searches from tagcache when there is a sudden need to open a tag file on the fly. Thanks to Andrew Mahoney for pointing out the issue.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21351 a1c6a512-1295-4272-9138-f99709370657
2009-06-19 14:30:59 +00:00
Andrew Mahone
de7c5711c5 Add a system-wide BIT_N macro, implemented via an LUT on SH, and use it in 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-06 00:00:58 +00:00
Andrew Mahone
52a8e38806 Replace bitfield for tagcache tag sets with array of char on SH.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21176 a1c6a512-1295-4272-9138-f99709370657
2009-06-03 09:38:06 +00:00
Andrew Mahone
1248a0dc1f Replace arrays of tags that are numeric/sorted/uniqued with bitfields 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-06-03 08:19:32 +00:00
Bertrik Sikken
0023943439 Fix duplicate #includes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20977 a1c6a512-1295-4272-9138-f99709370657
2009-05-17 14:50:19 +00:00
Miika Pekkarinen
a161450822 Handle the DB dirty flag correctly. Now a broken DB should stay disabled. Also don't remove broken files automatically. Should improve (or even fix) the duplicate entry issue seen in FS#8414 when the problem is caused by the player shutting down in the middle of a DB commit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20710 a1c6a512-1295-4272-9138-f99709370657
2009-04-15 06:46:25 +00:00
Bertrik Sikken
30a2713b6e Clean up some more #includes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20243 a1c6a512-1295-4272-9138-f99709370657
2009-03-08 18:37:32 +00:00
Thomas Martitz
2b6e4adbd2 Fix FS#9977 - Thanks to Brian Sutherland for intensive testing and effort
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20214 a1c6a512-1295-4272-9138-f99709370657
2009-03-06 15:21:58 +00:00
Björn Stenberg
ee46a3d88e Moved database builder into a separate directory, and gave it its' own Makefile. Now it compiles cleanly and builds a database if ran in root of music tree.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19448 a1c6a512-1295-4272-9138-f99709370657
2008-12-15 23:42:19 +00:00
Frank Gevaerts
2f8a0081c6 Apply FS#9500. This adds a storage_*() abstraction to replace ata_*(). To do that, it also introduces sd_*, nand_*, and mmc_*.
This should be a good first step to allow multi-driver targets, like the Elio (ATA/SD), or the D2 (NAND/SD).


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18960 a1c6a512-1295-4272-9138-f99709370657
2008-11-01 16:14:28 +00:00
Björn Stenberg
51b45d5602 Split id3.c/h into metadata.c/h and metadata/mp3.c. Updated all references. 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-15 06:38:51 +00:00
Miika Pekkarinen
d8bb6701e7 Fixed a possible index id destruction and temporary problems with the DB 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-08-29 21:14:58 +00:00
Daniel Stenberg
2acc0ac542 Updated our source code header to explicitly mention that we are GPL v2 or
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-06-28 18:10:04 +00:00
Miika Pekkarinen
dd7103ae2e Make sure a temporary file does not exists preventing the database re-initialization.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17689 a1c6a512-1295-4272-9138-f99709370657
2008-06-04 19:27:11 +00:00
Bertrik Sikken
f8a641d6f8 Renamed build_tagcache to tagcache_build to make it consistent with the 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-03 16:23:37 +00:00
Bertrik Sikken
e15f8a21a9 Made source files #include the header file that they implement to make sure 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-05-03 08:35:14 +00:00
Bertrik Sikken
2843469876 Moved atoi declaration to stdlib.h. Deleted atoi.h
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17280 a1c6a512-1295-4272-9138-f99709370657
2008-04-28 16:18:04 +00:00
Jonathan Gordon
5f3356b942 fix 64bit sim warning
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17235 a1c6a512-1295-4272-9138-f99709370657
2008-04-24 08:51:54 +00:00
Jonathan Gordon
7c0a8e1d4c structec makes a poor assumption that all targets use 1 byte chars, 2 byte shorts and 4 byte longs which is wrong on 64bit sims which causes database to not be commited.
The proper fix should be to remove those assumtopns but probably not nescacery untill a target comes along which breaks the assumption.
This _shouldnt_ change anything on target.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17234 a1c6a512-1295-4272-9138-f99709370657
2008-04-24 07:54:32 +00:00
Miika Pekkarinen
984278b10a FS#8795 - Fixed fault of the escape processing in Changelog (by Kenjiro Arai).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17178 a1c6a512-1295-4272-9138-f99709370657
2008-04-19 23:48:13 +00:00
Bertrik Sikken
b3c44deaf6 Made strictly local functions static (command_queue_sync_callback and run_command_queue) in tagcache.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17176 a1c6a512-1295-4272-9138-f99709370657
2008-04-19 23:22:40 +00:00
Miika Pekkarinen
6ab1c90513 FS#8707 - Enable "Load to RAM" (HAS_TC_RAMCACHE) compilation without Directory Cache (HAS_DIRCACHE).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16594 a1c6a512-1295-4272-9138-f99709370657
2008-03-09 20:33:19 +00:00
Miika Pekkarinen
9eec03faa5 FS#8565 - fix for runtime data causing extra spin ups. Included a debug menu update also.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16330 a1c6a512-1295-4272-9138-f99709370657
2008-02-17 18:35:27 +00:00
Marcoen Hirschberg
2d12b253ae add support for database.unignore files (adds dirs to the database which would be skipped because of a database.ignore file)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16214 a1c6a512-1295-4272-9138-f99709370657
2008-02-04 21:20:04 +00:00
Peter D'Hoye
b4f80fb93f Fix a bug in tagcache tag length check, thanks to Rhino Banga.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16166 a1c6a512-1295-4272-9138-f99709370657
2008-01-25 21:21:41 +00:00
Miika Pekkarinen
784112a075 Fixed the red.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16083 a1c6a512-1295-4272-9138-f99709370657
2008-01-13 19:34:49 +00:00
Miika Pekkarinen
39c597b5e1 Always check for deleted files, no matter how slow it might be when DB autoupdate is enabled. Also simplified code a bit. Fixed a crash when search is performaed and dircache has been vanished and DB is still exists ram.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16081 a1c6a512-1295-4272-9138-f99709370657
2008-01-13 19:13:37 +00:00
Miika Pekkarinen
f008da7db4 FS#8423 - Fixes quirks in routine used to remove obsolote entries from tagcache. This might fix FS#8414 and should fix FS#8384. Thanks to Lee Kang Hyuk.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16016 a1c6a512-1295-4272-9138-f99709370657
2008-01-07 15:10:49 +00:00
Miika Pekkarinen
21735eb91b Preserve song statistics when moving files or altering metadata. Conditions 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-18 21:50:29 +00:00
Miika Pekkarinen
f6039466fb Added file modify time field to the DB. Now metadata changes should be 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-12-16 21:10:26 +00:00
Miika Pekkarinen
ded6554cb0 Free resources properly. Fixes all kind of strange issues (shutdown problems with dircache and dirfds running out) with the newly added database.ignore -feature.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15780 a1c6a512-1295-4272-9138-f99709370657
2007-11-23 18:32:00 +00:00
Robert Kukla
d87b037efe consolidate the 3 file_exists() functions into one; use the version that explicitly uses dircache; give dir_exists() the same treatment for consistency
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15742 a1c6a512-1295-4272-9138-f99709370657
2007-11-21 21:28:27 +00:00
Jonathan Gordon
c31ffae440 FS#5690 - folders with a file named database.ignore will be skipped by the database when it rebuilds, (this includes any subdirs in that fodler)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15738 a1c6a512-1295-4272-9138-f99709370657
2007-11-21 13:37:45 +00:00
Miika Pekkarinen
caff835d78 Fixed debug menu crashing. Show last file processed by tagcache engine in 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-10-21 11:06:30 +00:00
Michael Sevakis
84f5c5c3e3 Take out some NOCACHEBSS_ATTR's that were accidentally left. Put some threading code in IRAM that should be there on PP502x.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15155 a1c6a512-1295-4272-9138-f99709370657
2007-10-16 22:00:51 +00:00
Michael Sevakis
a9b2fb5ee3 Finally full multicore support for PortalPlayer 502x targets with an eye towards the possibility of other types. All SVN targets the low-lag code to speed up blocking operations. Most files are modified here simple due to a name change to actually support a real event object and a param change to create_thread. Add some use of new features but just sit on things for a bit and leave full integration for later. Work will continue on to address size on sensitive targets and simplify things if possible. Any PP target having problems with SWP can easily be changed to sw corelocks with one #define change in config.h though only PP5020 has shown an issue and seems to work without any difficulties.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15134 a1c6a512-1295-4272-9138-f99709370657
2007-10-16 01:25:17 +00:00