summaryrefslogtreecommitdiff
path: root/apps/codecs.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs.h')
-rw-r--r--apps/codecs.h23
1 files changed, 10 insertions, 13 deletions
diff --git a/apps/codecs.h b/apps/codecs.h
index f94c81ab20..1c0b9da6ba 100644
--- a/apps/codecs.h
+++ b/apps/codecs.h
@@ -51,6 +51,7 @@
51#include "settings.h" 51#include "settings.h"
52 52
53#include "gcc_extensions.h" 53#include "gcc_extensions.h"
54#include "load_code.h"
54 55
55#ifdef CODEC 56#ifdef CODEC
56#if defined(DEBUG) || defined(SIMULATOR) 57#if defined(DEBUG) || defined(SIMULATOR)
@@ -240,11 +241,7 @@ struct codec_api {
240 241
241/* codec header */ 242/* codec header */
242struct codec_header { 243struct codec_header {
243 unsigned long magic; /* RCOD or RENC */ 244 struct lc_header lc_hdr; /* must be first */
244 unsigned short target_id;
245 unsigned short api_version;
246 unsigned char *load_addr;
247 unsigned char *end_addr;
248 enum codec_status(*entry_point)(void); 245 enum codec_status(*entry_point)(void);
249 struct codec_api **api; 246 struct codec_api **api;
250}; 247};
@@ -261,27 +258,27 @@ extern unsigned char plugin_end_addr[];
261#define CODEC_HEADER \ 258#define CODEC_HEADER \
262 const struct codec_header __header \ 259 const struct codec_header __header \
263 __attribute__ ((section (".header")))= { \ 260 __attribute__ ((section (".header")))= { \
264 CODEC_MAGIC, TARGET_ID, CODEC_API_VERSION, \ 261 { CODEC_MAGIC, TARGET_ID, CODEC_API_VERSION, \
265 plugin_start_addr, plugin_end_addr, codec_start, &ci }; 262 plugin_start_addr, plugin_end_addr }, codec_start, &ci };
266/* encoders */ 263/* encoders */
267#define CODEC_ENC_HEADER \ 264#define CODEC_ENC_HEADER \
268 const struct codec_header __header \ 265 const struct codec_header __header \
269 __attribute__ ((section (".header")))= { \ 266 __attribute__ ((section (".header")))= { \
270 CODEC_ENC_MAGIC, TARGET_ID, CODEC_API_VERSION, \ 267 { CODEC_ENC_MAGIC, TARGET_ID, CODEC_API_VERSION, \
271 plugin_start_addr, plugin_end_addr, codec_start, &ci }; 268 plugin_start_addr, plugin_end_addr }, codec_start, &ci };
272 269
273#else /* def SIMULATOR */ 270#else /* def SIMULATOR */
274/* decoders */ 271/* decoders */
275#define CODEC_HEADER \ 272#define CODEC_HEADER \
276 const struct codec_header __header \ 273 const struct codec_header __header \
277 __attribute__((visibility("default"))) = { \ 274 __attribute__((visibility("default"))) = { \
278 CODEC_MAGIC, TARGET_ID, CODEC_API_VERSION, \ 275 { CODEC_MAGIC, TARGET_ID, CODEC_API_VERSION, NULL, NULL }, \
279 NULL, NULL, codec_start, &ci }; 276 codec_start, &ci };
280/* encoders */ 277/* encoders */
281#define CODEC_ENC_HEADER \ 278#define CODEC_ENC_HEADER \
282 const struct codec_header __header = { \ 279 const struct codec_header __header = { \
283 CODEC_ENC_MAGIC, TARGET_ID, CODEC_API_VERSION, \ 280 { CODEC_ENC_MAGIC, TARGET_ID, CODEC_API_VERSION, NULL, NULL }, \
284 NULL, NULL, codec_start, &ci }; 281 codec_start, &ci };
285#endif /* SIMULATOR */ 282#endif /* SIMULATOR */
286#endif /* CODEC */ 283#endif /* CODEC */
287 284