Commit 6b416ce6 authored by Max Kellermann's avatar Max Kellermann

decoder/flac: move flac_scan_file2() to main plugin file

parent ef0392e8
...@@ -90,7 +90,15 @@ static bool ...@@ -90,7 +90,15 @@ static bool
flac_scan_file(const char *file, flac_scan_file(const char *file,
const struct tag_handler *handler, void *handler_ctx) const struct tag_handler *handler, void *handler_ctx)
{ {
return flac_scan_file2(file, handler, handler_ctx); FLACMetadataChain chain;
if (!chain.Read(file)) {
g_debug("Failed to read FLAC tags: %s",
chain.GetStatusString());
return false;
}
chain.Scan(handler, handler_ctx);
return true;
} }
/** /**
......
...@@ -239,21 +239,6 @@ flac_vorbis_comments_to_tag(struct tag *tag, ...@@ -239,21 +239,6 @@ flac_vorbis_comments_to_tag(struct tag *tag,
flac_scan_comments(comment, &add_tag_handler, tag); flac_scan_comments(comment, &add_tag_handler, tag);
} }
bool
flac_scan_file2(const char *file,
const struct tag_handler *handler, void *handler_ctx)
{
FLACMetadataChain chain;
if (!chain.Read(file)) {
g_debug("Failed to read FLAC tags: %s",
chain.GetStatusString());
return false;
}
chain.Scan(handler, handler_ctx);
return true;
}
void void
FLACMetadataChain::Scan(const struct tag_handler *handler, void *handler_ctx) FLACMetadataChain::Scan(const struct tag_handler *handler, void *handler_ctx)
{ {
......
...@@ -117,8 +117,4 @@ void ...@@ -117,8 +117,4 @@ void
flac_scan_metadata(const FLAC__StreamMetadata *block, flac_scan_metadata(const FLAC__StreamMetadata *block,
const struct tag_handler *handler, void *handler_ctx); const struct tag_handler *handler, void *handler_ctx);
bool
flac_scan_file2(const char *file,
const struct tag_handler *handler, void *handler_ctx);
#endif #endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment