diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2018-08-05 08:21:43 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2018-08-05 08:21:43 +0000 |
| commit | 8d146b246e3da5d26b9501ca509a43ef4112e27d (patch) | |
| tree | c2f6afa22262a836e2178786fdd43b6b269c21c0 /src/plugins/Input/aac | |
| parent | b662d3c4f6c525f401d08ec710f4a76b0c30b0b7 (diff) | |
| download | qmmp-8d146b246e3da5d26b9501ca509a43ef4112e27d.tar.gz qmmp-8d146b246e3da5d26b9501ca509a43ef4112e27d.tar.bz2 qmmp-8d146b246e3da5d26b9501ca509a43ef4112e27d.zip | |
fixed remaing plugins
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@8229 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Input/aac')
| -rw-r--r-- | src/plugins/Input/aac/aac.pro | 6 | ||||
| -rw-r--r-- | src/plugins/Input/aac/aacmetadatamodel.cpp | 51 | ||||
| -rw-r--r-- | src/plugins/Input/aac/aacmetadatamodel.h | 38 | ||||
| -rw-r--r-- | src/plugins/Input/aac/decoderaacfactory.cpp | 8 | ||||
| -rw-r--r-- | src/plugins/Input/aac/decoderaacfactory.h | 2 |
5 files changed, 8 insertions, 97 deletions
diff --git a/src/plugins/Input/aac/aac.pro b/src/plugins/Input/aac/aac.pro index 5be2bf90a..f7d618b51 100644 --- a/src/plugins/Input/aac/aac.pro +++ b/src/plugins/Input/aac/aac.pro @@ -4,12 +4,10 @@ TARGET = $$PLUGINS_PREFIX/Input/aac HEADERS += decoderaacfactory.h \ decoder_aac.h \ - aacfile.h \ - aacmetadatamodel.h + aacfile.h SOURCES += decoder_aac.cpp \ decoderaacfactory.cpp \ - aacfile.cpp \ - aacmetadatamodel.cpp + aacfile.cpp RESOURCES = translations/translations.qrc diff --git a/src/plugins/Input/aac/aacmetadatamodel.cpp b/src/plugins/Input/aac/aacmetadatamodel.cpp deleted file mode 100644 index c6adcc2c1..000000000 --- a/src/plugins/Input/aac/aacmetadatamodel.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2009-2018 by Ilya Kotov * - * forkotov02@ya.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., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - ***************************************************************************/ - -#include <QFile> -#include "aacfile.h" -#include "aacmetadatamodel.h" - -AACMetaDataModel::AACMetaDataModel(const QString &path, QObject *parent) : MetaDataModel(parent) -{ - m_path = path; -} - -AACMetaDataModel::~AACMetaDataModel() -{} - -QHash<QString, QString> AACMetaDataModel::audioProperties() -{ - QHash<QString, QString> ap; - QFile input(m_path); - if (!input.open(QIODevice::ReadOnly)) - return ap; - AACFile f(&input); - QString text; - text = QString("%1").arg(f.duration()/60000); - text +=":"+QString("%1").arg((f.duration()/1000)%60,2,10,QChar('0')); - ap.insert(tr("Length"), text); - text = QString("%1").arg(f.samplerate()); - ap.insert(tr("Sample rate"), text+" "+tr("Hz")); - text = QString("%1").arg(f.bitrate()); - ap.insert(tr("Bitrate"), text+" "+tr("kbps")); - text = QString("%1 "+tr("KB")).arg(input.size()/1024); - ap.insert(tr("File size"), text); - return ap; -} diff --git a/src/plugins/Input/aac/aacmetadatamodel.h b/src/plugins/Input/aac/aacmetadatamodel.h deleted file mode 100644 index 1a07b2dea..000000000 --- a/src/plugins/Input/aac/aacmetadatamodel.h +++ /dev/null @@ -1,38 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2009-2018 by Ilya Kotov * - * forkotov02@ya.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., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - ***************************************************************************/ - -#ifndef AACMETADATAMODEL_H -#define AACMETADATAMODEL_H - -#include <qmmp/metadatamodel.h> - -class AACMetaDataModel : public MetaDataModel -{ -Q_OBJECT -public: - AACMetaDataModel(const QString &path, QObject *parent); - ~AACMetaDataModel(); - QHash<QString, QString> audioProperties(); - -private: - QString m_path; -}; - -#endif // AACMETADATAMODEL_H diff --git a/src/plugins/Input/aac/decoderaacfactory.cpp b/src/plugins/Input/aac/decoderaacfactory.cpp index ef185f012..1589f9551 100644 --- a/src/plugins/Input/aac/decoderaacfactory.cpp +++ b/src/plugins/Input/aac/decoderaacfactory.cpp @@ -21,7 +21,6 @@ #include <QFile> #include <QMessageBox> #include "aacfile.h" -#include "aacmetadatamodel.h" #include "decoder_aac.h" #include "decoderaacfactory.h" @@ -89,9 +88,12 @@ QList<TrackInfo *> DecoderAACFactory::createPlayList(const QString &path, TrackI return QList<TrackInfo*>() << info; } -MetaDataModel* DecoderAACFactory::createMetaDataModel(const QString &path, QObject *parent) +MetaDataModel* DecoderAACFactory::createMetaDataModel(const QString &path, bool readOnly, QObject *parent) { - return new AACMetaDataModel(path, parent); + Q_UNUSED(path); + Q_UNUSED(readOnly); + Q_UNUSED(parent); + return 0; } void DecoderAACFactory::showSettings(QWidget *) diff --git a/src/plugins/Input/aac/decoderaacfactory.h b/src/plugins/Input/aac/decoderaacfactory.h index 1ddb25e68..59afe89b2 100644 --- a/src/plugins/Input/aac/decoderaacfactory.h +++ b/src/plugins/Input/aac/decoderaacfactory.h @@ -33,7 +33,7 @@ public: DecoderProperties properties() const; Decoder *create(const QString&, QIODevice *); QList<TrackInfo *> createPlayList(const QString &path, TrackInfo::Parts parts, QStringList *); - MetaDataModel* createMetaDataModel(const QString &path, QObject *parent = 0); + MetaDataModel* createMetaDataModel(const QString &path, bool readOnly = true, QObject *parent = 0); void showSettings(QWidget *parent); void showAbout(QWidget *parent); QString translation() const; |
