summaryrefslogtreecommitdiff
path: root/apps/recorder
diff options
context:
space:
mode:
authorNicolas Pennequin <nicolas.pennequin@free.fr>2007-12-09 18:48:02 +0000
committerNicolas Pennequin <nicolas.pennequin@free.fr>2007-12-09 18:48:02 +0000
commit90ce8269033dd1f06a5054392f35e45e45a5c560 (patch)
tree0583f4c56c2b8d73078f2112cc851862b859385d /apps/recorder
parent19f487b451b026833a6d9aaeabcec756c9e9f2b7 (diff)
downloadrockbox-90ce8269033dd1f06a5054392f35e45e45a5c560.tar.gz
rockbox-90ce8269033dd1f06a5054392f35e45e45a5c560.zip
Initial commit of the PictureFlow plugin, a nice visualization for album covers.
Original code by Ariya Hidayat. Rockbox port by Jonas Hurrelmann and a few tweaks by me. On the first startup the database is scanned and album art is searched for each album. This process will take some time (dircache enabled and/or database in RAM speed it up, and it is possible to abort by pressing MENU), but the results are cached and the next startups will be very quick. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15900 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/recorder')
-rw-r--r--apps/recorder/albumart.c8
-rw-r--r--apps/recorder/albumart.h3
2 files changed, 7 insertions, 4 deletions
diff --git a/apps/recorder/albumart.c b/apps/recorder/albumart.c
index 6aaf3885d7..6761cfc67a 100644
--- a/apps/recorder/albumart.c
+++ b/apps/recorder/albumart.c
@@ -125,8 +125,8 @@ static void fix_path_part(char* path, int offset, int count)
125 * If a matching bitmap is found, its filename is stored in buf. 125 * If a matching bitmap is found, its filename is stored in buf.
126 * Return value is true if a bitmap was found, false otherwise. 126 * Return value is true if a bitmap was found, false otherwise.
127 */ 127 */
128static bool search_files(const struct mp3entry *id3, const char *size_string, 128bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
129 char *buf, int buflen) 129 char *buf, int buflen)
130{ 130{
131 char path[MAX_PATH + 1]; 131 char path[MAX_PATH + 1];
132 char dir[MAX_PATH + 1]; 132 char dir[MAX_PATH + 1];
@@ -228,12 +228,12 @@ bool find_albumart(const struct mp3entry *id3, char *buf, int buflen)
228 data->albumart_max_width, data->albumart_max_height); 228 data->albumart_max_width, data->albumart_max_height);
229 229
230 /* First we look for a bitmap of the right size */ 230 /* First we look for a bitmap of the right size */
231 if (search_files(id3, size_string, buf, buflen)) 231 if (search_albumart_files(id3, size_string, buf, buflen))
232 return true; 232 return true;
233 233
234 /* Then we look for generic bitmaps */ 234 /* Then we look for generic bitmaps */
235 *size_string = 0; 235 *size_string = 0;
236 return search_files(id3, size_string, buf, buflen); 236 return search_albumart_files(id3, size_string, buf, buflen);
237} 237}
238 238
239/* Draw the album art bitmap from the given handle ID onto the given WPS. 239/* Draw the album art bitmap from the given handle ID onto the given WPS.
diff --git a/apps/recorder/albumart.h b/apps/recorder/albumart.h
index dcd106465b..febad28281 100644
--- a/apps/recorder/albumart.h
+++ b/apps/recorder/albumart.h
@@ -35,6 +35,9 @@ bool find_albumart(const struct mp3entry *id3, char *buf, int buflen);
35 Call with clear = true to clear the bitmap instead of drawing it. */ 35 Call with clear = true to clear the bitmap instead of drawing it. */
36void draw_album_art(struct gui_wps *gwps, int handle_id, bool clear); 36void draw_album_art(struct gui_wps *gwps, int handle_id, bool clear);
37 37
38bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
39 char *buf, int buflen);
40
38#endif /* HAVE_ALBUMART */ 41#endif /* HAVE_ALBUMART */
39 42
40#endif /* _ALBUMART_H_ */ 43#endif /* _ALBUMART_H_ */