From 7a3c89bf2d71b74a8edbc39ec1264c68307cc888 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Fri, 9 Oct 2009 20:01:12 +0000 Subject: added engine api, enabled mplayer plugin git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1296 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/Input/CMakeLists.txt | 5 - src/plugins/Input/cue/cueparser.cpp | 5 +- src/plugins/Input/flac/cueparser.cpp | 4 +- src/plugins/Input/mplayer/CMakeLists.txt | 67 ---- src/plugins/Input/mplayer/decoder_mplayer.cpp | 221 ------------ src/plugins/Input/mplayer/decoder_mplayer.h | 81 ----- .../Input/mplayer/decodermplayerfactory.cpp | 108 ------ src/plugins/Input/mplayer/decodermplayerfactory.h | 50 --- src/plugins/Input/mplayer/detailsdialog.cpp | 107 ------ src/plugins/Input/mplayer/detailsdialog.h | 43 --- src/plugins/Input/mplayer/detailsdialog.ui | 390 --------------------- src/plugins/Input/mplayer/mplayer.pro | 45 --- src/plugins/Input/mplayer/settingsdialog.cpp | 69 ---- src/plugins/Input/mplayer/settingsdialog.h | 46 --- src/plugins/Input/mplayer/settingsdialog.ui | 141 -------- .../mplayer/translations/mplayer_plugin_cs.ts | 187 ---------- .../mplayer/translations/mplayer_plugin_de.ts | 187 ---------- .../mplayer/translations/mplayer_plugin_it.ts | 187 ---------- .../mplayer/translations/mplayer_plugin_lt.ts | 187 ---------- .../mplayer/translations/mplayer_plugin_pl.ts | 187 ---------- .../mplayer/translations/mplayer_plugin_ru.ts | 187 ---------- .../mplayer/translations/mplayer_plugin_tr.ts | 187 ---------- .../mplayer/translations/mplayer_plugin_uk_UA.ts | 187 ---------- .../mplayer/translations/mplayer_plugin_zh_CN.ts | 187 ---------- .../mplayer/translations/mplayer_plugin_zh_TW.ts | 187 ---------- .../Input/mplayer/translations/translations.qrc | 15 - src/plugins/Input/wavpack/cueparser.cpp | 6 +- 27 files changed, 7 insertions(+), 3266 deletions(-) delete mode 100644 src/plugins/Input/mplayer/CMakeLists.txt delete mode 100644 src/plugins/Input/mplayer/decoder_mplayer.cpp delete mode 100644 src/plugins/Input/mplayer/decoder_mplayer.h delete mode 100644 src/plugins/Input/mplayer/decodermplayerfactory.cpp delete mode 100644 src/plugins/Input/mplayer/decodermplayerfactory.h delete mode 100644 src/plugins/Input/mplayer/detailsdialog.cpp delete mode 100644 src/plugins/Input/mplayer/detailsdialog.h delete mode 100644 src/plugins/Input/mplayer/detailsdialog.ui delete mode 100644 src/plugins/Input/mplayer/mplayer.pro delete mode 100644 src/plugins/Input/mplayer/settingsdialog.cpp delete mode 100644 src/plugins/Input/mplayer/settingsdialog.h delete mode 100644 src/plugins/Input/mplayer/settingsdialog.ui delete mode 100644 src/plugins/Input/mplayer/translations/mplayer_plugin_cs.ts delete mode 100644 src/plugins/Input/mplayer/translations/mplayer_plugin_de.ts delete mode 100644 src/plugins/Input/mplayer/translations/mplayer_plugin_it.ts delete mode 100644 src/plugins/Input/mplayer/translations/mplayer_plugin_lt.ts delete mode 100644 src/plugins/Input/mplayer/translations/mplayer_plugin_pl.ts delete mode 100644 src/plugins/Input/mplayer/translations/mplayer_plugin_ru.ts delete mode 100644 src/plugins/Input/mplayer/translations/mplayer_plugin_tr.ts delete mode 100644 src/plugins/Input/mplayer/translations/mplayer_plugin_uk_UA.ts delete mode 100644 src/plugins/Input/mplayer/translations/mplayer_plugin_zh_CN.ts delete mode 100644 src/plugins/Input/mplayer/translations/mplayer_plugin_zh_TW.ts delete mode 100644 src/plugins/Input/mplayer/translations/translations.qrc (limited to 'src/plugins/Input') diff --git a/src/plugins/Input/CMakeLists.txt b/src/plugins/Input/CMakeLists.txt index b6cb405d5..2d2ca0a49 100644 --- a/src/plugins/Input/CMakeLists.txt +++ b/src/plugins/Input/CMakeLists.txt @@ -11,7 +11,6 @@ SET(USE_WAVPACK TRUE CACHE BOOL "enable/disable wavpack plugin") SET(USE_MODPLUG TRUE CACHE BOOL "enable/disable modplug plugin") SET(USE_AAC TRUE CACHE BOOL "enable/disable aac plugin") SET(USE_CUE TRUE CACHE BOOL "enable/disable cue plugin") -#SET(USE_MPLAYER TRUE CACHE BOOL "enable/disable mplayer support") SET(USE_CDA TRUE CACHE BOOL "enable/disable cd audio support") pkg_check_modules(TAGLIB taglib) @@ -56,10 +55,6 @@ IF(USE_CUE) add_subdirectory(cue) ENDIF(USE_CUE) -IF(USE_MPLAYER) -#add_subdirectory(mplayer) -ENDIF(USE_MPLAYER) - IF(USE_CDA) add_subdirectory(cdaudio) ENDIF(USE_CDA) diff --git a/src/plugins/Input/cue/cueparser.cpp b/src/plugins/Input/cue/cueparser.cpp index b6fb8594d..ba4305bfc 100644 --- a/src/plugins/Input/cue/cueparser.cpp +++ b/src/plugins/Input/cue/cueparser.cpp @@ -25,6 +25,7 @@ #include #include +#include #include "cueparser.h" @@ -113,7 +114,7 @@ CUEParser::CUEParser(const QString &fileName) m_infoList[i].setLength(m_infoList[i+1].length() - m_infoList[i].length()); else { - QList f_list = Decoder::createPlayList(m_files[i], FALSE); + QList f_list = MetaDataManager::instance()->createPlayList(m_files[i], FALSE); qint64 l = f_list.isEmpty() ? 0 : f_list.at(0)->length() * 1000; if (l > m_infoList[i].length()) m_infoList[i].setLength(l - m_infoList[i].length()); @@ -123,7 +124,7 @@ CUEParser::CUEParser(const QString &fileName) } //calculate last item length - QList f_list = Decoder::createPlayList(m_filePath, FALSE); + QList f_list = MetaDataManager::instance()->createPlayList(m_filePath, FALSE); qint64 l = f_list.isEmpty() ? 0 : f_list.at(0)->length() * 1000; if (l > m_infoList.last().length()) m_infoList.last().setLength(l - m_infoList.last().length()); diff --git a/src/plugins/Input/flac/cueparser.cpp b/src/plugins/Input/flac/cueparser.cpp index 20bf94ec7..75b538bcf 100644 --- a/src/plugins/Input/flac/cueparser.cpp +++ b/src/plugins/Input/flac/cueparser.cpp @@ -21,7 +21,7 @@ #include #include -#include +#include #include "cueparser.h" @@ -94,7 +94,7 @@ CUEParser::CUEParser(const QByteArray &array, const QString &fileName) for (int i = 0; i < m_infoList.size() - 1; ++i) m_infoList[i].setLength(m_infoList[i+1].length() - m_infoList[i].length()); //calculate last item length - QList f_list = Decoder::createPlayList(m_filePath, FALSE); + QList f_list = MetaDataManager::instance()->createPlayList(m_filePath, FALSE); qint64 l = f_list.isEmpty() ? 0 : f_list.at(0)->length() * 1000; if (l > m_infoList.last().length()) m_infoList.last().setLength(l - m_infoList.last().length()); diff --git a/src/plugins/Input/mplayer/CMakeLists.txt b/src/plugins/Input/mplayer/CMakeLists.txt deleted file mode 100644 index 2b87c27c7..000000000 --- a/src/plugins/Input/mplayer/CMakeLists.txt +++ /dev/null @@ -1,67 +0,0 @@ -project(libmplayer) - -cmake_minimum_required(VERSION 2.4.7) - -if(COMMAND cmake_policy) -cmake_policy(SET CMP0003 NEW) -endif(COMMAND cmake_policy) - - -# qt plugin -ADD_DEFINITIONS( -Wall ) -ADD_DEFINITIONS(${QT_DEFINITIONS}) -ADD_DEFINITIONS(-DQT_PLUGIN) -ADD_DEFINITIONS(-DQT_NO_DEBUG) -ADD_DEFINITIONS(-DQT_SHARED) -ADD_DEFINITIONS(-DQT_THREAD) - -include_directories(${CMAKE_CURRENT_BINARY_DIR}) - -SET(QT_INCLUDES - ${QT_INCLUDES} - ${CMAKE_CURRENT_BINARY_DIR}/../../../ -) - -# libqmmp -include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../../) -link_directories(${CMAKE_CURRENT_BINARY_DIR}/../../../qmmp) - - -SET(libmplayer_SRCS - decoder_mplayer.cpp - decodermplayerfactory.cpp - detailsdialog.cpp - settingsdialog.cpp -) - -SET(libmplayer_MOC_HDRS - decodermplayerfactory.h - decoder_mplayer.h - detailsdialog.h - settingsdialog.h -) - -SET(libmplayer_RCCS translations/translations.qrc) - -QT4_ADD_RESOURCES(libmplayer_RCC_SRCS ${libmplayer_RCCS}) - -QT4_WRAP_CPP(libmplayer_MOC_SRCS ${libmplayer_MOC_HDRS}) - -# user interface - - -SET(libmplayer_UIS - settingsdialog.ui - detailsdialog.ui -) - -QT4_WRAP_UI(libmplayer_UIS_H ${libmplayer_UIS}) -# Don't forget to include output directory, otherwise -# the UI file won't be wrapped! -include_directories(${CMAKE_CURRENT_BINARY_DIR}) - -ADD_LIBRARY(mplayer MODULE ${libmplayer_SRCS} ${libmplayer_MOC_SRCS} ${libmplayer_RCC_SRCS} ${libmplayer_UIS_H}) -add_dependencies(mplayer qmmp) -target_link_libraries(mplayer ${QT_LIBRARIES} -lqmmp) -install(TARGETS mplayer DESTINATION ${LIB_DIR}/qmmp/Input) - diff --git a/src/plugins/Input/mplayer/decoder_mplayer.cpp b/src/plugins/Input/mplayer/decoder_mplayer.cpp deleted file mode 100644 index 862bc3c90..000000000 --- a/src/plugins/Input/mplayer/decoder_mplayer.cpp +++ /dev/null @@ -1,221 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2008-2009 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 -#include -#include -#include -#include -#include - -#include "decoder_mplayer.h" - -#define MPLAYER_DEBUG - -static QRegExp rx_av("^[AV]: *([0-9,:.-]+)"); -static QRegExp rx_pause("^(.*)=(.*)PAUSE(.*)"); -static QRegExp rx_end("^(.*)End of file(.*)"); -static QRegExp rx_quit("^(.*)Quit(.*)"); -static QRegExp rx_audio("^AUDIO: *([0-9,.]+) *Hz.*([0-9,.]+) *ch.*([0-9]+).* ([0-9,.]+) *kbit.*"); - - -FileInfo *MplayerInfo::createFileInfo(const QString &path) -{ - QRegExp rx_id_length("^ID_LENGTH=([0-9,.]+)*"); - QStringList args; - args << "-slave"; - args << "-identify"; - args << "-frames"; - args << "0"; - args << "-vo"; - args << "null"; - args << "-ao"; - args << "null"; - args << path; - QProcess mplayer_process; - mplayer_process.start("mplayer", args); - mplayer_process.waitForFinished(); - QString str = QString::fromLocal8Bit(mplayer_process.readAll()).trimmed(); - FileInfo *info = new FileInfo(path); - QStringList lines = str.split("\n"); - foreach(QString line, lines) - { - if (rx_id_length.indexIn(line) > -1) - info->setLength((qint64) rx_id_length.cap(1).toDouble()); - } -#ifdef MPLAYER_DEBUG - qDebug("%s",qPrintable(str)); -#endif - return info; -} - -QStringList MplayerInfo::filters() -{ - QStringList filters; - filters << "*.avi" << "*.mpg" << "*.mpeg" << "*.divx" << "*.qt" << "*.mov" << "*.wmv" << "*.asf" - << "*.flv" << "*.3gp" << "*.mkv"; - return filters; -} - -DecoderMplayer::DecoderMplayer(QObject *parent, DecoderFactory *d, const QString &url) - : Decoder(parent, d) -{ - m_url = url; - m_bitrate = 0; - m_samplerate = 0; - m_channels = 0; - m_bitsPerSample = 0; - m_length = 0; - m_currentTime = 0; - m_process = new QProcess(this); -} - -DecoderMplayer::~DecoderMplayer() -{ - qDebug("%s",__FUNCTION__); - m_process->close(); -} - -bool DecoderMplayer::initialize() -{ - FileInfo *info = MplayerInfo::createFileInfo(m_url); - m_length = info->length(); - delete info; - m_args.clear(); - m_args << "-slave"; - QSettings settings(Qmmp::configFile(), QSettings::IniFormat); - QString ao_str = settings.value("mplayer/ao","default").toString(); - QString vo_str = settings.value("mplayer/vo","default").toString(); - if (ao_str != "default") - m_args << "ao=" + ao_str; - if (vo_str != "default") - m_args << "vo=" + vo_str; - - if (settings.value("autosync", FALSE).toBool()) - m_args << QString("-autosync %1").arg(settings.value("autosync_factor", 100).toInt()); - - m_args << m_url; - connect(m_process, SIGNAL(readyReadStandardOutput()), SLOT(readStdOut())); - return TRUE; -} - -qint64 DecoderMplayer::totalTime() -{ - return m_length * 1000; -} - -void DecoderMplayer::seek(qint64 pos) -{ - if (m_process->state() == QProcess::Running) - m_process->write(QString("seek %1 \n").arg(pos/1000 - m_currentTime).toLocal8Bit ()); -} - -void DecoderMplayer::stop() -{ - if (m_process->state() == QProcess::Running) - { - m_process->write("quit\n"); - m_process->waitForFinished(1500); - } - StateHandler::instance()->dispatch(Qmmp::Stopped); -} - -void DecoderMplayer::pause() -{ - m_process->write("pause\n"); -} - -void DecoderMplayer::setEQ(double bands[10], double preamp) -{ - Q_UNUSED(bands[10]); - Q_UNUSED(preamp); -} - -void DecoderMplayer::setEQEnabled(bool on) -{ - Q_UNUSED(on); -} - -void DecoderMplayer::run() -{ - QMetaObject::invokeMethod(this, "startMplayerProcess"); - StateHandler::instance()->dispatch(Qmmp::Playing); -} - -void DecoderMplayer::readStdOut() -{ - QString line = QString::fromLocal8Bit(m_process->readAll ()).trimmed(); - QStringList lines = line.split("\n"); - foreach(line, lines) - { - if (rx_av.indexIn(line) > -1) - { - StateHandler::instance()->dispatch(Qmmp::Playing); - m_currentTime = (qint64) rx_av.cap(1).toDouble(); - StateHandler::instance()->dispatch(m_currentTime * 1000, - m_bitrate, - m_samplerate, - m_bitsPerSample, - m_channels); - } - else if (rx_pause.indexIn(line) > -1) - { - StateHandler::instance()->dispatch(Qmmp::Paused); - } - else if (rx_end.indexIn(line) > -1) - { - if (m_process->state() == QProcess::Running) - m_process->waitForFinished(1500); - finish(); - } - else if (rx_quit.indexIn(line) > -1) - { - if (m_process->state() == QProcess::Running) - m_process->waitForFinished(1500); - StateHandler::instance()->dispatch(Qmmp::Stopped); - } - else if (rx_audio.indexIn(line) > -1) - { - m_samplerate = rx_audio.cap(1).toInt(); - m_channels = rx_audio.cap(2).toInt(); - m_bitsPerSample = rx_audio.cap(3).toDouble(); - m_bitrate = rx_audio.cap(4).toDouble(); - } -#ifdef MPLAYER_DEBUG - else - qDebug("%s",qPrintable(line)); -#endif - } -} - -void DecoderMplayer::startMplayerProcess() -{ - m_process->start ("mplayer", m_args); -} diff --git a/src/plugins/Input/mplayer/decoder_mplayer.h b/src/plugins/Input/mplayer/decoder_mplayer.h deleted file mode 100644 index 38d47e629..000000000 --- a/src/plugins/Input/mplayer/decoder_mplayer.h +++ /dev/null @@ -1,81 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2008-2009 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_MPLAYER_H -#define DECODER_MPLAYER_H - -#include -#include - -class Output; -class QIDevice; -class DecoderPhonon; -class QMenu; -class QProcess; - - -class MplayerInfo -{ -public: - static FileInfo *createFileInfo(const QString &path); - static QStringList filters(); -}; - - - -class DecoderMplayer : public Decoder -{ - Q_OBJECT -public: - DecoderMplayer(QObject *, DecoderFactory *, const QString &url); - virtual ~DecoderMplayer(); - - // Standard Decoder API - bool initialize(); - qint64 totalTime(); - void seek(qint64); - void stop(); - void pause(); - - // Equalizer - void setEQ(double bands[10], double preamp); - void setEQEnabled(bool on); - -private slots: - void readStdOut(); - void startMplayerProcess(); - -private: - // thread run function - void run(); - int mplayer_pipe[2]; - QString m_url; - QStringList m_args; - QProcess *m_process; - int m_bitrate; - int m_samplerate; - int m_channels; - int m_bitsPerSample; - qint64 m_currentTime; - qint64 m_length; -}; - - -#endif // DECODER_MPLAYER_H diff --git a/src/plugins/Input/mplayer/decodermplayerfactory.cpp b/src/plugins/Input/mplayer/decodermplayerfactory.cpp deleted file mode 100644 index 15db7cd34..000000000 --- a/src/plugins/Input/mplayer/decodermplayerfactory.cpp +++ /dev/null @@ -1,108 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2008-2009 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 "settingsdialog.h" -#include "decoder_mplayer.h" -#include "decodermplayerfactory.h" - - -// DecoderMplayerFactory - -bool DecoderMplayerFactory::supports(const QString &source) const -{ - QStringList filters = MplayerInfo::filters(); - foreach(QString filter, filters) - { - QRegExp regexp(filter, Qt::CaseInsensitive, QRegExp::Wildcard); - if (regexp.exactMatch(source)) - return TRUE; - } - return FALSE; -} - -bool DecoderMplayerFactory::canDecode(QIODevice *) const -{ - return FALSE; -} - -const DecoderProperties DecoderMplayerFactory::properties() const -{ - DecoderProperties properties; - properties.name = tr("Mplayer Plugin"); - properties.shortName = "mplayer"; - properties.filter = MplayerInfo::filters().join(" "); - properties.description = tr("Video Files"); - //properties.contentType = "application/ogg;audio/x-vorbis+ogg"; - properties.protocols = "file"; - properties.hasAbout = TRUE; - properties.hasSettings = TRUE; - properties.noInput = TRUE; - properties.noOutput = TRUE; - return properties; -} - -Decoder *DecoderMplayerFactory::create(QObject *parent, QIODevice *input, - Output *output, const QString &url) -{ - Q_UNUSED(input); - Q_UNUSED(output); - return new DecoderMplayer(parent, this, url); -} - -QList DecoderMplayerFactory::createPlayList(const QString &fileName, bool useMetaData) -{ - Q_UNUSED(useMetaData); - QList info; - info << MplayerInfo::createFileInfo(fileName); - return info; -} - -QObject* DecoderMplayerFactory::showDetails(QWidget *parent, const QString &path) -{ - DetailsDialog *d = new DetailsDialog(path, parent); - d->show(); - return d; -} - -void DecoderMplayerFactory::showSettings(QWidget *parent) -{ - SettingsDialog *s = new SettingsDialog(parent); - s->show(); -} - -void DecoderMplayerFactory::showAbout(QWidget *parent) -{ - QMessageBox::about (parent, tr("About MPlayer Plugin"), - tr("Qmmp MPlayer Plugin")+"\n"+ - tr("This plugin uses MPlayer as backend")+"\n"+ - tr("Writen by: Ilya Kotov ")); -} - -QTranslator *DecoderMplayerFactory::createTranslator(QObject *parent) -{ - QTranslator *translator = new QTranslator(parent); - QString locale = Qmmp::systemLanguageID(); - translator->load(QString(":/mplayer_plugin_") + locale); - return translator; -} - -Q_EXPORT_PLUGIN(DecoderMplayerFactory) diff --git a/src/plugins/Input/mplayer/decodermplayerfactory.h b/src/plugins/Input/mplayer/decodermplayerfactory.h deleted file mode 100644 index a752d5a43..000000000 --- a/src/plugins/Input/mplayer/decodermplayerfactory.h +++ /dev/null @@ -1,50 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2006-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 DECODERMPLAYERFACTORY_H -#define DECODERMPLAYERFACTORY_H - -#include -#include -#include -#include - -#include -#include -#include -#include - -class DecoderMplayerFactory : 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/mplayer/detailsdialog.cpp b/src/plugins/Input/mplayer/detailsdialog.cpp deleted file mode 100644 index b541c1162..000000000 --- a/src/plugins/Input/mplayer/detailsdialog.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2009 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 "detailsdialog.h" - -DetailsDialog::DetailsDialog(const QString &path, QWidget *parent) - : QDialog(parent) -{ - ui.setupUi(this); - setAttribute(Qt::WA_DeleteOnClose); - ui.pathLineEdit->setText(path); - ui.sizeLabel->setText(QString("%1 ").arg(QFileInfo(path).size ()/1024)+tr("KB")); - setWindowTitle(QFileInfo(path).fileName()); - //regular expressions - QRegExp rx_id_length("^ID_LENGTH=([0-9,.]+)*"); - QRegExp rx_id_demuxer("^ID_DEMUXER=(.*)"); - QRegExp rx_id_video_bitrate("^ID_VIDEO_BITRATE=([0-9,.]+)*"); - QRegExp rx_id_width("^ID_VIDEO_WIDTH=([0-9,.]+)*"); - QRegExp rx_id_height("^ID_VIDEO_HEIGHT=([0-9,.]+)*"); - QRegExp rx_id_video_format("^ID_VIDEO_FORMAT=(.*)"); - QRegExp rx_id_video_fps("^ID_VIDEO_FPS=([0-9,.]+)*"); - QRegExp rx_id_video_codec("^ID_VIDEO_CODEC=(.*)"); - QRegExp rx_id_video_aspect("^ID_VIDEO_ASPECT=([0-9,.]+)*"); - QRegExp rx_id_audio_bitrate("^ID_AUDIO_BITRATE=([0-9,.]+)*"); - QRegExp rx_id_audio_rate("^ID_AUDIO_RATE=([0-9,.]+)*"); - QRegExp rx_id_audio_nch("^ID_AUDIO_NCH=([0-9,.]+)*"); - QRegExp rx_id_audio_codec("^ID_AUDIO_CODEC=(.*)"); - //prepare and start mplayer process - QStringList args; - args << "-slave"; - args << "-identify"; - args << "-frames"; - args << "0"; - args << "-vo"; - args << "null"; - args << "-ao"; - args << "null"; - args << path; - QProcess mplayer_process; - mplayer_process.start("mplayer", args); - mplayer_process.waitForFinished(); - QString str = QString::fromLocal8Bit(mplayer_process.readAll()).trimmed(); - QStringList lines = str.split("\n"); - int height = 0, width = 0; - //mplayer std output parsing - foreach(QString line, lines) - { - //general info - if (rx_id_length.indexIn(line) > -1) - ui.lengthLabel->setText(rx_id_length.cap(1)); //TODO use hh:mm:ss format - else if (rx_id_demuxer.indexIn(line) > -1) - ui.demuxerLabel->setText(rx_id_demuxer.cap(1)); - //video info - else if (rx_id_video_format.indexIn(line) > -1) - ui.videoFormatLabel->setText(rx_id_video_format.cap(1)); - else if (rx_id_video_fps.indexIn(line) > -1) - ui.fpsLabel->setText(rx_id_video_fps.cap(1)); - else if (rx_id_video_codec.indexIn(line) > -1) - ui.videoCodecLabel->setText(rx_id_video_codec.cap(1)); - else if (rx_id_video_aspect.indexIn(line) > -1) - ui. ratioLabel->setText(rx_id_video_aspect.cap(1)); - else if (rx_id_video_bitrate.indexIn(line) > -1) - ui.videoBitrateLabel->setText(rx_id_video_bitrate.cap(1)); - else if (rx_id_width.indexIn(line) > -1) - width = rx_id_width.cap(1).toInt(); - else if (rx_id_height.indexIn(line) > -1) - height = rx_id_height.cap(1).toInt(); - //audio info - else if (rx_id_audio_codec.indexIn(line) > -1) - ui.audioCodecLabel->setText(rx_id_audio_codec.cap(1)); - else if (rx_id_audio_rate.indexIn(line) > -1) - ui.sampleRateLabel->setText(rx_id_audio_rate.cap(1)); - else if (rx_id_audio_bitrate.indexIn(line) > -1) - ui.audioBitrateLabel->setText(rx_id_audio_bitrate.cap(1)); - else if (rx_id_audio_nch.indexIn(line) > -1) - ui.channelsLabel->setText(rx_id_audio_nch.cap(1)); - } - ui.resolutionLabel->setText(QString("%1x%2").arg(width).arg(height)); -} - - -DetailsDialog::~DetailsDialog() -{ -} - - diff --git a/src/plugins/Input/mplayer/detailsdialog.h b/src/plugins/Input/mplayer/detailsdialog.h deleted file mode 100644 index 0d4af20a7..000000000 --- a/src/plugins/Input/mplayer/detailsdialog.h +++ /dev/null @@ -1,43 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2009 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(const QString &path, QWidget *parent = 0); - - ~DetailsDialog(); - -private: - Ui::DetailsDialog ui; - -}; - -#endif diff --git a/src/plugins/Input/mplayer/detailsdialog.ui b/src/plugins/Input/mplayer/detailsdialog.ui deleted file mode 100644 index 37358df2b..000000000 --- a/src/plugins/Input/mplayer/detailsdialog.ui +++ /dev/null @@ -1,390 +0,0 @@ - - DetailsDialog - - - - 0 - 0 - 415 - 351 - - - - Details - - - - 5 - - - 9 - - - 5 - - - 5 - - - - - General information - - - - - - File path: - - - - - - - true - - - - - - - Size: - - - - - - - - - - - - - - - Demuxer: - - - - - - - - - - - - - - - Length: - - - - - - - - - - - - - - - - - - - 0 - 0 - - - - Video - - - - - - - 0 - 0 - - - - Resolution: - - - - - - - - 0 - 0 - - - - - - - - - - - - - 0 - 0 - - - - Bitrate: - - - - - - - - - - - - - - - - 0 - 0 - - - - Format: - - - - - - - - - - - - - - - - 0 - 0 - - - - FPS: - - - - - - - - - - - - - - - - 0 - 0 - - - - Codec: - - - - - - - - - - - - - - - - 0 - 0 - - - - Aspect ratio: - - - - - - - - - - - - - - - - - - Audio - - - - - - - 0 - 0 - - - - Codec: - - - - - - - - 0 - 0 - - - - - - - - - - - - - 0 - 0 - - - - Sample rate: - - - - - - - - - - - - - - - - 0 - 0 - - - - Bitrate: - - - - - - - - - - - - - - - - 0 - 0 - - - - Channels: - - - - - - - - - - - - - - - Qt::Vertical - - - - 20 - 37 - - - - - - - - - - - 0 - - - - - Qt::Horizontal - - - - 330 - 24 - - - - - - - - Close - - - - - - - - - - - closeButton - clicked() - DetailsDialog - accept() - - - 381 - 334 - - - 23 - 324 - - - - - diff --git a/src/plugins/Input/mplayer/mplayer.pro b/src/plugins/Input/mplayer/mplayer.pro deleted file mode 100644 index 4be7bbd50..000000000 --- a/src/plugins/Input/mplayer/mplayer.pro +++ /dev/null @@ -1,45 +0,0 @@ -include(../../plugins.pri) - -HEADERS += decodermplayerfactory.h \ - decoder_mplayer.h \ - detailsdialog.h \ - settingsdialog.h - -SOURCES += decoder_mplayer.cpp \ - decodermplayerfactory.cpp \ - detailsdialog.cpp \ - settingsdialog.cpp - -TARGET =$$PLUGINS_PREFIX/Input/mplayer -QMAKE_CLEAN =$$PLUGINS_PREFIX/Input/libmplayer.so - -INCLUDEPATH += ../../../ -CONFIG += release \ -warn_on \ -plugin - -TEMPLATE = lib - -QMAKE_LIBDIR += ../../../../lib -LIBS += -lqmmp -L/usr/lib - -TRANSLATIONS = translations/mplayer_plugin_ru.ts \ - translations/mplayer_plugin_uk_UA.ts \ - translations/mplayer_plugin_zh_CN.ts \ - translations/mplayer_plugin_zh_TW.ts \ - translations/mplayer_plugin_cs.ts \ - translations/mplayer_plugin_pl.ts \ - translations/mplayer_plugin_de.ts \ - translations/mplayer_plugin_it.ts \ - translations/mplayer_plugin_tr.ts \ - translations/mplayer_plugin_lt.ts -RESOURCES = translations/translations.qrc - -isEmpty(LIB_DIR){ - LIB_DIR = /lib -} -target.path = $$LIB_DIR/qmmp/Input -INSTALLS += target - -FORMS += detailsdialog.ui \ - settingsdialog.ui diff --git a/src/plugins/Input/mplayer/settingsdialog.cpp b/src/plugins/Input/mplayer/settingsdialog.cpp deleted file mode 100644 index 029890eb1..000000000 --- a/src/plugins/Input/mplayer/settingsdialog.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2009 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 "settingsdialog.h" - -SettingsDialog::SettingsDialog(QWidget *parent) - : QDialog(parent) -{ - ui.setupUi(this); - setAttribute(Qt::WA_DeleteOnClose); - ui.videoComboBox->addItem(tr("default")); - ui.videoComboBox->addItem("xv"); - ui.videoComboBox->addItem("x11"); - ui.videoComboBox->addItem("gl"); - ui.videoComboBox->addItem("gl2"); - ui.videoComboBox->addItem("dga"); - ui.videoComboBox->addItem("sdl"); - ui.videoComboBox->addItem("null"); - ui.audioComboBox->addItem(tr("default")); - ui.audioComboBox->addItem("oss"); - ui.audioComboBox->addItem("alsa"); - ui.audioComboBox->addItem("pulse"); - ui.audioComboBox->addItem("jack"); - ui.audioComboBox->addItem("nas"); - ui.audioComboBox->addItem("null"); - QSettings settings(Qmmp::configFile(), QSettings::IniFormat); - settings.beginGroup("mplayer"); - ui.audioComboBox->setEditText(settings.value("ao","default").toString().replace("default", tr("default"))); - ui.videoComboBox->setEditText(settings.value("vo","default").toString().replace("default", tr("default"))); - ui.autoSyncCheckBox->setChecked(settings.value("autosync", FALSE).toBool()); - ui.syncFactorSpinBox->setValue(settings.value("autosync_factor", 100).toInt()); - settings.endGroup(); -} - - -SettingsDialog::~SettingsDialog() -{} - -void SettingsDialog::accept() -{ - QSettings settings(Qmmp::configFile(), QSettings::IniFormat); - settings.beginGroup("mplayer"); - settings.setValue("ao",ui.audioComboBox->currentText().replace(tr("default"), "default")); - settings.setValue("vo",ui.videoComboBox->currentText().replace(tr("default"), "default")); - settings.setValue("autosync",ui.autoSyncCheckBox->isChecked()); - settings.setValue("autosync_factor",ui.syncFactorSpinBox->value()); - settings.endGroup(); - QDialog::accept(); -} diff --git a/src/plugins/Input/mplayer/settingsdialog.h b/src/plugins/Input/mplayer/settingsdialog.h deleted file mode 100644 index 9ba56bce8..000000000 --- a/src/plugins/Input/mplayer/settingsdialog.h +++ /dev/null @@ -1,46 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2009 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 SETTINGSDIALOG_H -#define SETTINGSDIALOG_H - -#include - -#include "ui_settingsdialog.h" - -/** - @author Ilya Kotov -*/ -class SettingsDialog : public QDialog -{ -Q_OBJECT -public: - SettingsDialog(QWidget *parent = 0); - - ~SettingsDialog(); - - -public slots: - virtual void accept(); - -private: - Ui::SettingsDialog ui; -}; - -#endif diff --git a/src/plugins/Input/mplayer/settingsdialog.ui b/src/plugins/Input/mplayer/settingsdialog.ui deleted file mode 100644 index 86dbfe8f6..000000000 --- a/src/plugins/Input/mplayer/settingsdialog.ui +++ /dev/null @@ -1,141 +0,0 @@ - - - SettingsDialog - - - - 0 - 0 - 259 - 143 - - - - MPlayer Settings - - - - 6 - - - 6 - - - 6 - - - - - Video: - - - - - - - true - - - - - - - Audio: - - - - - - - true - - - - - - - Audio/video auto synchronization - - - true - - - - - - - Synchronization factor: - - - - - - - 0 - - - 999 - - - - - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - - buttonBox - accepted() - SettingsDialog - accept() - - - 205 - 136 - - - 20 - 76 - - - - - buttonBox - rejected() - SettingsDialog - reject() - - - 208 - 136 - - - 40 - 81 - - - - - autoSyncCheckBox - toggled(bool) - syncFactorSpinBox - setEnabled(bool) - - - 216 - 67 - - - 237 - 96 - - - - - diff --git a/src/plugins/Input/mplayer/translations/mplayer_plugin_cs.ts b/src/plugins/Input/mplayer/translations/mplayer_plugin_cs.ts deleted file mode 100644 index 26f09d606..000000000 --- a/src/plugins/Input/mplayer/translations/mplayer_plugin_cs.ts +++ /dev/null @@ -1,187 +0,0 @@ - - - - - DecoderMplayerFactory - - - Mplayer Plugin - Modul MPlayer - - - - Video Files - Videosoubory - - - - Writen by: Ilya Kotov <forkotov02@hotmail.ru> - Autor: Ilja Kotov <forkotov02@hotmail.ru> - - - - About MPlayer Plugin - O modulu MPlayer - - - - Qmmp MPlayer Plugin - Modul Qmmp MPlayer - - - - This plugin uses MPlayer as backend - Tento modul používá jako backend MPlayer - - - - DetailsDialog - - - KB - KB - - - - - - - - - - - - - - - - - - - - - - - Sample rate: - Vzorkovací frekvence: - - - - Close - Zavřít - - - - File path: - Cesta k souboru: - - - - Size: - Velikost: - - - - Demuxer: - Demultiplexor: - - - - Length: - Délka: - - - - Video - Obraz - - - - Resolution: - Rozlišení: - - - - - Bitrate: - Datový tok: - - - - Format: - Formát: - - - - FPS: - FPS: - - - - - Codec: - Kodek: - - - - Aspect ratio: - Poměr stran: - - - - Audio - Zvuk - - - - Channels: - Kanály: - - - - Details - Podrobnosti - - - - General information - Obecné informace - - - - SettingsDialog - - - - - - - - default - výchozí - - - - MPlayer Settings - Nastavení MPlayer - - - - Video: - Video: - - - - Audio: - Audio: - - - - Audio/video auto synchronization - Automatická A/V synchronizace - - - - Synchronization factor: - Synchronizační faktor: - - - diff --git a/src/plugins/Input/mplayer/translations/mplayer_plugin_de.ts b/src/plugins/Input/mplayer/translations/mplayer_plugin_de.ts deleted file mode 100644 index 2f029c38b..000000000 --- a/src/plugins/Input/mplayer/translations/mplayer_plugin_de.ts +++ /dev/null @@ -1,187 +0,0 @@ - - - - - DecoderMplayerFactory - - - Mplayer Plugin - MPlayer-Modul - - - - Video Files - Videodateien - - - - Writen by: Ilya Kotov <forkotov02@hotmail.ru> - Autor: Ilya Kotov <forkotov02@hotmail.ru> - - - - About MPlayer Plugin - Über MPlayer-Modul - - - - Qmmp MPlayer Plugin - Qmmp MPlayer-Modul - - - - This plugin uses MPlayer as backend - Dieses Modul nutzt MPlayer als Backend - - - - DetailsDialog - - - KB - KB - - - - - - - - - - - - - - - - - - - - - - - Sample rate: - Abtastrate: - - - - Close - Schließen - - - - File path: - Dateipfad: - - - - Size: - Größe: - - - - Demuxer: - Demuxer: - - - - Length: - Länge: - - - - Video - Video - - - - Resolution: - Auflösung: - - - - - Bitrate: - Bitrate: - - - - Format: - Format: - - - - FPS: - FPS: - - - - - Codec: - Codec: - - - - Aspect ratio: - Seitenverhältnis: - - - - Audio - Audio - - - - Channels: - Kanäle: - - - - Details - Details - - - - General information - Allgemeine Informationen - - - - SettingsDialog - - - - - - - - default - Standard - - - - MPlayer Settings - Einstellungen MPlayer-Modul - - - - Video: - Video: - - - - Audio: - Audio: - - - - Audio/video auto synchronization - Autom. Audio/Video-Synchronisation - - - - Synchronization factor: - Synchronisationsfaktor: - - - diff --git a/src/plugins/Input/mplayer/translations/mplayer_plugin_it.ts b/src/plugins/Input/mplayer/translations/mplayer_plugin_it.ts deleted file mode 100644 index f405e4505..000000000 --- a/src/plugins/Input/mplayer/translations/mplayer_plugin_it.ts +++ /dev/null @@ -1,187 +0,0 @@ - - - - - DecoderMplayerFactory - - - Mplayer Plugin - Modulo MPlayer - - - - Video Files - Documenti video - - - - Writen by: Ilya Kotov <forkotov02@hotmail.ru> - Autore: Ilya Kotov <forkotov02@hotmail.ru> - - - - About MPlayer Plugin - Info sul modulo MPlayer - - - - Qmmp MPlayer Plugin - Modulo MPlayer per Qmmp - - - - This plugin uses MPlayer as backend - Modulo che usa MPlayer come Backend - - - - DetailsDialog - - - KB - KB - - - - - - - - - - - - - - - - - - - - - - - Sample rate: - Campionamento: - - - - Close - Chiudi - - - - File path: - File: - - - - Size: - Dimensione: - - - - Demuxer: - Demuxer: - - - - Length: - Durata: - - - - Video - Video - - - - Resolution: - Risoluzione: - - - - - Bitrate: - Bitrate: - - - - Format: - Formato: - - - - FPS: - FPS: - - - - - Codec: - Codec: - - - - Aspect ratio: - Ratio visualizzazione: - - - - Audio - Audio - - - - Channels: - Canali: - - - - Details - Dettagli - - - - General information - Informazioni generali - - - - SettingsDialog - - - - - - - - default - Default - - - - MPlayer Settings - Impostazioni MPlayer - - - - Video: - Video: - - - - Audio: - Audio: - - - - Audio/video auto synchronization - sincronizzazione audio/video - - - - Synchronization factor: - Fattore di sincronizzazione - - - diff --git a/src/plugins/Input/mplayer/translations/mplayer_plugin_lt.ts b/src/plugins/Input/mplayer/translations/mplayer_plugin_lt.ts deleted file mode 100644 index 87d1c6b33..000000000 --- a/src/plugins/Input/mplayer/translations/mplayer_plugin_lt.ts +++ /dev/null @@ -1,187 +0,0 @@ - - - - - DecoderMplayerFactory - - - Mplayer Plugin - MPlayer įskiepis - - - - Video Files - Video bylos - - - - Writen by: Ilya Kotov <forkotov02@hotmail.ru> - Sukūrė: Ilya Kotov <forkotov02@hotmail.ru> - - - - About MPlayer Plugin - Apie MPlayer Qmmp įskiepį - - - - Qmmp MPlayer Plugin - Qmmp MPlayer įskiepis - - - - This plugin uses MPlayer as backend - Šis įskiepis naudoja Mplayer video grojimui - - - - DetailsDialog - - - Close - Užverti - - - - - - - - - - - - - - - - - - - - - - - Sample rate: - Sample rate: - - - - File path: - Bylos kelias: - - - - KB - KB - - - - Size: - Dydis: - - - - Demuxer: - Demuxer: - - - - Length: - Ilgis: - - - - Video - Video - - - - Resolution: - Rezoliucija: - - - - - Bitrate: - Bitrate: - - - - Format: - Tipas: - - - - FPS: - FPS: - - - - - Codec: - Kodėkas: - - - - Aspect ratio: - Aspect ratio: - - - - Audio - Аudio - - - - Channels: - Kanalai: - - - - Details - Informacija - - - - General information - Bendra informacija - - - - SettingsDialog - - - - - - - - default - Numatytas - - - - MPlayer Settings - MPlayer nustatymai - - - - Video: - Video: - - - - Audio: - Аudio: - - - - Audio/video auto synchronization - Audio/Video automatinė sinchronizacija - - - - Synchronization factor: - Sinchronizacijos: - - - diff --git a/src/plugins/Input/mplayer/translations/mplayer_plugin_pl.ts b/src/plugins/Input/mplayer/translations/mplayer_plugin_pl.ts deleted file mode 100644 index fadc08ecc..000000000 --- a/src/plugins/Input/mplayer/translations/mplayer_plugin_pl.ts +++ /dev/null @@ -1,187 +0,0 @@ - - - - - DecoderMplayerFactory - - - Mplayer Plugin - Wtyczka Mplayer - - - - Video Files - Pliki wideo - - - - About MPlayer Plugin - O wtyczce Mplayer - - - - Qmmp MPlayer Plugin - Wtyczka Mplayer dla Qmmp - - - - This plugin uses MPlayer as backend - Ta wtyczka używa Mplayer do odtwarzania - - - - Writen by: Ilya Kotov <forkotov02@hotmail.ru> - Autor: Ilya Kotov <forkotov02@hotmail.ru> - - - - DetailsDialog - - - KB - - - - - Details - Szczegóły - - - - General information - Ogólne informacje - - - - File path: - Ścieżka do pliku: - - - - Size: - Rozmiar: - - - - - - - - - - - - - - - - - - - - - - Demuxer: - Demuxer: - - - - Length: - Długość: - - - - Video - Wideo - - - - Resolution: - Rozdzielczość: - - - - - Bitrate: - - - - - Format: - Format: - - - - FPS: - Klatek na sek.: - - - - - Codec: - Kodek: - - - - Aspect ratio: - Format obrazu: - - - - Audio - Dźwięk - - - - Sample rate: - Próbkowanie: - - - - Channels: - Kanały: - - - - Close - Zamknij - - - - SettingsDialog - - - - - - - - default - domyślne - - - - MPlayer Settings - Ustawienia Mplayer - - - - Video: - Wideo: - - - - Audio: - Dźwięk: - - - - Audio/video auto synchronization - Auto synchronizacja audio/wideo - - - - Synchronization factor: - Współczynnik synchro: - - - diff --git a/src/plugins/Input/mplayer/translations/mplayer_plugin_ru.ts b/src/plugins/Input/mplayer/translations/mplayer_plugin_ru.ts deleted file mode 100644 index b4169c849..000000000 --- a/src/plugins/Input/mplayer/translations/mplayer_plugin_ru.ts +++ /dev/null @@ -1,187 +0,0 @@ - - - - - DecoderMplayerFactory - - - Mplayer Plugin - Модуль MPlayer - - - - Video Files - Файлы видео - - - - Writen by: Ilya Kotov <forkotov02@hotmail.ru> - Разработчик: Илья Котов <forkotov02@hotmail.ru> - - - - About MPlayer Plugin - О модуле MPlayer для Qmmp - - - - Qmmp MPlayer Plugin - Модуль поддержки MPlayer для Qmmp - - - - This plugin uses MPlayer as backend - В этом модуле для воспроизведения используется Mplayer - - - - DetailsDialog - - - Close - Закрыть - - - - - - - - - - - - - - - - - - - - - - - Sample rate: - Дискретизация: - - - - File path: - Путь к файлу: - - - - KB - КБ - - - - Size: - Размер: - - - - Demuxer: - Демультиплексор: - - - - Length: - Длительность: - - - - Video - Видео - - - - Resolution: - Разрешение: - - - - - Bitrate: - Битовая частота: - - - - Format: - Формат: - - - - FPS: - Частота кадров: - - - - - Codec: - Кодек: - - - - Aspect ratio: - Соотношение сторон: - - - - Audio - Аудио - - - - Channels: - Каналов: - - - - Details - Информация - - - - General information - Общая информация - - - - SettingsDialog - - - - - - - - default - по умолчанию - - - - MPlayer Settings - Настройки MPlayer - - - - Video: - Видео: - - - - Audio: - Аудио: - - - - Audio/video auto synchronization - Автоматическая синхронизация аудио/видео - - - - Synchronization factor: - Фактор синхронизации: - - - diff --git a/src/plugins/Input/mplayer/translations/mplayer_plugin_tr.ts b/src/plugins/Input/mplayer/translations/mplayer_plugin_tr.ts deleted file mode 100644 index f1ba30cb0..000000000 --- a/src/plugins/Input/mplayer/translations/mplayer_plugin_tr.ts +++ /dev/null @@ -1,187 +0,0 @@ - - - - - DecoderMplayerFactory - - - Mplayer Plugin - Mplayer Eklentisi - - - - Video Files - Video Dosyaları - - - - About MPlayer Plugin - MPlayer Eklentisi Hakkında - - - - Qmmp MPlayer Plugin - Qmmp MPlayer Eklentisi - - - - This plugin uses MPlayer as backend - Bu eklenti arka uç olarak MPlayer kullanır - - - - Writen by: Ilya Kotov <forkotov02@hotmail.ru> - Yazan: Ilya Kotov <forkotov02@hotmail.ru> - - - - DetailsDialog - - - KB - KB - - - - Details - Detaylar - - - - General information - Genel Bilgiler - - - - File path: - Dosya konumu: - - - - Size: - Boyut: - - - - - - - - - - - - - - - - - - - - - - - Demuxer: - Çözümleyici: - - - - Length: - Uzunluk: - - - - Video - Video - - - - Resolution: - Çözünürlük: - - - - - Bitrate: - Bit oranı: - - - - Format: - Biçim: - - - - FPS: - FPS: - - - - - Codec: - Kodek: - - - - Aspect ratio: - En-boy oranı: - - - - Audio - Ses - - - - Sample rate: - Örnekleme oranı: - - - - Channels: - Kanallar: - - - - Close - Kapat - - - - SettingsDialog - - - - - - - - default - öntanımlı - - - - MPlayer Settings - MPlayer Ayarları - - - - Video: - Video: - - - - Audio: - Ses: - - - - Audio/video auto synchronization - Ses/video otomatik senkronizasyon - - - - Synchronization factor: - Senkronizasyon faktörü: - - - diff --git a/src/plugins/Input/mplayer/translations/mplayer_plugin_uk_UA.ts b/src/plugins/Input/mplayer/translations/mplayer_plugin_uk_UA.ts deleted file mode 100644 index 95a95ccb6..000000000 --- a/src/plugins/Input/mplayer/translations/mplayer_plugin_uk_UA.ts +++ /dev/null @@ -1,187 +0,0 @@ - - - - - DecoderMplayerFactory - - - Mplayer Plugin - Модуль Mplayer - - - - Video Files - Відео файли - - - - Writen by: Ilya Kotov <forkotov02@hotmail.ru> - Розробник: Ілля Котов <forkotov02@hotmail.ru> - - - - About MPlayer Plugin - Про модуль Mplayer - - - - Qmmp MPlayer Plugin - Модуль Mplayer для Qmmp - - - - This plugin uses MPlayer as backend - Цей модуль використовує MPlayer як бекенд - - - - DetailsDialog - - - Close - Закрити - - - - - - - - - - - - - - - - - - - - - - - Sample rate: - Дискретизація: - - - - File path: - Шлях до файлу: - - - - KB - Кб - - - - Size: - Розмір: - - - - Demuxer: - Демультиплексор: - - - - Length: - Тривалість: - - - - Video - Відео - - - - Resolution: - Роздільність: - - - - - Bitrate: - Бітрейт: - - - - Format: - Формат: - - - - FPS: - Кадрів в секунду: - - - - - Codec: - Кодек: - - - - Aspect ratio: - Співвідношення: - - - - Audio - Аудіо - - - - Channels: - Канали: - - - - Details - Детально - - - - General information - Головна інформація - - - - SettingsDialog - - - - - - - - default - за умовчанням - - - - MPlayer Settings - Налаштування MPlayer - - - - Video: - Відео: - - - - Audio: - Аудіо: - - - - Audio/video auto synchronization - Автоматична синхронізація аудіо/відео - - - - Synchronization factor: - Фактор синхронізації: - - - diff --git a/src/plugins/Input/mplayer/translations/mplayer_plugin_zh_CN.ts b/src/plugins/Input/mplayer/translations/mplayer_plugin_zh_CN.ts deleted file mode 100644 index a20be020d..000000000 --- a/src/plugins/Input/mplayer/translations/mplayer_plugin_zh_CN.ts +++ /dev/null @@ -1,187 +0,0 @@ - - - - - DecoderMplayerFactory - - - Mplayer Plugin - Mplayer 插件 - - - - Video Files - 视频文件 - - - - Writen by: Ilya Kotov <forkotov02@hotmail.ru> - 作者:Ilya Kotov <forkotov02@hotmail.ru> - - - - About MPlayer Plugin - 关于 MPlayer 插件 - - - - Qmmp MPlayer Plugin - Qmmp MPlayer 插件 - - - - This plugin uses MPlayer as backend - 此插件使用 MPlayer 后端 - - - - DetailsDialog - - - Close - 关闭 - - - - - - - - - - - - - - - - - - - - - - - Sample rate: - 取样率: - - - - File path: - 文件路径: - - - - KB - KB - - - - Size: - 大小: - - - - Demuxer: - 流分离: - - - - Length: - 长度: - - - - Video - 视频 - - - - Resolution: - 分辨率: - - - - - Bitrate: - 位速率: - - - - Format: - 格式: - - - - FPS: - FPS: - - - - - Codec: - 编解码器: - - - - Aspect ratio: - 宽高比: - - - - Audio - 音频 - - - - Channels: - 声音通道: - - - - Details - 详细资料 - - - - General information - 常规信息 - - - - SettingsDialog - - - - - - - - default - 默认 - - - - MPlayer Settings - Mplayer 设置 - - - - Video: - 视频: - - - - Audio: - 音频: - - - - Audio/video auto synchronization - 音频/视频自动同步 - - - - Synchronization factor: - 同步系数: - - - diff --git a/src/plugins/Input/mplayer/translations/mplayer_plugin_zh_TW.ts b/src/plugins/Input/mplayer/translations/mplayer_plugin_zh_TW.ts deleted file mode 100644 index 66c75d389..000000000 --- a/src/plugins/Input/mplayer/translations/mplayer_plugin_zh_TW.ts +++ /dev/null @@ -1,187 +0,0 @@ - - - - - DecoderMplayerFactory - - - Mplayer Plugin - Mplayer 插件 - - - - Video Files - 視頻檔案 - - - - Writen by: Ilya Kotov <forkotov02@hotmail.ru> - 作者:Ilya Kotov <forkotov02@hotmail.ru> - - - - About MPlayer Plugin - 關於 Mplayer 插件 - - - - Qmmp MPlayer Plugin - Qmmp Mplayer 插件 - - - - This plugin uses MPlayer as backend - 此插件使用 Mplayer 後端 - - - - DetailsDialog - - - Close - 關閉 - - - - - - - - - - - - - - - - - - - - - - - Sample rate: - 取樣率: - - - - File path: - 檔案路徑: - - - - KB - KB - - - - Size: - 大小: - - - - Demuxer: - 流分離: - - - - Length: - 長度: - - - - Video - 視頻 - - - - Resolution: - 分辨率: - - - - - Bitrate: - 位速率: - - - - Format: - 格式: - - - - FPS: - FPS: - - - - - Codec: - 編解碼器: - - - - Aspect ratio: - 寬高比: - - - - Audio - 聲訊 - - - - Channels: - 音頻通道: - - - - Details - 詳細資料 - - - - General information - 常規資訊 - - - - SettingsDialog - - - - - - - - default - 預設 - - - - MPlayer Settings - Mplayer 設置 - - - - Video: - 視頻: - - - - Audio: - 聲訊: - - - - Audio/video auto synchronization - 音頻/視頻自動同步 - - - - Synchronization factor: - 同步系數: - - - diff --git a/src/plugins/Input/mplayer/translations/translations.qrc b/src/plugins/Input/mplayer/translations/translations.qrc deleted file mode 100644 index 7a98c5a7f..000000000 --- a/src/plugins/Input/mplayer/translations/translations.qrc +++ /dev/null @@ -1,15 +0,0 @@ - - - - mplayer_plugin_it.qm - mplayer_plugin_ru.qm - mplayer_plugin_uk_UA.qm - mplayer_plugin_zh_CN.qm - mplayer_plugin_zh_TW.qm - mplayer_plugin_pl.qm - mplayer_plugin_cs.qm - mplayer_plugin_de.qm - mplayer_plugin_tr.qm - mplayer_plugin_lt.qm - - diff --git a/src/plugins/Input/wavpack/cueparser.cpp b/src/plugins/Input/wavpack/cueparser.cpp index 41190be4b..cf63e41a1 100644 --- a/src/plugins/Input/wavpack/cueparser.cpp +++ b/src/plugins/Input/wavpack/cueparser.cpp @@ -20,9 +20,7 @@ #include #include - -#include - +#include #include "cueparser.h" CUEParser::CUEParser(const QByteArray &array, const QString &fileName) @@ -94,7 +92,7 @@ CUEParser::CUEParser(const QByteArray &array, const QString &fileName) for (int i = 0; i < m_infoList.size() - 1; ++i) m_infoList[i].setLength(m_infoList[i+1].length() - m_infoList[i].length()); //calculate last item length - QList f_list = Decoder::createPlayList(m_filePath, FALSE); + QList f_list = MetaDataManager::instance()->createPlayList(m_filePath, FALSE); qint64 l = f_list.isEmpty() ? 0 : f_list.at(0)->length() * 1000; if (l > m_infoList.last().length()) m_infoList.last().setLength(l - m_infoList.last().length()); -- cgit v1.2.3-13-gbd6f