From cbc1ab38fb0dea358ac1b6866018d76b5f67ddc3 Mon Sep 17 00:00:00 2001 From: philippe44 Date: Sat, 1 Apr 2023 21:03:10 -0700 Subject: [PATCH] gain some .rodata from DMAP decoder (unused strings) --- components/raop/dmap_parser.c | 4 ++++ components/raop/raop.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/components/raop/dmap_parser.c b/components/raop/dmap_parser.c index d0780ed4..d3d3b85d 100644 --- a/components/raop/dmap_parser.c +++ b/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); diff --git a/components/raop/raop.c b/components/raop/raop.c index 82f5e8b4..59124737 100644 --- a/components/raop/raop.c +++ b/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);