浏览代码

gain some .rodata from DMAP decoder (unused strings)

philippe44 2 年之前
父节点
当前提交
cbc1ab38fb
共有 2 个文件被更改,包括 5 次插入1 次删除
  1. 4 0
      components/raop/dmap_parser.c
  2. 1 1
      components/raop/raop.c

+ 4 - 0
components/raop/dmap_parser.c

@@ -50,6 +50,7 @@ static const dmap_field dmap_fields[] = {
 	{ "abar",    DMAP_DICT, DMAP_STR,  "daap.browseartistlisting" },
 	{ "abcp",    DMAP_DICT, DMAP_STR,  "daap.browsecomposerlisting" },
 	{ "abgn",    DMAP_DICT, DMAP_STR,  "daap.browsegenrelisting" },
+#ifdef DMAP_FULL        
 	{ "abpl",    DMAP_UINT, 0,         "daap.baseplaylist" },
 	{ "abro",    DMAP_DICT, 0,         "daap.databasebrowse" },
 	{ "adbs",    DMAP_DICT, 0,         "daap.databasesongs" },
@@ -256,10 +257,12 @@ static const dmap_field dmap_fields[] = {
 	{ "meia",    DMAP_UINT, 0,         "dmap.itemdateadded" },
 	{ "meip",    DMAP_UINT, 0,         "dmap.itemdateplayed" },
 	{ "mext",    DMAP_UINT, 0,         "dmap.objectextradata" },
+#endif    
 	{ "miid",    DMAP_UINT, 0,         "dmap.itemid" },
 	{ "mikd",    DMAP_UINT, 0,         "dmap.itemkind" },
 	{ "mimc",    DMAP_UINT, 0,         "dmap.itemcount" },
 	{ "minm",    DMAP_STR,  0,         "dmap.itemname" },
+#ifdef DMAP_FULL    
 	{ "mlcl",    DMAP_DICT, DMAP_DICT, "dmap.listing" },
 	{ "mlid",    DMAP_UINT, 0,         "dmap.sessionid" },
 	{ "mlit",    DMAP_ITEM, 0,         "dmap.listingitem" },
@@ -314,6 +317,7 @@ static const dmap_field dmap_fields[] = {
 	{ "prat",    DMAP_UINT, 0,         "dpap.imagerating" },
 	{ "pret",    DMAP_DICT, 0,         "dpap.retryids" },
 	{ "pwth",    DMAP_UINT, 0,         "dpap.imagepixelwidth" }
+#endif    
 };
 static const size_t dmap_field_count = sizeof(dmap_fields) / sizeof(dmap_field);
 

+ 1 - 1
components/raop/raop.c

@@ -959,7 +959,7 @@ static int base64_decode(const char *str, void *data)
 /*----------------------------------------------------------------------------*/
 static void on_dmap_string(void *ctx, const char *code, const char *name, const char *buf, size_t len) {
 	struct metadata_s *metadata = (struct metadata_s *) ctx;
-
+    // to gain space, most of the code have been removed from dmap_parser.c (define DMAP_FULL)
 	if (!strcasecmp(code, "asar")) metadata->artist = strndup(buf, len);
 	else if (!strcasecmp(code, "asal")) metadata->album = strndup(buf, len);
 	else if (!strcasecmp(code, "minm")) metadata->title = strndup(buf, len);