aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/decoder.cpp5
-rw-r--r--lib/decoderfactory.h3
-rw-r--r--lib/qmmp/Input/ffmpeg/decoderffmpegfactory.cpp4
-rw-r--r--lib/qmmp/Input/ffmpeg/decoderffmpegfactory.h2
-rw-r--r--lib/qmmp/Input/flac/decoderflacfactory.cpp4
-rw-r--r--lib/qmmp/Input/flac/decoderflacfactory.h2
-rw-r--r--lib/qmmp/Input/mad/decodermadfactory.cpp5
-rw-r--r--lib/qmmp/Input/mad/decodermadfactory.h2
-rw-r--r--lib/qmmp/Input/mpc/decodermpcfactory.cpp5
-rw-r--r--lib/qmmp/Input/mpc/decodermpcfactory.h2
-rw-r--r--lib/qmmp/Input/vorbis/decodervorbisfactory.cpp5
-rw-r--r--lib/qmmp/Input/vorbis/decodervorbisfactory.h2
-rw-r--r--lib/soundcore.cpp2
13 files changed, 18 insertions, 25 deletions
diff --git a/lib/decoder.cpp b/lib/decoder.cpp
index 4b940520d..db10678cd 100644
--- a/lib/decoder.cpp
+++ b/lib/decoder.cpp
@@ -173,11 +173,10 @@ DecoderFactory *Decoder::findByContentType(const QString& type)
{
if (!blacklist.contains(files.at(i).section('/',-1)))
{
- QStringList types = factories->at(i)->contentTypes();
+ QStringList types = factories->at(i)->contentType().split(";");
for(int j=0; j<types.size(); ++j)
{
- qDebug(qPrintable(types[j]+" "+type));
- if(type == types[j])
+ if(type == types[j] && !types[j].isEmpty())
return factories->at(i);
}
}
diff --git a/lib/decoderfactory.h b/lib/decoderfactory.h
index 4e030f43e..651c19745 100644
--- a/lib/decoderfactory.h
+++ b/lib/decoderfactory.h
@@ -30,7 +30,6 @@ class QTranslator;
class Decoder;
class Output;
class FileTag;
-class QStringList;
class DecoderFactory
{
@@ -40,7 +39,7 @@ public:
virtual const QString &name() const = 0;
virtual const QString &filter() const = 0;
virtual const QString &description() const = 0; //i.e. file description
- virtual const QStringList &contentTypes() const = 0;
+ virtual const QString &contentType() const = 0;
virtual Decoder *create(QObject *, QIODevice *, Output *) = 0;
virtual FileTag *createTag(const QString &source) = 0;
virtual void showDetails(QWidget *parent, const QString &path) = 0;
diff --git a/lib/qmmp/Input/ffmpeg/decoderffmpegfactory.cpp b/lib/qmmp/Input/ffmpeg/decoderffmpegfactory.cpp
index 7b7579e35..947dcb0b3 100644
--- a/lib/qmmp/Input/ffmpeg/decoderffmpegfactory.cpp
+++ b/lib/qmmp/Input/ffmpeg/decoderffmpegfactory.cpp
@@ -34,9 +34,9 @@ const QString &DecoderFFmpegFactory::description() const
return desc;
}
-const QStringList &DecoderFFmpegFactory::contentTypes() const
+const QString &DecoderFFmpegFactory::contentType() const
{
- static QStringList types;
+ static QString types;
//types << "" << "";
return types;
}
diff --git a/lib/qmmp/Input/ffmpeg/decoderffmpegfactory.h b/lib/qmmp/Input/ffmpeg/decoderffmpegfactory.h
index 5b5930ad5..236d77604 100644
--- a/lib/qmmp/Input/ffmpeg/decoderffmpegfactory.h
+++ b/lib/qmmp/Input/ffmpeg/decoderffmpegfactory.h
@@ -44,7 +44,7 @@ public:
const QString &name() const;
const QString &filter() const;
const QString &description() const;
- const QStringList &contentTypes() const;
+ const QString &contentType() const;
Decoder *create(QObject *, QIODevice *, Output *);
FileTag *createTag(const QString &source);
void showDetails(QWidget *parent, const QString &path);
diff --git a/lib/qmmp/Input/flac/decoderflacfactory.cpp b/lib/qmmp/Input/flac/decoderflacfactory.cpp
index fe8bcf362..85909ca66 100644
--- a/lib/qmmp/Input/flac/decoderflacfactory.cpp
+++ b/lib/qmmp/Input/flac/decoderflacfactory.cpp
@@ -36,9 +36,9 @@ const QString &DecoderFLACFactory::description() const
return desc;
}
-const QStringList &DecoderFLACFactory::contentTypes() const
+const QString &DecoderFLACFactory::contentType() const
{
- static QStringList types;
+ static QString types;
//types << "" << "";
return types;
}
diff --git a/lib/qmmp/Input/flac/decoderflacfactory.h b/lib/qmmp/Input/flac/decoderflacfactory.h
index 56c95b248..12998b9c6 100644
--- a/lib/qmmp/Input/flac/decoderflacfactory.h
+++ b/lib/qmmp/Input/flac/decoderflacfactory.h
@@ -44,7 +44,7 @@ public:
const QString &name() const;
const QString &filter() const;
const QString &description() const;
- const QStringList &contentTypes() const;
+ const QString &contentType() const;
Decoder *create(QObject *, QIODevice *, Output *);
FileTag *createTag(const QString &source);
void showDetails(QWidget *parent, const QString &path);
diff --git a/lib/qmmp/Input/mad/decodermadfactory.cpp b/lib/qmmp/Input/mad/decodermadfactory.cpp
index 8c5f15305..0e15e9997 100644
--- a/lib/qmmp/Input/mad/decodermadfactory.cpp
+++ b/lib/qmmp/Input/mad/decodermadfactory.cpp
@@ -40,10 +40,9 @@ const QString &DecoderMADFactory::description() const
return desc;
}
-const QStringList &DecoderMADFactory::contentTypes() const
+const QString &DecoderMADFactory::contentType() const
{
- static QStringList types;
- types << "audio/mp3" << "audio/mpeg";
+ static QString types("audio/mp3;audio/mpeg");
return types;
}
diff --git a/lib/qmmp/Input/mad/decodermadfactory.h b/lib/qmmp/Input/mad/decodermadfactory.h
index a13596c8f..14a95fd58 100644
--- a/lib/qmmp/Input/mad/decodermadfactory.h
+++ b/lib/qmmp/Input/mad/decodermadfactory.h
@@ -43,7 +43,7 @@ public:
const QString &name() const;
const QString &filter() const; // file extension, ie. ".mp3" or ".ogg"
const QString &description() const; // file type, ie. "MPEG Audio Files"
- const QStringList &contentTypes() const;
+ const QString &contentType() const;
Decoder *create(QObject *, QIODevice *, Output *);
FileTag *createTag(const QString &source);
void showDetails(QWidget *parent, const QString &path);
diff --git a/lib/qmmp/Input/mpc/decodermpcfactory.cpp b/lib/qmmp/Input/mpc/decodermpcfactory.cpp
index f41090a02..3515fa9d2 100644
--- a/lib/qmmp/Input/mpc/decodermpcfactory.cpp
+++ b/lib/qmmp/Input/mpc/decodermpcfactory.cpp
@@ -36,10 +36,9 @@ const QString &DecoderMPCFactory::description() const
return desc;
}
-const QStringList &DecoderMPCFactory::contentTypes() const
+const QString &DecoderMPCFactory::contentType() const
{
- static QStringList types;
- //types << "" << "";
+ static QString types;
return types;
}
diff --git a/lib/qmmp/Input/mpc/decodermpcfactory.h b/lib/qmmp/Input/mpc/decodermpcfactory.h
index aed846358..e1327a35f 100644
--- a/lib/qmmp/Input/mpc/decodermpcfactory.h
+++ b/lib/qmmp/Input/mpc/decodermpcfactory.h
@@ -44,7 +44,7 @@ public:
const QString &name() const;
const QString &filter() const;
const QString &description() const;
- const QStringList &contentTypes() const;
+ const QString &contentType() const;
Decoder *create(QObject *, QIODevice *, Output *);
FileTag *createTag(const QString &source);
void showDetails(QWidget *parent, const QString &path);
diff --git a/lib/qmmp/Input/vorbis/decodervorbisfactory.cpp b/lib/qmmp/Input/vorbis/decodervorbisfactory.cpp
index b9c652a8d..bdd0a83ca 100644
--- a/lib/qmmp/Input/vorbis/decodervorbisfactory.cpp
+++ b/lib/qmmp/Input/vorbis/decodervorbisfactory.cpp
@@ -35,10 +35,9 @@ const QString &DecoderVorbisFactory::description() const
return desc;
}
-const QStringList &DecoderVorbisFactory::contentTypes() const
+const QString &DecoderVorbisFactory::contentType() const
{
- static QStringList types;
- types << "application/ogg" << "audio/x-vorbis+ogg";
+ static QString types("application/ogg;audio/x-vorbis+ogg");
return types;
}
diff --git a/lib/qmmp/Input/vorbis/decodervorbisfactory.h b/lib/qmmp/Input/vorbis/decodervorbisfactory.h
index f699830ce..09c181a8c 100644
--- a/lib/qmmp/Input/vorbis/decodervorbisfactory.h
+++ b/lib/qmmp/Input/vorbis/decodervorbisfactory.h
@@ -44,7 +44,7 @@ public:
const QString &name() const;
const QString &filter() const; // file extension, ie. ".mp3" or ".ogg"
const QString &description() const; // file type, ie. "MPEG Audio Files"
- const QStringList &contentTypes() const;
+ const QString &contentType() const;
Decoder *create(QObject *, QIODevice *, Output *);
FileTag *createTag(const QString &source);
void showDetails(QWidget *parent, const QString &path);
diff --git a/lib/soundcore.cpp b/lib/soundcore.cpp
index 4e7bbf205..e84d2925a 100644
--- a/lib/soundcore.cpp
+++ b/lib/soundcore.cpp
@@ -128,10 +128,8 @@ bool SoundCore::play(const QString &source)
m_output->start();
m_decoder->start();
m_error = NoError;
-
return TRUE;
}
- qDebug("12345678");
stop();
return FALSE;
}