aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/FLACMetaData.hxx
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/decoder/FLACMetaData.hxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/decoder/FLACMetaData.hxx b/src/decoder/FLACMetaData.hxx
index 9808852f3..7b5eb8b0c 100644
--- a/src/decoder/FLACMetaData.hxx
+++ b/src/decoder/FLACMetaData.hxx
@@ -21,6 +21,7 @@
#define MPD_FLAC_METADATA_H
#include "gcc.h"
+#include "FLACIOHandle.hxx"
#include <FLAC/metadata.h>
@@ -45,10 +46,30 @@ public:
return ::FLAC__metadata_chain_read(chain, path);
}
+ bool Read(FLAC__IOHandle handle, FLAC__IOCallbacks callbacks) {
+ return ::FLAC__metadata_chain_read_with_callbacks(chain,
+ handle,
+ callbacks);
+ }
+
+ bool Read(input_stream *is) {
+ return Read(::ToFLACIOHandle(is), ::GetFLACIOCallbacks(is));
+ }
+
bool ReadOgg(const char *path) {
return ::FLAC__metadata_chain_read_ogg(chain, path);
}
+ bool ReadOgg(FLAC__IOHandle handle, FLAC__IOCallbacks callbacks) {
+ return ::FLAC__metadata_chain_read_ogg_with_callbacks(chain,
+ handle,
+ callbacks);
+ }
+
+ bool ReadOgg(input_stream *is) {
+ return ReadOgg(::ToFLACIOHandle(is), ::GetFLACIOCallbacks(is));
+ }
+
gcc_pure
FLAC__Metadata_ChainStatus GetStatus() const {
return ::FLAC__metadata_chain_status(chain);