albumart search in pluginlib when building without HAVE_ALBUMART (for later use by pictureflow)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19835 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
b0befadad1
commit
7215a67e64
6 changed files with 48 additions and 1 deletions
|
@ -630,6 +630,7 @@ static const struct plugin_api rockbox_api = {
|
|||
#ifdef CPU_ARM
|
||||
__div0,
|
||||
#endif
|
||||
strip_extension
|
||||
};
|
||||
|
||||
int plugin_load(const char* plugin, const void* parameter)
|
||||
|
|
|
@ -126,7 +126,7 @@ void* plugin_get_buffer(size_t *buffer_size);
|
|||
#define PLUGIN_MAGIC 0x526F634B /* RocK */
|
||||
|
||||
/* increase this every time the api struct changes */
|
||||
#define PLUGIN_API_VERSION 138
|
||||
#define PLUGIN_API_VERSION 139
|
||||
|
||||
/* update this to latest version if a change to the api struct breaks
|
||||
backwards compatibility (and please take the opportunity to sort in any
|
||||
|
@ -785,6 +785,7 @@ struct plugin_api {
|
|||
#ifdef CPU_ARM
|
||||
void (*__div0)(void);
|
||||
#endif
|
||||
char* (*strip_extension)(char* buffer, int buffer_size, const char *filename);
|
||||
};
|
||||
|
||||
/* plugin header */
|
||||
|
|
|
@ -51,4 +51,7 @@ helper.c
|
|||
#ifdef HAVE_TOUCHSCREEN
|
||||
touchscreen.c
|
||||
#endif
|
||||
#ifndef HAVE_ALBUMART
|
||||
pluginlib_albumart.c
|
||||
#endif
|
||||
md5.c
|
||||
|
|
27
apps/plugins/lib/pluginlib_albumart.c
Normal file
27
apps/plugins/lib/pluginlib_albumart.c
Normal file
|
@ -0,0 +1,27 @@
|
|||
/***************************************************************************
|
||||
* __________ __ ___.
|
||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||
* \/ \/ \/ \/ \/
|
||||
* $Id$
|
||||
*
|
||||
* Copyright (C) 2009 by Andrew Mahone
|
||||
*
|
||||
* This is a wrapper for the core albumart.c
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include <plugin.h>
|
||||
#include "wrappers.h"
|
||||
|
||||
#include "../../recorder/albumart.c"
|
|
@ -27,6 +27,9 @@
|
|||
#ifndef _LIB_WRAPPERS_H_
|
||||
#define _LIB_WRAPPERS_H_
|
||||
|
||||
#define DEBUG_H
|
||||
#define __SPRINTF_H__
|
||||
|
||||
#define open rb->open
|
||||
#define close rb->close
|
||||
#define read rb->read
|
||||
|
@ -36,6 +39,16 @@
|
|||
#define cpu_boost rb->cpu_boost
|
||||
#endif
|
||||
#define yield rb->yield
|
||||
#define file_exists rb->file_exists
|
||||
#define snprintf rb->snprintf
|
||||
#define strcat rb->strcat
|
||||
#define strchr rb->strchr
|
||||
#define strcmp rb->strcmp
|
||||
#define strcpy rb->strcpy
|
||||
#define strip_extension rb->strip_extension
|
||||
#define strlen rb->strlen
|
||||
#define strncpy rb->strncpy
|
||||
#define strrchr rb->strrchr
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -204,6 +204,7 @@ bool search_albumart_files(const struct mp3entry *id3, const char *size_string,
|
|||
return true;
|
||||
}
|
||||
|
||||
#ifdef HAVE_ALBUMART
|
||||
/* 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 */
|
||||
|
@ -306,3 +307,4 @@ void get_albumart_size(struct bitmap *bmp)
|
|||
bmp->width = data->albumart_max_width;
|
||||
bmp->height = data->albumart_max_height;
|
||||
}
|
||||
#endif /* HAVE_ALBUMART */
|
||||
|
|
Loading…
Reference in a new issue