From 9d4bed7ff06818b098926932db824a8d6532bfee Mon Sep 17 00:00:00 2001 From: Nicolas Pennequin Date: Sun, 11 Nov 2007 12:29:37 +0000 Subject: Album art support. Based on FS#3045, but heavily modified to adapt to MoB and for cleanness. The cover pictures are loaded from external bitmaps. JPEG and embedded art are not supported. The pictures will only be drawn on the main display. There is no resizing but it is possible to specify the WPS bitmap size in the bitmap names (e.g. cover.100x100.bmp). The bitmaps are stored in the main buffer and read directly from there. Currently, duplicate bitmaps will simply be present several times in the buffer, but this will be improved. To enable for a target, #define HAVE_ALBUMART in its config file. For more information, see the wiki page: http://www.rockbox.org/wiki/AlbumArt. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15572 a1c6a512-1295-4272-9138-f99709370657 --- apps/recorder/albumart.h | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 apps/recorder/albumart.h (limited to 'apps/recorder/albumart.h') diff --git a/apps/recorder/albumart.h b/apps/recorder/albumart.h new file mode 100644 index 0000000000..21ae50edb9 --- /dev/null +++ b/apps/recorder/albumart.h @@ -0,0 +1,39 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id$ + * + * Copyright (C) 2007 Nicolas Pennequin + * + * All files in this archive are subject to the GNU General Public License. + * See the file COPYING in the source tree root for full license agreement. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ + +#ifndef _ALBUMART_H_ +#define _ALBUMART_H_ + +#ifdef HAVE_ALBUMART + +#include +#include "id3.h" +#include "gwps.h" + +/* Look for albumart bitmap in the same dir as the track and in its parent dir. + * Stores the found filename in the buf parameter. + * Returns true if a bitmap was found, false otherwise */ +bool find_albumart(const struct mp3entry *id3, char *buf, int buflen); + +/* Draw the album art bitmap from the given handle ID onto the given WPS. */ +void draw_album_art(struct gui_wps *gwps, int handle_id); + +#endif /* HAVE_ALBUMART */ + +#endif /* _ALBUMART_H_ */ -- cgit v1.2.3