diff options
author | Christian Soffke <christian.soffke@gmail.com> | 2024-12-15 23:50:05 +0100 |
---|---|---|
committer | Christian Soffke <christian.soffke@gmail.com> | 2024-12-15 23:50:24 +0100 |
commit | 5e66f0e762b78b207053d29bddd65e83353b33e0 (patch) | |
tree | 0a879ad448817f1c8bf63ac62ee01a06aeafaa7b | |
parent | de8d1437dc29bbfefc488ea29e7870b31204c898 (diff) | |
download | rockbox-5e66f0e762.tar.gz rockbox-5e66f0e762.zip |
plugins: Remove id3 lib
only remaining user is PictureFlow, and
function is arguably not lib-worthy at
this point
Change-Id: If5cff56fc4aed7c8029782a7087ba4cfef3ec4ea
-rw-r--r-- | apps/plugins/lib/SOURCES | 2 | ||||
-rw-r--r-- | apps/plugins/lib/id3.c | 39 | ||||
-rw-r--r-- | apps/plugins/lib/id3.h | 26 | ||||
-rw-r--r-- | apps/plugins/pictureflow/pictureflow.c | 19 |
4 files changed, 18 insertions, 68 deletions
diff --git a/apps/plugins/lib/SOURCES b/apps/plugins/lib/SOURCES index 0083d54dc6..06adb04426 100644 --- a/apps/plugins/lib/SOURCES +++ b/apps/plugins/lib/SOURCES @@ -70,6 +70,4 @@ kbd_helper.c pluginlib_touchscreen.c #endif -id3.c - mul_id3.c diff --git a/apps/plugins/lib/id3.c b/apps/plugins/lib/id3.c deleted file mode 100644 index 6af715b1fb..0000000000 --- a/apps/plugins/lib/id3.c +++ /dev/null @@ -1,39 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * $Id$ - * - * Copyright (C) 2023 Christian Soffke - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ -#include "plugin.h" - -/* Fills mp3entry with metadata retrieved from RAM, if possible, or by reading from - * the file directly. Note that the tagcache only stores a subset of metadata and - * will thus not return certain properties of the file, such as frequency, size, or - * codec. - */ -bool retrieve_id3(struct mp3entry *id3, const char* file) -{ -#if defined (HAVE_TAGCACHE) && defined(HAVE_TC_RAMCACHE) && defined(HAVE_DIRCACHE) - if (rb->tagcache_fill_tags(id3, file)) - { - rb->strlcpy(id3->path, file, sizeof(id3->path)); - return true; - } -#endif - - return rb->get_metadata(id3, -1, file); -} diff --git a/apps/plugins/lib/id3.h b/apps/plugins/lib/id3.h deleted file mode 100644 index 6ae1688798..0000000000 --- a/apps/plugins/lib/id3.h +++ /dev/null @@ -1,26 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * $Id$ - * - * Copyright (C) 2023 Christian Soffke - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ -#ifndef ID3_H -#define ID3_H - -bool retrieve_id3(struct mp3entry *id3, const char* file); - -#endif /* ID3_H */ diff --git a/apps/plugins/pictureflow/pictureflow.c b/apps/plugins/pictureflow/pictureflow.c index 3d1640d903..726a6bc898 100644 --- a/apps/plugins/pictureflow/pictureflow.c +++ b/apps/plugins/pictureflow/pictureflow.c @@ -33,7 +33,6 @@ #include "lib/grey.h" #include "lib/mylcd.h" #include "lib/feature_wrappers.h" -#include "lib/id3.h" /******************************* Globals ***********************************/ static fb_data *lcd_fb; @@ -2076,6 +2075,24 @@ static inline void free_borrowed_tracks(void) buf_ctx_unlock(); } +/* Fills mp3entry with metadata retrieved from RAM, if possible, or by reading from + * the file directly. Note that the tagcache only stores a subset of metadata and + * will thus not return certain properties of the file, such as frequency, size, or + * codec. + */ +bool retrieve_id3(struct mp3entry *id3, const char* file) +{ +#if defined (HAVE_TAGCACHE) && defined(HAVE_TC_RAMCACHE) && defined(HAVE_DIRCACHE) + if (rb->tagcache_fill_tags(id3, file)) + { + rb->strlcpy(id3->path, file, sizeof(id3->path)); + return true; + } +#endif + + return rb->get_metadata(id3, -1, file); +} + /** Determine filename of the album art for the given slide_index and store the result in buf. |