tag/ApeReplayGain: add overload with InputStream& parameter

This commit is contained in:
Max Kellermann 2016-02-23 10:42:41 +01:00
parent b5c206d3ae
commit 222b777552
2 changed files with 21 additions and 0 deletions

View File

@ -47,6 +47,23 @@ replay_gain_ape_callback(unsigned long flags, const char *key,
return ParseReplayGainTag(info, key, value);
}
bool
replay_gain_ape_read(InputStream &is, ReplayGainInfo &info)
{
bool found = false;
auto callback = [&info, &found]
(unsigned long flags, const char *key,
StringView value) {
found |= replay_gain_ape_callback(flags, key,
value,
info);
return true;
};
return tag_ape_scan(is, callback) && found;
}
bool
replay_gain_ape_read(Path path_fs, ReplayGainInfo &info)
{

View File

@ -22,9 +22,13 @@
#include "check.h"
class InputStream;
class Path;
struct ReplayGainInfo;
bool
replay_gain_ape_read(InputStream &is, ReplayGainInfo &info);
bool
replay_gain_ape_read(Path path_fs, ReplayGainInfo &info);