summaryrefslogtreecommitdiffstats
path: root/xbmc/music/tags/TagLibVFSStream.h
diff options
context:
space:
mode:
Diffstat (limited to 'xbmc/music/tags/TagLibVFSStream.h')
-rw-r--r--xbmc/music/tags/TagLibVFSStream.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/xbmc/music/tags/TagLibVFSStream.h b/xbmc/music/tags/TagLibVFSStream.h
index d567055..2302c04 100644
--- a/xbmc/music/tags/TagLibVFSStream.h
+++ b/xbmc/music/tags/TagLibVFSStream.h
@@ -10,6 +10,7 @@
#include "filesystem/File.h"
+#include <taglib/taglib.h>
#include <taglib/tiostream.h>
namespace MUSIC_INFO
@@ -36,7 +37,11 @@ namespace MUSIC_INFO
/*!
* Reads a block of size \a length at the current get pointer.
*/
+#if (TAGLIB_MAJOR_VERSION >= 2)
+ TagLib::ByteVector readBlock(unsigned long length) override;
+#else
TagLib::ByteVector readBlock(TagLib::ulong length) override;
+#endif
/*!
* Attempts to write the block \a data at the current get pointer. If the
@@ -56,7 +61,13 @@ namespace MUSIC_INFO
* \note This method is slow since it requires rewriting all of the file
* after the insertion point.
*/
+#if (TAGLIB_MAJOR_VERSION >= 2)
+ void insert(const TagLib::ByteVector& data,
+ TagLib::offset_t start = 0,
+ size_t replace = 0) override;
+#else
void insert(const TagLib::ByteVector &data, TagLib::ulong start = 0, TagLib::ulong replace = 0) override;
+#endif
/*!
* Removes a block of the file starting a \a start and continuing for
@@ -65,7 +76,11 @@ namespace MUSIC_INFO
* \note This method is slow since it involves rewriting all of the file
* after the removed portion.
*/
+#if (TAGLIB_MAJOR_VERSION >= 2)
+ void removeBlock(TagLib::offset_t start = 0, size_t length = 0) override;
+#else
void removeBlock(TagLib::ulong start = 0, TagLib::ulong length = 0) override;
+#endif
/*!
* Returns true if the file is read only (or if the file can not be opened).
@@ -110,7 +125,11 @@ namespace MUSIC_INFO
/*!
* Returns the buffer size that is used for internal buffering.
*/
+#if (TAGLIB_MAJOR_VERSION >= 2)
+ static unsigned int bufferSize() { return 1024; }
+#else
static TagLib::uint bufferSize() { return 1024; }
+#endif
private:
std::string m_strFileName;