summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2011-05-31 21:26:18 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2011-05-31 21:26:18 +0000
commit70b81e65cceb83b8933c7da7bdae2ce709404998 (patch)
treea9415ac980bd144dfd08e9eda41b8d6066de47e0 /apps
parent1aadfb2229d7105d19d321079acaede1e4f63a3f (diff)
downloadrockbox-70b81e65cceb83b8933c7da7bdae2ce709404998.tar.gz
rockbox-70b81e65cceb83b8933c7da7bdae2ce709404998.tar.bz2
rockbox-70b81e65cceb83b8933c7da7bdae2ce709404998.zip
Android: install codecs as native libs instead of extracting them (FS#12134).
Codec files are loaded as dynamic libraries. Instead of extracting them from the packaged libmisc.so and therefore having them present twice on the device put them into the apk as native libraries. Decreases the size of the installed Rockbox by the compressed size of the codecs. Also, the extraction on first Rockbox startup gets notably faster since it's less data to extract. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29940 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/codecs.c4
-rw-r--r--apps/metadata.h6
2 files changed, 8 insertions, 2 deletions
diff --git a/apps/codecs.c b/apps/codecs.c
index 249cd8f5c1..cd4a9d50eb 100644
--- a/apps/codecs.c
+++ b/apps/codecs.c
@@ -169,8 +169,8 @@ struct codec_api ci = {
void codec_get_full_path(char *path, const char *codec_root_fn)
{
- snprintf(path, MAX_PATH-1, "%s/%s." CODEC_EXTENSION,
- CODECS_DIR, codec_root_fn);
+ snprintf(path, MAX_PATH-1, CODECS_DIR "/" CODEC_PREFIX "%s."
+ CODEC_EXTENSION, codec_root_fn);
}
/* Returns pointer to and size of free codec RAM. Aligns to CACHEALIGN_SIZE. */
diff --git a/apps/metadata.h b/apps/metadata.h
index 3499e13f47..a191e43219 100644
--- a/apps/metadata.h
+++ b/apps/metadata.h
@@ -107,7 +107,13 @@ enum
};
#if CONFIG_CODEC == SWCODEC
+#if (CONFIG_PLATFORM & PLATFORM_ANDROID)
+#define CODEC_EXTENSION "so"
+#define CODEC_PREFIX "lib"
+#else
#define CODEC_EXTENSION "codec"
+#define CODEC_PREFIX ""
+#endif
#ifdef HAVE_RECORDING
enum rec_format_indexes