aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2007-08-19 15:20:10 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2007-08-19 15:20:10 +0000
commit75719b8c81a6fa169f42bfba0d18716802effe39 (patch)
tree70b09982fd328f4761b9e86e23ffb1560a867a4e /lib
parent923ec125e4c56afc27e658273e245e61e639191c (diff)
downloadqmmp-75719b8c81a6fa169f42bfba0d18716802effe39.tar.gz
qmmp-75719b8c81a6fa169f42bfba0d18716802effe39.tar.bz2
qmmp-75719b8c81a6fa169f42bfba0d18716802effe39.zip
decoder API changes
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@100 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'lib')
-rw-r--r--lib/decoderfactory.h2
-rw-r--r--lib/qmmp/Input/ffmpeg/decoderffmpegfactory.cpp7
-rw-r--r--lib/qmmp/Input/ffmpeg/decoderffmpegfactory.h2
-rw-r--r--lib/qmmp/Input/flac/decoderflacfactory.cpp7
-rw-r--r--lib/qmmp/Input/flac/decoderflacfactory.h2
-rw-r--r--lib/qmmp/Input/mad/decodermadfactory.cpp4
-rw-r--r--lib/qmmp/Input/mad/decodermadfactory.h2
-rw-r--r--lib/qmmp/Input/mpc/decodermpcfactory.cpp33
-rw-r--r--lib/qmmp/Input/mpc/decodermpcfactory.h2
-rw-r--r--lib/qmmp/Input/vorbis/decodervorbisfactory.cpp29
-rw-r--r--lib/qmmp/Input/vorbis/decodervorbisfactory.h2
11 files changed, 19 insertions, 73 deletions
diff --git a/lib/decoderfactory.h b/lib/decoderfactory.h
index c73b92c62..cfd0e5166 100644
--- a/lib/decoderfactory.h
+++ b/lib/decoderfactory.h
@@ -50,7 +50,7 @@ public:
virtual ~DecoderFactory() {}
virtual bool supports(const QString &source) const = 0;
virtual bool canDecode(QIODevice *) const = 0;
- virtual const DecoderProperties &properties() const = 0;
+ virtual const DecoderProperties properties() 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 adccc6255..acd40c4e8 100644
--- a/lib/qmmp/Input/ffmpeg/decoderffmpegfactory.cpp
+++ b/lib/qmmp/Input/ffmpeg/decoderffmpegfactory.cpp
@@ -16,13 +16,12 @@ bool DecoderFFmpegFactory::supports(const QString &source) const
bool DecoderFFmpegFactory::canDecode(QIODevice *input) const
{
- static bool c = FALSE;
- return c;
+ return FALSE;
}
-const DecoderProperties &DecoderFFmpegFactory::properties() const
+const DecoderProperties DecoderFFmpegFactory::properties() const
{
- static DecoderProperties properties;
+ DecoderProperties properties;
properties.name = tr("WMA Files");
properties.filter = "*.wma *.wav";
properties.description = tr("WMA Files");
diff --git a/lib/qmmp/Input/ffmpeg/decoderffmpegfactory.h b/lib/qmmp/Input/ffmpeg/decoderffmpegfactory.h
index e5da44bf1..7acc9f204 100644
--- a/lib/qmmp/Input/ffmpeg/decoderffmpegfactory.h
+++ b/lib/qmmp/Input/ffmpeg/decoderffmpegfactory.h
@@ -42,7 +42,7 @@ Q_INTERFACES(DecoderFactory);
public:
bool supports(const QString &source) const;
bool canDecode(QIODevice *input) const;
- const DecoderProperties &properties() const;
+ const DecoderProperties properties() 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 d9e9123ae..a6b5e1188 100644
--- a/lib/qmmp/Input/flac/decoderflacfactory.cpp
+++ b/lib/qmmp/Input/flac/decoderflacfactory.cpp
@@ -18,13 +18,12 @@ bool DecoderFLACFactory::supports(const QString &source) const
bool DecoderFLACFactory::canDecode(QIODevice *input) const
{
- static bool c = FALSE;
- return c;
+ return FALSE;
}
-const DecoderProperties &DecoderFLACFactory::properties() const
+const DecoderProperties DecoderFLACFactory::properties() const
{
- static DecoderProperties properties;
+ DecoderProperties properties;
properties.name = tr("FLAC Plugin");
properties.filter = "*.flac";
properties.description = tr("FLAC Files");
diff --git a/lib/qmmp/Input/flac/decoderflacfactory.h b/lib/qmmp/Input/flac/decoderflacfactory.h
index 24eba6135..59b6a8656 100644
--- a/lib/qmmp/Input/flac/decoderflacfactory.h
+++ b/lib/qmmp/Input/flac/decoderflacfactory.h
@@ -42,7 +42,7 @@ Q_INTERFACES(DecoderFactory);
public:
bool supports(const QString &source) const;
bool canDecode(QIODevice *input) const;
- const DecoderProperties &properties() const;
+ const DecoderProperties properties() 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 b253a60fa..c503850fb 100644
--- a/lib/qmmp/Input/mad/decodermadfactory.cpp
+++ b/lib/qmmp/Input/mad/decodermadfactory.cpp
@@ -46,9 +46,9 @@ bool DecoderMADFactory::canDecode(QIODevice *input) const
return FALSE;
}
-const DecoderProperties &DecoderMADFactory::properties() const
+const DecoderProperties DecoderMADFactory::properties() const
{
- static DecoderProperties properties;
+ DecoderProperties properties;
properties.name = tr("MPEG Plugin");
properties.filter = "*.mp1 *.mp2 *.mp3";
properties.description = tr("MPEG Files");
diff --git a/lib/qmmp/Input/mad/decodermadfactory.h b/lib/qmmp/Input/mad/decodermadfactory.h
index 7ebfd7275..fa1e7972f 100644
--- a/lib/qmmp/Input/mad/decodermadfactory.h
+++ b/lib/qmmp/Input/mad/decodermadfactory.h
@@ -41,7 +41,7 @@ Q_INTERFACES(DecoderFactory);
public:
bool supports(const QString &source) const;
bool canDecode(QIODevice *input) const;
- const DecoderProperties &properties() const;
+ const DecoderProperties properties() 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 fd8ebd259..de4fc5b1f 100644
--- a/lib/qmmp/Input/mpc/decodermpcfactory.cpp
+++ b/lib/qmmp/Input/mpc/decodermpcfactory.cpp
@@ -16,41 +16,14 @@ bool DecoderMPCFactory::supports(const QString &source) const
return (source.right(4).toLower() == ".mpc");
}
-/*const QString &DecoderMPCFactory::name() const
-{
- static QString name (tr("Musepack Plugin"));
- return name;
-}
-
-
-const QString &DecoderMPCFactory::filter() const
-{
- static QString filter("*.mpc");
- return filter;
-}
-
-
-const QString &DecoderMPCFactory::description() const
-{
- static QString desc(tr("Musepack Files"));
- return desc;
-}
-
-const QString &DecoderMPCFactory::contentType() const
-{
- static QString types;
- return types;
-}*/
-
bool DecoderMPCFactory::canDecode(QIODevice *input) const
{
- static bool c = FALSE;
- return c;
+ return FALSE;
}
-const DecoderProperties &DecoderMPCFactory::properties() const
+const DecoderProperties DecoderMPCFactory::properties() const
{
- static DecoderProperties properties;
+ DecoderProperties properties;
properties.name = tr("Musepack Plugin");
properties.filter = "*.mpc";
properties.description = tr("Musepack Files");
diff --git a/lib/qmmp/Input/mpc/decodermpcfactory.h b/lib/qmmp/Input/mpc/decodermpcfactory.h
index 7b008425b..eb8858cdf 100644
--- a/lib/qmmp/Input/mpc/decodermpcfactory.h
+++ b/lib/qmmp/Input/mpc/decodermpcfactory.h
@@ -42,7 +42,7 @@ Q_INTERFACES(DecoderFactory);
public:
bool supports(const QString &source) const;
bool canDecode(QIODevice *input) const;
- const DecoderProperties &properties() const;
+ const DecoderProperties properties() 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 682e58229..8f4458845 100644
--- a/lib/qmmp/Input/vorbis/decodervorbisfactory.cpp
+++ b/lib/qmmp/Input/vorbis/decodervorbisfactory.cpp
@@ -15,31 +15,6 @@ bool DecoderVorbisFactory::supports(const QString &source) const
return source.right(4).toLower() == ".ogg";
}
-/*const QString &DecoderVorbisFactory::name() const
-{
- static QString name (tr("Ogg Vorbis Plugin"));
- return name;
-}
-
-const QString &DecoderVorbisFactory::filter() const
-{
- static QString filter("*.ogg");
- return filter;
-}
-
-
-const QString &DecoderVorbisFactory::description() const
-{
- static QString desc(tr("Ogg Vorbis Files"));
- return desc;
-}
-
-const QString &DecoderVorbisFactory::contentType() const
-{
- static QString types("application/ogg;audio/x-vorbis+ogg");
- return types;
-}*/
-
bool DecoderVorbisFactory::canDecode(QIODevice *input) const
{
char buf[36];
@@ -50,9 +25,9 @@ bool DecoderVorbisFactory::canDecode(QIODevice *input) const
return FALSE;
}
-const DecoderProperties &DecoderVorbisFactory::properties() const
+const DecoderProperties DecoderVorbisFactory::properties() const
{
- static DecoderProperties properties;
+ DecoderProperties properties;
properties.name = tr("Ogg Vorbis Plugin");
properties.filter = "*.ogg";
properties.description = tr("Ogg Vorbis Files");
diff --git a/lib/qmmp/Input/vorbis/decodervorbisfactory.h b/lib/qmmp/Input/vorbis/decodervorbisfactory.h
index 156df9045..f4d3eb9c6 100644
--- a/lib/qmmp/Input/vorbis/decodervorbisfactory.h
+++ b/lib/qmmp/Input/vorbis/decodervorbisfactory.h
@@ -42,7 +42,7 @@ Q_INTERFACES(DecoderFactory);
public:
bool supports(const QString &source) const;
bool canDecode(QIODevice *input) const;
- const DecoderProperties &properties() const;
+ const DecoderProperties properties() const;
Decoder *create(QObject *, QIODevice *, Output *);
FileTag *createTag(const QString &source);
void showDetails(QWidget *parent, const QString &path);