tag/Generic: add overload with InputStream& parameter

This commit is contained in:
Max Kellermann 2016-02-23 10:07:47 +01:00
parent 779d73f94b
commit 17ace95268
2 changed files with 24 additions and 0 deletions

View File

@ -22,6 +22,23 @@
#include "TagId3.hxx"
#include "ApeTag.hxx"
#include "fs/Path.hxx"
#include "input/InputStream.hxx"
#include "util/Error.hxx"
/**
* Attempts to scan APE or ID3 tags from the specified file.
*/
bool
ScanGenericTags(InputStream &is, const TagHandler &handler, void *ctx)
{
if (tag_ape_scan2(is, handler, ctx))
return true;
if (!is.Rewind(IgnoreError()))
return false;
return tag_id3_scan(is, handler, ctx);
}
/**
* Attempts to scan APE or ID3 tags from the specified file.

View File

@ -23,8 +23,15 @@
#include "check.h"
struct TagHandler;
class InputStream;
class Path;
/**
* Attempts to scan APE or ID3 tags from the specified file.
*/
bool
ScanGenericTags(InputStream &is, const TagHandler &handler, void *ctx);
/**
* Attempts to scan APE or ID3 tags from the specified file.
*/