decoder/DecoderPlugin: container_scan() returns forward_list<DetachedSong>

Speed up container_scan() again, by eliminating the need to call
scan_file() for each item.
This commit is contained in:
Max Kellermann
2016-11-22 12:25:52 +01:00
parent 72c96052b4
commit 95e2bec215
6 changed files with 47 additions and 35 deletions

View File

@@ -23,13 +23,13 @@
#include "Compiler.h"
#include <forward_list>
#include <string>
struct ConfigBlock;
class InputStream;
struct TagHandler;
class Path;
class DecoderClient;
class DetachedSong;
struct DecoderPlugin {
const char *name;
@@ -93,7 +93,7 @@ struct DecoderPlugin {
* a filename for every single track;
* do not include full pathname here, just the "virtual" file
*/
std::forward_list<std::string> (*container_scan)(Path path_fs);
std::forward_list<DetachedSong> (*container_scan)(Path path_fs);
/* last element in these arrays must always be a nullptr: */
const char *const*suffixes;