diff --git a/src/decoder/plugins/FlacDecoderPlugin.cxx b/src/decoder/plugins/FlacDecoderPlugin.cxx index 5fa8a0ae3..04364ad6a 100644 --- a/src/decoder/plugins/FlacDecoderPlugin.cxx +++ b/src/decoder/plugins/FlacDecoderPlugin.cxx @@ -24,6 +24,7 @@ #include "FlacCommon.hxx" #include "lib/xiph/FlacMetadataChain.hxx" #include "OggCodec.hxx" +#include "input/InputStream.hxx" #include "fs/Path.hxx" #include "fs/NarrowPath.hxx" #include "Log.hxx" diff --git a/src/lib/xiph/FlacMetadataChain.cxx b/src/lib/xiph/FlacMetadataChain.cxx index b41ac9d68..379f3e74f 100644 --- a/src/lib/xiph/FlacMetadataChain.cxx +++ b/src/lib/xiph/FlacMetadataChain.cxx @@ -20,8 +20,21 @@ #include "config.h" #include "FlacMetadataChain.hxx" #include "FlacMetadataIterator.hxx" +#include "FlacIOHandle.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 FlacMetadataChain::Scan(TagHandler &handler) noexcept { diff --git a/src/lib/xiph/FlacMetadataChain.hxx b/src/lib/xiph/FlacMetadataChain.hxx index 3d5070e2a..bc62c4ca2 100644 --- a/src/lib/xiph/FlacMetadataChain.hxx +++ b/src/lib/xiph/FlacMetadataChain.hxx @@ -20,11 +20,11 @@ #ifndef MPD_FLAC_METADATA_CHAIN_HXX #define MPD_FLAC_METADATA_CHAIN_HXX -#include "FlacIOHandle.hxx" #include "Compiler.h" #include +class InputStream; class TagHandler; class FlacMetadataChain { @@ -52,9 +52,7 @@ public: callbacks); } - bool Read(InputStream &is) noexcept { - return Read(::ToFlacIOHandle(is), ::GetFlacIOCallbacks(is)); - } + bool Read(InputStream &is) noexcept; bool ReadOgg(const char *path) noexcept { return ::FLAC__metadata_chain_read_ogg(chain, path); @@ -67,9 +65,7 @@ public: callbacks); } - bool ReadOgg(InputStream &is) { - return ReadOgg(::ToFlacIOHandle(is), ::GetFlacIOCallbacks(is)); - } + bool ReadOgg(InputStream &is) noexcept; gcc_pure FLAC__Metadata_ChainStatus GetStatus() const noexcept {