diff options
Diffstat (limited to 'src/plugins/Input')
| -rw-r--r-- | src/plugins/Input/Input.pro | 14 | ||||
| -rw-r--r-- | src/plugins/Input/flac/decoder_flac.cpp | 4 | ||||
| -rw-r--r-- | src/plugins/Input/flac/decoderflacfactory.cpp | 4 | ||||
| -rw-r--r-- | src/plugins/Input/flac/flac.pro | 28 | ||||
| -rw-r--r-- | src/plugins/Input/flac/flacmetadatamodel.cpp | 4 | ||||
| -rw-r--r-- | src/plugins/Input/mad/decodermadfactory.cpp | 2 | ||||
| -rw-r--r-- | src/plugins/Input/mad/mad.pro | 33 | ||||
| -rw-r--r-- | src/plugins/Input/modplug/modplug.pro | 27 | ||||
| -rw-r--r-- | src/plugins/Input/mpc/decodermpcfactory.cpp | 4 | ||||
| -rw-r--r-- | src/plugins/Input/mpc/mpc.pro | 30 | ||||
| -rw-r--r-- | src/plugins/Input/sndfile/sndfile.pro | 27 | ||||
| -rw-r--r-- | src/plugins/Input/vorbis/decodervorbisfactory.cpp | 2 | ||||
| -rw-r--r-- | src/plugins/Input/vorbis/vorbis.pro | 31 | ||||
| -rw-r--r-- | src/plugins/Input/vorbis/vorbismetadatamodel.cpp | 4 | ||||
| -rw-r--r-- | src/plugins/Input/wavpack/wavpack.pro | 29 |
15 files changed, 159 insertions, 84 deletions
diff --git a/src/plugins/Input/Input.pro b/src/plugins/Input/Input.pro index cc65fe64b..40317cf15 100644 --- a/src/plugins/Input/Input.pro +++ b/src/plugins/Input/Input.pro @@ -1,22 +1,22 @@ include(../../../qmmp.pri) -SUBDIRS += mad cue +SUBDIRS += mad cue vorbis sndfile wavpack TEMPLATE = subdirs -unix{ -SUBDIRS += vorbis sndfile wavpack -contains(CONFIG, MODPLUG_PLUGIN){ - SUBDIRS += modplug +contains(CONFIG, FLAC_PLUGIN){ + SUBDIRS += flac } contains(CONFIG, MUSEPACK_PLUGIN){ SUBDIRS += mpc } -contains(CONFIG, FLAC_PLUGIN){ - SUBDIRS += flac +contains(CONFIG, MODPLUG_PLUGIN){ + SUBDIRS += modplug } +unix{ + contains(CONFIG, FFMPEG_PLUGIN){ SUBDIRS += ffmpeg } diff --git a/src/plugins/Input/flac/decoder_flac.cpp b/src/plugins/Input/flac/decoder_flac.cpp index 2eecb7272..ee1972560 100644 --- a/src/plugins/Input/flac/decoder_flac.cpp +++ b/src/plugins/Input/flac/decoder_flac.cpp @@ -283,10 +283,10 @@ bool DecoderFLAC::initialize() p.replace(QString(QUrl::toPercentEncoding("?")), "?"); p.replace(QString(QUrl::toPercentEncoding("%")), "%"); p.replace(QString(QUrl::toPercentEncoding(":")), ":"); - TagLib::FLAC::File fileRef(p.toLocal8Bit ()); + TagLib::FLAC::File fileRef(p.toLocal8Bit().constData()); //looking for cuesheet comment TagLib::Ogg::XiphComment *xiph_comment = fileRef.xiphComment(); - QList <FileInfo*> list; + if (xiph_comment && xiph_comment->fieldListMap().contains("CUESHEET")) { qDebug("DecoderFLAC: using cuesheet xiph comment."); diff --git a/src/plugins/Input/flac/decoderflacfactory.cpp b/src/plugins/Input/flac/decoderflacfactory.cpp index c1eee4480..ed6f05705 100644 --- a/src/plugins/Input/flac/decoderflacfactory.cpp +++ b/src/plugins/Input/flac/decoderflacfactory.cpp @@ -102,13 +102,13 @@ QList<FileInfo *> DecoderFLACFactory::createPlayList(const QString &fileName, bo if(fileName.endsWith(".flac", Qt::CaseInsensitive)) { - flacFile = new TagLib::FLAC::File(fileName.toLocal8Bit ()); + flacFile = new TagLib::FLAC::File(fileName.toLocal8Bit().constData()); tag = useMetaData ? flacFile->xiphComment() : 0; ap = flacFile->audioProperties(); } else if(fileName.endsWith(".oga", Qt::CaseInsensitive)) { - oggFlacFile = new TagLib::Ogg::FLAC::File(fileName.toLocal8Bit ()); + oggFlacFile = new TagLib::Ogg::FLAC::File(fileName.toLocal8Bit().constData()); tag = useMetaData ? oggFlacFile->tag() : 0; ap = oggFlacFile->audioProperties(); } diff --git a/src/plugins/Input/flac/flac.pro b/src/plugins/Input/flac/flac.pro index d39776fa2..e25230f23 100644 --- a/src/plugins/Input/flac/flac.pro +++ b/src/plugins/Input/flac/flac.pro @@ -11,7 +11,7 @@ SOURCES += decoder_flac.cpp \ flacmetadatamodel.cpp \ replaygainreader.cpp TARGET = $$PLUGINS_PREFIX/Input/flac -QMAKE_CLEAN = $$PLUGINS_PREFIX/Input/libflac.so + INCLUDEPATH += ../../../ CONFIG += release \ warn_on \ @@ -19,11 +19,8 @@ CONFIG += release \ link_pkgconfig TEMPLATE = lib QMAKE_LIBDIR += ../../../../lib -LIBS += -lqmmp \ - -L/usr/lib \ - -I/usr/include -PKGCONFIG += taglib \ - flac + + TRANSLATIONS = translations/flac_plugin_ru.ts \ translations/flac_plugin_uk_UA.ts \ translations/flac_plugin_zh_CN.ts \ @@ -39,6 +36,19 @@ TRANSLATIONS = translations/flac_plugin_ru.ts \ translations/flac_plugin_es.ts RESOURCES = translations/translations.qrc -isEmpty(LIB_DIR):LIB_DIR = /lib -target.path = $$LIB_DIR/qmmp/Input -INSTALLS += target + +unix { + isEmpty(LIB_DIR):LIB_DIR = /lib + target.path = $$LIB_DIR/qmmp/Input + INSTALLS += target + PKGCONFIG += taglib flac + LIBS += -lqmmp + QMAKE_CLEAN = $$PLUGINS_PREFIX/Input/libflac.so +} + +win32 { + HEADERS += ../../../../src/qmmp/metadatamodel.h \ + ../../../../src/qmmp/decoderfactory.h + QMAKE_LIBDIR += ../../../../bin + LIBS += -lqmmp0 -lflac -logg -ltag.dll -lm +} diff --git a/src/plugins/Input/flac/flacmetadatamodel.cpp b/src/plugins/Input/flac/flacmetadatamodel.cpp index 48cd4bc9e..eb89e4724 100644 --- a/src/plugins/Input/flac/flacmetadatamodel.cpp +++ b/src/plugins/Input/flac/flacmetadatamodel.cpp @@ -62,13 +62,13 @@ QHash<QString, QString> FLACMetaDataModel::audioProperties() qint64 size = 0; if(m_path.endsWith(".flac")) { - flacFile = new TagLib::FLAC::File(m_path.toLocal8Bit ()); + flacFile = new TagLib::FLAC::File(m_path.toLocal8Bit().constData()); taglib_ap = flacFile->audioProperties(); size = flacFile->length(); } else if(m_path.endsWith(".oga")) { - oggFlacFile = new TagLib::Ogg::FLAC::File(m_path.toLocal8Bit ()); + oggFlacFile = new TagLib::Ogg::FLAC::File(m_path.toLocal8Bit().constData()); taglib_ap = oggFlacFile->audioProperties(); size = oggFlacFile->length(); } diff --git a/src/plugins/Input/mad/decodermadfactory.cpp b/src/plugins/Input/mad/decodermadfactory.cpp index a6a192234..83a3d4f29 100644 --- a/src/plugins/Input/mad/decodermadfactory.cpp +++ b/src/plugins/Input/mad/decodermadfactory.cpp @@ -224,7 +224,7 @@ void DecoderMADFactory::showAbout(QWidget *parent) .arg(MAD_VERSION_MINOR) .arg(MAD_VERSION_PATCH).arg(MAD_VERSION_EXTRA)+"\n"+ tr("Written by: Ilya Kotov <forkotov02@hotmail.ru>")+"\n"+ - tr("Source code based on mq3 and madplay progects") + tr("Source code based on mq3 and madplay projects") ); } diff --git a/src/plugins/Input/mad/mad.pro b/src/plugins/Input/mad/mad.pro index 5cbc61a0c..17f9b7918 100644 --- a/src/plugins/Input/mad/mad.pro +++ b/src/plugins/Input/mad/mad.pro @@ -13,25 +13,16 @@ SOURCES += decoder_mad.cpp \ mpegmetadatamodel.cpp \ replaygainreader.cpp TARGET = $$PLUGINS_PREFIX/Input/mad -unix:QMAKE_CLEAN = $$PLUGINS_PREFIX/Input/libmad.so -INCLUDEPATH += ../../../ \ - ./ -win32:INCLUDEPATH += D:\qt4\MINGW\include\taglib + +INCLUDEPATH += ../../../ + CONFIG += release \ warn_on \ plugin \ link_pkgconfig TEMPLATE = lib -unix:QMAKE_LIBDIR += ../../../../lib -win32:QMAKE_LIBDIR += ../../../../bin -unix:LIBS += -lqmmp \ - -lmad -unix:PKGCONFIG += taglib \ - mad -win32:LIBS += -lqmmp0 \ - -lmad \ - -ltag.dll \ - -ltag_c.dll + + TRANSLATIONS = translations/mad_plugin_ru.ts \ translations/mad_plugin_uk_UA.ts \ translations/mad_plugin_zh_CN.ts \ @@ -52,6 +43,16 @@ unix { isEmpty(LIB_DIR):LIB_DIR = /lib target.path = $$LIB_DIR/qmmp/Input INSTALLS += target + + QMAKE_LIBDIR += ../../../../lib + LIBS += -lqmmp -lmad + PKGCONFIG += taglib mad + QMAKE_CLEAN = $$PLUGINS_PREFIX/Input/libmad.so +} + +win32 { + HEADERS += ../../../../src/qmmp/metadatamodel.h \ + ../../../../src/qmmp/decoderfactory.h + QMAKE_LIBDIR += ../../../../bin + LIBS += -lqmmp0 -lmad -ltag.dll } -win32:HEADERS += ../../../../src/qmmp/metadatamodel.h \ - ../../../../src/qmmp/decoderfactory.h diff --git a/src/plugins/Input/modplug/modplug.pro b/src/plugins/Input/modplug/modplug.pro index ccc2d840b..2b456bab7 100644 --- a/src/plugins/Input/modplug/modplug.pro +++ b/src/plugins/Input/modplug/modplug.pro @@ -11,7 +11,7 @@ SOURCES += decoder_modplug.cpp \ archivereader.cpp \ modplugmetadatamodel.cpp TARGET = $$PLUGINS_PREFIX/Input/modplug -QMAKE_CLEAN = $$PLUGINS_PREFIX/Input/libmodplug.so + DEFINES += HAVE_STDINT_H \ HAVE_INTTYPES_H INCLUDEPATH += ../../../ @@ -21,10 +21,8 @@ CONFIG += release \ link_pkgconfig TEMPLATE = lib QMAKE_LIBDIR += ../../../../lib -LIBS += -lqmmp \ - -L/usr/lib \ - -I/usr/include -PKGCONFIG += libmodplug + + TRANSLATIONS = translations/modplug_plugin_cs.ts \ translations/modplug_plugin_de.ts \ translations/modplug_plugin_zh_CN.ts \ @@ -43,3 +41,22 @@ RESOURCES = translations/translations.qrc isEmpty(LIB_DIR):LIB_DIR = /lib target.path = $$LIB_DIR/qmmp/Input INSTALLS += target + +unix { + isEmpty(LIB_DIR):LIB_DIR = /lib + target.path = $$LIB_DIR/qmmp/Input + INSTALLS += target + + QMAKE_LIBDIR += ../../../../lib + LIBS += -lqmmp + PKGCONFIG += libmodplug + QMAKE_CLEAN = $$PLUGINS_PREFIX/Input/libmodplug.so +} + +win32 { + HEADERS += ../../../../src/qmmp/metadatamodel.h \ + ../../../../src/qmmp/decoderfactory.h + QMAKE_LIBDIR += ../../../../bin + LIBS += -lqmmp0 -lmodplug + DEFINES -= UNICODE +} diff --git a/src/plugins/Input/mpc/decodermpcfactory.cpp b/src/plugins/Input/mpc/decodermpcfactory.cpp index 07fd9693b..3dfd32407 100644 --- a/src/plugins/Input/mpc/decodermpcfactory.cpp +++ b/src/plugins/Input/mpc/decodermpcfactory.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2010 by Ilya Kotov * + * Copyright (C) 2008-2012 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -75,7 +75,7 @@ QList<FileInfo *> DecoderMPCFactory::createPlayList(const QString &fileName, boo { FileInfo *info = new FileInfo(fileName); - TagLib::MPC::File fileRef(fileName.toLocal8Bit ()); + TagLib::MPC::File fileRef(fileName.toLocal8Bit().constData()); TagLib::APE::Tag *tag = useMetaData ? fileRef.APETag() : 0; if (tag && !tag->isEmpty()) { diff --git a/src/plugins/Input/mpc/mpc.pro b/src/plugins/Input/mpc/mpc.pro index 3fe8322b6..54fdce022 100644 --- a/src/plugins/Input/mpc/mpc.pro +++ b/src/plugins/Input/mpc/mpc.pro @@ -7,7 +7,7 @@ SOURCES += decoder_mpc.cpp \ decodermpcfactory.cpp \ mpcmetadatamodel.cpp TARGET = $$PLUGINS_PREFIX/Input/mpc -QMAKE_CLEAN = $$PLUGINS_PREFIX/Input/libmpc.so + INCLUDEPATH += ../../../ CONFIG += release \ warn_on \ @@ -15,11 +15,7 @@ CONFIG += release \ link_pkgconfig TEMPLATE = lib QMAKE_LIBDIR += ../../../../lib -LIBS += -lqmmp \ - -L/usr/lib \ - -lmpcdec \ - -I/usr/include -PKGCONFIG += taglib + TRANSLATIONS = translations/mpc_plugin_ru.ts \ translations/mpc_plugin_uk_UA.ts \ translations/mpc_plugin_zh_CN.ts \ @@ -35,7 +31,21 @@ TRANSLATIONS = translations/mpc_plugin_ru.ts \ translations/mpc_plugin_es.ts RESOURCES = translations/translations.qrc -isEmpty (LIB_DIR):LIB_DIR = /lib -exists(/usr/include/mpcdec/mpcdec.h):DEFINES += MPC_OLD_API -target.path = $$LIB_DIR/qmmp/Input -INSTALLS += target +unix { + isEmpty(LIB_DIR):LIB_DIR = /lib + target.path = $$LIB_DIR/qmmp/Input + INSTALLS += target + + PKGCONFIG += taglib + LIBS += -lqmmp -lmpcdec -I/usr/include + exists(/usr/include/mpcdec/mpcdec.h):DEFINES += MPC_OLD_API + QMAKE_CLEAN = $$PLUGINS_PREFIX/Input/libmpc.so +} + +win32 { + HEADERS += ../../../../src/qmmp/metadatamodel.h \ + ../../../../src/qmmp/decoderfactory.h + QMAKE_LIBDIR += ../../../../bin + LIBS += -lqmmp0 -lmpcdec -ltag.dll + DEFINES += MPC_OLD_API +} diff --git a/src/plugins/Input/sndfile/sndfile.pro b/src/plugins/Input/sndfile/sndfile.pro index adf2703c7..914170d4c 100644 --- a/src/plugins/Input/sndfile/sndfile.pro +++ b/src/plugins/Input/sndfile/sndfile.pro @@ -6,18 +6,19 @@ SOURCES += decoder_sndfile.cpp \ decodersndfilefactory.cpp TARGET=$$PLUGINS_PREFIX/Input/sndfile -QMAKE_CLEAN =$$PLUGINS_PREFIX/Input/libsndfile.so + INCLUDEPATH += ../../../ CONFIG += release \ warn_on \ plugin \ link_pkgconfig + TEMPLATE = lib + QMAKE_LIBDIR += ../../../../lib -LIBS += -lqmmp -L/usr/lib -I/usr/include -PKGCONFIG += sndfile + TRANSLATIONS = translations/sndfile_plugin_cs.ts \ translations/sndfile_plugin_de.ts \ translations/sndfile_plugin_zh_CN.ts \ @@ -34,8 +35,20 @@ TRANSLATIONS = translations/sndfile_plugin_cs.ts \ RESOURCES = translations/translations.qrc -isEmpty (LIB_DIR){ -LIB_DIR = /lib +unix { + isEmpty(LIB_DIR):LIB_DIR = /lib + target.path = $$LIB_DIR/qmmp/Input + INSTALLS += target + + QMAKE_LIBDIR += ../../../../lib + LIBS += -lqmmp + PKGCONFIG += sndfile + QMAKE_CLEAN =$$PLUGINS_PREFIX/Input/libsndfile.so +} + +win32 { + HEADERS += ../../../../src/qmmp/metadatamodel.h \ + ../../../../src/qmmp/decoderfactory.h + QMAKE_LIBDIR += ../../../../bin + LIBS += -lqmmp0 -lsndfile -lflac -lvorbisenc -lvorbis -logg } -target.path = $$LIB_DIR/qmmp/Input -INSTALLS += target diff --git a/src/plugins/Input/vorbis/decodervorbisfactory.cpp b/src/plugins/Input/vorbis/decodervorbisfactory.cpp index 8d5676504..9b27dec34 100644 --- a/src/plugins/Input/vorbis/decodervorbisfactory.cpp +++ b/src/plugins/Input/vorbis/decodervorbisfactory.cpp @@ -78,7 +78,7 @@ QList<FileInfo *> DecoderVorbisFactory::createPlayList(const QString &fileName, { FileInfo *info = new FileInfo(fileName); - TagLib::Ogg::Vorbis::File fileRef(fileName.toLocal8Bit ()); + TagLib::Ogg::Vorbis::File fileRef(fileName.toLocal8Bit().constData()); TagLib::Ogg::XiphComment *tag = useMetaData ? fileRef.tag() : 0; if (tag && !tag->isEmpty()) diff --git a/src/plugins/Input/vorbis/vorbis.pro b/src/plugins/Input/vorbis/vorbis.pro index d4b4c16e0..5be351f1d 100644 --- a/src/plugins/Input/vorbis/vorbis.pro +++ b/src/plugins/Input/vorbis/vorbis.pro @@ -9,7 +9,7 @@ SOURCES += decoder_vorbis.cpp \ vorbismetadatamodel.cpp \ replaygainreader.cpp TARGET = $$PLUGINS_PREFIX/Input/vorbis -QMAKE_CLEAN = $$PLUGINS_PREFIX/Input/libvorbis.so + INCLUDEPATH += ../../../ CONFIG += release \ warn_on \ @@ -17,12 +17,8 @@ CONFIG += release \ link_pkgconfig TEMPLATE = lib QMAKE_LIBDIR += ../../../../lib -LIBS += -lqmmp \ - -L/usr/lib -PKGCONFIG += taglib \ - ogg \ - vorbisfile \ - vorbis + + TRANSLATIONS = translations/vorbis_plugin_ru.ts \ translations/vorbis_plugin_uk_UA.ts \ translations/vorbis_plugin_zh_CN.ts \ @@ -38,6 +34,21 @@ TRANSLATIONS = translations/vorbis_plugin_ru.ts \ translations/vorbis_plugin_es.ts RESOURCES = translations/translations.qrc -isEmpty (LIB_DIR):LIB_DIR = /lib -target.path = $$LIB_DIR/qmmp/Input -INSTALLS += target + +unix { + isEmpty (LIB_DIR):LIB_DIR = /lib + target.path = $$LIB_DIR/qmmp/Input + INSTALLS += target + + PKGCONFIG += taglib ogg vorbisfile vorbis + LIBS += -lqmmp + QMAKE_CLEAN = $$PLUGINS_PREFIX/Input/libvorbis.so +} + +win32 { + HEADERS += ../../../../src/qmmp/metadatamodel.h \ + ../../../../src/qmmp/decoderfactory.h + QMAKE_LIBDIR += ../../../../bin + LIBS += -lqmmp0 -lvorbisfile -lvorbis -logg -ltag.dll -lm + LD_FLAGS += -no-undefined +} diff --git a/src/plugins/Input/vorbis/vorbismetadatamodel.cpp b/src/plugins/Input/vorbis/vorbismetadatamodel.cpp index 321906f42..bb7451a50 100644 --- a/src/plugins/Input/vorbis/vorbismetadatamodel.cpp +++ b/src/plugins/Input/vorbis/vorbismetadatamodel.cpp @@ -43,7 +43,7 @@ VorbisMetaDataModel::~VorbisMetaDataModel() QHash<QString, QString> VorbisMetaDataModel::audioProperties() { QHash<QString, QString> ap; - TagLib::Ogg::Vorbis::File f (m_path.toLocal8Bit()); + TagLib::Ogg::Vorbis::File f (m_path.toLocal8Bit().constData()); if(f.audioProperties()) { QString text = QString("%1").arg(f.audioProperties()->length()/60); @@ -208,6 +208,6 @@ void VorbisCommentModel::save() //taglib bug workarround QString path = QString::fromLocal8Bit(m_file->name()); delete m_file; - m_file = new TagLib::Ogg::Vorbis::File(path.toLocal8Bit()); + m_file = new TagLib::Ogg::Vorbis::File(path.toLocal8Bit().constData()); m_tag = m_file->tag(); } diff --git a/src/plugins/Input/wavpack/wavpack.pro b/src/plugins/Input/wavpack/wavpack.pro index 1d386efde..1d11b337b 100644 --- a/src/plugins/Input/wavpack/wavpack.pro +++ b/src/plugins/Input/wavpack/wavpack.pro @@ -11,7 +11,7 @@ SOURCES += decoder_wavpack.cpp \ wavpackmetadatamodel.cpp \ replaygainreader.cpp TARGET = $$PLUGINS_PREFIX/Input/wavpack -QMAKE_CLEAN = $$PLUGINS_PREFIX/Input/libwavpack.so + INCLUDEPATH += ../../../ CONFIG += release \ warn_on \ @@ -19,10 +19,8 @@ CONFIG += release \ link_pkgconfig TEMPLATE = lib QMAKE_LIBDIR += ../../../../lib -LIBS += -lqmmp \ - -L/usr/lib \ - -I/usr/include -PKGCONFIG += wavpack + + TRANSLATIONS = translations/wavpack_plugin_cs.ts \ translations/wavpack_plugin_de.ts \ translations/wavpack_plugin_zh_CN.ts \ @@ -38,6 +36,21 @@ TRANSLATIONS = translations/wavpack_plugin_cs.ts \ translations/wavpack_plugin_es.ts RESOURCES = translations/translations.qrc -isEmpty (LIB_DIR):LIB_DIR = /lib -target.path = $$LIB_DIR/qmmp/Input -INSTALLS += target + +unix { + isEmpty(LIB_DIR):LIB_DIR = /lib + target.path = $$LIB_DIR/qmmp/Input + INSTALLS += target + + QMAKE_LIBDIR += ../../../../lib + LIBS += -lqmmp + PKGCONFIG += wavpack + QMAKE_CLEAN = $$PLUGINS_PREFIX/Input/libwavpack.so +} + +win32 { + HEADERS += ../../../../src/qmmp/metadatamodel.h \ + ../../../../src/qmmp/decoderfactory.h + QMAKE_LIBDIR += ../../../../bin + LIBS += -lqmmp0 -lwavpack +} |
