summaryrefslogtreecommitdiff
path: root/apps/codecs.h
diff options
context:
space:
mode:
authorBrandon Low <lostlogic@rockbox.org>2006-04-15 02:03:11 +0000
committerBrandon Low <lostlogic@rockbox.org>2006-04-15 02:03:11 +0000
commitebadcc633ae8ad2a6048aff9c815cdb37f012e44 (patch)
tree2749a0dccbec61669b99d83867b7cf18c661f3e0 /apps/codecs.h
parentae33f37678311c5d6893aa526fad947bce912eff (diff)
Put new_track on the codec_api, and use it instead of the reload_codec variable in most places. Should help with problems people have had with GUI vs. playback sync.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9670 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs.h')
-rw-r--r--apps/codecs.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/apps/codecs.h b/apps/codecs.h
index 1bc37ad017..5d85a42a67 100644
--- a/apps/codecs.h
+++ b/apps/codecs.h
@@ -85,12 +85,12 @@
#define CODEC_MAGIC 0x52434F44 /* RCOD */
/* increase this every time the api struct changes */
-#define CODEC_API_VERSION 7
+#define CODEC_API_VERSION 8
/* update this to latest version if a change to the api struct breaks
backwards compatibility (and please take the opportunity to sort in any
new function which are "waiting" at the end of the function table) */
-#define CODEC_MIN_API_VERSION 6
+#define CODEC_MIN_API_VERSION 8
/* codec return codes */
enum codec_status {
@@ -115,11 +115,11 @@ struct codec_api {
bool *taginfo_ready; /* Is metadata read */
/* Codec should periodically check if stop_codec is set to true.
- In case it's, codec must return with PLUGIN_OK status immediately. */
+ In case it is, codec must return immediately */
bool stop_codec;
- /* Codec should periodically check if reload_codec is set to true.
- In case it's, codec should reload itself without exiting. */
- bool reload_codec;
+ /* Codec should periodically check if new_track is non zero.
+ When it is, the codec should request a new track. */
+ int new_track;
/* If seek_time != 0, codec should seek to that song position (in ms)
if codec supports seeking. */
long seek_time;
@@ -155,6 +155,8 @@ struct codec_api {
track is available and changed. If return value is false,
codec should exit immediately with PLUGIN_OK status. */
bool (*request_next_track)(void);
+ /* Free the buffer area of the current codec after its loaded */
+ void (*discard_codec)(void);
void (*set_offset)(size_t value);
/* Configure different codec buffer parameters. */
@@ -287,8 +289,6 @@ struct codec_api {
/* new stuff at the end, sort into place next time
the API gets incompatible */
- void (*discard_codec)(void);
-
};
/* codec header */