summaryrefslogtreecommitdiff
path: root/apps/codecs.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs.h')
-rw-r--r--apps/codecs.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/apps/codecs.h b/apps/codecs.h
index 7a0fab297f..d28afc7292 100644
--- a/apps/codecs.h
+++ b/apps/codecs.h
@@ -85,12 +85,12 @@
85#define CODEC_MAGIC 0x52434F44 /* RCOD */ 85#define CODEC_MAGIC 0x52434F44 /* RCOD */
86 86
87/* increase this every time the api struct changes */ 87/* increase this every time the api struct changes */
88#define CODEC_API_VERSION 4 88#define CODEC_API_VERSION 5
89 89
90/* update this to latest version if a change to the api struct breaks 90/* update this to latest version if a change to the api struct breaks
91 backwards compatibility (and please take the opportunity to sort in any 91 backwards compatibility (and please take the opportunity to sort in any
92 new function which are "waiting" at the end of the function table) */ 92 new function which are "waiting" at the end of the function table) */
93#define CODEC_MIN_API_VERSION 3 93#define CODEC_MIN_API_VERSION 5
94 94
95/* codec return codes */ 95/* codec return codes */
96enum codec_status { 96enum codec_status {
@@ -125,7 +125,7 @@ struct codec_api {
125 long seek_time; 125 long seek_time;
126 126
127 /* Returns buffer to malloc array. Only codeclib should need this. */ 127 /* Returns buffer to malloc array. Only codeclib should need this. */
128 void* (*get_codec_memory)(long *size); 128 void* (*get_codec_memory)(size_t *size);
129 /* Insert PCM data into audio buffer for playback. Playback will start 129 /* Insert PCM data into audio buffer for playback. Playback will start
130 automatically. */ 130 automatically. */
131 bool (*pcmbuf_insert)(const char *data, size_t length); 131 bool (*pcmbuf_insert)(const char *data, size_t length);
@@ -135,18 +135,18 @@ struct codec_api {
135 135
136 /* Read next <size> amount bytes from file buffer to <ptr>. 136 /* Read next <size> amount bytes from file buffer to <ptr>.
137 Will return number of bytes read or 0 if end of file. */ 137 Will return number of bytes read or 0 if end of file. */
138 long (*read_filebuf)(void *ptr, long size); 138 size_t (*read_filebuf)(void *ptr, size_t size);
139 /* Request pointer to file buffer which can be used to read 139 /* Request pointer to file buffer which can be used to read
140 <realsize> amount of data. <reqsize> tells the buffer system 140 <realsize> amount of data. <reqsize> tells the buffer system
141 how much data it should try to allocate. If <realsize> is 0, 141 how much data it should try to allocate. If <realsize> is 0,
142 end of file is reached. */ 142 end of file is reached. */
143 void* (*request_buffer)(long *realsize, long reqsize); 143 void* (*request_buffer)(size_t *realsize, size_t reqsize);
144 /* Advance file buffer position by <amount> amount of bytes. */ 144 /* Advance file buffer position by <amount> amount of bytes. */
145 void (*advance_buffer)(long amount); 145 void (*advance_buffer)(size_t amount);
146 /* Advance file buffer to a pointer location inside file buffer. */ 146 /* Advance file buffer to a pointer location inside file buffer. */
147 void (*advance_buffer_loc)(void *ptr); 147 void (*advance_buffer_loc)(void *ptr);
148 /* Seek file buffer to position <newpos> beginning of file. */ 148 /* Seek file buffer to position <newpos> beginning of file. */
149 bool (*seek_buffer)(off_t newpos); 149 bool (*seek_buffer)(size_t newpos);
150 /* Codec should call this function when it has done the seeking. */ 150 /* Codec should call this function when it has done the seeking. */
151 void (*seek_complete)(void); 151 void (*seek_complete)(void);
152 /* Calculate mp3 seek position from given time data in ms. */ 152 /* Calculate mp3 seek position from given time data in ms. */
@@ -156,7 +156,7 @@ struct codec_api {
156 codec should exit immediately with PLUGIN_OK status. */ 156 codec should exit immediately with PLUGIN_OK status. */
157 bool (*request_next_track)(void); 157 bool (*request_next_track)(void);
158 158
159 void (*set_offset)(unsigned int value); 159 void (*set_offset)(size_t value);
160 /* Configure different codec buffer parameters. */ 160 /* Configure different codec buffer parameters. */
161 void (*configure)(int setting, void *value); 161 void (*configure)(int setting, void *value);
162 162
@@ -214,6 +214,7 @@ struct codec_api {
214 int (*strncasecmp)(const char *s1, const char *s2, size_t n); 214 int (*strncasecmp)(const char *s1, const char *s2, size_t n);
215 void* (*memset)(void *dst, int c, size_t length); 215 void* (*memset)(void *dst, int c, size_t length);
216 void* (*memcpy)(void *out, const void *in, size_t n); 216 void* (*memcpy)(void *out, const void *in, size_t n);
217 void* (*memmove)(void *out, const void *in, size_t n);
217 const char *_ctype_; 218 const char *_ctype_;
218 int (*atoi)(const char *str); 219 int (*atoi)(const char *str);
219 char *(*strchr)(const char *s, int c); 220 char *(*strchr)(const char *s, int c);
@@ -292,7 +293,6 @@ struct codec_api {
292 /* new stuff at the end, sort into place next time 293 /* new stuff at the end, sort into place next time
293 the API gets incompatible */ 294 the API gets incompatible */
294 295
295 void* (*memmove)(void *out, const void *in, size_t n);
296}; 296};
297 297
298/* codec header */ 298/* codec header */