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/Engines/CMakeLists.txt | 5 + src/plugins/Engines/Engines.pro | 4 + src/plugins/Engines/mplayer/CMakeLists.txt | 66 ++++++ src/plugins/Engines/mplayer/mplayer.pro | 34 +++ src/plugins/Engines/mplayer/mplayerengine.cpp | 262 +++++++++++++++++++++ src/plugins/Engines/mplayer/mplayerengine.h | 83 +++++++ .../Engines/mplayer/mplayerenginefactory.cpp | 96 ++++++++ src/plugins/Engines/mplayer/mplayerenginefactory.h | 49 ++++ .../Engines/mplayer/mplayermetadatamodel.cpp | 106 +++++++++ src/plugins/Engines/mplayer/mplayermetadatamodel.h | 38 +++ src/plugins/Engines/mplayer/settingsdialog.cpp | 69 ++++++ src/plugins/Engines/mplayer/settingsdialog.h | 46 ++++ src/plugins/Engines/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 +++++++++++++++ .../Engines/mplayer/translations/translations.qrc | 15 ++ 24 files changed, 2884 insertions(+) create mode 100644 src/plugins/Engines/CMakeLists.txt create mode 100644 src/plugins/Engines/Engines.pro create mode 100644 src/plugins/Engines/mplayer/CMakeLists.txt create mode 100644 src/plugins/Engines/mplayer/mplayer.pro create mode 100644 src/plugins/Engines/mplayer/mplayerengine.cpp create mode 100644 src/plugins/Engines/mplayer/mplayerengine.h create mode 100644 src/plugins/Engines/mplayer/mplayerenginefactory.cpp create mode 100644 src/plugins/Engines/mplayer/mplayerenginefactory.h create mode 100644 src/plugins/Engines/mplayer/mplayermetadatamodel.cpp create mode 100644 src/plugins/Engines/mplayer/mplayermetadatamodel.h create mode 100644 src/plugins/Engines/mplayer/settingsdialog.cpp create mode 100644 src/plugins/Engines/mplayer/settingsdialog.h create mode 100644 src/plugins/Engines/mplayer/settingsdialog.ui create mode 100644 src/plugins/Engines/mplayer/translations/mplayer_plugin_cs.ts create mode 100644 src/plugins/Engines/mplayer/translations/mplayer_plugin_de.ts create mode 100644 src/plugins/Engines/mplayer/translations/mplayer_plugin_it.ts create mode 100644 src/plugins/Engines/mplayer/translations/mplayer_plugin_lt.ts create mode 100644 src/plugins/Engines/mplayer/translations/mplayer_plugin_pl.ts create mode 100644 src/plugins/Engines/mplayer/translations/mplayer_plugin_ru.ts create mode 100644 src/plugins/Engines/mplayer/translations/mplayer_plugin_tr.ts create mode 100644 src/plugins/Engines/mplayer/translations/mplayer_plugin_uk_UA.ts create mode 100644 src/plugins/Engines/mplayer/translations/mplayer_plugin_zh_CN.ts create mode 100644 src/plugins/Engines/mplayer/translations/mplayer_plugin_zh_TW.ts create mode 100644 src/plugins/Engines/mplayer/translations/translations.qrc (limited to 'src/plugins/Engines') diff --git a/src/plugins/Engines/CMakeLists.txt b/src/plugins/Engines/CMakeLists.txt new file mode 100644 index 000000000..636972563 --- /dev/null +++ b/src/plugins/Engines/CMakeLists.txt @@ -0,0 +1,5 @@ +SET(USE_MPLAYER TRUE CACHE BOOL "enable/disable mplayer support") + +IF(USE_MPLAYER) +add_subdirectory(mplayer) +ENDIF(USE_MPLAYER) diff --git a/src/plugins/Engines/Engines.pro b/src/plugins/Engines/Engines.pro new file mode 100644 index 000000000..1dddcfd5d --- /dev/null +++ b/src/plugins/Engines/Engines.pro @@ -0,0 +1,4 @@ +include(../../../qmmp.pri) + +SUBDIRS += mplayer +TEMPLATE = subdirs diff --git a/src/plugins/Engines/mplayer/CMakeLists.txt b/src/plugins/Engines/mplayer/CMakeLists.txt new file mode 100644 index 000000000..1dea9477b --- /dev/null +++ b/src/plugins/Engines/mplayer/CMakeLists.txt @@ -0,0 +1,66 @@ +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 + mplayerenginefactory.cpp + mplayerengine.cpp + mplayermetadatamodel.cpp + settingsdialog.cpp +) + +SET(libmplayer_MOC_HDRS + mplayerenginefactory.h + mplayerengine.h + mplayermetadatamodel.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 +) + +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/Engines) + diff --git a/src/plugins/Engines/mplayer/mplayer.pro b/src/plugins/Engines/mplayer/mplayer.pro new file mode 100644 index 000000000..dbcde014d --- /dev/null +++ b/src/plugins/Engines/mplayer/mplayer.pro @@ -0,0 +1,34 @@ +include(../../plugins.pri) +HEADERS += mplayerenginefactory.h \ + mplayerengine.h \ + settingsdialog.h \ + mplayermetadatamodel.h +SOURCES += mplayerengine.cpp \ + mplayerenginefactory.cpp \ + settingsdialog.cpp \ + mplayermetadatamodel.cpp +TARGET = $$PLUGINS_PREFIX/Engines/mplayer +QMAKE_CLEAN = $$PLUGINS_PREFIX/Engines/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 += settingsdialog.ui diff --git a/src/plugins/Engines/mplayer/mplayerengine.cpp b/src/plugins/Engines/mplayer/mplayerengine.cpp new file mode 100644 index 000000000..33a2c69ae --- /dev/null +++ b/src/plugins/Engines/mplayer/mplayerengine.cpp @@ -0,0 +1,262 @@ +/*************************************************************************** + * 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 +#include "mplayerengine.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; +} + +MplayerEngine::MplayerEngine(QObject *parent) + : AbstractEngine(parent) +{ + //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); + connect(m_process, SIGNAL(readyReadStandardOutput()), SLOT(readStdOut())); +} + +MplayerEngine::~MplayerEngine() +{ + qDebug("%s",__FUNCTION__); + m_process->close(); +} + +bool MplayerEngine::play() +{ + if(m_process->state() != QProcess::NotRunning) + return FALSE; + startMplayerProcess(); + return TRUE; +} + +bool MplayerEngine::enqueue(InputSource *source) +{ + QString url = source->url(); + QStringList filters = MplayerInfo::filters(); + bool supports = FALSE; + foreach(QString filter, filters) + { + QRegExp regexp(filter, Qt::CaseInsensitive, QRegExp::Wildcard); + supports = regexp.exactMatch(source->url()); + if(supports) + break; + } + if(!supports) + return FALSE; + source->deleteLater(); + if(m_process->state() == QProcess::NotRunning) + m_url = url; + else + m_files.enqueue(url); + return TRUE; +} + +bool MplayerEngine::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; + return TRUE; +} + +qint64 MplayerEngine::totalTime() +{ + return m_length * 1000; +} + +void MplayerEngine::seek(qint64 pos) +{ + if (m_process->state() == QProcess::Running) + m_process->write(QString("seek %1 \n").arg(pos/1000 - m_currentTime).toLocal8Bit ()); +} + +void MplayerEngine::stop() +{ + if (m_process->state() == QProcess::Running) + { + m_process->write("quit\n"); + m_process->waitForFinished(1500); + } + StateHandler::instance()->dispatch(Qmmp::Stopped); + m_files.clear(); + m_url.clear(); +} + +void MplayerEngine::pause() +{ + m_process->write("pause\n"); +} + +void MplayerEngine::setEQ(double bands[10], double preamp) +{ + Q_UNUSED(bands[10]); + Q_UNUSED(preamp); +} + +void MplayerEngine::setEQEnabled(bool on) +{ + Q_UNUSED(on); +} + +void MplayerEngine::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(3500); + emit playbackFinished(); + if(!m_files.isEmpty()) + { + StateHandler::instance()->dispatch(Qmmp::Stopped); + m_url = m_files.dequeue(); + startMplayerProcess(); + } + else + { + StateHandler::instance()->dispatch(Qmmp::Stopped); + return; + } + } + 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 MplayerEngine::startMplayerProcess() +{ + initialize(); + m_process->start ("mplayer", m_args); + StateHandler::instance()->dispatch(Qmmp::Playing); + FileInfo *info = MplayerInfo::createFileInfo(m_url); + StateHandler::instance()->dispatch(info->metaData()); + delete info; +} diff --git a/src/plugins/Engines/mplayer/mplayerengine.h b/src/plugins/Engines/mplayer/mplayerengine.h new file mode 100644 index 000000000..cc6b12d16 --- /dev/null +++ b/src/plugins/Engines/mplayer/mplayerengine.h @@ -0,0 +1,83 @@ +/*************************************************************************** + * 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 MPLAYERENGINE_H +#define MPLAYERENGINE_H + +#include +#include +#include +#include + +class Output; +class QIDevice; +class DecoderPhonon; +class QMenu; +class QProcess; +class FileInfo; +class InputSource; + +class MplayerInfo +{ +public: + static FileInfo *createFileInfo(const QString &path); + static QStringList filters(); +}; + +class MplayerEngine : public AbstractEngine +{ + Q_OBJECT +public: + MplayerEngine(QObject *parent); + virtual ~MplayerEngine(); + + // Engine API + bool play(); + bool enqueue(InputSource *source); + 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: + 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; + QQueue m_files; +}; + + +#endif // MPLAYERENGINE_H diff --git a/src/plugins/Engines/mplayer/mplayerenginefactory.cpp b/src/plugins/Engines/mplayer/mplayerenginefactory.cpp new file mode 100644 index 000000000..33ca2e4cf --- /dev/null +++ b/src/plugins/Engines/mplayer/mplayerenginefactory.cpp @@ -0,0 +1,96 @@ +/*************************************************************************** + * 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 "mplayermetadatamodel.h" +#include "settingsdialog.h" +#include "mplayerengine.h" +#include "mplayerenginefactory.h" + + +// MplayerEngineFactory + +const EngineProperties MplayerEngineFactory::properties() const +{ + EngineProperties 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; + return properties; +} + +bool MplayerEngineFactory::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; +} + +AbstractEngine *MplayerEngineFactory::create(QObject *parent) +{ + return new MplayerEngine(parent); +} + +QList MplayerEngineFactory::createPlayList(const QString &fileName, bool useMetaData) +{ + Q_UNUSED(useMetaData); + QList info; + info << MplayerInfo::createFileInfo(fileName); + return info; +} + +MetaDataModel* MplayerEngineFactory::createMetaDataModel(const QString &path, QObject *parent) +{ + return new MplayerMetaDataModel(path, parent); +} + +void MplayerEngineFactory::showSettings(QWidget *parent) +{ + SettingsDialog *s = new SettingsDialog(parent); + s->show(); +} + +void MplayerEngineFactory::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 *MplayerEngineFactory::createTranslator(QObject *parent) +{ + QTranslator *translator = new QTranslator(parent); + QString locale = Qmmp::systemLanguageID(); + translator->load(QString(":/mplayer_plugin_") + locale); + return translator; +} + +Q_EXPORT_PLUGIN(MplayerEngineFactory) diff --git a/src/plugins/Engines/mplayer/mplayerenginefactory.h b/src/plugins/Engines/mplayer/mplayerenginefactory.h new file mode 100644 index 000000000..4c43b15a2 --- /dev/null +++ b/src/plugins/Engines/mplayer/mplayerenginefactory.h @@ -0,0 +1,49 @@ +/*************************************************************************** + * Copyright (C) 2006-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 MPLAYERENGINEFACTORY_H +#define MPLAYERENGINEFACTORY_H + +#include +#include +#include +#include + +#include +#include +#include +#include + +class MplayerEngineFactory : public QObject, EngineFactory +{ +Q_OBJECT +Q_INTERFACES(EngineFactory); + +public: + const EngineProperties properties() const; + bool supports(const QString &source) const; + AbstractEngine *create(QObject *parent = 0); + QList createPlayList(const QString &fileName, bool useMetaData); + MetaDataModel* createMetaDataModel(const QString &path, QObject *parent = 0); + void showSettings(QWidget *parent); + void showAbout(QWidget *parent); + QTranslator *createTranslator(QObject *parent); +}; + +#endif diff --git a/src/plugins/Engines/mplayer/mplayermetadatamodel.cpp b/src/plugins/Engines/mplayer/mplayermetadatamodel.cpp new file mode 100644 index 000000000..7aa8b3e3a --- /dev/null +++ b/src/plugins/Engines/mplayer/mplayermetadatamodel.cpp @@ -0,0 +1,106 @@ +/*************************************************************************** + * 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 +#include "mplayermetadatamodel.h" + +MplayerMetaDataModel::MplayerMetaDataModel(const QString &path, QObject *parent) : MetaDataModel(parent) +{ + m_path = path; +} + +MplayerMetaDataModel::~MplayerMetaDataModel() +{} + +QHash MplayerMetaDataModel::audioProperties() +{ + QHash vp; + QHash ap; + ap.insert(tr("Size"), QString("%1 ").arg(QFileInfo(m_path).size ()/1024)+tr("KB")); + //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 << m_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) + ap.insert(tr("Length"),rx_id_length.cap(1)); //TODO use hh:mm:ss format + else if (rx_id_demuxer.indexIn(line) > -1) + ap.insert(tr("Demuxer"), rx_id_demuxer.cap(1)); + //video info + else if (rx_id_video_format.indexIn(line) > -1) + ap.insert(tr("Video format"), rx_id_video_format.cap(1)); + else if (rx_id_video_fps.indexIn(line) > -1) + ap.insert(tr("FPS"), rx_id_video_fps.cap(1)); + else if (rx_id_video_codec.indexIn(line) > -1) + ap.insert(tr("Video codec"), rx_id_video_codec.cap(1)); + else if (rx_id_video_aspect.indexIn(line) > -1) + ap.insert(tr("Aspect ratio"),rx_id_video_aspect.cap(1)); + else if (rx_id_video_bitrate.indexIn(line) > -1) + ap.insert(tr("Video bitrate"), 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) + ap.insert(tr("Audio codec"),rx_id_audio_codec.cap(1)); + else if (rx_id_audio_rate.indexIn(line) > -1) + ap.insert(tr("Sample rate"), rx_id_audio_rate.cap(1)); + else if (rx_id_audio_bitrate.indexIn(line) > -1) + ap.insert(tr("Audio bitrate"), rx_id_audio_bitrate.cap(1)); + else if (rx_id_audio_nch.indexIn(line) > -1) + ap.insert(tr("Channels"), rx_id_audio_nch.cap(1)); + } + vp.insert(tr("Resolution"), QString("%1x%2").arg(width).arg(height)); + return ap; +} diff --git a/src/plugins/Engines/mplayer/mplayermetadatamodel.h b/src/plugins/Engines/mplayer/mplayermetadatamodel.h new file mode 100644 index 000000000..3cfe4662c --- /dev/null +++ b/src/plugins/Engines/mplayer/mplayermetadatamodel.h @@ -0,0 +1,38 @@ +/*************************************************************************** + * 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 MPLAYERMETADATAMODEL_H +#define MPLAYERMETADATAMODEL_H + +#include + +class MplayerMetaDataModel : public MetaDataModel +{ +Q_OBJECT +public: + MplayerMetaDataModel(const QString &path, QObject *parent); + ~MplayerMetaDataModel(); + QHash audioProperties(); + +private: + QString m_path; +}; + +#endif // MPLAYERMETADATAMODEL_H diff --git a/src/plugins/Engines/mplayer/settingsdialog.cpp b/src/plugins/Engines/mplayer/settingsdialog.cpp new file mode 100644 index 000000000..029890eb1 --- /dev/null +++ b/src/plugins/Engines/mplayer/settingsdialog.cpp @@ -0,0 +1,69 @@ +/*************************************************************************** + * 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/Engines/mplayer/settingsdialog.h b/src/plugins/Engines/mplayer/settingsdialog.h new file mode 100644 index 000000000..9ba56bce8 --- /dev/null +++ b/src/plugins/Engines/mplayer/settingsdialog.h @@ -0,0 +1,46 @@ +/*************************************************************************** + * 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/Engines/mplayer/settingsdialog.ui b/src/plugins/Engines/mplayer/settingsdialog.ui new file mode 100644 index 000000000..86dbfe8f6 --- /dev/null +++ b/src/plugins/Engines/mplayer/settingsdialog.ui @@ -0,0 +1,141 @@ + + + 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/Engines/mplayer/translations/mplayer_plugin_cs.ts b/src/plugins/Engines/mplayer/translations/mplayer_plugin_cs.ts new file mode 100644 index 000000000..26f09d606 --- /dev/null +++ b/src/plugins/Engines/mplayer/translations/mplayer_plugin_cs.ts @@ -0,0 +1,187 @@ + + + + + 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/Engines/mplayer/translations/mplayer_plugin_de.ts b/src/plugins/Engines/mplayer/translations/mplayer_plugin_de.ts new file mode 100644 index 000000000..2f029c38b --- /dev/null +++ b/src/plugins/Engines/mplayer/translations/mplayer_plugin_de.ts @@ -0,0 +1,187 @@ + + + + + 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/Engines/mplayer/translations/mplayer_plugin_it.ts b/src/plugins/Engines/mplayer/translations/mplayer_plugin_it.ts new file mode 100644 index 000000000..f405e4505 --- /dev/null +++ b/src/plugins/Engines/mplayer/translations/mplayer_plugin_it.ts @@ -0,0 +1,187 @@ + + + + + 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/Engines/mplayer/translations/mplayer_plugin_lt.ts b/src/plugins/Engines/mplayer/translations/mplayer_plugin_lt.ts new file mode 100644 index 000000000..87d1c6b33 --- /dev/null +++ b/src/plugins/Engines/mplayer/translations/mplayer_plugin_lt.ts @@ -0,0 +1,187 @@ + + + + + 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/Engines/mplayer/translations/mplayer_plugin_pl.ts b/src/plugins/Engines/mplayer/translations/mplayer_plugin_pl.ts new file mode 100644 index 000000000..fadc08ecc --- /dev/null +++ b/src/plugins/Engines/mplayer/translations/mplayer_plugin_pl.ts @@ -0,0 +1,187 @@ + + + + + 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/Engines/mplayer/translations/mplayer_plugin_ru.ts b/src/plugins/Engines/mplayer/translations/mplayer_plugin_ru.ts new file mode 100644 index 000000000..b4169c849 --- /dev/null +++ b/src/plugins/Engines/mplayer/translations/mplayer_plugin_ru.ts @@ -0,0 +1,187 @@ + + + + + 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/Engines/mplayer/translations/mplayer_plugin_tr.ts b/src/plugins/Engines/mplayer/translations/mplayer_plugin_tr.ts new file mode 100644 index 000000000..f1ba30cb0 --- /dev/null +++ b/src/plugins/Engines/mplayer/translations/mplayer_plugin_tr.ts @@ -0,0 +1,187 @@ + + + + + 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/Engines/mplayer/translations/mplayer_plugin_uk_UA.ts b/src/plugins/Engines/mplayer/translations/mplayer_plugin_uk_UA.ts new file mode 100644 index 000000000..95a95ccb6 --- /dev/null +++ b/src/plugins/Engines/mplayer/translations/mplayer_plugin_uk_UA.ts @@ -0,0 +1,187 @@ + + + + + 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/Engines/mplayer/translations/mplayer_plugin_zh_CN.ts b/src/plugins/Engines/mplayer/translations/mplayer_plugin_zh_CN.ts new file mode 100644 index 000000000..a20be020d --- /dev/null +++ b/src/plugins/Engines/mplayer/translations/mplayer_plugin_zh_CN.ts @@ -0,0 +1,187 @@ + + + + + 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/Engines/mplayer/translations/mplayer_plugin_zh_TW.ts b/src/plugins/Engines/mplayer/translations/mplayer_plugin_zh_TW.ts new file mode 100644 index 000000000..66c75d389 --- /dev/null +++ b/src/plugins/Engines/mplayer/translations/mplayer_plugin_zh_TW.ts @@ -0,0 +1,187 @@ + + + + + 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/Engines/mplayer/translations/translations.qrc b/src/plugins/Engines/mplayer/translations/translations.qrc new file mode 100644 index 000000000..7a98c5a7f --- /dev/null +++ b/src/plugins/Engines/mplayer/translations/translations.qrc @@ -0,0 +1,15 @@ + + + + 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 + + -- cgit v1.2.3-13-gbd6f