lib/xiph/FlacMetadataChain: un-inline Read(InputStream)

This commit is contained in:
Max Kellermann 2018-07-07 14:22:22 +02:00
parent 37897d1550
commit 2e116c9e28
3 changed files with 17 additions and 7 deletions

View File

@ -24,6 +24,7 @@
#include "FlacCommon.hxx" #include "FlacCommon.hxx"
#include "lib/xiph/FlacMetadataChain.hxx" #include "lib/xiph/FlacMetadataChain.hxx"
#include "OggCodec.hxx" #include "OggCodec.hxx"
#include "input/InputStream.hxx"
#include "fs/Path.hxx" #include "fs/Path.hxx"
#include "fs/NarrowPath.hxx" #include "fs/NarrowPath.hxx"
#include "Log.hxx" #include "Log.hxx"

View File

@ -20,8 +20,21 @@
#include "config.h" #include "config.h"
#include "FlacMetadataChain.hxx" #include "FlacMetadataChain.hxx"
#include "FlacMetadataIterator.hxx" #include "FlacMetadataIterator.hxx"
#include "FlacIOHandle.hxx"
#include "decoder/plugins/FlacMetadata.hxx" #include "decoder/plugins/FlacMetadata.hxx"
bool
FlacMetadataChain::Read(InputStream &is) noexcept
{
return Read(::ToFlacIOHandle(is), ::GetFlacIOCallbacks(is));
}
bool
FlacMetadataChain::ReadOgg(InputStream &is) noexcept
{
return ReadOgg(::ToFlacIOHandle(is), ::GetFlacIOCallbacks(is));
}
void void
FlacMetadataChain::Scan(TagHandler &handler) noexcept FlacMetadataChain::Scan(TagHandler &handler) noexcept
{ {

View File

@ -20,11 +20,11 @@
#ifndef MPD_FLAC_METADATA_CHAIN_HXX #ifndef MPD_FLAC_METADATA_CHAIN_HXX
#define MPD_FLAC_METADATA_CHAIN_HXX #define MPD_FLAC_METADATA_CHAIN_HXX
#include "FlacIOHandle.hxx"
#include "Compiler.h" #include "Compiler.h"
#include <FLAC/metadata.h> #include <FLAC/metadata.h>
class InputStream;
class TagHandler; class TagHandler;
class FlacMetadataChain { class FlacMetadataChain {
@ -52,9 +52,7 @@ public:
callbacks); callbacks);
} }
bool Read(InputStream &is) noexcept { bool Read(InputStream &is) noexcept;
return Read(::ToFlacIOHandle(is), ::GetFlacIOCallbacks(is));
}
bool ReadOgg(const char *path) noexcept { bool ReadOgg(const char *path) noexcept {
return ::FLAC__metadata_chain_read_ogg(chain, path); return ::FLAC__metadata_chain_read_ogg(chain, path);
@ -67,9 +65,7 @@ public:
callbacks); callbacks);
} }
bool ReadOgg(InputStream &is) { bool ReadOgg(InputStream &is) noexcept;
return ReadOgg(::ToFlacIOHandle(is), ::GetFlacIOCallbacks(is));
}
gcc_pure gcc_pure
FLAC__Metadata_ChainStatus GetStatus() const noexcept { FLAC__Metadata_ChainStatus GetStatus() const noexcept {