2013-10-29 16:27:50 +01:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2013 nu774
|
|
|
|
* For conditions of distribution and use, see copyright notice in COPYING
|
|
|
|
*/
|
2013-02-15 14:26:17 +01:00
|
|
|
#ifndef METADATA_H
|
|
|
|
#define METADATA_H
|
|
|
|
|
2013-10-23 16:35:23 +02:00
|
|
|
#include "m4af.h"
|
|
|
|
|
2013-02-15 14:26:17 +01:00
|
|
|
typedef struct aacenc_tag_entry_t {
|
2013-10-23 16:35:23 +02:00
|
|
|
uint32_t tag;
|
|
|
|
char *name;
|
|
|
|
char *data;
|
|
|
|
uint32_t data_size;
|
2013-02-15 14:26:17 +01:00
|
|
|
} aacenc_tag_entry_t;
|
|
|
|
|
2013-10-23 16:35:23 +02:00
|
|
|
typedef struct aacenc_tag_store_t {
|
2013-02-15 14:26:17 +01:00
|
|
|
aacenc_tag_entry_t *tag_table;
|
|
|
|
unsigned tag_count;
|
|
|
|
unsigned tag_table_capacity;
|
2013-10-23 16:35:23 +02:00
|
|
|
} aacenc_tag_store_t;
|
|
|
|
|
|
|
|
typedef struct aacenc_translate_generic_text_tag_ctx_t {
|
|
|
|
unsigned track, track_total, disc, disc_total;
|
|
|
|
void (*add)(void *, const aacenc_tag_entry_t *);
|
|
|
|
void *add_ctx;
|
|
|
|
} aacenc_translate_generic_text_tag_ctx_t;
|
|
|
|
|
|
|
|
typedef void (*aacenc_tag_callback_t)(void *ctx, const char *key,
|
|
|
|
const char *value, uint32_t size);
|
|
|
|
|
|
|
|
void aacenc_translate_generic_text_tag(void *ctx, const char *key,
|
|
|
|
const char *val, uint32_t size);
|
|
|
|
|
|
|
|
|
|
|
|
void aacenc_add_tag_to_store(aacenc_tag_store_t *store, uint32_t tag,
|
|
|
|
const char *key, const char *value,
|
|
|
|
uint32_t size, int is_file_name);
|
2013-02-15 14:26:17 +01:00
|
|
|
|
2013-10-23 16:35:23 +02:00
|
|
|
void aacenc_add_tag_entry_to_store(void *store, const aacenc_tag_entry_t *tag);
|
2013-02-15 14:26:17 +01:00
|
|
|
|
2013-10-23 16:35:23 +02:00
|
|
|
void aacenc_free_tag_store(aacenc_tag_store_t *store);
|
2013-02-15 14:26:17 +01:00
|
|
|
|
2013-10-23 16:35:23 +02:00
|
|
|
void aacenc_write_tags_from_json(m4af_ctx_t *m4af, const char *json_filename);
|
2013-02-15 14:26:17 +01:00
|
|
|
|
2013-10-23 16:35:23 +02:00
|
|
|
void aacenc_write_tag_entry(void *m4af, const aacenc_tag_entry_t *tag);
|
2013-02-15 14:26:17 +01:00
|
|
|
|
|
|
|
#endif
|