From 47269eb9a00b983d791cee8e1309ff1f735b6d7b Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Sun, 7 Dec 2008 14:09:43 +0000 Subject: midi plugin git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@672 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/Input/wildmidi/decoder_wildmidi.cpp | 257 +++++++++++++++ src/plugins/Input/wildmidi/decoder_wildmidi.h | 68 ++++ .../Input/wildmidi/decoderwildmidifactory.cpp | 97 ++++++ .../Input/wildmidi/decoderwildmidifactory.h | 52 +++ src/plugins/Input/wildmidi/detailsdialog.cpp | 142 ++++++++ src/plugins/Input/wildmidi/detailsdialog.h | 49 +++ src/plugins/Input/wildmidi/detailsdialog.ui | 364 +++++++++++++++++++++ src/plugins/Input/wildmidi/wildmidi.pro | 37 +++ 8 files changed, 1066 insertions(+) create mode 100644 src/plugins/Input/wildmidi/decoder_wildmidi.cpp create mode 100644 src/plugins/Input/wildmidi/decoder_wildmidi.h create mode 100644 src/plugins/Input/wildmidi/decoderwildmidifactory.cpp create mode 100644 src/plugins/Input/wildmidi/decoderwildmidifactory.h create mode 100644 src/plugins/Input/wildmidi/detailsdialog.cpp create mode 100644 src/plugins/Input/wildmidi/detailsdialog.h create mode 100644 src/plugins/Input/wildmidi/detailsdialog.ui create mode 100644 src/plugins/Input/wildmidi/wildmidi.pro (limited to 'src') diff --git a/src/plugins/Input/wildmidi/decoder_wildmidi.cpp b/src/plugins/Input/wildmidi/decoder_wildmidi.cpp new file mode 100644 index 000000000..48b2c636e --- /dev/null +++ b/src/plugins/Input/wildmidi/decoder_wildmidi.cpp @@ -0,0 +1,257 @@ +/*************************************************************************** + * Copyright (C) 2008 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 "decoder_wildmidi.h" + +// Decoder class + +DecoderWildMidi::DecoderWildMidi(QObject *parent, DecoderFactory *d, Output *o, const QString &path) + : Decoder(parent, d, o) +{ + m_path = path; + m_inited = FALSE; + m_user_stop = FALSE; + m_output_buf = 0; + m_output_bytes = 0; + m_output_at = 0; + m_bks = 0; + m_done = FALSE; + m_finish = FALSE; + m_freq = 0; + m_bitrate = 0; + m_seekTime = -1.0; + m_totalTime = 0.0; + m_chan = 0; + m_output_size = 0; + //m_context = 0; + midi_ptr = 0; +} + +DecoderWildMidi::~DecoderWildMidi() +{ + deinit(); + if (m_output_buf) + delete [] m_output_buf; + m_output_buf = 0; +} + +void DecoderWildMidi::stop() +{ + m_user_stop = TRUE; +} + +void DecoderWildMidi::flush(bool final) +{ + ulong min = final ? 0 : m_bks; + + while ((! m_done && ! m_finish) && m_output_bytes > min) + { + output()->recycler()->mutex()->lock (); + + while ((! m_done && ! m_finish) && output()->recycler()->full()) + { + mutex()->unlock(); + + output()->recycler()->cond()->wait(output()->recycler()->mutex()); + + mutex()->lock (); + m_done = m_user_stop; + } + + if (m_user_stop || m_finish) + { + m_inited = FALSE; + m_done = TRUE; + } + else + { + m_output_bytes -= produceSound(m_output_buf, m_output_bytes, m_bitrate, m_chan); + m_output_size += m_bks; + m_output_at = m_output_bytes; + } + + if (output()->recycler()->full()) + { + output()->recycler()->cond()->wakeOne(); + } + + output()->recycler()->mutex()->unlock(); + } +} + +bool DecoderWildMidi::initialize() +{ + m_bks = Buffer::size(); + m_inited = m_user_stop = m_done = m_finish = FALSE; + m_freq = m_bitrate = 0; + m_chan = 0; + m_output_size = 0; + m_seekTime = -1.0; + m_totalTime = 0.0; + _WM_Info *wm_info = 0; //TODO fix memory leak + + if (! m_output_buf) + m_output_buf = new char[globalBufferSize]; + m_output_at = 0; + m_output_bytes = 0; + + wm_info = new _WM_Info; + + unsigned long int mixer_options = 0; + + if (WildMidi_Init ("/etc/timidity/timidity.cfg", 44100, mixer_options) == -1) + return FALSE; + + midi_ptr = WildMidi_Open (m_path.toLocal8Bit()); + + wm_info = WildMidi_GetInfo(midi_ptr); + + m_totalTime = wm_info->approx_total_samples / 44100; + + configure(44100, 2, 16); + + m_inited = TRUE; + qDebug("DecoderWildMidi: initialize succes"); + return TRUE; +} + +qint64 DecoderWildMidi::lengthInSeconds() +{ + if (!m_inited) + return 0; + + return m_totalTime; +} + + +void DecoderWildMidi::seek(qint64 pos) +{ + m_seekTime = pos; +} + +void DecoderWildMidi::deinit() +{ + m_inited = m_user_stop = m_done = m_finish = FALSE; + m_freq = m_bitrate = 0; + m_chan = 0; + m_output_size = 0; + WildMidi_Shutdown(); +} + +void DecoderWildMidi::run() +{ + mutex()->lock (); + + ulong len = 0; + + _WM_Info *wm_info = new _WM_Info; + + if (!m_inited) + { + mutex()->unlock(); + return; + } + mutex()->unlock(); + + while (! m_done && ! m_finish) + { + mutex()->lock (); + + //seeking + + if (m_seekTime >= 0.0) + { + // WavpackSeekSample (m_context, m_seekTime * m_freq); + qint64 i = m_seekTime *44100; + long unsigned int *sample_pos = (long unsigned int *) &i; + WildMidi_FastSeek(midi_ptr, sample_pos); + m_seekTime = -1.0; + } + + wm_info = WildMidi_GetInfo(midi_ptr); + + if (wm_info->approx_total_samples > wm_info->current_sample) + len = WildMidi_GetOutput (midi_ptr, m_output_buf, globalBufferSize - m_output_at); + else + len = 0; + + if (len > 0) + { + m_bitrate = 0; //TODO calculate bitrate using file size and length + m_output_at += len; + m_output_bytes += len; + + if (output()) + flush(); + + } + else if (len == 0) + { + flush(TRUE); + + if (output()) + { + output()->recycler()->mutex()->lock (); + // end of stream + while (! output()->recycler()->empty() && ! m_user_stop) + { + output()->recycler()->cond()->wakeOne(); + mutex()->unlock(); + output()->recycler()->cond()->wait(output()->recycler()->mutex()); + mutex()->lock (); + } + output()->recycler()->mutex()->unlock(); + } + + m_done = TRUE; + if (! m_user_stop) + { + m_finish = TRUE; + } + } + else + { + // error while reading + qWarning("DecoderWildMidi: Error while decoding stream, file appears to be corrupted"); + m_finish = TRUE; + } + mutex()->unlock(); + } + + mutex()->lock (); + + if (m_finish) + finish(); + + mutex()->unlock(); + deinit(); +} diff --git a/src/plugins/Input/wildmidi/decoder_wildmidi.h b/src/plugins/Input/wildmidi/decoder_wildmidi.h new file mode 100644 index 000000000..139a9d88d --- /dev/null +++ b/src/plugins/Input/wildmidi/decoder_wildmidi.h @@ -0,0 +1,68 @@ +/*************************************************************************** + * Copyright (C) 2008 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 DECODER_WILDMIDI_H +#define DECODER_WILDMIDI_H + +extern "C"{ +#include +} + +#include + + +class DecoderWildMidi : public Decoder +{ +public: + DecoderWildMidi(QObject *, DecoderFactory *, Output *, const QString &); + virtual ~DecoderWildMidi(); + + // Standard Decoder API + bool initialize(); + qint64 lengthInSeconds(); + void seek(qint64); + void stop(); + +private: + // thread run function + void run(); + void *midi_ptr; + // helper functions + void flush(bool = FALSE); + void deinit(); + + bool m_inited, m_user_stop; + int m_bps; //bits per sample + + // output buffer + char *m_output_buf; + qint64 m_output_bytes, m_output_at; + + unsigned int m_bks; //block size + bool m_done, m_finish; + long m_freq, m_bitrate; + int m_chan; + unsigned long m_output_size; + qint64 m_totalTime, m_seekTime; + QString m_path; +}; + + +#endif // DECODER_WILDMIDI_H diff --git a/src/plugins/Input/wildmidi/decoderwildmidifactory.cpp b/src/plugins/Input/wildmidi/decoderwildmidifactory.cpp new file mode 100644 index 000000000..eb563ab47 --- /dev/null +++ b/src/plugins/Input/wildmidi/decoderwildmidifactory.cpp @@ -0,0 +1,97 @@ +/*************************************************************************** + * Copyright (C) 2008 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 "detailsdialog.h" +#include "decoder_wildmidi.h" +#include "decoderwildmidifactory.h" + + +// DecoderWildMidiFactory + +bool DecoderWildMidiFactory::supports(const QString &source) const +{ + + return (source.right(4).toLower() == ".mid"); +} + +bool DecoderWildMidiFactory::canDecode(QIODevice *) const +{ + return FALSE; +} + +const DecoderProperties DecoderWildMidiFactory::properties() const +{ + DecoderProperties properties; + properties.name = tr("WildMidi Plugin"); + properties.filter = "*.mid"; + properties.description = tr("Midi Files"); + //properties.contentType = ; + properties.hasAbout = FALSE; + properties.hasSettings = FALSE; + properties.noInput = TRUE; + properties.protocols = "file"; + return properties; +} + +Decoder *DecoderWildMidiFactory::create(QObject *parent, QIODevice *input, + Output *output, const QString &path) +{ + Q_UNUSED(input); + return new DecoderWildMidi(parent, this, output, path); +} + +QList DecoderWildMidiFactory::createPlayList(const QString &fileName, bool useMetaData) +{ + QList list; + FileInfo *info = new FileInfo(fileName); + list << info; + return list; +} + +QObject* DecoderWildMidiFactory::showDetails(QWidget *parent, const QString &path) +{ + /*DetailsDialog *d = new DetailsDialog(parent, path); + d -> show();*/ + return 0; +} + +void DecoderWildMidiFactory::showSettings(QWidget *) +{} + +void DecoderWildMidiFactory::showAbout(QWidget *parent) +{ + /*QMessageBox::about (parent, tr("About WildMidi Audio Plugin"), + tr("Qmmp WildMidi Audio Plugin")+"\n"+ + tr("WildMidi library version:") + + QString(" %1").arg(WavpackGetLibraryVersionString ())+"\n"+ + tr("Writen by: Ilya Kotov "));*/ +} + +QTranslator *DecoderWildMidiFactory::createTranslator(QObject *parent) +{ + QTranslator *translator = new QTranslator(parent); + QString locale = QLocale::system().name(); + translator->load(QString(":/wildmidi_plugin_") + locale); + return translator; +} + +Q_EXPORT_PLUGIN(DecoderWildMidiFactory) diff --git a/src/plugins/Input/wildmidi/decoderwildmidifactory.h b/src/plugins/Input/wildmidi/decoderwildmidifactory.h new file mode 100644 index 000000000..003738160 --- /dev/null +++ b/src/plugins/Input/wildmidi/decoderwildmidifactory.h @@ -0,0 +1,52 @@ +/*************************************************************************** + * Copyright (C) 2008 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 DECODERWILDMIDIFACTORY_H +#define DECODERWILDMIDIFACTORY_H + +#include +#include +#include +#include + +#include +#include +#include +#include + + +class DecoderWildMidiFactory : public QObject, + DecoderFactory +{ +Q_OBJECT +Q_INTERFACES(DecoderFactory); + +public: + bool supports(const QString &source) const; + bool canDecode(QIODevice *input) const; + const DecoderProperties properties() const; + Decoder *create(QObject *, QIODevice *, Output *, const QString &); + QList createPlayList(const QString &fileName, bool useMetaData); + QObject* showDetails(QWidget *parent, const QString &path); + void showSettings(QWidget *parent); + void showAbout(QWidget *parent); + QTranslator *createTranslator(QObject *parent); +}; + +#endif diff --git a/src/plugins/Input/wildmidi/detailsdialog.cpp b/src/plugins/Input/wildmidi/detailsdialog.cpp new file mode 100644 index 000000000..9952e60d8 --- /dev/null +++ b/src/plugins/Input/wildmidi/detailsdialog.cpp @@ -0,0 +1,142 @@ +/*************************************************************************** + * Copyright (C) 2008 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 + +extern "C" +{ +#include +} + +#include "detailsdialog.h" + +DetailsDialog::DetailsDialog(QWidget *parent, const QString &path) + : QDialog(parent) +{ + ui.setupUi(this); + setAttribute(Qt::WA_DeleteOnClose); + m_path = path; + setWindowTitle (path.section('/',-1)); + path.section('/',-1); + ui.pathLineEdit->setText(m_path); + if (QFile::exists(m_path)) + { + loadWavPackInfo(); + loadTag(); + } +} + + +DetailsDialog::~DetailsDialog() +{} + +void DetailsDialog::loadWavPackInfo() +{ + char err[80]; + WavpackContext *ctx = WavpackOpenFileInput (m_path.toLocal8Bit(), err, + OPEN_WVC | OPEN_TAGS, 0); + if (!ctx) + { + qWarning("DetailsDialog: error: %s", err); + return; + } + + QString text; + int length = (int) WavpackGetNumSamples(ctx)/WavpackGetSampleRate(ctx); + text = QString("%1").arg(length/60); + text +=":"+QString("%1").arg(length % 60, 2, 10, QChar('0')); + ui.lengthLabel->setText(text); + text = QString("%1").arg((int) WavpackGetSampleRate(ctx)); + ui.sampleRateLabel->setText(text+" "+tr("Hz")); + text = QString("%1").arg((int) WavpackGetNumChannels(ctx)); + ui.channelsLabel->setText(text); + text = QString("%1") + .arg((int) WavpackGetAverageBitrate(ctx, WavpackGetNumChannels(ctx))/1000); + ui.bitrateLabel->setText(text+" "+tr("kbps")); + QFileInfo info(m_path); + text = QString("%1 "+tr("KB")).arg((int) info.size()/1024); + ui.fileSizeLabel->setText(text); + ui.ratioLabel->setText(QString("%1").arg(WavpackGetRatio(ctx))); + ui.versionLabel->setText(QString("%1").arg(WavpackGetVersion(ctx))); + WavpackCloseFile (ctx); +} + +void DetailsDialog::loadTag() +{ + char err[80]; + WavpackContext *ctx = WavpackOpenFileInput (m_path.toLocal8Bit(), err, + OPEN_WVC | OPEN_TAGS, 0); + if (!ctx) + { + qWarning("DetailsDialog: error: %s", err); + return; + } + + char value[200]; + WavpackGetTagItem (ctx, "Title", value, sizeof(value)); + ui.titleLineEdit->setText(QString::fromUtf8(value)); + WavpackGetTagItem (ctx, "Artist", value, sizeof(value)); + ui.artistLineEdit->setText(QString::fromUtf8(value)); + WavpackGetTagItem (ctx, "Album", value, sizeof(value)); + ui.albumLineEdit->setText(QString::fromUtf8(value)); + WavpackGetTagItem (ctx, "Comment", value, sizeof(value)); + ui.commentLineEdit->setText(QString::fromUtf8(value)); + WavpackGetTagItem (ctx, "Year", value, sizeof(value)); + ui.yearLineEdit->setText(QString::fromUtf8(value)); + WavpackGetTagItem (ctx, "Track", value, sizeof(value)); + ui.trackLineEdit->setText(QString::fromUtf8(value)); + WavpackGetTagItem (ctx, "Genre", value, sizeof(value)); + ui.genreLineEdit->setText(QString::fromUtf8(value)); + + QFileInfo info(m_path); + ui.saveButton->setEnabled(info.isWritable()); + connect(ui.saveButton, SIGNAL(clicked()), SLOT(saveTag())); + WavpackCloseFile (ctx); +} + +void DetailsDialog::saveTag() +{ + char err[80]; + WavpackContext *ctx = WavpackOpenFileInput (m_path.toLocal8Bit(), err, + OPEN_WVC | OPEN_EDIT_TAGS, 0); + if (!ctx) + { + qWarning("DetailsDialog: error: %s", err); + return; + } + QByteArray value = ui.titleLineEdit->text().toUtf8(); + WavpackAppendTagItem(ctx, "Title", value, value.size()); + value = ui.artistLineEdit->text().toUtf8(); + WavpackAppendTagItem(ctx, "Artist", value, value.size()); + value = ui.albumLineEdit->text().toUtf8(); + WavpackAppendTagItem(ctx, "Album", value, value.size()); + value = ui.commentLineEdit->text().toUtf8(); + WavpackAppendTagItem(ctx, "Comment", value, value.size()); + value = ui.genreLineEdit->text().toUtf8(); + WavpackAppendTagItem(ctx, "Genre", value, value.size()); + value = ui.yearLineEdit->text().toUtf8(); + WavpackAppendTagItem(ctx, "Year", value, value.size()); + value = ui.trackLineEdit->text().toUtf8(); + WavpackAppendTagItem(ctx, "Track", value, value.size()); + + WavpackWriteTag (ctx); + WavpackCloseFile (ctx); +} diff --git a/src/plugins/Input/wildmidi/detailsdialog.h b/src/plugins/Input/wildmidi/detailsdialog.h new file mode 100644 index 000000000..a36f9695f --- /dev/null +++ b/src/plugins/Input/wildmidi/detailsdialog.h @@ -0,0 +1,49 @@ +/*************************************************************************** + * Copyright (C) 2008 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 DETAILSDIALOG_H +#define DETAILSDIALOG_H + +#include + +#include "ui_detailsdialog.h" + +/** + @author Ilya Kotov +*/ +class DetailsDialog : public QDialog +{ +Q_OBJECT +public: + DetailsDialog(QWidget *parent = 0, const QString &path = 0); + + ~DetailsDialog(); + +private slots: + void saveTag(); + +private: + void loadWavPackInfo(); + void loadTag(); + Ui::DetailsDialog ui; + QString m_path; + +}; + +#endif diff --git a/src/plugins/Input/wildmidi/detailsdialog.ui b/src/plugins/Input/wildmidi/detailsdialog.ui new file mode 100644 index 000000000..d1e0f9c80 --- /dev/null +++ b/src/plugins/Input/wildmidi/detailsdialog.ui @@ -0,0 +1,364 @@ + + DetailsDialog + + + + 0 + 0 + 545 + 374 + + + + Details + + + + + + File path: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + true + + + + + + + + 0 + 16 + + + + WavPack Info + + + + + + Length: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + - + + + + + + + Sample rate: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + - + + + + + + + File size: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + - + + + + + + + Qt::LeftToRight + + + Channels: + + + Qt::PlainText + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Qt::LeftToRight + + + - + + + + + + + Bitrate: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + - + + + + + + + Ratio: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + - + + + + + + + Version: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + - + + + + + + + Qt::Vertical + + + + 74 + 101 + + + + + + + + + + + + 0 + 0 + + + + APE Tag + + + + 8 + + + 8 + + + 8 + + + 8 + + + 6 + + + 6 + + + + + false + + + Save + + + + + + + + + + Track number: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + + + + Year: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + Genre: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + Comment: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + Album: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + Artist: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + Title: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + + + + + + + + + + + + + + + + + + + Qt::Horizontal + + + + 111 + 20 + + + + + + + + Close + + + + + + + + + pushButton_3 + clicked() + DetailsDialog + close() + + + 623 + 353 + + + 539 + 352 + + + + + diff --git a/src/plugins/Input/wildmidi/wildmidi.pro b/src/plugins/Input/wildmidi/wildmidi.pro new file mode 100644 index 000000000..86d7188b5 --- /dev/null +++ b/src/plugins/Input/wildmidi/wildmidi.pro @@ -0,0 +1,37 @@ +include(../../plugins.pri) + +FORMS += detailsdialog.ui +HEADERS += decoderwildmidifactory.h \ + decoder_wildmidi.h \ + detailsdialog.h +SOURCES += decoder_wildmidi.cpp \ + decoderwildmidifactory.cpp \ + detailsdialog.cpp + +TARGET=$$PLUGINS_PREFIX/Input/wildmidi +QMAKE_CLEAN =$$PLUGINS_PREFIX/Input/libwildmidi.so + + +INCLUDEPATH += ../../../ +CONFIG += release \ +warn_on \ +plugin + +TEMPLATE = lib +QMAKE_LIBDIR += ../../../../lib +LIBS += -lqmmp -L/usr/lib -I/usr/include -lWildMidi + +TRANSLATIONS = translations/wildmidi_plugin_cs.ts \ + translations/wildmidi_plugin_de.ts \ + translations/wildmidi_plugin_zh_CN.ts \ + translations/wildmidi_plugin_zh_TW.ts \ + translations/wildmidi_plugin_ru.ts \ + translations/wildmidi_plugin_uk_UA.ts +#RESOURCES = translations/translations.qrc + +isEmpty (LIB_DIR){ +LIB_DIR = /lib +} + +target.path = $$LIB_DIR/qmmp/Input +INSTALLS += target -- cgit v1.2.3-13-gbd6f