diff options
| author | Daniel Stenberg <daniel@haxx.se> | 2005-06-22 19:41:30 +0000 |
|---|---|---|
| committer | Daniel Stenberg <daniel@haxx.se> | 2005-06-22 19:41:30 +0000 |
| commit | 1dd672fe3226fa77113f35e4d72f50b863484c63 (patch) | |
| tree | 67b424ab990f160dbc8fb238b9fa3390ceba10ed /apps/plugin.c | |
| parent | b7aaa641b864628d76103b8c9d57c15747560ca7 (diff) | |
| download | rockbox-1dd672fe3226fa77113f35e4d72f50b863484c63.zip rockbox-1dd672fe3226fa77113f35e4d72f50b863484c63.tar.gz rockbox-1dd672fe3226fa77113f35e4d72f50b863484c63.tar.bz2 rockbox-1dd672fe3226fa77113f35e4d72f50b863484c63.tar.xz | |
moved and renamed the codecs, gave the codecs a new extension (.codec),
unified to a single codec-only API, made a new codeclib, disabled the building
of the *2wav plugins
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6812 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugin.c')
| -rw-r--r-- | apps/plugin.c | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/apps/plugin.c b/apps/plugin.c index a1a0b06..97f811e 100644 --- a/apps/plugin.c +++ b/apps/plugin.c @@ -332,60 +332,6 @@ static const struct plugin_api rockbox_api = { }; -#if CONFIG_HWCODEC == MASNONE -int codec_load_ram(char* codecptr, size_t size, void *parameter, void* ptr2, - size_t bufwrap) -{ - enum plugin_status (*plugin_start)(struct plugin_api* api, void* param); - int copy_n; - int status; - - if ((char *)&codecbuf[0] != codecptr) { - /* zero out codec buffer to ensure a properly zeroed bss area */ - memset(codecbuf, 0, CODEC_BUFFER_SIZE); - - size = MIN(size, CODEC_BUFFER_SIZE); - copy_n = MIN(size, bufwrap); - memcpy(codecbuf, codecptr, copy_n); - size -= copy_n; - if (size > 0) { - memcpy(&codecbuf[copy_n], ptr2, size); - } - } - plugin_start = (void*)&codecbuf; - - invalidate_icache(); - status = plugin_start((struct plugin_api*) &rockbox_api, parameter); - - return status; -} - -int codec_load_file(const char *plugin, void *parameter) -{ - char msgbuf[80]; - int fd; - int rc; - - fd = open(plugin, O_RDONLY); - if (fd < 0) { - snprintf(msgbuf, sizeof(msgbuf)-1, "Couldn't load codec: %s", plugin); - logf("Codec load error:%d", fd); - splash(HZ*2, true, msgbuf); - return fd; - } - - rc = read(fd, &codecbuf[0], CODEC_BUFFER_SIZE); - close(fd); - if (rc <= 0) { - logf("Codec read error"); - return PLUGIN_ERROR; - } - - return codec_load_ram(codecbuf, (size_t)rc, parameter, NULL, 0); -} - -#endif - int plugin_load(const char* plugin, void* parameter) { enum plugin_status (*plugin_start)(struct plugin_api* api, void* param); |