summaryrefslogtreecommitdiff
path: root/apps/plugin.h
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2007-05-07 17:23:31 +0000
committerDave Chapman <dave@dchapman.com>2007-05-07 17:23:31 +0000
commit7cdd0fe6ea8561a94862f0b0dd53fa8b5a7628e9 (patch)
tree59448bc2cbc66bb7369d87a3864162d90618ba38 /apps/plugin.h
parent1feb8bd4a11cdfc552799958ad8539090eec2b74 (diff)
downloadrockbox-7cdd0fe6ea8561a94862f0b0dd53fa8b5a7628e9.zip
rockbox-7cdd0fe6ea8561a94862f0b0dd53fa8b5a7628e9.tar.gz
rockbox-7cdd0fe6ea8561a94862f0b0dd53fa8b5a7628e9.tar.bz2
rockbox-7cdd0fe6ea8561a94862f0b0dd53fa8b5a7628e9.tar.xz
Initial version of a test_codec plugin (viewer). This loads the audio file into the audio buffer and decodes it as fast as it can via a locally implemented version of the codec API. Intended for use when optimising codecs - so isn't built by default. Remember to add it to both plugins/SOURCES and viewers.config to enable it. Currently the codec is run in the main thread which means mpa.codec doesn't work - it requires more stack than is available on the main thread. The solution will be to create a new thread in the plugin which steals the main codec thread's IRAM stack, but that's not done yet.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13345 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugin.h')
-rw-r--r--apps/plugin.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/apps/plugin.h b/apps/plugin.h
index 987c070..cb8324f 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -59,6 +59,9 @@
#include "misc.h"
#if (CONFIG_CODEC == SWCODEC)
#include "dsp.h"
+#include "codecs.h"
+#include "playback.h"
+#include "metadata.h"
#ifdef HAVE_RECORDING
#include "recording.h"
#endif
@@ -110,7 +113,7 @@
#define PLUGIN_MAGIC 0x526F634B /* RocK */
/* increase this every time the api struct changes */
-#define PLUGIN_API_VERSION 54
+#define PLUGIN_API_VERSION 55
/* update this to latest version if a change to the api struct breaks
backwards compatibility (and please take the opportunity to sort in any
@@ -602,6 +605,13 @@ struct plugin_api {
void (*spinlock_lock)(struct mutex *m);
void (*spinlock_unlock)(struct mutex *m);
#endif
+
+#if (CONFIG_CODEC == SWCODEC)
+ int (*codec_load_file)(const char* codec, struct codec_api *api);
+ bool (*get_metadata)(struct track_info* track, int fd, const char* trackname,
+ bool v1first);
+ const char *(*get_codec_filename)(int cod_spec);
+#endif
};
/* plugin header */