diff options
author | Thomas Martitz <kugel@rockbox.org> | 2009-10-16 19:14:41 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2009-10-16 19:14:41 +0000 |
commit | e9c10189e93fe53cff74ae8fa15d19b1c522d5e4 (patch) | |
tree | e3c39a41ff160194dfd9ce617893e0367a6fdcc8 /apps/playback.h | |
parent | a72ffe7bb533302dbf4e6c7c4f1e4bd4078d3ed6 (diff) | |
download | rockbox-e9c10189e93fe53cff74ae8fa15d19b1c522d5e4.tar.gz rockbox-e9c10189e93fe53cff74ae8fa15d19b1c522d5e4.zip |
Rework albumart buffering internally to allow for mutliple albumart sizes.
Playback now has a few albumart slots. Anything (most importantly: skins) can obtain such a slot.
The slot has fields for the size which is passed to bufopen then to image_load to buffer the albumart with the proper size.
Currently there's 1 slot. We can increase it for remotes if we want. Custom statusbar will increase it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23209 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/playback.h')
-rw-r--r-- | apps/playback.h | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/apps/playback.h b/apps/playback.h index 378d5effec..add11e296b 100644 --- a/apps/playback.h +++ b/apps/playback.h @@ -25,6 +25,32 @@ #include <stdbool.h> #include "config.h" +#ifdef HAVE_ALBUMART + +#include "bmp.h" +/* + * Returns the handle id of the buffered albumart for the given slot id + **/ +int playback_current_aa_hid(int slot); + +/* + * Hands out an albumart slot for buffering albumart using the size + * int the passed dim struct, it copies the data of dim in order to + * be safe to be reused for other code + * + * The slot may be reused if other code calls this with the same dimensions + * in dim, so if you change dim release and claim a new slot + * + * Save to call from other threads */ +int playback_claim_aa_slot(struct dim *dim); + +/* + * Releases the albumart slot with given id + * + * Save to call from other threads */ +void playback_release_aa_slot(int slot); +#endif + /* Functions */ const char *get_codec_filename(int cod_spec); void voice_wait(void); @@ -45,9 +71,6 @@ bool audio_restore_playback(int type); /* Restores the audio buffer to handle th void codec_thread_do_callback(void (*fn)(void), unsigned int *codec_thread_id); -#ifdef HAVE_ALBUMART -int audio_current_aa_hid(void); -#endif #if CONFIG_CODEC == SWCODEC /* This #ifdef is better here than gui/wps.c */ extern void audio_next_dir(void); |