aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Input/mpc/decodermpcfactory.cpp
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2014-09-29 12:02:12 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2014-09-29 12:02:12 +0000
commit5638a2a1b70266e7417ce5b53bc1d0cdb5037d35 (patch)
treec4b68971ead3ef69c7c1dc4123eb246c30ff5625 /src/plugins/Input/mpc/decodermpcfactory.cpp
parent729eb1013bc4614f2eb259c59f51542b1bfb5bec (diff)
downloadqmmp-5638a2a1b70266e7417ce5b53bc1d0cdb5037d35.tar.gz
qmmp-5638a2a1b70266e7417ce5b53bc1d0cdb5037d35.tar.bz2
qmmp-5638a2a1b70266e7417ce5b53bc1d0cdb5037d35.zip
reduced tag reading delay
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@4519 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Input/mpc/decodermpcfactory.cpp')
-rw-r--r--src/plugins/Input/mpc/decodermpcfactory.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/plugins/Input/mpc/decodermpcfactory.cpp b/src/plugins/Input/mpc/decodermpcfactory.cpp
index f0faaab51..30d06365b 100644
--- a/src/plugins/Input/mpc/decodermpcfactory.cpp
+++ b/src/plugins/Input/mpc/decodermpcfactory.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2008-2012 by Ilya Kotov *
+ * Copyright (C) 2008-2014 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -23,6 +23,9 @@
#include <taglib/fileref.h>
#include <taglib/mpcfile.h>
#include <taglib/apetag.h>
+#if (TAGLIB_MAJOR_VERSION > 1) || ((TAGLIB_MAJOR_VERSION == 1) && (TAGLIB_MINOR_VERSION >= 8))
+#include <taglib/tfilestream.h>
+#endif
#include "mpcmetadatamodel.h"
#include "decoder_mpc.h"
#include "decodermpcfactory.h"
@@ -75,7 +78,13 @@ QList<FileInfo *> DecoderMPCFactory::createPlayList(const QString &fileName, boo
{
FileInfo *info = new FileInfo(fileName);
+#if (TAGLIB_MAJOR_VERSION > 1) || ((TAGLIB_MAJOR_VERSION == 1) && (TAGLIB_MINOR_VERSION >= 8))
+ TagLib::FileStream stream(fileName.toLocal8Bit().constData(), true);
+ TagLib::MPC::File fileRef(&stream);
+#else
TagLib::MPC::File fileRef(fileName.toLocal8Bit().constData());
+#endif
+
TagLib::APE::Tag *tag = useMetaData ? fileRef.APETag() : 0;
if (tag && !tag->isEmpty())
{