From aa3f57c0236c77f2fd90415fc1f3062a93b25b93 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Wed, 24 Nov 2010 18:17:51 +0000 Subject: some api changes, partial mpris 2.0 implementation git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1991 90c681e8-e032-0410-971d-27865f9a5e38 --- .../Engines/mplayer/mplayerenginefactory.cpp | 6 +- src/plugins/General/mpris/CMakeLists.txt | 2 + src/plugins/General/mpris/mpris.cpp | 26 +++---- src/plugins/General/mpris/mpris.pro | 11 +-- src/plugins/General/mpris/root2object.cpp | 88 ++++++++++++++++++++++ src/plugins/General/mpris/root2object.h | 58 ++++++++++++++ src/plugins/Input/aac/decoderaacfactory.cpp | 4 +- .../Input/cdaudio/decodercdaudiofactory.cpp | 2 +- src/plugins/Input/cue/decodercuefactory.cpp | 4 +- src/plugins/Input/ffmpeg/decoderffmpegfactory.cpp | 37 +++------ .../Input/ffmpeg/translations/ffmpeg_plugin_cs.ts | 12 +-- .../Input/ffmpeg/translations/ffmpeg_plugin_de.ts | 12 +-- .../Input/ffmpeg/translations/ffmpeg_plugin_es.ts | 12 +-- .../Input/ffmpeg/translations/ffmpeg_plugin_it.ts | 12 +-- .../Input/ffmpeg/translations/ffmpeg_plugin_ja.ts | 12 +-- .../Input/ffmpeg/translations/ffmpeg_plugin_lt.ts | 12 +-- .../Input/ffmpeg/translations/ffmpeg_plugin_nl.ts | 12 +-- .../Input/ffmpeg/translations/ffmpeg_plugin_pl.ts | 12 +-- .../Input/ffmpeg/translations/ffmpeg_plugin_ru.ts | 12 +-- .../Input/ffmpeg/translations/ffmpeg_plugin_tr.ts | 12 +-- .../ffmpeg/translations/ffmpeg_plugin_uk_UA.ts | 12 +-- .../ffmpeg/translations/ffmpeg_plugin_zh_CN.ts | 12 +-- .../ffmpeg/translations/ffmpeg_plugin_zh_TW.ts | 12 +-- src/plugins/Input/flac/decoderflacfactory.cpp | 4 +- src/plugins/Input/gme/decodergmefactory.cpp | 19 ++--- .../Input/gme/translations/gme_plugin_cs.ts | 10 +-- .../Input/gme/translations/gme_plugin_de.ts | 10 +-- .../Input/gme/translations/gme_plugin_it.ts | 10 +-- .../Input/gme/translations/gme_plugin_ja.ts | 10 +-- .../Input/gme/translations/gme_plugin_lt.ts | 10 +-- .../Input/gme/translations/gme_plugin_nl.ts | 10 +-- .../Input/gme/translations/gme_plugin_pl.ts | 10 +-- .../Input/gme/translations/gme_plugin_ru.ts | 10 +-- .../Input/gme/translations/gme_plugin_tr.ts | 10 +-- .../Input/gme/translations/gme_plugin_uk_UA.ts | 10 +-- .../Input/gme/translations/gme_plugin_zh_CN.ts | 10 +-- .../Input/gme/translations/gme_plugin_zh_TW.ts | 10 +-- src/plugins/Input/mad/decodermadfactory.cpp | 5 +- .../Input/mad/translations/mad_plugin_cs.ts | 14 ++-- .../Input/mad/translations/mad_plugin_de.ts | 14 ++-- .../Input/mad/translations/mad_plugin_es.ts | 14 ++-- .../Input/mad/translations/mad_plugin_it.ts | 14 ++-- .../Input/mad/translations/mad_plugin_ja.ts | 14 ++-- .../Input/mad/translations/mad_plugin_lt.ts | 14 ++-- .../Input/mad/translations/mad_plugin_nl.ts | 14 ++-- .../Input/mad/translations/mad_plugin_pl.ts | 14 ++-- .../Input/mad/translations/mad_plugin_ru.ts | 14 ++-- .../Input/mad/translations/mad_plugin_tr.ts | 14 ++-- .../Input/mad/translations/mad_plugin_uk_UA.ts | 14 ++-- .../Input/mad/translations/mad_plugin_zh_CN.ts | 14 ++-- .../Input/mad/translations/mad_plugin_zh_TW.ts | 14 ++-- .../Input/modplug/decodermodplugfactory.cpp | 31 ++++---- .../modplug/translations/modplug_plugin_cs.ts | 20 ++--- .../modplug/translations/modplug_plugin_de.ts | 20 ++--- .../modplug/translations/modplug_plugin_es.ts | 20 ++--- .../modplug/translations/modplug_plugin_it.ts | 20 ++--- .../modplug/translations/modplug_plugin_ja.ts | 20 ++--- .../modplug/translations/modplug_plugin_lt.ts | 20 ++--- .../modplug/translations/modplug_plugin_nl.ts | 20 ++--- .../modplug/translations/modplug_plugin_pl.ts | 20 ++--- .../modplug/translations/modplug_plugin_ru.ts | 20 ++--- .../modplug/translations/modplug_plugin_tr.ts | 20 ++--- .../modplug/translations/modplug_plugin_uk_UA.ts | 20 ++--- .../modplug/translations/modplug_plugin_zh_CN.ts | 20 ++--- .../modplug/translations/modplug_plugin_zh_TW.ts | 20 ++--- src/plugins/Input/mpc/decodermpcfactory.cpp | 4 +- .../Input/sndfile/decodersndfilefactory.cpp | 26 +++---- .../sndfile/translations/sndfile_plugin_cs.ts | 12 +-- .../sndfile/translations/sndfile_plugin_de.ts | 12 +-- .../sndfile/translations/sndfile_plugin_es.ts | 12 +-- .../sndfile/translations/sndfile_plugin_it.ts | 12 +-- .../sndfile/translations/sndfile_plugin_ja.ts | 12 +-- .../sndfile/translations/sndfile_plugin_lt.ts | 12 +-- .../sndfile/translations/sndfile_plugin_nl.ts | 12 +-- .../sndfile/translations/sndfile_plugin_pl.ts | 12 +-- .../sndfile/translations/sndfile_plugin_ru.ts | 12 +-- .../sndfile/translations/sndfile_plugin_tr.ts | 12 +-- .../sndfile/translations/sndfile_plugin_uk_UA.ts | 12 +-- .../sndfile/translations/sndfile_plugin_zh_CN.ts | 12 +-- .../sndfile/translations/sndfile_plugin_zh_TW.ts | 12 +-- src/plugins/Input/vorbis/decodervorbisfactory.cpp | 6 +- .../Input/wavpack/decoderwavpackfactory.cpp | 6 +- .../Input/wildmidi/decoderwildmidifactory.cpp | 4 +- src/plugins/Transports/http/httpinputfactory.cpp | 2 +- src/plugins/Transports/http/httpinputfactory.h | 1 + src/plugins/Transports/mms/mmsinputfactory.cpp | 2 +- src/plugins/Transports/mms/mmsinputfactory.h | 1 + src/qmmp/abstractengine.cpp | 51 ++++++++----- src/qmmp/abstractengine.h | 16 ++-- src/qmmp/decoder.cpp | 67 +++++++++------- src/qmmp/decoder.h | 6 ++ src/qmmp/decoderfactory.h | 25 +++--- src/qmmp/enginefactory.h | 17 +++-- src/qmmp/inputsource.cpp | 18 +++-- src/qmmp/inputsource.h | 4 + src/qmmp/inputsourcefactory.h | 11 +-- src/qmmp/metadatamanager.cpp | 45 ++++------- src/qmmp/metadatamanager.h | 1 - src/qmmpui/fileloader.cpp | 4 +- 99 files changed, 822 insertions(+), 666 deletions(-) create mode 100644 src/plugins/General/mpris/root2object.cpp create mode 100644 src/plugins/General/mpris/root2object.h (limited to 'src') diff --git a/src/plugins/Engines/mplayer/mplayerenginefactory.cpp b/src/plugins/Engines/mplayer/mplayerenginefactory.cpp index 48de7f5fe..669161bc7 100644 --- a/src/plugins/Engines/mplayer/mplayerenginefactory.cpp +++ b/src/plugins/Engines/mplayer/mplayerenginefactory.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2009 by Ilya Kotov * + * Copyright (C) 2008-2010 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -32,10 +32,10 @@ const EngineProperties MplayerEngineFactory::properties() const EngineProperties properties; properties.name = tr("Mplayer Plugin"); properties.shortName = "mplayer"; - properties.filter = MplayerInfo::filters().join(" "); + properties.filters = MplayerInfo::filters(); properties.description = tr("Video Files"); //properties.contentType = "application/ogg;audio/x-vorbis+ogg"; - properties.protocols = "file"; + properties.protocols << "file"; properties.hasAbout = true; properties.hasSettings = true; return properties; diff --git a/src/plugins/General/mpris/CMakeLists.txt b/src/plugins/General/mpris/CMakeLists.txt index 069492b1c..d1eb3e2a3 100644 --- a/src/plugins/General/mpris/CMakeLists.txt +++ b/src/plugins/General/mpris/CMakeLists.txt @@ -33,6 +33,7 @@ SET(libmpris_SRCS mpris.cpp mprisfactory.cpp rootobject.cpp + root2object.cpp playerobject.cpp tracklistobject.cpp ) @@ -41,6 +42,7 @@ SET(libmpris_MOC_HDRS mprisfactory.h mpris.h rootobject.h + root2object.h playerobject.h tracklistobject.h ) diff --git a/src/plugins/General/mpris/mpris.cpp b/src/plugins/General/mpris/mpris.cpp index 4c6474311..d355f7f7f 100644 --- a/src/plugins/General/mpris/mpris.cpp +++ b/src/plugins/General/mpris/mpris.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008 by Ilya Kotov * + * Copyright (C) 2008-2010 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -19,28 +19,28 @@ ***************************************************************************/ #include - #include "playerobject.h" #include "rootobject.h" #include "tracklistobject.h" +#include "root2object.h" #include "mpris.h" -MPRIS::MPRIS(QObject *parent) - : General(parent) +MPRIS::MPRIS(QObject *parent) : General(parent) { - PlayerObject *player = new PlayerObject(this); - RootObject *root = new RootObject(this); - TrackListObject *trackList = new TrackListObject(this); QDBusConnection connection = QDBusConnection::sessionBus(); - connection.registerObject("/TrackList", trackList, QDBusConnection::ExportAllContents); - connection.registerObject("/Player", player, QDBusConnection::ExportAllContents); - connection.registerObject("/", root, QDBusConnection::ExportAllContents); + //MPRISv1 + connection.registerObject("/TrackList", new TrackListObject(this), QDBusConnection::ExportAllContents); + connection.registerObject("/Player", new PlayerObject(this), QDBusConnection::ExportAllContents); + connection.registerObject("/", new RootObject(this), QDBusConnection::ExportAllContents); + //MPRISv2 + connection.registerObject("/org/mpris/MediaPlayer2", new Root2Object(this), + QDBusConnection::ExportAllContents); connection.registerService("org.mpris.qmmp"); + connection.registerService("org.mpris.MediaPlayer2.qmmp"); } - MPRIS::~MPRIS() { + QDBusConnection::sessionBus().unregisterService("org.mpris.qmmp"); + QDBusConnection::sessionBus().unregisterService("org.mpris.MediaPlayer2.qmmp"); } - - diff --git a/src/plugins/General/mpris/mpris.pro b/src/plugins/General/mpris/mpris.pro index 7d1310348..e97282e03 100644 --- a/src/plugins/General/mpris/mpris.pro +++ b/src/plugins/General/mpris/mpris.pro @@ -40,16 +40,17 @@ INSTALLS += target HEADERS += mprisfactory.h \ mpris.h \ playerobject.h \ - rootobject.h \ - tracklistobject.h + rootobject.h \ + tracklistobject.h \ + root2object.h SOURCES += mprisfactory.cpp \ mpris.cpp \ playerobject.cpp \ - rootobject.cpp \ - tracklistobject.cpp + rootobject.cpp \ + tracklistobject.cpp \ + root2object.cpp INCLUDEPATH += ../../../../src LIBS += -lqmmpui -lqmmp - diff --git a/src/plugins/General/mpris/root2object.cpp b/src/plugins/General/mpris/root2object.cpp new file mode 100644 index 000000000..c0eca65fb --- /dev/null +++ b/src/plugins/General/mpris/root2object.cpp @@ -0,0 +1,88 @@ +/*************************************************************************** + * Copyright (C) 2010 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "root2object.h" + +Root2Object::Root2Object(QObject *parent) : QObject(parent) +{} + + +Root2Object::~Root2Object() +{} + +bool Root2Object::canQuit() const +{ + return true; +} + +bool Root2Object::canRaise() const +{ + return false; +} + +QString Root2Object::desktopEntry() const +{ + return "qmmp"; +} + +bool Root2Object::hasTrackList() const +{ + return false; +} +QString Root2Object::identity() const +{ + QString name = "Qmmp " + Qmmp::strVersion(); + return name; +} + +QStringList Root2Object::supportedMimeTypes() const +{ + QStringList mimeTypes; + foreach(DecoderFactory *factory, *Decoder::factories()) + mimeTypes << factory->properties().contentTypes; + foreach(EngineFactory *factory, *AbstractEngine::factories()) + mimeTypes << factory->properties().contentTypes; + mimeTypes.removeDuplicates(); + return mimeTypes; +} + +QStringList Root2Object::supportedUriSchemes() const +{ + QStringList protocols = MetaDataManager::instance()->protocols(); + if(!protocols.contains("file")) //append file if needed + protocols.append("file"); + return protocols; +} + +void Root2Object::Quit() +{ + QMetaObject::invokeMethod(parent(), "exit"); +} + +void Root2Object::Raise(){} diff --git a/src/plugins/General/mpris/root2object.h b/src/plugins/General/mpris/root2object.h new file mode 100644 index 000000000..f661df200 --- /dev/null +++ b/src/plugins/General/mpris/root2object.h @@ -0,0 +1,58 @@ +/*************************************************************************** + * Copyright (C) 2010 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef ROOT2OBJECT_H +#define ROOT2OBJECT_H + +#include +#include + +/** + @author Ilya Kotov +*/ +class Root2Object : public QObject +{ +Q_OBJECT +Q_CLASSINFO("D-Bus Interface", "org.mpris.MediaPlayer2") +Q_PROPERTY(bool CanQuit READ canQuit) +Q_PROPERTY(bool CanRaise READ canRaise) +Q_PROPERTY(QString DesktopEntry READ desktopEntry) +Q_PROPERTY(bool HasTrackList READ hasTrackList) +Q_PROPERTY(QString Identity READ identity) +Q_PROPERTY(QStringList SupportedMimeTypes READ supportedMimeTypes) +Q_PROPERTY(QStringList SupportedUriSchemes READ supportedUriSchemes) + +public: + Root2Object(QObject *parent = 0); + virtual ~Root2Object(); + + bool canQuit() const; + bool canRaise() const; + QString desktopEntry() const; + bool hasTrackList() const; + QString identity() const; + QStringList supportedMimeTypes() const; + QStringList supportedUriSchemes() const; + +public slots: + void Quit(); + void Raise(); +}; + +#endif diff --git a/src/plugins/Input/aac/decoderaacfactory.cpp b/src/plugins/Input/aac/decoderaacfactory.cpp index bce1e2f51..a00d6ea43 100644 --- a/src/plugins/Input/aac/decoderaacfactory.cpp +++ b/src/plugins/Input/aac/decoderaacfactory.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2009 by Ilya Kotov * + * Copyright (C) 2008-2010 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -43,7 +43,7 @@ const DecoderProperties DecoderAACFactory::properties() const { DecoderProperties properties; properties.name = tr("AAC Plugin"); - properties.filter = "*.aac"; + properties.filters << "*.aac"; properties.description = tr("AAC Files"); //properties.contentType = ; properties.shortName = "aac"; diff --git a/src/plugins/Input/cdaudio/decodercdaudiofactory.cpp b/src/plugins/Input/cdaudio/decodercdaudiofactory.cpp index cb334c4d5..9e5358e4c 100644 --- a/src/plugins/Input/cdaudio/decodercdaudiofactory.cpp +++ b/src/plugins/Input/cdaudio/decodercdaudiofactory.cpp @@ -44,7 +44,7 @@ const DecoderProperties DecoderCDAudioFactory::properties() const DecoderProperties properties; properties.name = tr("CD Audio Plugin"); properties.shortName = "cdaudio"; - properties.protocols = "cdda"; + properties.protocols << "cdda"; properties.hasAbout = true; properties.noInput = true; properties.hasSettings = true; diff --git a/src/plugins/Input/cue/decodercuefactory.cpp b/src/plugins/Input/cue/decodercuefactory.cpp index 9a36cc948..a9924fd7e 100644 --- a/src/plugins/Input/cue/decodercuefactory.cpp +++ b/src/plugins/Input/cue/decodercuefactory.cpp @@ -43,10 +43,10 @@ const DecoderProperties DecoderCUEFactory::properties() const DecoderProperties properties; properties.name = tr("CUE Plugin"); properties.shortName = "cue"; - properties.filter = "*.cue"; + properties.filters << "*.cue"; properties.description = tr("CUE Files"); //properties.contentType = "application/ogg;audio/x-vorbis+ogg"; - properties.protocols = "cue"; + properties.protocols << "cue"; properties.hasAbout = true; properties.hasSettings = true; properties.noInput = true; diff --git a/src/plugins/Input/ffmpeg/decoderffmpegfactory.cpp b/src/plugins/Input/ffmpeg/decoderffmpegfactory.cpp index 2e6f163a1..d126d714b 100644 --- a/src/plugins/Input/ffmpeg/decoderffmpegfactory.cpp +++ b/src/plugins/Input/ffmpeg/decoderffmpegfactory.cpp @@ -51,14 +51,7 @@ extern "C" bool DecoderFFmpegFactory::supports(const QString &source) const { - QSettings settings(Qmmp::configFile(), QSettings::IniFormat); - QStringList filters; - filters << "*.wma" << "*.ape"; -#if (LIBAVCODEC_VERSION_INT >= ((52<<16)+(20<<8)+0)) - filters << "*.shn"; -#endif - filters = settings.value("FFMPEG/filters", filters).toStringList(); - foreach(QString filter, filters) + foreach(QString filter, properties().filters) { QRegExp regexp(filter, Qt::CaseInsensitive, QRegExp::Wildcard); if (regexp.exactMatch(source)) @@ -70,17 +63,7 @@ bool DecoderFFmpegFactory::supports(const QString &source) const bool DecoderFFmpegFactory::canDecode(QIODevice *i) const { av_register_all(); - QSettings settings(Qmmp::configFile(), QSettings::IniFormat); - QStringList filters; -#if (LIBAVCODEC_VERSION_INT >= ((51<<16)+(44<<8)+0)) - filters << "*.wma" << "*.ape"; -#else - filters << "*.wma"; -#endif -#if (LIBAVCODEC_VERSION_INT >= ((52<<16)+(20<<8)+0)) - filters << "*.shn"; -#endif - filters = settings.value("FFMPEG/filters", filters).toStringList(); + QStringList filters = properties().filters; AVProbeData pd; uint8_t buf[8192 + AVPROBE_PADDING_SIZE]; @@ -119,19 +102,21 @@ const DecoderProperties DecoderFFmpegFactory::properties() const filters = settings.value("FFMPEG/filters", filters).toStringList(); DecoderProperties properties; properties.name = tr("FFmpeg Plugin"); - properties.filter = filters.join(" "); + properties.filters = filters; properties.description = tr("FFmpeg Formats"); if(filters.contains("*.wma")) - properties.contentType += "audio/x-ms-wma"; + properties.contentTypes << "audio/x-ms-wma"; if(filters.contains("*.mp3")) - properties.contentType += " audio/mpeg"; + properties.contentTypes << "audio/mpeg"; if(filters.contains("*.aac")) - properties.contentType += " audio/aac audio/aacp"; + properties.contentTypes << "audio/aac" << "audio/aacp"; if(filters.contains("*.m4a")) - properties.contentType += " audio/x-ffmpeg-shorten"; + properties.contentTypes << "audio/x-ffmpeg-shorten"; if(filters.contains("*.shn")) - properties.contentType += " audio/3gpp audio/3gpp2 audio/mp4 audio/MP4A-LATM audio/mpeg4-generic"; - properties.contentType = properties.contentType.trimmed(); + { + properties.contentTypes << "audio/3gpp" << "audio/3gpp2" << "audio/mp4"; + properties.contentTypes << "audio/MP4A-LATM" << "audio/mpeg4-generic"; + } properties.shortName = "ffmpeg"; properties.hasAbout = true; properties.hasSettings = true; diff --git a/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_cs.ts b/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_cs.ts index 4adbe0c51..5b1181810 100644 --- a/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_cs.ts +++ b/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_cs.ts @@ -4,32 +4,32 @@ DecoderFFmpegFactory - + About FFmpeg Audio Plugin O modulu FFmpeg - + Qmmp FFmpeg Audio Plugin Vstupní modul Qmmp FFmpeg - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Autor: Ilja Kotov <forkotov02@hotmail.ru> - + FFmpeg Plugin Modul FFmpeg - + FFmpeg Formats Formáty FFmpeg - + Compiled against libavformat-%1.%2.%3 and libavcodec-%4.%5.%6 Přeloženo s libavformat-%1.%2.%3 a libavcodec-%4.%5.%6 diff --git a/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_de.ts b/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_de.ts index 40847013e..d4a9c3a68 100644 --- a/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_de.ts +++ b/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_de.ts @@ -4,32 +4,32 @@ DecoderFFmpegFactory - + About FFmpeg Audio Plugin Über FFmpeg-Audio-Modul - + Qmmp FFmpeg Audio Plugin Qmmp FFmpeg-Audio-Modul - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Autor: Ilya Kotov <forkotov02@hotmail.ru> - + FFmpeg Plugin FFmpeg-Modul - + FFmpeg Formats FFmpeg-Formate - + Compiled against libavformat-%1.%2.%3 and libavcodec-%4.%5.%6 Kompiliert gegen libavformat-%1.%2.%3 und libavcodec-%4.%5.%6 diff --git a/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_es.ts b/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_es.ts index d125f74c9..d344c0044 100644 --- a/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_es.ts +++ b/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_es.ts @@ -4,32 +4,32 @@ DecoderFFmpegFactory - + About FFmpeg Audio Plugin Acerca del módulo de audio FFmpeg - + Qmmp FFmpeg Audio Plugin Módulo de audio FFmpeg para Qmmp - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Escrito por: Ilya Kotov <forkotov02@hotmail.ru> - + FFmpeg Plugin Módulo FFmpeg - + FFmpeg Formats Formatos FFmpeg - + Compiled against libavformat-%1.%2.%3 and libavcodec-%4.%5.%6 Compilado con libavformat-%1.%2.%3 y libavcodec-%4.%5.%6 diff --git a/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_it.ts b/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_it.ts index 100fc434f..2028baee5 100644 --- a/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_it.ts +++ b/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_it.ts @@ -4,32 +4,32 @@ DecoderFFmpegFactory - + About FFmpeg Audio Plugin Info sul modulo audi FFmpeg - + Qmmp FFmpeg Audio Plugin Modulo audio FFmpeg per Qmmp - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Autore: Ilya Kotov <forkotov02@hotmail.ru> - + FFmpeg Plugin Modulo FFmpeg - + FFmpeg Formats Formati FFmpeg - + Compiled against libavformat-%1.%2.%3 and libavcodec-%4.%5.%6 Compilato con libavformat-%1.%2.%3 e libavcodec-%4.%5.%6 diff --git a/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_ja.ts b/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_ja.ts index 652c4feb3..a0f658c29 100644 --- a/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_ja.ts +++ b/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_ja.ts @@ -4,32 +4,32 @@ DecoderFFmpegFactory - + FFmpeg Plugin FFmpeg プラグイン - + FFmpeg Formats FFmpeg 用の形式 - + About FFmpeg Audio Plugin FFmpeg 音響プラグインについて - + Qmmp FFmpeg Audio Plugin QMMP FFmpeg 音響プラグイン - + Compiled against libavformat-%1.%2.%3 and libavcodec-%4.%5.%6 libavformat-%1.%2.%3 と libavcodec-%4.%5.%6 対応でコンパイル - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> 制作: Илья Котов (Ilya Kotov) <forkotov02@hotmail.ru> diff --git a/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_lt.ts b/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_lt.ts index 9d29c08ec..fe9cbc272 100644 --- a/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_lt.ts +++ b/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_lt.ts @@ -4,32 +4,32 @@ DecoderFFmpegFactory - + About FFmpeg Audio Plugin Apie FFmpeg įskiepį - + Qmmp FFmpeg Audio Plugin FFmpeg Qmmp audio įskiepis - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Sukūrė: Ilya Kotov <forkotov02@hotmail.ru> - + FFmpeg Plugin FFmpeg įskiepis - + FFmpeg Formats FFmpeg bylų tipai - + Compiled against libavformat-%1.%2.%3 and libavcodec-%4.%5.%6 Surinkta iš libavformat-%1.%2.%3 ir libavcodec-%4.%5.%6 diff --git a/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_nl.ts b/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_nl.ts index ffe94687c..a21bcdbd7 100644 --- a/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_nl.ts +++ b/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_nl.ts @@ -4,32 +4,32 @@ DecoderFFmpegFactory - + About FFmpeg Audio Plugin Over de FFmpeg Audio Module - + Qmmp FFmpeg Audio Plugin FFmpeg Audio Module voor Qmmp - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Auteur: Ilya Kotov <forkotov02@hotmail.ru> - + FFmpeg Plugin FFmpeg Module - + FFmpeg Formats FFmpeg Formaat - + Compiled against libavformat-%1.%2.%3 and libavcodec-%4.%5.%6 Gebouwd tegen libavformat-%1.%2.%3 en libavcodec-%4.%5.%6 diff --git a/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_pl.ts b/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_pl.ts index 3b4f6b7bb..1486420e5 100644 --- a/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_pl.ts +++ b/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_pl.ts @@ -4,32 +4,32 @@ DecoderFFmpegFactory - + FFmpeg Plugin Wtyczka FFMPEG - + FFmpeg Formats Formaty FFmpeg - + About FFmpeg Audio Plugin O wtyczce FFmpeg Audio - + Qmmp FFmpeg Audio Plugin Wtyczka FFmpeg Audio dla Qmmp - + Compiled against libavformat-%1.%2.%3 and libavcodec-%4.%5.%6 Skompilowane przy użyciu libavformat-%1.%2.%3 i libavcodec-%4.%5.%6 - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Autor: Ilja Kotov <forkotov02@hotmail.ru> diff --git a/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_ru.ts b/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_ru.ts index dfaee7c45..ad4a27b9e 100644 --- a/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_ru.ts +++ b/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_ru.ts @@ -4,32 +4,32 @@ DecoderFFmpegFactory - + About FFmpeg Audio Plugin Об аудио-модуле FFmpeg - + Qmmp FFmpeg Audio Plugin Аудио-модуль FFmpeg для Qmmp - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Разработчик: Илья Котов <forkotov02@hotmail.ru> - + FFmpeg Plugin Модуль FFmpeg - + FFmpeg Formats Форматы FFmpeg - + Compiled against libavformat-%1.%2.%3 and libavcodec-%4.%5.%6 Собрано с libavformat-%1.%2.%3 и libavcodec-%4.%5.%6 diff --git a/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_tr.ts b/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_tr.ts index b70442464..74ee59da3 100644 --- a/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_tr.ts +++ b/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_tr.ts @@ -4,32 +4,32 @@ DecoderFFmpegFactory - + FFmpeg Plugin FFmpeg Eklentisi - + FFmpeg Formats FFmpeg Biçimleri - + About FFmpeg Audio Plugin FFmpeg Ses Eklentisi Hakkında - + Qmmp FFmpeg Audio Plugin Qmmp FFmpeg Ses Eklentisi - + Compiled against libavformat-%1.%2.%3 and libavcodec-%4.%5.%6 libavformat-%1.%2.%3 ve libavcodec-%4.%5.%6 ile derlenmiştir - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Yazan: Ilya Kotov <forkotov02@hotmail.ru> diff --git a/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_uk_UA.ts b/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_uk_UA.ts index 9afeaef0f..d7307bb04 100644 --- a/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_uk_UA.ts +++ b/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_uk_UA.ts @@ -4,32 +4,32 @@ DecoderFFmpegFactory - + About FFmpeg Audio Plugin Про аудіо-модуль FFmpeg - + Qmmp FFmpeg Audio Plugin Аудіо-модуль FFmpeg для Qmmp - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Розробник: Ілля Котов <forkotov02@hotmail.ru> - + FFmpeg Plugin Модуль FFmpeg - + FFmpeg Formats Формати FFmpeg - + Compiled against libavformat-%1.%2.%3 and libavcodec-%4.%5.%6 Зібрано з libavformat-%1.%2.%3 та libavcodec-%4.%5.%6 diff --git a/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_zh_CN.ts b/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_zh_CN.ts index 5a169595f..729e63a4b 100644 --- a/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_zh_CN.ts +++ b/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_zh_CN.ts @@ -4,32 +4,32 @@ DecoderFFmpegFactory - + About FFmpeg Audio Plugin 关于 FFmpeg 音频插件 - + Qmmp FFmpeg Audio Plugin Qmmp FFmpeg 音频插件 - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> 作者:Ilya Kotov <forkotov02@hotmail.ru> - + FFmpeg Plugin FFmpeg 插件 - + FFmpeg Formats FFmpeg 格式 - + Compiled against libavformat-%1.%2.%3 and libavcodec-%4.%5.%6 编译依赖 libavformat-%1.%2.%3 和 libavcodec-%4.%5.%6 diff --git a/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_zh_TW.ts b/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_zh_TW.ts index c181cd093..bdf67ec98 100644 --- a/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_zh_TW.ts +++ b/src/plugins/Input/ffmpeg/translations/ffmpeg_plugin_zh_TW.ts @@ -4,32 +4,32 @@ DecoderFFmpegFactory - + About FFmpeg Audio Plugin 關於 FFmpeg 聲訊插件 - + Qmmp FFmpeg Audio Plugin Qmmp FFmpeg 聲訊插件 - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> 作者:Ilya Kotov <forkotov02@hotmail.ru> - + FFmpeg Plugin FFmpeg 插件 - + FFmpeg Formats FFmpeg 格式 - + Compiled against libavformat-%1.%2.%3 and libavcodec-%4.%5.%6 編譯依賴 libavformat-%1.%2.%3 與 libavcodec-%4.%5.%6 diff --git a/src/plugins/Input/flac/decoderflacfactory.cpp b/src/plugins/Input/flac/decoderflacfactory.cpp index f6ac9fdd8..33e97d1b4 100644 --- a/src/plugins/Input/flac/decoderflacfactory.cpp +++ b/src/plugins/Input/flac/decoderflacfactory.cpp @@ -49,11 +49,11 @@ const DecoderProperties DecoderFLACFactory::properties() const { DecoderProperties properties; properties.name = tr("FLAC Plugin"); - properties.filter = "*.flac *.oga"; + properties.filters << "*.flac" << "*.oga"; properties.description = tr("FLAC Files"); //properties.contentType = ; properties.shortName = "flac"; - properties.protocols = "flac"; + properties.protocols << "flac"; properties.hasAbout = true; properties.hasSettings = false; return properties; diff --git a/src/plugins/Input/gme/decodergmefactory.cpp b/src/plugins/Input/gme/decodergmefactory.cpp index 120a3cf61..e9a9a37ca 100644 --- a/src/plugins/Input/gme/decodergmefactory.cpp +++ b/src/plugins/Input/gme/decodergmefactory.cpp @@ -19,6 +19,7 @@ ***************************************************************************/ #include +#include #include #include "gmehelper.h" #include "decoder_gme.h" @@ -28,13 +29,12 @@ bool DecoderGmeFactory::supports(const QString &source) const { - QString lExt = source.section(".",-1).toLower(); - lExt.prepend("."); - QStringList lExtList; - lExtList << ".ay" << ".gms" << ".gym" << ".hes" << ".kss" << ".nsf" << ".nsfe" << ".sap" << ".spc" - << ".vgm" << ".vgz"; - if (lExtList.contains(lExt)) - return true; + foreach(QString filter, properties().filters) + { + QRegExp regexp(filter, Qt::CaseInsensitive, QRegExp::Wildcard); + if (regexp.exactMatch(source)) + return true; + } return false; } @@ -47,14 +47,15 @@ const DecoderProperties DecoderGmeFactory::properties() const { DecoderProperties properties; properties.name = tr("GME Plugin"); - properties.filter = QString("*.ay *.gms *.gym *.hes *.kss *.nsf *.nsfe *.sap *.spc *.vgm *.vgz"); + properties.filters << "*.ay" << "*.gms" << "*.gym" << "*.hes" << "*.kss" << "*.nsf" << "*.nsfe"; + properties.filters << "*.sap" << "*.spc" << "*.vgm" << "*.vgz"; properties.description = tr("Game Music Files"); //properties.contentType = ; properties.shortName = "gme"; properties.hasAbout = true; properties.hasSettings = false; properties.noInput = true; - properties.protocols = "gme"; + properties.protocols << "gme"; return properties; } diff --git a/src/plugins/Input/gme/translations/gme_plugin_cs.ts b/src/plugins/Input/gme/translations/gme_plugin_cs.ts index ee88b1667..681061c4f 100644 --- a/src/plugins/Input/gme/translations/gme_plugin_cs.ts +++ b/src/plugins/Input/gme/translations/gme_plugin_cs.ts @@ -9,27 +9,27 @@ - + Game Music Files - + About GME Audio Plugin - + Qmmp GME Audio Plugin - + This plugin uses Game_Music_Emu library to play game music files - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Autor: Ilja Kotov <forkotov02@hotmail.ru> diff --git a/src/plugins/Input/gme/translations/gme_plugin_de.ts b/src/plugins/Input/gme/translations/gme_plugin_de.ts index 25c602f21..b01326a42 100644 --- a/src/plugins/Input/gme/translations/gme_plugin_de.ts +++ b/src/plugins/Input/gme/translations/gme_plugin_de.ts @@ -9,27 +9,27 @@ - + Game Music Files - + About GME Audio Plugin - + Qmmp GME Audio Plugin - + This plugin uses Game_Music_Emu library to play game music files - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Autor: Ilya Kotov <forkotov02@hotmail.ru> diff --git a/src/plugins/Input/gme/translations/gme_plugin_it.ts b/src/plugins/Input/gme/translations/gme_plugin_it.ts index d97083f69..c206a2f4c 100644 --- a/src/plugins/Input/gme/translations/gme_plugin_it.ts +++ b/src/plugins/Input/gme/translations/gme_plugin_it.ts @@ -9,27 +9,27 @@ - + Game Music Files - + About GME Audio Plugin - + Qmmp GME Audio Plugin - + This plugin uses Game_Music_Emu library to play game music files - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Autore: Ilya Kotov <forkotov02@hotmail.ru> diff --git a/src/plugins/Input/gme/translations/gme_plugin_ja.ts b/src/plugins/Input/gme/translations/gme_plugin_ja.ts index cf53f3e03..273b23c13 100644 --- a/src/plugins/Input/gme/translations/gme_plugin_ja.ts +++ b/src/plugins/Input/gme/translations/gme_plugin_ja.ts @@ -9,27 +9,27 @@ GME プラグイン - + Game Music Files ゲーム音楽ファイル - + About GME Audio Plugin GME 音響プラグインについて - + Qmmp GME Audio Plugin QMMP 用 GME 音響プラグイン - + This plugin uses Game_Music_Emu library to play game music files このプラグインは Game_Music_Emu ライブラリを用いてゲーム音楽ファイルを再生します。 - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> 制作: Илья Котов (Ilya Kotov) <forkotov02@hotmail.ru> diff --git a/src/plugins/Input/gme/translations/gme_plugin_lt.ts b/src/plugins/Input/gme/translations/gme_plugin_lt.ts index a75b279ce..c4ecea22c 100644 --- a/src/plugins/Input/gme/translations/gme_plugin_lt.ts +++ b/src/plugins/Input/gme/translations/gme_plugin_lt.ts @@ -9,27 +9,27 @@ - + Game Music Files - + About GME Audio Plugin - + Qmmp GME Audio Plugin - + This plugin uses Game_Music_Emu library to play game music files - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Sukūrė: Ilya Kotov <forkotov02@hotmail.ru> diff --git a/src/plugins/Input/gme/translations/gme_plugin_nl.ts b/src/plugins/Input/gme/translations/gme_plugin_nl.ts index a7c65f0cf..0264a87f2 100644 --- a/src/plugins/Input/gme/translations/gme_plugin_nl.ts +++ b/src/plugins/Input/gme/translations/gme_plugin_nl.ts @@ -9,27 +9,27 @@ - + Game Music Files - + About GME Audio Plugin - + Qmmp GME Audio Plugin - + This plugin uses Game_Music_Emu library to play game music files - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Auteur: Ilya Kotov <forkotov02@hotmail.ru> diff --git a/src/plugins/Input/gme/translations/gme_plugin_pl.ts b/src/plugins/Input/gme/translations/gme_plugin_pl.ts index d8c4e1933..02d3343c2 100644 --- a/src/plugins/Input/gme/translations/gme_plugin_pl.ts +++ b/src/plugins/Input/gme/translations/gme_plugin_pl.ts @@ -9,27 +9,27 @@ Wtyczka GME - + Game Music Files Game Music Files - + About GME Audio Plugin O wtyczce dźwiękowej GME - + Qmmp GME Audio Plugin Wtyczka dźwiękowa GME dla Qmmp - + This plugin uses Game_Music_Emu library to play game music files Ta wtyczka używa biblioteki Game_Music_Emu do odtwarzania plików muzycznych z gier - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Autor: Ilja Kotov <forkotov02@hotmail.ru> diff --git a/src/plugins/Input/gme/translations/gme_plugin_ru.ts b/src/plugins/Input/gme/translations/gme_plugin_ru.ts index d5508a970..dcfef1691 100644 --- a/src/plugins/Input/gme/translations/gme_plugin_ru.ts +++ b/src/plugins/Input/gme/translations/gme_plugin_ru.ts @@ -9,27 +9,27 @@ Модуль GME - + Game Music Files Программы звукогенераторов - + About GME Audio Plugin Об аудио-модуле GME - + Qmmp GME Audio Plugin Аудио-модуль GME для Qmmp - + This plugin uses Game_Music_Emu library to play game music files Для воспроизведения используется библиотека Game_Music_Emu - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Разработчик: Илья Котов <forkotov02@hotmail.ru> diff --git a/src/plugins/Input/gme/translations/gme_plugin_tr.ts b/src/plugins/Input/gme/translations/gme_plugin_tr.ts index f6fd2e991..63bfe53f9 100644 --- a/src/plugins/Input/gme/translations/gme_plugin_tr.ts +++ b/src/plugins/Input/gme/translations/gme_plugin_tr.ts @@ -9,27 +9,27 @@ - + Game Music Files - + About GME Audio Plugin - + Qmmp GME Audio Plugin - + This plugin uses Game_Music_Emu library to play game music files - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Yazan: Ilya Kotov <forkotov02@hotmail.ru> diff --git a/src/plugins/Input/gme/translations/gme_plugin_uk_UA.ts b/src/plugins/Input/gme/translations/gme_plugin_uk_UA.ts index 942a8fcc6..113dc73dd 100644 --- a/src/plugins/Input/gme/translations/gme_plugin_uk_UA.ts +++ b/src/plugins/Input/gme/translations/gme_plugin_uk_UA.ts @@ -9,27 +9,27 @@ Модуль GME - + Game Music Files Програми звукогенераторів - + About GME Audio Plugin Про аудіо-модуль GME - + Qmmp GME Audio Plugin Аудіо-модуль GME для Qmmp - + This plugin uses Game_Music_Emu library to play game music files Для відтворення використовується бібліотека Game_Music_Emu - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Розробник: Ілля Котов <forkotov02@hotmail.ru> diff --git a/src/plugins/Input/gme/translations/gme_plugin_zh_CN.ts b/src/plugins/Input/gme/translations/gme_plugin_zh_CN.ts index ad54efe84..d3240cad4 100644 --- a/src/plugins/Input/gme/translations/gme_plugin_zh_CN.ts +++ b/src/plugins/Input/gme/translations/gme_plugin_zh_CN.ts @@ -9,27 +9,27 @@ - + Game Music Files - + About GME Audio Plugin - + Qmmp GME Audio Plugin - + This plugin uses Game_Music_Emu library to play game music files - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> 作者:Ilya Kotov <forkotov02@hotmail.ru> diff --git a/src/plugins/Input/gme/translations/gme_plugin_zh_TW.ts b/src/plugins/Input/gme/translations/gme_plugin_zh_TW.ts index 8e1ec40fd..88b2327a6 100644 --- a/src/plugins/Input/gme/translations/gme_plugin_zh_TW.ts +++ b/src/plugins/Input/gme/translations/gme_plugin_zh_TW.ts @@ -9,27 +9,27 @@ - + Game Music Files - + About GME Audio Plugin - + Qmmp GME Audio Plugin - + This plugin uses Game_Music_Emu library to play game music files - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> 作者:Ilya Kotov <forkotov02@hotmail.ru> diff --git a/src/plugins/Input/mad/decodermadfactory.cpp b/src/plugins/Input/mad/decodermadfactory.cpp index 3e38cb4b0..39f31d9da 100644 --- a/src/plugins/Input/mad/decodermadfactory.cpp +++ b/src/plugins/Input/mad/decodermadfactory.cpp @@ -55,6 +55,7 @@ bool DecoderMADFactory::supports(const QString &source) const return true; } } + qDebug("false"); return false; } @@ -86,9 +87,9 @@ const DecoderProperties DecoderMADFactory::properties() const DecoderProperties properties; properties.name = tr("MPEG Plugin"); properties.shortName = "mad"; - properties.filter = "*.mp1 *.mp2 *.mp3 *.wav"; + properties.filters << "*.mp1" << "*.mp2" << "*.mp3" << "*.wav"; properties.description = tr("MPEG Files"); - properties.contentType = "audio/mp3;audio/mpeg"; + properties.contentTypes << "audio/mp3" << "audio/mpeg"; properties.hasAbout = true; properties.hasSettings = true; return properties; diff --git a/src/plugins/Input/mad/translations/mad_plugin_cs.ts b/src/plugins/Input/mad/translations/mad_plugin_cs.ts index 8995478b6..40418073b 100644 --- a/src/plugins/Input/mad/translations/mad_plugin_cs.ts +++ b/src/plugins/Input/mad/translations/mad_plugin_cs.ts @@ -4,37 +4,37 @@ DecoderMADFactory - + MPEG Plugin Modul MPEG - + MPEG Files Soubory MPEG - + About MPEG Audio Plugin O modulu MPEG - + Qmmp MPEG Audio Plugin Vstupní modul Qmmp MPEG - + Compiled against libmad version: Zkompilováno s libmad verze: - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Autor: Ilja Kotov <forkotov02@hotmail.ru> - + Source code based on mq3 progect Zdrojový kód je založen na projektu mq3 diff --git a/src/plugins/Input/mad/translations/mad_plugin_de.ts b/src/plugins/Input/mad/translations/mad_plugin_de.ts index 484649853..d9cbae94d 100644 --- a/src/plugins/Input/mad/translations/mad_plugin_de.ts +++ b/src/plugins/Input/mad/translations/mad_plugin_de.ts @@ -4,37 +4,37 @@ DecoderMADFactory - + MPEG Plugin MPEG-Modul - + MPEG Files MPEG-Dateien - + About MPEG Audio Plugin Über MPEG-Audio-Modul - + Qmmp MPEG Audio Plugin Qmmp MPEG-Audio-Modul - + Compiled against libmad version: Kompiliert gegen libmad-Version: - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Autor: Ilya Kotov <forkotov02@hotmail.ru> - + Source code based on mq3 progect Quellcode basiert auf dem mq3-Projekt diff --git a/src/plugins/Input/mad/translations/mad_plugin_es.ts b/src/plugins/Input/mad/translations/mad_plugin_es.ts index b41232e7b..0fa603efe 100644 --- a/src/plugins/Input/mad/translations/mad_plugin_es.ts +++ b/src/plugins/Input/mad/translations/mad_plugin_es.ts @@ -4,37 +4,37 @@ DecoderMADFactory - + MPEG Plugin Módulo MPEG - + MPEG Files Archivos MPEG - + About MPEG Audio Plugin Acerca del módulo de audio MPEG - + Qmmp MPEG Audio Plugin Módulo de audio MPEG para Qmmp - + Compiled against libmad version: Compilado con libmad version: - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Escrito por: Ilya Kotov <forkotov02@hotmail.ru> - + Source code based on mq3 progect Código basado en el proyecto mq3 diff --git a/src/plugins/Input/mad/translations/mad_plugin_it.ts b/src/plugins/Input/mad/translations/mad_plugin_it.ts index d1a502d09..a0cf71b34 100644 --- a/src/plugins/Input/mad/translations/mad_plugin_it.ts +++ b/src/plugins/Input/mad/translations/mad_plugin_it.ts @@ -4,37 +4,37 @@ DecoderMADFactory - + MPEG Plugin Modulo MPEG - + MPEG Files Brani MPEG - + About MPEG Audio Plugin Info sul modulo audio MPEG - + Qmmp MPEG Audio Plugin Modulo audio MPEG per Qmmp - + Compiled against libmad version: Compilato con libmad-Version: - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Autore: Ilya Kotov <forkotov02@hotmail.ru> - + Source code based on mq3 progect Codice sorgente basato sul progetto mq3 diff --git a/src/plugins/Input/mad/translations/mad_plugin_ja.ts b/src/plugins/Input/mad/translations/mad_plugin_ja.ts index 9fbf16a70..a07394048 100644 --- a/src/plugins/Input/mad/translations/mad_plugin_ja.ts +++ b/src/plugins/Input/mad/translations/mad_plugin_ja.ts @@ -4,37 +4,37 @@ DecoderMADFactory - + MPEG Plugin MPEG プラグイン - + MPEG Files MPEG ファイル - + About MPEG Audio Plugin MPEG 音響プラグインについて - + Qmmp MPEG Audio Plugin QMMP MPEG 音響プラグイン - + Compiled against libmad version: コンパイル時に使われた libmad の版はつぎのとおり: - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> 制作: Илья Котов (Ilya Kotov) <forkotov02@hotmail.ru> - + Source code based on mq3 progect ソースコードは MP3 プロジェクトより流用 diff --git a/src/plugins/Input/mad/translations/mad_plugin_lt.ts b/src/plugins/Input/mad/translations/mad_plugin_lt.ts index d387ae0fc..e19d228b6 100644 --- a/src/plugins/Input/mad/translations/mad_plugin_lt.ts +++ b/src/plugins/Input/mad/translations/mad_plugin_lt.ts @@ -4,37 +4,37 @@ DecoderMADFactory - + MPEG Plugin MPEG įskiepis - + MPEG Files MPEG bylos - + About MPEG Audio Plugin Apie MPEG audio įskiepį - + Qmmp MPEG Audio Plugin Qmmp MPEG įskiepis - + Compiled against libmad version: Sukurta libmad pagrindu: - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Sukūrė: Ilya Kotov <forkotov02@hotmail.ru> - + Source code based on mq3 progect Išvesties kodas sukurtas mq3 pagrindu diff --git a/src/plugins/Input/mad/translations/mad_plugin_nl.ts b/src/plugins/Input/mad/translations/mad_plugin_nl.ts index 6bfc1cc76..78464ace2 100644 --- a/src/plugins/Input/mad/translations/mad_plugin_nl.ts +++ b/src/plugins/Input/mad/translations/mad_plugin_nl.ts @@ -4,37 +4,37 @@ DecoderMADFactory - + MPEG Plugin MPEG Module - + MPEG Files MPEG Bestanden - + About MPEG Audio Plugin Over de MPEG Audio Module - + Qmmp MPEG Audio Plugin MPEG Audio Module voor Qmmp - + Compiled against libmad version: Gebouwd tegen libmad versie: - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Auteur: Ilya Kotov <forkotov02@hotmail.ru> - + Source code based on mq3 progect Broncode gebasseerd op het 'mq3 project' diff --git a/src/plugins/Input/mad/translations/mad_plugin_pl.ts b/src/plugins/Input/mad/translations/mad_plugin_pl.ts index 586d613cc..01fc93e09 100644 --- a/src/plugins/Input/mad/translations/mad_plugin_pl.ts +++ b/src/plugins/Input/mad/translations/mad_plugin_pl.ts @@ -4,37 +4,37 @@ DecoderMADFactory - + MPEG Plugin Wtyczka MPEG - + MPEG Files Pliki MPEG - + About MPEG Audio Plugin O wtyczce Audio MPEG - + Qmmp MPEG Audio Plugin Wtyczka MPEG Audio dla Qmmp - + Compiled against libmad version: Skompilowane przy użyciu biblioteki libmad w wersji: - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Autor: Ilja Kotov <forkotov02@hotmail.ru> - + Source code based on mq3 progect Kod źródłowy oparty na projekcie mq3 diff --git a/src/plugins/Input/mad/translations/mad_plugin_ru.ts b/src/plugins/Input/mad/translations/mad_plugin_ru.ts index 73d95047a..bc1a3b5aa 100644 --- a/src/plugins/Input/mad/translations/mad_plugin_ru.ts +++ b/src/plugins/Input/mad/translations/mad_plugin_ru.ts @@ -4,37 +4,37 @@ DecoderMADFactory - + MPEG Plugin Модуль MPEG - + MPEG Files Файлы MPEG - + About MPEG Audio Plugin Об аудио-модуле MPEG - + Qmmp MPEG Audio Plugin Аудио-модуль MPEG для Qmmp - + Compiled against libmad version: Собрано с версией libmad: - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Разработчик: Илья Котов <forkotov02@hotmail.ru> - + Source code based on mq3 progect Исходный код основан на проекте mq3 diff --git a/src/plugins/Input/mad/translations/mad_plugin_tr.ts b/src/plugins/Input/mad/translations/mad_plugin_tr.ts index 0c37533a7..b3285e437 100644 --- a/src/plugins/Input/mad/translations/mad_plugin_tr.ts +++ b/src/plugins/Input/mad/translations/mad_plugin_tr.ts @@ -4,37 +4,37 @@ DecoderMADFactory - + MPEG Plugin MPEG Eklentisi - + MPEG Files MPEG Dosyaları - + About MPEG Audio Plugin MPEG Ses Eklentisi Hakkında - + Qmmp MPEG Audio Plugin Qmmp MPEG Ses Eklentisi - + Compiled against libmad version: Derlendiği libmad sürümü: - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Yazan: Ilya Kotov <forkotov02@hotmail.ru> - + Source code based on mq3 progect Kaynak kodu mq3 projesi temellidir diff --git a/src/plugins/Input/mad/translations/mad_plugin_uk_UA.ts b/src/plugins/Input/mad/translations/mad_plugin_uk_UA.ts index 67ad78a3e..c553c6015 100644 --- a/src/plugins/Input/mad/translations/mad_plugin_uk_UA.ts +++ b/src/plugins/Input/mad/translations/mad_plugin_uk_UA.ts @@ -4,37 +4,37 @@ DecoderMADFactory - + MPEG Plugin Модуль MPEG - + MPEG Files Файли MPEG - + About MPEG Audio Plugin Про аудіо-модуль MPEG - + Qmmp MPEG Audio Plugin Аудіо-модуль MPEG для Qmmp - + Compiled against libmad version: Зібрано з версією libmad: - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Розробник: Ілля Котов <forkotov02@hotmail.ru> - + Source code based on mq3 progect Вихідний код базується на проекті mq3 diff --git a/src/plugins/Input/mad/translations/mad_plugin_zh_CN.ts b/src/plugins/Input/mad/translations/mad_plugin_zh_CN.ts index 53dba5050..41bd1494b 100644 --- a/src/plugins/Input/mad/translations/mad_plugin_zh_CN.ts +++ b/src/plugins/Input/mad/translations/mad_plugin_zh_CN.ts @@ -4,37 +4,37 @@ DecoderMADFactory - + MPEG Plugin MPEG 插件 - + MPEG Files MPEG 文件 - + About MPEG Audio Plugin 关于 MPEG 音频插件 - + Qmmp MPEG Audio Plugin Qmmp MPEG 音频插件 - + Compiled against libmad version: 编译基于 libmad 的版本: - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> 作者:Ilya Kotov <forkotov02@hotmail.ru> - + Source code based on mq3 progect 源代码基于 mq3 项目 diff --git a/src/plugins/Input/mad/translations/mad_plugin_zh_TW.ts b/src/plugins/Input/mad/translations/mad_plugin_zh_TW.ts index d39a2047a..8a0912314 100644 --- a/src/plugins/Input/mad/translations/mad_plugin_zh_TW.ts +++ b/src/plugins/Input/mad/translations/mad_plugin_zh_TW.ts @@ -4,37 +4,37 @@ DecoderMADFactory - + MPEG Plugin MPEG 插件 - + MPEG Files MPEG 檔案 - + About MPEG Audio Plugin 關於 MPEG 聲訊插件 - + Qmmp MPEG Audio Plugin Qmmp MPEG 聲訊插件 - + Compiled against libmad version: 編譯基於 libmad 的版本: - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> 作者:Ilya Kotov <forkotov02@hotmail.ru> - + Source code based on mq3 progect 源碼基於 mq3 項目 diff --git a/src/plugins/Input/modplug/decodermodplugfactory.cpp b/src/plugins/Input/modplug/decodermodplugfactory.cpp index bc80f549d..d5ed95e4b 100644 --- a/src/plugins/Input/modplug/decodermodplugfactory.cpp +++ b/src/plugins/Input/modplug/decodermodplugfactory.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008 by Ilya Kotov * + * Copyright (C) 2008-2010 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -20,11 +20,10 @@ #include #include - +#include #include #include #include - #include "settingsdialog.h" #include "modplugmetadatamodel.h" #include "decoder_modplug.h" @@ -36,16 +35,12 @@ bool DecoderModPlugFactory::supports(const QString &source) const { - QString lExt = source.section(".",-1).toLower(); - lExt.prepend("."); - QStringList lExtList; - lExtList << ".amf" << ".ams" << ".dbm" << ".dbf" << ".dsm" << ".far" << ".mdl" - << ".stm" << ".ult" << ".ult" << ".j2b" << ".mt2" << ".mdz" /*<< ".mdr"*/ << ".mdgz" - << ".mdbz" << ".mod" << ".s3z" << /*".s3r" <<*/ ".s3gz" << ".s3m" << ".xmz" /*<< ".xmr"*/ - << ".xmgz" << ".itz" << /*".itr" <<*/ ".itgz" << ".dmf" << ".umx" << ".it" << ".669" - << ".xm" << ".mtm" << ".psm" << ".ft2"; - if (lExtList.contains(lExt)) - return true; + foreach(QString filter, properties().filters) + { + QRegExp regexp(filter, Qt::CaseInsensitive, QRegExp::Wildcard); + if (regexp.exactMatch(source)) + return true; + } return false; } @@ -58,16 +53,18 @@ const DecoderProperties DecoderModPlugFactory::properties() const { DecoderProperties properties; properties.name = tr("ModPlug Plugin"); - properties.filter = (QString) "*.amf *.ams *.dbm *.dbf *.dsm *.far *.mdl *.stm *.ult" + - "*.j2b *.mt2 *.mdz *.mdr *.mdgz *.mdbz *.mod *.s3z *.s3r *.s3gz *.s3m *.xmz"+ - "*.xmr *.xmgz *.itz *.itr *.itgz *.dmf *.umx *.it *.669 *.xm *.mtm *.psm *.ft2"; + properties.filters << "*.amf" << "*.ams" << "*.dbm" << "*.dbf" << "*.dsm" << "*.far" << "*.mdl"; + properties.filters << "*.stm" << "*.ult" << "*.j2b" << "*.mt2" << "*.mdz" << "*.mdr" << "*.mdgz"; + properties.filters << "*.mdbz" << "*.mod" << "*.s3z" << "*.s3r" << "*.s3gz" << "*.s3m" << "*.xmz"; + properties.filters << "*.xmr" << "*.xmgz" << "*.itz" << "*.itr" << "*.itgz" << "*.dmf" "*.umx"; + properties.filters << "*.it" << "*.669" << "*.xm" << "*.mtm" << "*.psm" << "*.ft2"; properties.description = tr("ModPlug Files"); //properties.contentType = ; properties.shortName = "modplug"; properties.hasAbout = true; properties.hasSettings = true; properties.noInput = true; - properties.protocols = "file"; + properties.protocols << "file"; return properties; } diff --git a/src/plugins/Input/modplug/translations/modplug_plugin_cs.ts b/src/plugins/Input/modplug/translations/modplug_plugin_cs.ts index 78d4de940..af8f6c4ce 100644 --- a/src/plugins/Input/modplug/translations/modplug_plugin_cs.ts +++ b/src/plugins/Input/modplug/translations/modplug_plugin_cs.ts @@ -4,52 +4,52 @@ DecoderModPlugFactory - + ModPlug Plugin Modul ModPlug - + ModPlug Files Soubory ModPlug - + About ModPlug Audio Plugin O modulu ModPlug - + Qmmp ModPlug Audio Plugin Vstupní modul Qmmp ModPlug - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Autor: Ilja Kotov <forkotov02@hotmail.ru> - + Based on the Modplug Plugin for Xmms Založeno na modulu Modplug pro XMMS - + Modplug Plugin developers: Vývojáři modulu ModPlug: - + Olivier Lapicque <olivierl@jps.net> Olivier Lapicque <olivierl@jps.net> - + Kenton Varda <temporal@gauge3d.org> Kenton Varda <temporal@gauge3d.org> - + Konstanty Bialkowski <konstanty@ieee.org> Konstanty Bialkowski <konstanty@ieee.org> diff --git a/src/plugins/Input/modplug/translations/modplug_plugin_de.ts b/src/plugins/Input/modplug/translations/modplug_plugin_de.ts index 78406c300..3c60b62ef 100644 --- a/src/plugins/Input/modplug/translations/modplug_plugin_de.ts +++ b/src/plugins/Input/modplug/translations/modplug_plugin_de.ts @@ -4,52 +4,52 @@ DecoderModPlugFactory - + ModPlug Plugin ModPlug-Modul - + ModPlug Files ModPlug-Dateien - + About ModPlug Audio Plugin Über ModPlug-Audio-Modul - + Qmmp ModPlug Audio Plugin Qmmp ModPlug-Audio-Modul - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Autor: Ilya Kotov <forkotov02@hotmail.ru> - + Based on the Modplug Plugin for Xmms Basiert auf dem Modplug-Modul für Xmms - + Modplug Plugin developers: Entwickler des Modplug-Moduls: - + Olivier Lapicque <olivierl@jps.net> Olivier Lapicque <olivierl@jps.net> - + Kenton Varda <temporal@gauge3d.org> Kenton Varda <temporal@gauge3d.org> - + Konstanty Bialkowski <konstanty@ieee.org> Konstanty Bialkowski <konstanty@ieee.org> diff --git a/src/plugins/Input/modplug/translations/modplug_plugin_es.ts b/src/plugins/Input/modplug/translations/modplug_plugin_es.ts index bb91cda58..ddaec5796 100644 --- a/src/plugins/Input/modplug/translations/modplug_plugin_es.ts +++ b/src/plugins/Input/modplug/translations/modplug_plugin_es.ts @@ -4,52 +4,52 @@ DecoderModPlugFactory - + ModPlug Plugin Módulo ModPlug - + ModPlug Files Archivos ModPlug - + About ModPlug Audio Plugin Acerca del módulo de audio ModPlug - + Qmmp ModPlug Audio Plugin Módulo de audio ModPlug para Qmmp - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Escrito por: Ilya Kotov <forkotov02@hotmail.ru> - + Based on the Modplug Plugin for Xmms Basado en el módulo Modplug para Xmms - + Modplug Plugin developers: Desarrolladores del módulo Modplug: - + Olivier Lapicque <olivierl@jps.net> Olivier Lapicque <olivierl@jps.net> - + Kenton Varda <temporal@gauge3d.org> Kenton Varda <temporal@gauge3d.org> - + Konstanty Bialkowski <konstanty@ieee.org> Konstanty Bialkowski <konstanty@ieee.org> diff --git a/src/plugins/Input/modplug/translations/modplug_plugin_it.ts b/src/plugins/Input/modplug/translations/modplug_plugin_it.ts index 07d5e2b9b..78ad9fa1b 100644 --- a/src/plugins/Input/modplug/translations/modplug_plugin_it.ts +++ b/src/plugins/Input/modplug/translations/modplug_plugin_it.ts @@ -4,52 +4,52 @@ DecoderModPlugFactory - + ModPlug Plugin Modulo ModPlug - + ModPlug Files Brani ModPlug - + About ModPlug Audio Plugin Info sul modulo audio ModPlug - + Qmmp ModPlug Audio Plugin Modulo audio ModPlug per Qmmp - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Autore: Ilya Kotov <forkotov02@hotmail.ru> - + Based on the Modplug Plugin for Xmms Basato sul Modulo Modplug per Xmms - + Modplug Plugin developers: Sviluppatori del modulo Modplug: - + Olivier Lapicque <olivierl@jps.net> Olivier Lapicque <olivierl@jps.net> - + Kenton Varda <temporal@gauge3d.org> Kenton Varda <temporal@gauge3d.org> - + Konstanty Bialkowski <konstanty@ieee.org> Konstanty Bialkowski <konstanty@ieee.org> diff --git a/src/plugins/Input/modplug/translations/modplug_plugin_ja.ts b/src/plugins/Input/modplug/translations/modplug_plugin_ja.ts index 1e8271195..9becea968 100644 --- a/src/plugins/Input/modplug/translations/modplug_plugin_ja.ts +++ b/src/plugins/Input/modplug/translations/modplug_plugin_ja.ts @@ -4,52 +4,52 @@ DecoderModPlugFactory - + ModPlug Plugin ModPlug プラグイン - + ModPlug Files ModoPlug ファイル - + About ModPlug Audio Plugin ModoPlug 音響プラグインについて - + Qmmp ModPlug Audio Plugin QMMP ModoPlug 音響プラグイン - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> 制作: Илья Котов (Ilya Kotov) <forkotov02@hotmail.ru> - + Based on the Modplug Plugin for Xmms XMMS 用 ModPlug プラグインを流用 - + Modplug Plugin developers: ModPlug プラグインの開発者: - + Olivier Lapicque <olivierl@jps.net> Olivier Lapicque <olivierl@jps.net> - + Kenton Varda <temporal@gauge3d.org> Kenton Varda <temporal@gauge3d.org> - + Konstanty Bialkowski <konstanty@ieee.org> Konstanty Bialkowski <konstanty@ieee.org> diff --git a/src/plugins/Input/modplug/translations/modplug_plugin_lt.ts b/src/plugins/Input/modplug/translations/modplug_plugin_lt.ts index c32ff1639..b064b1298 100644 --- a/src/plugins/Input/modplug/translations/modplug_plugin_lt.ts +++ b/src/plugins/Input/modplug/translations/modplug_plugin_lt.ts @@ -4,52 +4,52 @@ DecoderModPlugFactory - + ModPlug Plugin ModPlug Įskiepis - + ModPlug Files ModPlug bylos - + About ModPlug Audio Plugin Apie ModPlug audio įskiepį - + Qmmp ModPlug Audio Plugin Qmmp ModPlug audio įskiepis - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> sukūrė:Ilya Kotov <forkotov02@hotmail.ru> - + Based on the Modplug Plugin for Xmms Sukurta Xmms Modplug įskiepio pagrindu - + Modplug Plugin developers: Modplug įskiepio kūrėjai: - + Olivier Lapicque <olivierl@jps.net> Olivier Lapicque <olivierl@jps.net> - + Kenton Varda <temporal@gauge3d.org> Kenton Varda <temporal@gauge3d.org> - + Konstanty Bialkowski <konstanty@ieee.org> Konstanty Bialkowski <konstanty@ieee.org> diff --git a/src/plugins/Input/modplug/translations/modplug_plugin_nl.ts b/src/plugins/Input/modplug/translations/modplug_plugin_nl.ts index 9e19cbdb8..0f0e56de4 100644 --- a/src/plugins/Input/modplug/translations/modplug_plugin_nl.ts +++ b/src/plugins/Input/modplug/translations/modplug_plugin_nl.ts @@ -4,52 +4,52 @@ DecoderModPlugFactory - + ModPlug Plugin ModPlug Module - + ModPlug Files ModPlug Bestanden - + About ModPlug Audio Plugin Over de ModPlug Audio Module - + Qmmp ModPlug Audio Plugin Modplug Audio Module voor Qmmp - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Auteur: Ilya Kotov <forkotov02@hotmail.ru> - + Based on the Modplug Plugin for Xmms Gebasseerd op de Modplug Module voor Xmms - + Modplug Plugin developers: Modplug Module ontwikkelaars: - + Olivier Lapicque <olivierl@jps.net> Olivier Lapicque <olivierl@jps.net> - + Kenton Varda <temporal@gauge3d.org> Kenton Varda <temporal@gauge3d.org> - + Konstanty Bialkowski <konstanty@ieee.org> Konstanty Bialkowski <konstanty@ieee.org> diff --git a/src/plugins/Input/modplug/translations/modplug_plugin_pl.ts b/src/plugins/Input/modplug/translations/modplug_plugin_pl.ts index bf0a00584..f5b75dfa1 100644 --- a/src/plugins/Input/modplug/translations/modplug_plugin_pl.ts +++ b/src/plugins/Input/modplug/translations/modplug_plugin_pl.ts @@ -4,52 +4,52 @@ DecoderModPlugFactory - + ModPlug Plugin Wtyczka ModPlug - + ModPlug Files Pliki ModPlug - + About ModPlug Audio Plugin O wtyczce ModPlug Audio - + Qmmp ModPlug Audio Plugin Wtyczka ModPlug Audio dla Qmmp - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Autor: Ilya Kotov <forkotov02@hotmail.ru> - + Based on the Modplug Plugin for Xmms Oparty na wtyczce Modplug dla Xmms - + Modplug Plugin developers: Twórcy wtyczki Modplug: - + Olivier Lapicque <olivierl@jps.net> - + Kenton Varda <temporal@gauge3d.org> - + Konstanty Bialkowski <konstanty@ieee.org> diff --git a/src/plugins/Input/modplug/translations/modplug_plugin_ru.ts b/src/plugins/Input/modplug/translations/modplug_plugin_ru.ts index e68998a15..6f7ba4148 100644 --- a/src/plugins/Input/modplug/translations/modplug_plugin_ru.ts +++ b/src/plugins/Input/modplug/translations/modplug_plugin_ru.ts @@ -4,52 +4,52 @@ DecoderModPlugFactory - + ModPlug Plugin Модуль ModPlug - + ModPlug Files Файлы ModPlug - + About ModPlug Audio Plugin Об аудио-модуле ModPlug - + Qmmp ModPlug Audio Plugin Аудио-модуль ModPlug для Qmmp - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Разработчик: Илья Котов <forkotov02@hotmail.ru> - + Based on the Modplug Plugin for Xmms Основан на базе модуля Modplug для Xmms - + Modplug Plugin developers: Разработчики модуля Modplug: - + Olivier Lapicque <olivierl@jps.net> Olivier Lapicque <olivierl@jps.net> - + Kenton Varda <temporal@gauge3d.org> Kenton Varda <temporal@gauge3d.org> - + Konstanty Bialkowski <konstanty@ieee.org> Konstanty Bialkowski <konstanty@ieee.org> diff --git a/src/plugins/Input/modplug/translations/modplug_plugin_tr.ts b/src/plugins/Input/modplug/translations/modplug_plugin_tr.ts index a55668d66..8f446b273 100644 --- a/src/plugins/Input/modplug/translations/modplug_plugin_tr.ts +++ b/src/plugins/Input/modplug/translations/modplug_plugin_tr.ts @@ -4,52 +4,52 @@ DecoderModPlugFactory - + ModPlug Plugin ModPlug Eklentisi - + ModPlug Files ModPlug Dosyaları - + About ModPlug Audio Plugin ModPlug Ses Eklentisi Hakkında - + Qmmp ModPlug Audio Plugin Qmmp ModPlug Ses Eklentisi - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Yazan: Ilya Kotov <forkotov02@hotmail.ru> - + Based on the Modplug Plugin for Xmms Xmms için yazılan Modplug eklentisi temellidir - + Modplug Plugin developers: - + Olivier Lapicque <olivierl@jps.net> Olivier Lapicque <olivierl@jps.net> - + Kenton Varda <temporal@gauge3d.org> Kenton Varda <temporal@gauge3d.org> - + Konstanty Bialkowski <konstanty@ieee.org> Konstanty Bialkowski <konstanty@ieee.org> diff --git a/src/plugins/Input/modplug/translations/modplug_plugin_uk_UA.ts b/src/plugins/Input/modplug/translations/modplug_plugin_uk_UA.ts index ac61c7bbd..37af9c381 100644 --- a/src/plugins/Input/modplug/translations/modplug_plugin_uk_UA.ts +++ b/src/plugins/Input/modplug/translations/modplug_plugin_uk_UA.ts @@ -4,52 +4,52 @@ DecoderModPlugFactory - + ModPlug Plugin Модуль ModPlug - + ModPlug Files Файли ModPlug - + About ModPlug Audio Plugin Про аудіо-модуль ModPlug - + Qmmp ModPlug Audio Plugin Аудіо-модуль для Qmmp - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Розробник: Ілля Котов <forkotov02@hotmail.ru> - + Based on the Modplug Plugin for Xmms На базі модуля Modplug для Xmms - + Modplug Plugin developers: Розробники модуля ModPlug: - + Olivier Lapicque <olivierl@jps.net> - + Kenton Varda <temporal@gauge3d.org> - + Konstanty Bialkowski <konstanty@ieee.org> diff --git a/src/plugins/Input/modplug/translations/modplug_plugin_zh_CN.ts b/src/plugins/Input/modplug/translations/modplug_plugin_zh_CN.ts index 4c3928987..ed8f4d0a2 100644 --- a/src/plugins/Input/modplug/translations/modplug_plugin_zh_CN.ts +++ b/src/plugins/Input/modplug/translations/modplug_plugin_zh_CN.ts @@ -4,52 +4,52 @@ DecoderModPlugFactory - + ModPlug Plugin ModPlug 插件 - + ModPlug Files ModPlug 文件 - + About ModPlug Audio Plugin 关于 ModPlug 音频插件 - + Qmmp ModPlug Audio Plugin Qmmp ModPlug 音频插件 - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> 作者:Ilya Kotov <forkotov02@hotmail.ru> - + Based on the Modplug Plugin for Xmms 基于 Modplug 的 Xmms 插件 - + Modplug Plugin developers: - + Olivier Lapicque <olivierl@jps.net> Olivier Lapicque <olivierl@jps.net> - + Kenton Varda <temporal@gauge3d.org> Kenton Varda <temporal@gauge3d.org> - + Konstanty Bialkowski <konstanty@ieee.org> Konstanty Bialkowski <konstanty@ieee.org> diff --git a/src/plugins/Input/modplug/translations/modplug_plugin_zh_TW.ts b/src/plugins/Input/modplug/translations/modplug_plugin_zh_TW.ts index 422e6eed2..fc466f401 100644 --- a/src/plugins/Input/modplug/translations/modplug_plugin_zh_TW.ts +++ b/src/plugins/Input/modplug/translations/modplug_plugin_zh_TW.ts @@ -4,52 +4,52 @@ DecoderModPlugFactory - + ModPlug Plugin ModPlug 插件 - + ModPlug Files ModPlug 檔案 - + About ModPlug Audio Plugin 關於 ModPlug 聲訊插件 - + Qmmp ModPlug Audio Plugin Qmmp ModPlug 聲訊插件 - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> 作者:Ilya Kotov <forkotov02@hotmail.ru> - + Based on the Modplug Plugin for Xmms 基於 Modplug 的 Xmms 插件 - + Modplug Plugin developers: - + Olivier Lapicque <olivierl@jps.net> Olivier Lapicque <olivierl@jps.net> - + Kenton Varda <temporal@gauge3d.org> Kenton Varda <temporal@gauge3d.org> - + Konstanty Bialkowski <konstanty@ieee.org> Konstanty Bialkowski <konstanty@ieee.org> diff --git a/src/plugins/Input/mpc/decodermpcfactory.cpp b/src/plugins/Input/mpc/decodermpcfactory.cpp index 43366bc89..a3ab7ae5d 100644 --- a/src/plugins/Input/mpc/decodermpcfactory.cpp +++ b/src/plugins/Input/mpc/decodermpcfactory.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008 by Ilya Kotov * + * Copyright (C) 2008-2010 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -45,7 +45,7 @@ const DecoderProperties DecoderMPCFactory::properties() const { DecoderProperties properties; properties.name = tr("Musepack Plugin"); - properties.filter = "*.mpc"; + properties.filters << "*.mpc"; properties.description = tr("Musepack Files"); //properties.contentType = ; properties.shortName = "mpc"; diff --git a/src/plugins/Input/sndfile/decodersndfilefactory.cpp b/src/plugins/Input/sndfile/decodersndfilefactory.cpp index 5ffbb8ddb..e01ac3103 100644 --- a/src/plugins/Input/sndfile/decodersndfilefactory.cpp +++ b/src/plugins/Input/sndfile/decodersndfilefactory.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2007-2009 by Ilya Kotov * + * Copyright (C) 2007-2010 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -18,6 +18,7 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include +#include extern "C" { #include @@ -31,17 +32,7 @@ extern "C" bool DecoderSndFileFactory::supports(const QString &source) const { - - if ((source.right(3).toLower() == ".au") || - (source.right(4).toLower() == ".snd") || - (source.right(4).toLower() == ".aif") || - (source.right(5).toLower() == ".aiff") || - (source.right(5).toLower() == ".8svx") || - (source.right(4).toLower() == ".sph") || - (source.right(3).toLower() == ".sf") || - (source.right(4).toLower() == ".voc")) - return true; - else if (source.right(4).toLower() == ".wav") + if (source.right(4).toLower() == ".wav") { //try top open the file SF_INFO snd_info; @@ -52,6 +43,12 @@ bool DecoderSndFileFactory::supports(const QString &source) const sndfile = 0; return true; } + foreach(QString filter, properties().filters) + { + QRegExp regexp(filter, Qt::CaseInsensitive, QRegExp::Wildcard); + if (regexp.exactMatch(source)) + return true; + } return false; } @@ -64,14 +61,15 @@ const DecoderProperties DecoderSndFileFactory::properties() const { DecoderProperties properties; properties.name = tr("Sndfile Plugin"); - properties.filter = "*.wav *.au *.snd *.aif *.aiff *.8svx *.sph *.sf *.voc"; + properties.filters << "*.wav" << "*.au" << "*.snd" << "*.aif" << "*.aiff" << "*.8svx"; + properties.filters << "*.sph" << "*.sf" << "*.voc"; properties.description = tr("PCM Files"); //properties.contentType = ""; properties.shortName = "sndfile"; properties.hasAbout = true; properties.hasSettings = false; properties.noInput = true; - properties.protocols = "file"; + properties.protocols << "file"; return properties; } diff --git a/src/plugins/Input/sndfile/translations/sndfile_plugin_cs.ts b/src/plugins/Input/sndfile/translations/sndfile_plugin_cs.ts index 28c04a70c..109275191 100644 --- a/src/plugins/Input/sndfile/translations/sndfile_plugin_cs.ts +++ b/src/plugins/Input/sndfile/translations/sndfile_plugin_cs.ts @@ -4,32 +4,32 @@ DecoderSndFileFactory - + Sndfile Plugin Modul Sndfile - + PCM Files Soubory PCM - + About Sndfile Audio Plugin O modulu Sndfile - + Qmmp Sndfile Audio Plugin Vstupní modul Qmmp Sndfile - + Compiled against Zkompilováno s - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Autor: Ilja Kotov <forkotov02@hotmail.ru> diff --git a/src/plugins/Input/sndfile/translations/sndfile_plugin_de.ts b/src/plugins/Input/sndfile/translations/sndfile_plugin_de.ts index eee5b58a3..dd6ed2a3d 100644 --- a/src/plugins/Input/sndfile/translations/sndfile_plugin_de.ts +++ b/src/plugins/Input/sndfile/translations/sndfile_plugin_de.ts @@ -4,32 +4,32 @@ DecoderSndFileFactory - + Sndfile Plugin Sndfile-Modul - + PCM Files PCM-Dateien - + About Sndfile Audio Plugin Über Sndfile-Audio-Modul - + Qmmp Sndfile Audio Plugin Qmmp Sndfile-Audio-Modul - + Compiled against Kompiliert gegen - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Autor: Ilya Kotov <forkotov02@hotmail.ru> diff --git a/src/plugins/Input/sndfile/translations/sndfile_plugin_es.ts b/src/plugins/Input/sndfile/translations/sndfile_plugin_es.ts index 09fd41f47..fa63b9baf 100644 --- a/src/plugins/Input/sndfile/translations/sndfile_plugin_es.ts +++ b/src/plugins/Input/sndfile/translations/sndfile_plugin_es.ts @@ -4,32 +4,32 @@ DecoderSndFileFactory - + Sndfile Plugin Módulo Sndfile - + PCM Files Archivos PCM - + About Sndfile Audio Plugin Acerca del módulo de sonido Sndfile - + Qmmp Sndfile Audio Plugin Módulo de sonido Sndfile para Qmmp - + Compiled against Compilado con - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Escrito por: Ilya Kotov <forkotov02@hotmail.ru> diff --git a/src/plugins/Input/sndfile/translations/sndfile_plugin_it.ts b/src/plugins/Input/sndfile/translations/sndfile_plugin_it.ts index e03d61a1c..628c534ec 100644 --- a/src/plugins/Input/sndfile/translations/sndfile_plugin_it.ts +++ b/src/plugins/Input/sndfile/translations/sndfile_plugin_it.ts @@ -4,32 +4,32 @@ DecoderSndFileFactory - + Sndfile Plugin Modulo Sndfile - + PCM Files Brani PCM - + About Sndfile Audio Plugin Info sul modulo audio Sndfile - + Qmmp Sndfile Audio Plugin Modulo audio Sndfile per Qmmp - + Compiled against Compilato su - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Autore: Ilya Kotov <forkotov02@hotmail.ru> diff --git a/src/plugins/Input/sndfile/translations/sndfile_plugin_ja.ts b/src/plugins/Input/sndfile/translations/sndfile_plugin_ja.ts index 64bc1e524..60f950069 100644 --- a/src/plugins/Input/sndfile/translations/sndfile_plugin_ja.ts +++ b/src/plugins/Input/sndfile/translations/sndfile_plugin_ja.ts @@ -4,32 +4,32 @@ DecoderSndFileFactory - + Sndfile Plugin Sndfile プラグイン - + PCM Files PCM ファイル - + About Sndfile Audio Plugin Sndfile 音響プラグインについて - + Qmmp Sndfile Audio Plugin QMMP Sndfile 音響プラグイン - + Compiled against コンパイルに使用したライブラリ - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> 制作: Илья Котов (Ilya Kotov) <forkotov02@hotmail.ru> diff --git a/src/plugins/Input/sndfile/translations/sndfile_plugin_lt.ts b/src/plugins/Input/sndfile/translations/sndfile_plugin_lt.ts index 39ef4efcf..852c23833 100644 --- a/src/plugins/Input/sndfile/translations/sndfile_plugin_lt.ts +++ b/src/plugins/Input/sndfile/translations/sndfile_plugin_lt.ts @@ -4,32 +4,32 @@ DecoderSndFileFactory - + Sndfile Plugin Sndfile įskiepis - + PCM Files PCM bylos - + About Sndfile Audio Plugin Apie Sndfile Audio įskiepį - + Qmmp Sndfile Audio Plugin Qmmp Sndfile Audio įskiepis - + Compiled against Compiled against - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Sukūrė: Ilya Kotov <forkotov02@hotmail.ru> diff --git a/src/plugins/Input/sndfile/translations/sndfile_plugin_nl.ts b/src/plugins/Input/sndfile/translations/sndfile_plugin_nl.ts index 426ae2e57..94480cf02 100644 --- a/src/plugins/Input/sndfile/translations/sndfile_plugin_nl.ts +++ b/src/plugins/Input/sndfile/translations/sndfile_plugin_nl.ts @@ -4,32 +4,32 @@ DecoderSndFileFactory - + Sndfile Plugin Sndfile Module - + PCM Files PCM Bestanden - + About Sndfile Audio Plugin Over de Sndfile Audio Module - + Qmmp Sndfile Audio Plugin Sndfile Audio Module voor Qmmp - + Compiled against Gebouwd tegen - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Auteur: Ilya Kotov <forkotov02@hotmail.ru> diff --git a/src/plugins/Input/sndfile/translations/sndfile_plugin_pl.ts b/src/plugins/Input/sndfile/translations/sndfile_plugin_pl.ts index 70426ece5..8cf02b2dd 100644 --- a/src/plugins/Input/sndfile/translations/sndfile_plugin_pl.ts +++ b/src/plugins/Input/sndfile/translations/sndfile_plugin_pl.ts @@ -4,32 +4,32 @@ DecoderSndFileFactory - + Sndfile Plugin Wtyczka Sndfile - + PCM Files Pliki PCM - + About Sndfile Audio Plugin O wtyczce Sndfile Audio - + Qmmp Sndfile Audio Plugin Wtyczka Sndfile Audio dla Qmmp - + Compiled against Skompilowano przy użyciu - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Autor: Ilya Kotov <forkotov02@hotmail.ru> diff --git a/src/plugins/Input/sndfile/translations/sndfile_plugin_ru.ts b/src/plugins/Input/sndfile/translations/sndfile_plugin_ru.ts index 5842f2dc8..df231ef4c 100644 --- a/src/plugins/Input/sndfile/translations/sndfile_plugin_ru.ts +++ b/src/plugins/Input/sndfile/translations/sndfile_plugin_ru.ts @@ -4,32 +4,32 @@ DecoderSndFileFactory - + Sndfile Plugin Модуль Sndfile - + PCM Files Файлы PCM - + About Sndfile Audio Plugin Об аудио-модуле Sndfile - + Qmmp Sndfile Audio Plugin Модуль SndFile для Qmmp - + Compiled against Собрано с - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Разработчик: Илья Котов <forkotov02@hotmail.ru> diff --git a/src/plugins/Input/sndfile/translations/sndfile_plugin_tr.ts b/src/plugins/Input/sndfile/translations/sndfile_plugin_tr.ts index 9fd98c7c1..a976bcfcf 100644 --- a/src/plugins/Input/sndfile/translations/sndfile_plugin_tr.ts +++ b/src/plugins/Input/sndfile/translations/sndfile_plugin_tr.ts @@ -4,32 +4,32 @@ DecoderSndFileFactory - + Sndfile Plugin Sndfile Eklentisi - + PCM Files PCM Dosyaları - + About Sndfile Audio Plugin Sndfile Ses Eklentisi Hakkında - + Qmmp Sndfile Audio Plugin Qmmp Sndfile Ses Eklentisi - + Compiled against Derlendi - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Yazan: Ilya Kotov <forkotov02@hotmail.ru> diff --git a/src/plugins/Input/sndfile/translations/sndfile_plugin_uk_UA.ts b/src/plugins/Input/sndfile/translations/sndfile_plugin_uk_UA.ts index 23acc3081..735d4761d 100644 --- a/src/plugins/Input/sndfile/translations/sndfile_plugin_uk_UA.ts +++ b/src/plugins/Input/sndfile/translations/sndfile_plugin_uk_UA.ts @@ -4,32 +4,32 @@ DecoderSndFileFactory - + Sndfile Plugin Модуль Sndfile - + PCM Files Файли PCM - + About Sndfile Audio Plugin Про аудіо-модуль Sndfile - + Qmmp Sndfile Audio Plugin Модуль SndFile для Qmmp - + Compiled against Зкомпільовано з - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> Розробник: Ілля Котов <forkotov02@hotmail.ru> diff --git a/src/plugins/Input/sndfile/translations/sndfile_plugin_zh_CN.ts b/src/plugins/Input/sndfile/translations/sndfile_plugin_zh_CN.ts index 13fa4d9e1..9d766a3a9 100644 --- a/src/plugins/Input/sndfile/translations/sndfile_plugin_zh_CN.ts +++ b/src/plugins/Input/sndfile/translations/sndfile_plugin_zh_CN.ts @@ -4,32 +4,32 @@ DecoderSndFileFactory - + Sndfile Plugin Sndfile 插件 - + PCM Files PCM 文件 - + About Sndfile Audio Plugin 关于 Sndfile 音频插件 - + Qmmp Sndfile Audio Plugin Qmmp Sndfile 音频插件 - + Compiled against 编译依赖 - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> 作者:Ilya Kotov <forkotov02@hotmail.ru> diff --git a/src/plugins/Input/sndfile/translations/sndfile_plugin_zh_TW.ts b/src/plugins/Input/sndfile/translations/sndfile_plugin_zh_TW.ts index c36795f2b..8d0ef3990 100644 --- a/src/plugins/Input/sndfile/translations/sndfile_plugin_zh_TW.ts +++ b/src/plugins/Input/sndfile/translations/sndfile_plugin_zh_TW.ts @@ -4,32 +4,32 @@ DecoderSndFileFactory - + Sndfile Plugin Sndfile 插件 - + PCM Files PCM 檔案 - + About Sndfile Audio Plugin 關於 Sndfile 聲訊插件 - + Qmmp Sndfile Audio Plugin Qmmp Sndfile 聲訊插件 - + Compiled against 編譯依賴於 - + Writen by: Ilya Kotov <forkotov02@hotmail.ru> 作者:Ilya Kotov <forkotov02@hotmail.ru> diff --git a/src/plugins/Input/vorbis/decodervorbisfactory.cpp b/src/plugins/Input/vorbis/decodervorbisfactory.cpp index 12ed9ba0a..2ca31b60e 100644 --- a/src/plugins/Input/vorbis/decodervorbisfactory.cpp +++ b/src/plugins/Input/vorbis/decodervorbisfactory.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2009 by Ilya Kotov * + * Copyright (C) 2008-2010 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -49,9 +49,9 @@ const DecoderProperties DecoderVorbisFactory::properties() const DecoderProperties properties; properties.name = tr("Ogg Vorbis Plugin"); properties.shortName = "vorbis"; - properties.filter = "*.ogg"; + properties.filters << "*.ogg"; properties.description = tr("Ogg Vorbis Files"); - properties.contentType = "application/ogg;audio/x-vorbis+ogg"; + properties.contentTypes << "application/ogg" << "audio/x-vorbis+ogg"; properties.hasAbout = true; properties.hasSettings = false; properties.noInput = false; diff --git a/src/plugins/Input/wavpack/decoderwavpackfactory.cpp b/src/plugins/Input/wavpack/decoderwavpackfactory.cpp index 50a81c6c7..45a6bfaed 100644 --- a/src/plugins/Input/wavpack/decoderwavpackfactory.cpp +++ b/src/plugins/Input/wavpack/decoderwavpackfactory.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2009 by Ilya Kotov * + * Copyright (C) 2008-2010 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -42,14 +42,14 @@ const DecoderProperties DecoderWavPackFactory::properties() const { DecoderProperties properties; properties.name = tr("WavPack Plugin"); - properties.filter = "*.wv"; + properties.filters << "*.wv"; properties.description = tr("WavPack Files"); //properties.contentType = ; properties.shortName = "wavpack"; properties.hasAbout = true; properties.hasSettings = false; properties.noInput = true; - properties.protocols = "file wvpack"; + properties.protocols << "file" << "wvpack"; return properties; } diff --git a/src/plugins/Input/wildmidi/decoderwildmidifactory.cpp b/src/plugins/Input/wildmidi/decoderwildmidifactory.cpp index 808341333..c9ed01c19 100644 --- a/src/plugins/Input/wildmidi/decoderwildmidifactory.cpp +++ b/src/plugins/Input/wildmidi/decoderwildmidifactory.cpp @@ -41,14 +41,14 @@ const DecoderProperties DecoderWildMidiFactory::properties() const { DecoderProperties properties; properties.name = tr("WildMidi Plugin"); - properties.filter = "*.mid"; + properties.filters << "*.mid"; properties.description = tr("Midi Files"); //properties.contentType = ; properties.shortName = "wildmidi"; properties.hasAbout = true; properties.hasSettings = true; properties.noInput = true; - properties.protocols = "file"; + properties.protocols << "file"; WildMidiHelper::instance()->initialize(); return properties; } diff --git a/src/plugins/Transports/http/httpinputfactory.cpp b/src/plugins/Transports/http/httpinputfactory.cpp index e1229a04b..f5353534c 100644 --- a/src/plugins/Transports/http/httpinputfactory.cpp +++ b/src/plugins/Transports/http/httpinputfactory.cpp @@ -30,7 +30,7 @@ const InputSourceProperties HTTPInputFactory::properties() const { InputSourceProperties p; - p.protocols = "http"; + p.protocols << "http"; p.name = tr("HTTP Plugin"); p.shortName = "http"; p.hasAbout = true; diff --git a/src/plugins/Transports/http/httpinputfactory.h b/src/plugins/Transports/http/httpinputfactory.h index 220984ad2..550b12e53 100644 --- a/src/plugins/Transports/http/httpinputfactory.h +++ b/src/plugins/Transports/http/httpinputfactory.h @@ -22,6 +22,7 @@ #define HTTPINPUTFACTORY_H #include +#include #include class QTranslator; diff --git a/src/plugins/Transports/mms/mmsinputfactory.cpp b/src/plugins/Transports/mms/mmsinputfactory.cpp index b0945ab70..48e36f957 100644 --- a/src/plugins/Transports/mms/mmsinputfactory.cpp +++ b/src/plugins/Transports/mms/mmsinputfactory.cpp @@ -30,7 +30,7 @@ const InputSourceProperties MMSInputFactory::properties() const { InputSourceProperties p; - p.protocols = "mms mmsh mmst mmsu"; + p.protocols << "mms" << "mmsh" << "mmst" << "mmsu"; p.name = tr("MMS Plugin"); p.shortName = "mms"; p.hasAbout = true; diff --git a/src/plugins/Transports/mms/mmsinputfactory.h b/src/plugins/Transports/mms/mmsinputfactory.h index a5997b697..a2853636a 100644 --- a/src/plugins/Transports/mms/mmsinputfactory.h +++ b/src/plugins/Transports/mms/mmsinputfactory.h @@ -22,6 +22,7 @@ #define HTTPINPUTFACTORY_H #include +#include #include class QTranslator; diff --git a/src/qmmp/abstractengine.cpp b/src/qmmp/abstractengine.cpp index 2aa468375..a9115d777 100644 --- a/src/qmmp/abstractengine.cpp +++ b/src/qmmp/abstractengine.cpp @@ -42,6 +42,7 @@ QWaitCondition *AbstractEngine::cond() // static methods QList *AbstractEngine::m_factories = 0; +QList *AbstractEngine::m_disabledFactories = 0; QStringList AbstractEngine::m_files; void AbstractEngine::checkFactories() @@ -49,8 +50,10 @@ void AbstractEngine::checkFactories() if (!m_factories) { QSettings settings (Qmmp::configFile(), QSettings::IniFormat); + QStringList disabledNames = settings.value("Engine/disabled_plugins").toStringList (); m_files.clear(); m_factories = new QList; + m_disabledFactories = new QList; QDir pluginsDir (Qmmp::pluginsPath()); pluginsDir.cd("Engines"); @@ -71,6 +74,8 @@ void AbstractEngine::checkFactories() m_factories->append(factory); m_files << pluginsDir.absoluteFilePath(fileName); qApp->installTranslator(factory->createTranslator(qApp)); + if(disabledNames.contains(factory->properties().shortName)) + m_disabledFactories->append(factory); } } //remove physically deleted plugins from disabled list @@ -79,13 +84,12 @@ void AbstractEngine::checkFactories() { names.append(factory->properties().shortName); } - QStringList disabledList = settings.value("Engine/disabled_plugins").toStringList (); - foreach (QString name, disabledList) + foreach (QString name, disabledNames) { if (!names.contains(name)) - disabledList.removeAll(name); + disabledNames.removeAll(name); } - settings.setValue("Engine/disabled_plugins",disabledList); + settings.setValue("Engine/disabled_plugins", disabledNames); } } @@ -112,29 +116,28 @@ void AbstractEngine::setEnabled(EngineFactory* factory, bool enable) if (!m_factories->contains(factory)) return; - QString name = factory->properties().shortName; - QSettings settings (Qmmp::configFile(), QSettings::IniFormat ); - QStringList disabledList = settings.value("Engine/disabled_plugins").toStringList(); + if(enable == isEnabled(factory)) + return; - if (enable) - disabledList.removeAll(name); + if(enable) + m_disabledFactories->removeAll(factory); else + m_disabledFactories->append(factory); + + QStringList disabledNames; + foreach(EngineFactory *f, *m_disabledFactories) { - if (!disabledList.contains(name)) - disabledList << name; + disabledNames << f->properties().shortName; } - settings.setValue("Engine/disabled_plugins", disabledList); + disabledNames.removeDuplicates(); + QSettings settings (Qmmp::configFile(), QSettings::IniFormat); + settings.setValue("Engine/disabled_plugins", disabledNames); } bool AbstractEngine::isEnabled(EngineFactory* factory) { checkFactories(); - if (!m_factories->contains(factory)) - return false; - QString name = factory->properties().shortName; - QSettings settings ( Qmmp::configFile(), QSettings::IniFormat ); - QStringList disabledList = settings.value("Engine/disabled_plugins").toStringList(); - return !disabledList.contains(name); + return !m_disabledFactories->contains(factory); } QStringList AbstractEngine::files() @@ -143,3 +146,15 @@ QStringList AbstractEngine::files() return m_files; } +QStringList AbstractEngine::protocols() +{ + QStringList protocolsList; + foreach(EngineFactory *f, *m_factories) + { + if(isEnabled(f)) + protocolsList << f->properties().protocols; + } + protocolsList.removeDuplicates(); + return protocolsList; +} + diff --git a/src/qmmp/abstractengine.h b/src/qmmp/abstractengine.h index 92c1d8d83..5792bb775 100644 --- a/src/qmmp/abstractengine.h +++ b/src/qmmp/abstractengine.h @@ -79,16 +79,6 @@ public: * Returns wait condition pointer. */ QWaitCondition *cond(); - /*! - * Sets equalizer settings. Each item of \p bands[] and \p reamp should be \b -20.0..20.0 - * Subclass should reimplement this function. - */ - //virtual void setEQ(double bands[10], double preamp) = 0; - /*! - * Enables equalizer if \p on is \b true or disables it if \p on is \b false - * Subclass should reimplement this function. - */ - //virtual void setEQEnabled(bool on) = 0; /*! * Returns a list of decoder factories. */ @@ -112,6 +102,11 @@ public: * Returns a list of engine plugin files. */ static QStringList files(); + /*! + * Returns a list of supported protocols (including meta-protocols). + * This fuction ignores disabled engines. + */ + static QStringList protocols(); signals: /*! @@ -125,6 +120,7 @@ private: static void checkFactories(); static QList *m_factories; + static QList *m_disabledFactories; static QStringList m_files; }; diff --git a/src/qmmp/decoder.cpp b/src/qmmp/decoder.cpp index 6a0debc5b..81960a0e7 100644 --- a/src/qmmp/decoder.cpp +++ b/src/qmmp/decoder.cpp @@ -67,6 +67,7 @@ QIODevice *Decoder::input() // static methods QList *Decoder::m_factories = 0; +QList *Decoder::m_disabledFactories = 0; DecoderFactory *Decoder::m_lastFactory = 0; QStringList Decoder::m_files; @@ -75,8 +76,11 @@ void Decoder::checkFactories() if (!m_factories) { QSettings settings (Qmmp::configFile(), QSettings::IniFormat); + QStringList disabledNames = settings.value("Decoder/disabled_plugins").toStringList (); + m_files.clear(); m_factories = new QList; + m_disabledFactories = new QList; QDir pluginsDir (Qmmp::pluginsPath()); pluginsDir.cd("Input"); @@ -97,6 +101,8 @@ void Decoder::checkFactories() m_factories->append(factory); m_files << pluginsDir.absoluteFilePath(fileName); qApp->installTranslator(factory->createTranslator(qApp)); + if(disabledNames.contains(factory->properties().shortName)) + m_disabledFactories->append(factory); } } //remove physically deleted plugins from disabled list @@ -105,13 +111,12 @@ void Decoder::checkFactories() { names.append(factory->properties().shortName); } - QStringList disabledList = settings.value("Decoder/disabled_plugins").toStringList (); - foreach (QString name, disabledList) + foreach (QString name, disabledNames) { if (!names.contains(name)) - disabledList.removeAll(name); + disabledNames.removeAll(name); } - settings.setValue("Decoder/disabled_plugins",disabledList); + settings.setValue("Decoder/disabled_plugins",disabledNames); } } @@ -121,6 +126,18 @@ QStringList Decoder::files() return m_files; } +QStringList Decoder::protocols() +{ + QStringList protocolsList; + foreach(DecoderFactory *f, *m_factories) + { + if(isEnabled(f)) + protocolsList << f->properties().protocols; + } + protocolsList.removeDuplicates(); + return protocolsList; +} + DecoderFactory *Decoder::findByPath(const QString& source) { checkFactories(); @@ -146,15 +163,8 @@ DecoderFactory *Decoder::findByMime(const QString& type) DecoderFactory *fact; foreach(fact, *m_factories) { - if (isEnabled(fact)) - { - QStringList types = fact->properties().contentType.split(";"); - for (int j=0; jproperties().contentTypes.contains(type)) + return fact; } return 0; } @@ -164,7 +174,7 @@ DecoderFactory *Decoder::findByContent(QIODevice *input) checkFactories(); foreach(DecoderFactory *fact, *m_factories) { - if (fact->canDecode(input) && isEnabled(fact)) + if (isEnabled(fact) && fact->canDecode(input)) { return fact; } @@ -177,7 +187,7 @@ DecoderFactory *Decoder::findByProtocol(const QString &p) checkFactories(); foreach(DecoderFactory *fact, *m_factories) { - if (isEnabled(fact) && fact->properties().protocols.split(" ").contains(p)) + if (isEnabled(fact) && fact->properties().protocols.contains(p)) return fact; } return 0; @@ -189,29 +199,28 @@ void Decoder::setEnabled(DecoderFactory* factory, bool enable) if (!m_factories->contains(factory)) return; - QString name = factory->properties().shortName; - QSettings settings ( Qmmp::configFile(), QSettings::IniFormat ); - QStringList disabledList = settings.value("Decoder/disabled_plugins").toStringList(); + if(enable == isEnabled(factory)) + return; - if (enable) - disabledList.removeAll(name); + if(enable) + m_disabledFactories->removeAll(factory); else + m_disabledFactories->append(factory); + + QStringList disabledNames; + foreach(DecoderFactory *f, *m_disabledFactories) { - if (!disabledList.contains(name)) - disabledList << name; + disabledNames << f->properties().shortName; } - settings.setValue("Decoder/disabled_plugins", disabledList); + disabledNames.removeDuplicates(); + QSettings settings (Qmmp::configFile(), QSettings::IniFormat); + settings.setValue("Decoder/disabled_plugins", disabledNames); } bool Decoder::isEnabled(DecoderFactory* factory) { checkFactories(); - if (!m_factories->contains(factory)) - return false; - QString name = factory->properties().shortName; - QSettings settings ( Qmmp::configFile(), QSettings::IniFormat ); - QStringList disabledList = settings.value("Decoder/disabled_plugins").toStringList(); - return !disabledList.contains(name); + return !m_disabledFactories->contains(factory); } QList *Decoder::factories() diff --git a/src/qmmp/decoder.h b/src/qmmp/decoder.h index fad61295b..13f78913c 100644 --- a/src/qmmp/decoder.h +++ b/src/qmmp/decoder.h @@ -116,6 +116,11 @@ public: * Returns a list of input plugin file names. */ static QStringList files(); + /*! + * Returns a list of supported protocols (including meta-protocols). + * This fuction ignores disabled decoders. + */ + static QStringList protocols(); /*! * Sets whether the input plugin is enabled. * @param factory Decoder plugin factory. @@ -140,6 +145,7 @@ protected: private: static void checkFactories(); static QList *m_factories; + static QList *m_disabledFactories; static DecoderFactory *m_lastFactory; static QStringList m_files; AudioParameters m_parameters; diff --git a/src/qmmp/decoderfactory.h b/src/qmmp/decoderfactory.h index c72fa68c8..adeb0da4c 100644 --- a/src/qmmp/decoderfactory.h +++ b/src/qmmp/decoderfactory.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2006-2009 by Ilya Kotov * + * Copyright (C) 2006-2010 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -26,6 +26,7 @@ class QString; class QIODevice; class QWidget; class QTranslator; +class QStringList; class Decoder; class Output; @@ -47,18 +48,18 @@ public: hasSettings = false; noInput = false; noOutput = false; - } - QString name; /*!< Input plugin full name */ - QString shortName; /*!< Input plugin short name for internal usage */ - QString filter; /*!< File filter (example: "*.mp3 *.ogg") */ - QString description; /*!< File filter description */ - QString contentType; /*!< Supported content types */ - QString protocols; /*!< Supported protocols. Should be empty if plugin uses stream input. */ - bool hasAbout; /*!< Should be \b true if plugin has about dialog, otherwise \b false */ - bool hasSettings; /*!< Should be \b true if plugin has settings dialog, otherwise \b false */ - bool noInput; /*!< Should be \b true if plugin has own input, otherwise \b false */ - bool noOutput; /*!< Should be \b true if plugin has own output, otherwise \b false */ + QString name; /*!< Input plugin full name */ + QString shortName; /*!< Input plugin short name for internal usage */ + QStringList filters; /*!< File filters (example: "*.mp3") */ + QString description; /*!< File filters description */ + QStringList contentTypes; /*!< Supported content types */ + QStringList protocols; /*!< A list of supported protocols. + * Should be empty if plugin uses stream input. */ + bool hasAbout; /*!< Should be \b true if plugin has about dialog, otherwise \b false */ + bool hasSettings; /*!< Should be \b true if plugin has settings dialog, otherwise \b false */ + bool noInput; /*!< Should be \b true if plugin has own input, otherwise \b false */ + bool noOutput; /*!< Should be \b true if plugin has own output, otherwise \b false */ }; /*! @brief Input plugin interface (decoder factory). * @author Ilya Kotov diff --git a/src/qmmp/enginefactory.h b/src/qmmp/enginefactory.h index 6f081b841..6bc09af66 100644 --- a/src/qmmp/enginefactory.h +++ b/src/qmmp/enginefactory.h @@ -26,6 +26,7 @@ class QString; class QIODevice; class QWidget; class QTranslator; +class QStringList; class MetaDataModel; class FileInfo; class AbstractEngine; @@ -44,14 +45,14 @@ public: hasAbout = false; hasSettings = false; } - QString name; /*!< Input plugin full name */ - QString shortName; /*!< Input plugin short name for internal usage */ - QString filter; /*!< File filter (example: "*.mp3 *.ogg") */ - QString description; /*!< File filter description */ - QString contentType; /*!< Supported content types */ - QString protocols; /*!< Supported protocols. Should be empty if plugin uses stream input. */ - bool hasAbout; /*!< Should be \b true if plugin has about dialog, otherwise returns \b false */ - bool hasSettings; /*!< Should be \b true if plugin has settings dialog, otherwise returns \b false */ + QString name; /*!< Input plugin full name */ + QString shortName; /*!< Input plugin short name for internal usage */ + QStringList filters; /*!< File filters (example: "*.mp3,*.ogg") */ + QString description; /*!< File filter description */ + QStringList contentTypes; /*!< Supported content types */ + QStringList protocols; /*!< Supported protocols. Should be empty if plugin uses stream input. */ + bool hasAbout; /*!< Should be \b true if plugin has about dialog, otherwise returns \b false */ + bool hasSettings; /*!< Should be \b true if plugin has settings dialog, otherwise returns \b false */ }; /*! @brief Engine plugin interface. * @author Ilya Kotov diff --git a/src/qmmp/inputsource.cpp b/src/qmmp/inputsource.cpp index 912e3df87..43451f356 100644 --- a/src/qmmp/inputsource.cpp +++ b/src/qmmp/inputsource.cpp @@ -19,7 +19,6 @@ ***************************************************************************/ #include -#include #include #include #include @@ -68,8 +67,7 @@ InputSource *InputSource::create(const QString &url, QObject *parent) } foreach(InputSourceFactory *f, *m_factories) { - QStringList protocols = f->properties().protocols.split(" "); - if(protocols.contains(url.section("://", 0, 0))) + if(f->properties().protocols.contains(url.section("://", 0, 0))) { factory = f; break; @@ -99,10 +97,20 @@ QStringList InputSource::files() return m_files; } -void InputSource::checkFactories() +QStringList InputSource::protocols() { - QSettings settings (Qmmp::configFile(), QSettings::IniFormat); + checkFactories(); + QStringList protocolsList; + foreach(InputSourceFactory *f, *m_factories) + { + protocolsList << f->properties().protocols; + } + protocolsList.removeDuplicates(); + return protocolsList; +} +void InputSource::checkFactories() +{ if (!m_factories) { m_files.clear(); diff --git a/src/qmmp/inputsource.h b/src/qmmp/inputsource.h index d6c98c5f4..49384e61c 100644 --- a/src/qmmp/inputsource.h +++ b/src/qmmp/inputsource.h @@ -85,6 +85,10 @@ public: * Returns a list of transport plugin file names. */ static QStringList files(); + /*! + * Returns a list of supported protocols. + */ + static QStringList protocols(); signals: /*! diff --git a/src/qmmp/inputsourcefactory.h b/src/qmmp/inputsourcefactory.h index 00159c9b9..3764cef56 100644 --- a/src/qmmp/inputsourcefactory.h +++ b/src/qmmp/inputsourcefactory.h @@ -24,6 +24,7 @@ #include class QTranslator; +class QStringList; class InputSource; /*! @brief Helper class to store transport plugin properies. @@ -41,11 +42,11 @@ public: hasAbout = false; } - QString name; /*!< Transport plugin full name */ - QString shortName; /*!< Transport plugin name for internal usage */ - QString protocols; /*!< Supported protocols. */ - bool hasAbout; /*!< Should be \b true if plugin has about dialog, otherwise \b false */ - bool hasSettings; /*!< Should be \b true if plugin has settings dialog, otherwise \b false */ + QString name; /*!< Transport plugin full name */ + QString shortName; /*!< Transport plugin name for internal usage */ + QStringList protocols; /*!< A list of supported protocols. */ + bool hasAbout; /*!< Should be \b true if plugin has about dialog, otherwise \b false */ + bool hasSettings; /*!< Should be \b true if plugin has settings dialog, otherwise \b false */ }; diff --git a/src/qmmp/metadatamanager.cpp b/src/qmmp/metadatamanager.cpp index 5a7a835a6..b1d2c255c 100644 --- a/src/qmmp/metadatamanager.cpp +++ b/src/qmmp/metadatamanager.cpp @@ -37,7 +37,6 @@ MetaDataManager::MetaDataManager() : m_mutex(QMutex::Recursive) m_instance = this; m_decoderFactories = Decoder::factories(); m_engineFactories = AbstractEngine::factories(); - m_inputSourceFactories = InputSource::factories(); m_settings = QmmpSettings::instance(); } @@ -66,20 +65,14 @@ QList MetaDataManager::createPlayList(const QString &fileName, bool else { QString scheme = fileName.section("://",0,0); - QStringList p; - foreach(InputSourceFactory *f, *m_inputSourceFactories) - { - p << f->properties().protocols.split(" ", QString::SkipEmptyParts); - } - if(p.contains(scheme)) + if(InputSource::protocols().contains(scheme)) { list << new FileInfo(fileName); return list; } foreach(fact, *m_decoderFactories) { - p = fact->properties().protocols.split(" ", QString::SkipEmptyParts); - if(p.contains(scheme) && Decoder::isEnabled(fact)) + if(fact->properties().protocols.contains(scheme) && Decoder::isEnabled(fact)) return fact->createPlayList(fileName, useMetaData); } } @@ -104,16 +97,13 @@ MetaDataModel* MetaDataManager::createMetaDataModel(const QString &path, QObject { QString scheme = path.section("://",0,0); MetaDataModel *model = 0; - foreach(fact, *Decoder::factories()) + if((fact = Decoder::findByProtocol(scheme))) { - if(fact->properties().protocols.split(" ").contains(scheme)) - model = fact->createMetaDataModel(path, parent); - if(model) - return model; + return fact->createMetaDataModel(path, parent); } foreach(efact, *AbstractEngine::factories()) { - if(efact->properties().protocols.split(" ").contains(scheme)) + if(efact->properties().protocols.contains(scheme) && AbstractEngine::isEnabled(efact)) model = efact->createMetaDataModel(path, parent); if(model) return model; @@ -127,13 +117,13 @@ QStringList MetaDataManager::filters() const QStringList filters; foreach(DecoderFactory *fact, *m_decoderFactories) { - if (Decoder::isEnabled(fact) && !fact->properties().filter.isEmpty()) - filters << fact->properties().description + " (" + fact->properties().filter + ")"; + if (Decoder::isEnabled(fact) && !fact->properties().filters.isEmpty()) + filters << fact->properties().description + " (" + fact->properties().filters.join(" ") + ")"; } foreach(EngineFactory *fact, *m_engineFactories) { - if (AbstractEngine::isEnabled(fact) && !fact->properties().filter.isEmpty()) - filters << fact->properties().description + " (" + fact->properties().filter + ")"; + if (AbstractEngine::isEnabled(fact) && !fact->properties().filters.isEmpty()) + filters << fact->properties().description + " (" + fact->properties().filters.join(" ") + ")"; } return filters; } @@ -144,12 +134,12 @@ QStringList MetaDataManager::nameFilters() const foreach(DecoderFactory *fact, *m_decoderFactories) { if (Decoder::isEnabled(fact)) - filters << fact->properties().filter.split(" ", QString::SkipEmptyParts); + filters << fact->properties().filters; } foreach(EngineFactory *fact, *m_engineFactories) { if (AbstractEngine::isEnabled(fact)) - filters << fact->properties().filter.split(" ", QString::SkipEmptyParts); + filters << fact->properties().filters; } return filters; } @@ -157,15 +147,10 @@ QStringList MetaDataManager::nameFilters() const QStringList MetaDataManager::protocols() const { QStringList p; - foreach(InputSourceFactory *f, *m_inputSourceFactories) - { - p << f->properties().protocols.split(" ", QString::SkipEmptyParts); - } - foreach(DecoderFactory *f, *m_decoderFactories) - { - if (Decoder::isEnabled(f)) - p << f->properties().protocols.split(" ", QString::SkipEmptyParts); - } + p << InputSource::protocols(); + p << Decoder::protocols(); + p << AbstractEngine::protocols(); + p.removeDuplicates(); return p; } diff --git a/src/qmmp/metadatamanager.h b/src/qmmp/metadatamanager.h index 09417903e..2d0ccdb72 100644 --- a/src/qmmp/metadatamanager.h +++ b/src/qmmp/metadatamanager.h @@ -107,7 +107,6 @@ private: QFileInfoList findCoverFiles(QDir dir, int depth) const; QList *m_decoderFactories; QList *m_engineFactories; - QList *m_inputSourceFactories; QMap m_cover_cache; QmmpSettings *m_settings; mutable QMutex m_mutex; diff --git a/src/qmmpui/fileloader.cpp b/src/qmmpui/fileloader.cpp index 6c53c62a8..d5d4c01af 100644 --- a/src/qmmpui/fileloader.cpp +++ b/src/qmmpui/fileloader.cpp @@ -31,9 +31,7 @@ FileLoader::FileLoader(QObject *parent) : QThread(parent) FileLoader::~FileLoader() -{ - qWarning("FileLoader::~FileLoader()"); -} +{} void FileLoader::addFile(const QString &path) -- cgit v1.2.3-13-gbd6f