From 06d1877811fa6aa97dddc0e03bcde4e766928c87 Mon Sep 17 00:00:00 2001 From: vovanec Date: Thu, 7 Feb 2008 13:36:34 +0000 Subject: new directory structure git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@232 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/Input/mpc/CMakeLists.txt | 86 +++++ src/plugins/Input/mpc/Makefile | 254 ++++++++++++++ src/plugins/Input/mpc/decoder_mpc.cpp | 386 +++++++++++++++++++++ src/plugins/Input/mpc/decoder_mpc.h | 80 +++++ src/plugins/Input/mpc/decodermpcfactory.cpp | 95 +++++ src/plugins/Input/mpc/decodermpcfactory.h | 54 +++ src/plugins/Input/mpc/detailsdialog.cpp | 115 ++++++ src/plugins/Input/mpc/detailsdialog.h | 49 +++ src/plugins/Input/mpc/detailsdialog.ui | 349 +++++++++++++++++++ src/plugins/Input/mpc/mpc.pro | 32 ++ .../Input/mpc/translations/mpc_plugin_ru.qm | Bin 0 -> 2230 bytes .../Input/mpc/translations/mpc_plugin_ru.ts | 149 ++++++++ .../Input/mpc/translations/translations.qrc | 6 + 13 files changed, 1655 insertions(+) create mode 100644 src/plugins/Input/mpc/CMakeLists.txt create mode 100644 src/plugins/Input/mpc/Makefile create mode 100644 src/plugins/Input/mpc/decoder_mpc.cpp create mode 100644 src/plugins/Input/mpc/decoder_mpc.h create mode 100644 src/plugins/Input/mpc/decodermpcfactory.cpp create mode 100644 src/plugins/Input/mpc/decodermpcfactory.h create mode 100644 src/plugins/Input/mpc/detailsdialog.cpp create mode 100644 src/plugins/Input/mpc/detailsdialog.h create mode 100644 src/plugins/Input/mpc/detailsdialog.ui create mode 100644 src/plugins/Input/mpc/mpc.pro create mode 100644 src/plugins/Input/mpc/translations/mpc_plugin_ru.qm create mode 100644 src/plugins/Input/mpc/translations/mpc_plugin_ru.ts create mode 100644 src/plugins/Input/mpc/translations/translations.qrc (limited to 'src/plugins/Input/mpc') diff --git a/src/plugins/Input/mpc/CMakeLists.txt b/src/plugins/Input/mpc/CMakeLists.txt new file mode 100644 index 000000000..dccd6dd6b --- /dev/null +++ b/src/plugins/Input/mpc/CMakeLists.txt @@ -0,0 +1,86 @@ +project(libmpc) + +cmake_minimum_required(VERSION 2.4.0) + + +INCLUDE(UsePkgConfig) +INCLUDE(FindQt4) + +find_package(Qt4 REQUIRED) # find and setup Qt4 for this project +include(${QT_USE_FILE}) + +# 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_BINARY_DIR}/../../../) +link_directories(${CMAKE_CURRENT_BINARY_DIR}/../../../) + +# libmpc and taglib +PKGCONFIG(taglib TAGLIB_INCLUDE_DIR TAGLIB_LINK_DIR TAGLIB_LINK_FLAGS TAGLIB_CFLAGS) + +IF(NOT TAGLIB_LINK_FLAGS) + SET(TAGLIB_LINK_FLAGS -ltag) + SET(TAGLIB_INCLUDE_DIR /usr/include/taglib) + SET(TAGLIB_CFLAGS -I/usr/include/taglib) +ENDIF(NOT TAGLIB_LINK_FLAGS) + +include_directories(${FLAC_INCLUDE_DIR} ${TAGLIB_INCLUDE_DIR}) +link_directories(${FLAC_LINK_DIR} ${TAGLIB_LINK_DIR}) + +ADD_DEFINITIONS(${TAGLIB_CFLAGS}) + + +SET(libmpc_SRCS + decoder_mpc.cpp + decodermpcfactory.cpp + detailsdialog.cpp +) + +SET(libmpc_MOC_HDRS + decodermpcfactory.h + decoder_mpc.h + detailsdialog.h +) + +SET(libmpc_RCCS translations/translations.qrc) + +QT4_ADD_RESOURCES(libmpc_RCC_SRCS ${libmpc_RCCS}) + +QT4_WRAP_CPP(libmpc_MOC_SRCS ${libmpc_MOC_HDRS}) + +# user interface + + +SET(libmpc_UIS + detailsdialog.ui +) + +QT4_WRAP_UI(libmpc_UIS_H ${libmpc_UIS}) +# Don't forget to include output directory, otherwise +# the UI file won't be wrapped! +include_directories(${CMAKE_CURRENT_BINARY_DIR}) + +ADD_LIBRARY(mpc SHARED ${libmpc_SRCS} ${libmpc_MOC_SRCS} ${libmpc_UIS_H} + ${libmpc_RCC_SRCS}) +target_link_libraries(mpc ${QT_LIBRARIES} -lqmmp -lmpcdec ${TAGLIB_LINK_FLAGS} ${TAGLIB_CFLAGS}) +install(TARGETS mpc DESTINATION ${LIB_DIR}/qmmp/Input PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ) + +# clean remaining files + +SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES + "CMakeCache.txt;Makefile;cmake_install.cmake" +) + diff --git a/src/plugins/Input/mpc/Makefile b/src/plugins/Input/mpc/Makefile new file mode 100644 index 000000000..7aa3ee7b3 --- /dev/null +++ b/src/plugins/Input/mpc/Makefile @@ -0,0 +1,254 @@ +############################################################################# +# Makefile for building: libmpc.so +# Generated by qmake (2.01a) (Qt 4.3.1) on: Thu Feb 7 14:07:02 2008 +# Project: mpc.pro +# Template: lib +# Command: /usr/local/Trolltech/Qt-4.3.1/bin/qmake -unix -o Makefile mpc.pro +############################################################################# + +####### Compiler, tools and options + +CC = gcc +CXX = g++ +DEFINES = -DQT_NO_DEBUG -DQT_PLUGIN -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED +CFLAGS = -pipe -O2 -I/usr/include/taglib -Wall -W -D_REENTRANT -fPIC $(DEFINES) +CXXFLAGS = -pipe -O2 -I/usr/include/taglib -Wall -W -D_REENTRANT -fPIC $(DEFINES) +INCPATH = -I/usr/local/Trolltech/Qt-4.3.1/mkspecs/linux-g++ -I. -I/usr/local/Trolltech/Qt-4.3.1/include/QtCore -I/usr/local/Trolltech/Qt-4.3.1/include/QtCore -I/usr/local/Trolltech/Qt-4.3.1/include/QtGui -I/usr/local/Trolltech/Qt-4.3.1/include/QtGui -I/usr/local/Trolltech/Qt-4.3.1/include -I../../../qmmp -I.build/moc -I.build/ui +LINK = g++ +LFLAGS = -Wl,-rpath,/usr/local/Trolltech/Qt-4.3.1/lib -shared +LIBS = $(SUBLIBS) -L../../../../lib -L/usr/local/Trolltech/Qt-4.3.1/lib -lqmmp -L/usr/lib -lmpcdec -I/usr/include -ltag -lQtGui -L/usr/local/Trolltech/Qt-4.3.1/lib -L/usr/X11R6/lib -lpng -lSM -lICE -pthread -pthread -lXi -lXrender -lXrandr -lXfixes -lXcursor -lXinerama -lfreetype -lfontconfig -lXext -lX11 -lQtCore -lz -lm -pthread -lgthread-2.0 -lglib-2.0 -lrt -ldl -lpthread +AR = ar cqs +RANLIB = +QMAKE = /usr/local/Trolltech/Qt-4.3.1/bin/qmake +TAR = tar -cf +COMPRESS = gzip -9f +COPY = cp -f +SED = sed +COPY_FILE = $(COPY) +COPY_DIR = $(COPY) -r +INSTALL_FILE = install -m 644 -p +INSTALL_DIR = $(COPY_DIR) +INSTALL_PROGRAM = install -m 755 -p +DEL_FILE = rm -f +SYMLINK = ln -sf +DEL_DIR = rmdir +MOVE = mv -f +CHK_DIR_EXISTS= test -d +MKDIR = mkdir -p + +####### Output directory + +OBJECTS_DIR = .build/obj/ + +####### Files + +SOURCES = decoder_mpc.cpp \ + decodermpcfactory.cpp \ + detailsdialog.cpp .build/moc/moc_decodermpcfactory.cpp \ + .build/moc/moc_detailsdialog.cpp +OBJECTS = .build/obj/decoder_mpc.o \ + .build/obj/decodermpcfactory.o \ + .build/obj/detailsdialog.o \ + .build/obj/moc_decodermpcfactory.o \ + .build/obj/moc_detailsdialog.o +DIST = /usr/local/Trolltech/Qt-4.3.1/mkspecs/common/g++.conf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/common/unix.conf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/common/linux.conf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/qconfig.pri \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/qt_functions.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/qt_config.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/exclusive_builds.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/default_pre.prf \ + ../../../../qmmp.pri \ + ../../plugins.pri \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/release.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/default_post.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/link_pkgconfig.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/warn_on.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/qt.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/unix/thread.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/moc.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/resources.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/uic.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/yacc.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/lex.prf \ + mpc.pro +QMAKE_TARGET = mpc +DESTDIR = ../../../../lib/qmmp/Input/ +TARGET = libmpc.so +TARGETD = libmpc.so + +first: all +####### Implicit rules + +.SUFFIXES: .o .c .cpp .cc .cxx .C + +.cpp.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.cc.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.cxx.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.C.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" + +.c.o: + $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" + +####### Build rules + +all: Makefile ../../../../lib/qmmp/Input/$(TARGET) + +../../../../lib/qmmp/Input/$(TARGET): .build/ui/ui_detailsdialog.h $(OBJECTS) $(SUBLIBS) $(OBJCOMP) + @$(CHK_DIR_EXISTS) ../../../../lib/qmmp/Input/ || $(MKDIR) ../../../../lib/qmmp/Input/ + -$(DEL_FILE) $(TARGET) + $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS) $(OBJCOMP) + -$(MOVE) $(TARGET) ../../../../lib/qmmp/Input/ + + + +Makefile: mpc.pro /usr/local/Trolltech/Qt-4.3.1/mkspecs/linux-g++/qmake.conf /usr/local/Trolltech/Qt-4.3.1/mkspecs/common/g++.conf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/common/unix.conf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/common/linux.conf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/qconfig.pri \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/qt_functions.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/qt_config.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/exclusive_builds.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/default_pre.prf \ + ../../../../qmmp.pri \ + ../../plugins.pri \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/release.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/default_post.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/link_pkgconfig.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/warn_on.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/qt.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/unix/thread.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/moc.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/resources.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/uic.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/yacc.prf \ + /usr/local/Trolltech/Qt-4.3.1/mkspecs/features/lex.prf \ + /usr/local/Trolltech/Qt-4.3.1/lib/libQtGui.prl \ + /usr/local/Trolltech/Qt-4.3.1/lib/libQtCore.prl + $(QMAKE) -unix -o Makefile mpc.pro +/usr/local/Trolltech/Qt-4.3.1/mkspecs/common/g++.conf: +/usr/local/Trolltech/Qt-4.3.1/mkspecs/common/unix.conf: +/usr/local/Trolltech/Qt-4.3.1/mkspecs/common/linux.conf: +/usr/local/Trolltech/Qt-4.3.1/mkspecs/qconfig.pri: +/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/qt_functions.prf: +/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/qt_config.prf: +/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/exclusive_builds.prf: +/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/default_pre.prf: +../../../../qmmp.pri: +../../plugins.pri: +/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/release.prf: +/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/default_post.prf: +/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/link_pkgconfig.prf: +/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/warn_on.prf: +/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/qt.prf: +/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/unix/thread.prf: +/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/moc.prf: +/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/resources.prf: +/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/uic.prf: +/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/yacc.prf: +/usr/local/Trolltech/Qt-4.3.1/mkspecs/features/lex.prf: +/usr/local/Trolltech/Qt-4.3.1/lib/libQtGui.prl: +/usr/local/Trolltech/Qt-4.3.1/lib/libQtCore.prl: +qmake: FORCE + @$(QMAKE) -unix -o Makefile mpc.pro + +dist: + @$(CHK_DIR_EXISTS) .build/obj/mpc1.0.0 || $(MKDIR) .build/obj/mpc1.0.0 + $(COPY_FILE) --parents $(SOURCES) $(DIST) .build/obj/mpc1.0.0/ && $(COPY_FILE) --parents decodermpcfactory.h decoder_mpc.h detailsdialog.h .build/obj/mpc1.0.0/ && $(COPY_FILE) --parents decoder_mpc.cpp decodermpcfactory.cpp detailsdialog.cpp .build/obj/mpc1.0.0/ && $(COPY_FILE) --parents detailsdialog.ui .build/obj/mpc1.0.0/ && (cd `dirname .build/obj/mpc1.0.0` && $(TAR) mpc1.0.0.tar mpc1.0.0 && $(COMPRESS) mpc1.0.0.tar) && $(MOVE) `dirname .build/obj/mpc1.0.0`/mpc1.0.0.tar.gz . && $(DEL_FILE) -r .build/obj/mpc1.0.0 + + +clean:compiler_clean + -$(DEL_FILE) $(OBJECTS) + -$(DEL_FILE) ../../../../lib/qmmp/Input/libmpc.so + -$(DEL_FILE) *~ core *.core + + +####### Sub-libraries + +distclean: clean + -$(DEL_FILE) $(TARGET) + -$(DEL_FILE) Makefile + + +mocclean: compiler_moc_header_clean compiler_moc_source_clean + +mocables: compiler_moc_header_make_all compiler_moc_source_make_all + +compiler_moc_header_make_all: .build/moc/moc_decodermpcfactory.cpp .build/moc/moc_detailsdialog.cpp +compiler_moc_header_clean: + -$(DEL_FILE) .build/moc/moc_decodermpcfactory.cpp .build/moc/moc_detailsdialog.cpp +.build/moc/moc_decodermpcfactory.cpp: decodermpcfactory.h + /usr/local/Trolltech/Qt-4.3.1/bin/moc $(DEFINES) $(INCPATH) decodermpcfactory.h -o .build/moc/moc_decodermpcfactory.cpp + +.build/moc/moc_detailsdialog.cpp: .build/ui/ui_detailsdialog.h \ + detailsdialog.h + /usr/local/Trolltech/Qt-4.3.1/bin/moc $(DEFINES) $(INCPATH) detailsdialog.h -o .build/moc/moc_detailsdialog.cpp + +compiler_rcc_make_all: +compiler_rcc_clean: +compiler_image_collection_make_all: qmake_image_collection.cpp +compiler_image_collection_clean: + -$(DEL_FILE) qmake_image_collection.cpp +compiler_moc_source_make_all: +compiler_moc_source_clean: +compiler_uic_make_all: .build/ui/ui_detailsdialog.h +compiler_uic_clean: + -$(DEL_FILE) .build/ui/ui_detailsdialog.h +.build/ui/ui_detailsdialog.h: detailsdialog.ui + /usr/local/Trolltech/Qt-4.3.1/bin/uic detailsdialog.ui -o .build/ui/ui_detailsdialog.h + +compiler_yacc_decl_make_all: +compiler_yacc_decl_clean: +compiler_yacc_impl_make_all: +compiler_yacc_impl_clean: +compiler_lex_make_all: +compiler_lex_clean: +compiler_clean: compiler_moc_header_clean compiler_uic_clean + +####### Compile + +.build/obj/decoder_mpc.o: decoder_mpc.cpp decoder_mpc.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .build/obj/decoder_mpc.o decoder_mpc.cpp + +.build/obj/decodermpcfactory.o: decodermpcfactory.cpp detailsdialog.h \ + .build/ui/ui_detailsdialog.h \ + decoder_mpc.h \ + decodermpcfactory.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .build/obj/decodermpcfactory.o decodermpcfactory.cpp + +.build/obj/detailsdialog.o: detailsdialog.cpp detailsdialog.h \ + .build/ui/ui_detailsdialog.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .build/obj/detailsdialog.o detailsdialog.cpp + +.build/obj/moc_decodermpcfactory.o: .build/moc/moc_decodermpcfactory.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .build/obj/moc_decodermpcfactory.o .build/moc/moc_decodermpcfactory.cpp + +.build/obj/moc_detailsdialog.o: .build/moc/moc_detailsdialog.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .build/obj/moc_detailsdialog.o .build/moc/moc_detailsdialog.cpp + +####### Install + +install_target: first FORCE + @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/lib/qmmp/Input/ || $(MKDIR) $(INSTALL_ROOT)/lib/qmmp/Input/ + -$(INSTALL_PROGRAM) "../../../../lib/qmmp/Input/$(TARGET)" "$(INSTALL_ROOT)/lib/qmmp/Input/$(TARGET)" + -strip --strip-unneeded "$(INSTALL_ROOT)/lib/qmmp/Input/$(TARGET)" + +uninstall_target: FORCE + -$(DEL_FILE) "$(INSTALL_ROOT)/lib/qmmp/Input/$(TARGET)" + -$(DEL_DIR) $(INSTALL_ROOT)/lib/qmmp/Input/ + + +install: install_target FORCE + +uninstall: uninstall_target FORCE + +FORCE: + diff --git a/src/plugins/Input/mpc/decoder_mpc.cpp b/src/plugins/Input/mpc/decoder_mpc.cpp new file mode 100644 index 000000000..10591a384 --- /dev/null +++ b/src/plugins/Input/mpc/decoder_mpc.cpp @@ -0,0 +1,386 @@ +/*************************************************************************** + * Copyright (C) 2006 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 "constants.h" +#include "buffer.h" +#include "output.h" +#include "recycler.h" + +#include "decoder_mpc.h" + +// this function used from xmms +inline static void copyBuffer(MPC_SAMPLE_FORMAT* pInBuf, char* pOutBuf, unsigned pLength) +{ + unsigned pSize = 16; + int clipMin = -1 << (pSize - 1); + int clipMax = (1 << (pSize - 1)) - 1; + int floatScale = 1 << (pSize - 1); + for (unsigned n = 0; n < 2 * pLength; n++) + { + int val; +#ifdef MPC_FIXED_POINT + val = shiftSigned(pInBuf[n], pSize - MPC_FIXED_POINT_SCALE_SHIFT); +#else + val = (int) (pInBuf[n] * floatScale); +#endif + if (val < clipMin) + val = clipMin; + else if (val > clipMax) + val = clipMax; + unsigned shift = 0; + do + { + pOutBuf[n * 2 + (shift / 8)] = (unsigned char) ((val >> shift) & 0xFF); + shift += 8; + } + while (shift < pSize); + } +} + +// mpc callbacks + +static mpc_int32_t mpc_callback_read (void *data, void *buffer, mpc_int32_t size) +{ + DecoderMPC *dmpc = (DecoderMPC *) data; + qint64 res; + + res = dmpc->input()->read((char *)buffer, size); + + return res; +} + +static mpc_bool_t mpc_callback_seek (void *data, mpc_int32_t offset) +{ + DecoderMPC *dmpc = (DecoderMPC *) data; + + return dmpc->input()->seek(offset); // ? TRUE : FALSE; +} + +static mpc_int32_t mpc_callback_tell (void *data) +{ + DecoderMPC *dmpc = (DecoderMPC *) data; + return dmpc->input()->pos (); +} + +static mpc_bool_t mpc_callback_canseek (void *data) +{ + DecoderMPC *dmpc = (DecoderMPC *) data; + return !dmpc->input()->isSequential () ; +} + +static mpc_int32_t mpc_callback_get_size (void *data) +{ + DecoderMPC *dmpc = (DecoderMPC *) data; + return dmpc->input()->size(); +} + +// Decoder class + +DecoderMPC::DecoderMPC(QObject *parent, DecoderFactory *d, QIODevice *i, Output *o) + : Decoder(parent, d, i, o) +{ + inited = FALSE; + user_stop = FALSE; + stat = 0; + output_buf = 0; + output_bytes = 0; + output_at = 0; + bks = 0; + done = FALSE; + finish = FALSE; + len = 0; + freq = 0; + bitrate = 0; + seekTime = -1.0; + totalTime = 0.0; + chan = 0; + output_size = 0; + m_data = 0; + + + + +} + + +DecoderMPC::~DecoderMPC() +{ + deinit(); + if(data()) + { + delete data(); + m_data = 0; + } + if (output_buf) + delete [] output_buf; + output_buf = 0; +} + + +void DecoderMPC::stop() +{ + user_stop = TRUE; +} + + +void DecoderMPC::flush(bool final) +{ + ulong min = final ? 0 : bks; + + while ((! done && ! finish) && output_bytes > min) + { + output()->recycler()->mutex()->lock (); + + while ((! done && ! finish) && output()->recycler()->full()) + { + mutex()->unlock(); + + output()->recycler()->cond()->wait(output()->recycler()->mutex()); + + mutex()->lock (); + done = user_stop; + } + + if (user_stop || finish) + { + inited = FALSE; + done = TRUE; + } + else + { + output_bytes -= produceSound(output_buf, output_bytes, bitrate, chan); + output_size += bks; + output_at = output_bytes; + } + + if (output()->recycler()->full()) + { + output()->recycler()->cond()->wakeOne(); + } + + output()->recycler()->mutex()->unlock(); + } +} + + +bool DecoderMPC::initialize() +{ + bks = blockSize(); + inited = user_stop = done = finish = FALSE; + len = freq = bitrate = 0; + stat = chan = 0; + output_size = 0; + seekTime = -1.0; + totalTime = 0.0; + + + if (! input()) + { + error("DecoderMPC: cannot initialize. No input."); + + return FALSE; + } + + if (! output_buf) + output_buf = new char[globalBufferSize]; + output_at = 0; + output_bytes = 0; + + if (! input()) + { + error("DecoderMPC: cannot initialize. No input."); + + return FALSE; + } + + if (! output_buf) + output_buf = new char[globalBufferSize]; + output_at = 0; + output_bytes = 0; + + if (! input()->isOpen()) + { + if (! input()->open(QIODevice::ReadOnly)) + { + error("DecoderMPC: cannot open input."); + return FALSE; + } + } + if (!m_data) + { + m_data = new mpc_data; + } + + qDebug("DecoderMPC: setting callbacks"); + m_data->reader.read = mpc_callback_read; + m_data->reader.seek = mpc_callback_seek; + m_data->reader.tell = mpc_callback_tell; + m_data->reader.canseek = mpc_callback_canseek; + m_data->reader.get_size = mpc_callback_get_size; + m_data->reader.data = this; + + mpc_streaminfo_init (&m_data->info); + + if (mpc_streaminfo_read (&m_data->info, &m_data->reader) != ERROR_CODE_OK) + return FALSE; + chan = data()->info.channels; + configure(data()->info.sample_freq, chan, 16, data()->info.bitrate); + + mpc_decoder_setup (&data()->decoder, &data()->reader); + + //mpc_decoder_scale_output (&data()->decoder, 3.0); + + if (!mpc_decoder_initialize (&data()->decoder, &data()->info)) + { + error("DecoderMPC: cannot get info."); + return FALSE; + } + totalTime = mpc_streaminfo_get_length(&data()->info); + inited = TRUE; + qDebug("DecoderMPC: initialize succes"); + return TRUE; +} + + +double DecoderMPC::lengthInSeconds() +{ + if (! inited) + return 0; + + return totalTime; +} + + +void DecoderMPC::seek(double pos) +{ + seekTime = pos; +} + + +void DecoderMPC::deinit() +{ + //FLAC__stream_decoder_finish (data()->decoder); + inited = user_stop = done = finish = FALSE; + len = freq = bitrate = 0; + stat = chan = 0; + output_size = 0; +} + +void DecoderMPC::run() +{ + mpc_uint32_t vbrAcc = 0; + mpc_uint32_t vbrUpd = 0; + mutex()->lock (); + + if (! inited) + { + mutex()->unlock(); + + return; + } + stat = DecoderState::Decoding; + mutex()->unlock(); + { + dispatch(DecoderState ((DecoderState::Type) stat)); + } + + while (! done && ! finish) + { + mutex()->lock (); + // decode + + if (seekTime >= 0.0) + { + mpc_decoder_seek_seconds(&data()->decoder, seekTime); + seekTime = -1.0; + } + MPC_SAMPLE_FORMAT buffer[MPC_DECODER_BUFFER_LENGTH]; + + len = mpc_decoder_decode (&data()->decoder, buffer, &vbrAcc, &vbrUpd); + + copyBuffer(buffer, (char *) (output_buf + output_at), len); + + len = len * 4; + + if (len > 0) + { + bitrate = vbrUpd * data()->info.sample_freq / 1152; + output_at += len; + output_bytes += len; + + if (output()) + flush(); + + } + else if (len == 0) + { + flush(TRUE); + + if (output()) + { + output()->recycler()->mutex()->lock (); + // end of stream + while (! output()->recycler()->empty() && ! user_stop) + { + output()->recycler()->cond()->wakeOne(); + mutex()->unlock(); + output()->recycler()->cond()->wait(output()->recycler()->mutex()); + mutex()->lock (); + } + output()->recycler()->mutex()->unlock(); + } + + done = TRUE; + if (! user_stop) + { + finish = TRUE; + } + } + else + { + // error in read + error("DecoderMPC: Error while decoding stream, File appears to be " + "corrupted"); + + finish = TRUE; + } + + mutex()->unlock(); + } + + mutex()->lock (); + + if (finish) + stat = DecoderState::Finished; + else if (user_stop) + stat = DecoderState::Stopped; + + mutex()->unlock(); + + { + dispatch(DecoderState ((DecoderState::Type) stat)); + } + + deinit(); +} diff --git a/src/plugins/Input/mpc/decoder_mpc.h b/src/plugins/Input/mpc/decoder_mpc.h new file mode 100644 index 000000000..3b17b100e --- /dev/null +++ b/src/plugins/Input/mpc/decoder_mpc.h @@ -0,0 +1,80 @@ +/*************************************************************************** + * Copyright (C) 2006 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_mpc_h +#define __decoder_mpc_h + +#include + +#include "decoder.h" + +struct mpc_data +{ + mpc_decoder decoder; + mpc_reader reader; + mpc_streaminfo info; +}; + +class DecoderMPC : public Decoder +{ +public: + DecoderMPC(QObject *, DecoderFactory *, QIODevice *, Output *); + virtual ~DecoderMPC(); + + // Standard Decoder API + bool initialize(); + double lengthInSeconds(); + void seek(double); + void stop(); + + // Equalizer + bool isEQSupported() const { return FALSE; } + void setEQEnabled(bool) { ; } + void setEQGain(int) { ; } + void setEQBands(int[10]) { ; } + + struct mpc_data *data() { return m_data; } + + +private: + // thread run function + void run(); + struct mpc_data *m_data; + // helper functions + void flush(bool = FALSE); + void deinit(); + + bool inited, user_stop; + int stat; + + // output buffer + char *output_buf; + ulong output_bytes, output_at; + + unsigned int bks; + bool done, finish; + long len, freq, bitrate; + int chan; + unsigned long output_size; + double totalTime, seekTime; +}; + + +#endif // __decoder_mpc_h diff --git a/src/plugins/Input/mpc/decodermpcfactory.cpp b/src/plugins/Input/mpc/decodermpcfactory.cpp new file mode 100644 index 000000000..f2874a08d --- /dev/null +++ b/src/plugins/Input/mpc/decodermpcfactory.cpp @@ -0,0 +1,95 @@ +#include +#include +#include + +#include "detailsdialog.h" +#include "decoder_mpc.h" +#include "decodermpcfactory.h" + + +// DecoderMPCFactory + +bool DecoderMPCFactory::supports(const QString &source) const +{ + + return (source.right(4).toLower() == ".mpc"); +} + +bool DecoderMPCFactory::canDecode(QIODevice *) const +{ + return FALSE; +} + +const DecoderProperties DecoderMPCFactory::properties() const +{ + DecoderProperties properties; + properties.name = tr("Musepack Plugin"); + properties.filter = "*.mpc"; + properties.description = tr("Musepack Files"); + //properties.contentType = ; + properties.hasAbout = TRUE; + properties.hasSettings = FALSE; + return properties; +} + +Decoder *DecoderMPCFactory::create(QObject *parent, QIODevice *input, + Output *output) +{ + return new DecoderMPC(parent, this, input, output); +} + +FileTag *DecoderMPCFactory::createTag(const QString &source) +{ + FileTag *ftag = new FileTag(); + + TagLib::FileRef fileRef(source.toLocal8Bit ()); + TagLib::Tag *tag = fileRef.tag(); + + if (tag && !tag->isEmpty()) + { + ftag->setValue(FileTag::ALBUM, + QString::fromUtf8(tag->album().toCString(TRUE)).trimmed()); + ftag->setValue(FileTag::ARTIST, + QString::fromUtf8(tag->artist().toCString(TRUE)).trimmed()); + ftag->setValue(FileTag::COMMENT, + QString::fromUtf8(tag->comment().toCString(TRUE)).trimmed()); + ftag->setValue(FileTag::GENRE, + QString::fromUtf8(tag->genre().toCString(TRUE)).trimmed()); + ftag->setValue(FileTag::TITLE, + QString::fromUtf8(tag->title().toCString(TRUE)).trimmed()); + ftag->setValue(FileTag::YEAR, tag->year()); + ftag->setValue(FileTag::TRACK, tag->track()); + } + + if (fileRef.audioProperties()) + ftag->setValue(FileTag::LENGTH, fileRef.audioProperties()->length()); + + return ftag; +} + +QObject* DecoderMPCFactory::showDetails(QWidget *parent, const QString &path) +{ + DetailsDialog *d = new DetailsDialog(parent, path); + d -> show(); + return d; +} + +void DecoderMPCFactory::showSettings(QWidget *) +{} + +void DecoderMPCFactory::showAbout(QWidget *parent) +{ + QMessageBox::about (parent, tr("About Musepack Audio Plugin"), + tr("Qmmp Musepack Audio Plugin")+"\n"+ + tr("Writen by: Ilya Kotov ")); +} + +QTranslator *DecoderMPCFactory::createTranslator(QObject *parent) +{ + QTranslator *translator = new QTranslator(parent); + QString locale = QLocale::system().name(); + translator->load(QString(":/mpc_plugin_") + locale); + return translator; +} + +Q_EXPORT_PLUGIN(DecoderMPCFactory) diff --git a/src/plugins/Input/mpc/decodermpcfactory.h b/src/plugins/Input/mpc/decodermpcfactory.h new file mode 100644 index 000000000..0f8dda55f --- /dev/null +++ b/src/plugins/Input/mpc/decodermpcfactory.h @@ -0,0 +1,54 @@ +/*************************************************************************** + * Copyright (C) 2006 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 DECODERMPCFACTORY_H +#define DECODERMPCFACTORY_H + +#include +#include +#include +#include + +#include +#include +#include +#include + + + + +class DecoderMPCFactory : 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 *); + FileTag *createTag(const QString &source); + 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/mpc/detailsdialog.cpp b/src/plugins/Input/mpc/detailsdialog.cpp new file mode 100644 index 000000000..472046717 --- /dev/null +++ b/src/plugins/Input/mpc/detailsdialog.cpp @@ -0,0 +1,115 @@ +/*************************************************************************** + * Copyright (C) 2007 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 "detailsdialog.h" + +#define QStringToTString_qt4(s) TagLib::String(s.toUtf8().constData(), TagLib::String::UTF8) + +DetailsDialog::DetailsDialog(QWidget *parent, const QString &path) + : QDialog(parent) +{ + ui.setupUi(this); + setAttribute(Qt::WA_DeleteOnClose); + m_path = path; + setWindowTitle (path.section('/',-1)); + path.section('/',-1); + ui.pathLineEdit->setText(m_path); + if(QFile::exists(m_path)) + { + loadMPCInfo(); + loadTag(); + } +} + + +DetailsDialog::~DetailsDialog() +{} + +void DetailsDialog::loadMPCInfo() +{ + TagLib::MPC::File f (m_path.toLocal8Bit()); + QString text; + text = QString("%1").arg(f.audioProperties()->length()/60); + text +=":"+QString("%1").arg(f.audioProperties()->length()%60,2,10,QChar('0')); + ui.lengthLabel->setText(text); + text = QString("%1").arg(f.audioProperties()->sampleRate()); + ui.sampleRateLabel->setText(text+" "+tr("Hz")); + text = QString("%1").arg(f.audioProperties()->channels()); + ui.channelsLabel->setText(text); + text = QString("%1").arg(f.audioProperties()->bitrate()); + ui.bitrateLabel->setText(text+" "+tr("kbps")); + text = QString("%1").arg(f.audioProperties()->mpcVersion()); + ui.versionLabel->setText(text); + text = QString("%1 "+tr("KB")).arg(f.length()/1024); + ui.fileSizeLabel->setText(text); +} + +void DetailsDialog::loadTag() +{ + TagLib::FileRef f (m_path.toLocal8Bit()); + + if (f.tag()) + { //TODO: load codec name from config + + TagLib::String title = f.tag()->title(); + TagLib::String artist = f.tag()->artist(); + TagLib::String album = f.tag()->album(); + TagLib::String comment = f.tag()->comment(); + TagLib::String genre = f.tag()->genre(); + QString string = QString::fromUtf8(title.toCString(TRUE)).trimmed(); + ui.titleLineEdit->setText(string); + string = QString::fromUtf8(artist.toCString(TRUE)).trimmed(); + ui.artistLineEdit->setText(string); + string = QString::fromUtf8(album.toCString(TRUE)).trimmed(); + ui.albumLineEdit->setText(string); + string = QString::fromUtf8(comment.toCString(TRUE)).trimmed(); + ui.commentLineEdit->setText(string); + string = QString("%1").arg(f.tag()->year()); + ui.yearLineEdit->setText(string); + string = QString("%1").arg(f.tag()->track()); + ui.trackLineEdit->setText(string); + string = QString::fromUtf8(genre.toCString(TRUE)).trimmed(); + ui.genreLineEdit->setText(string); + } + QFileInfo info(m_path); + ui.saveButton->setEnabled(info.isWritable()); + connect(ui.saveButton, SIGNAL(clicked()), SLOT(saveTag())); +} + +void DetailsDialog::saveTag() +{ + TagLib::FileRef f (m_path.toLocal8Bit()); + + f.tag()->setTitle(QStringToTString_qt4(ui.titleLineEdit->text())); + f.tag()->setArtist(QStringToTString_qt4(ui.artistLineEdit->text())); + f.tag()->setAlbum(QStringToTString_qt4(ui.albumLineEdit->text())); + f.tag()->setComment(QStringToTString_qt4(ui.commentLineEdit->text())); + f.tag()->setGenre(QStringToTString_qt4(ui.genreLineEdit->text())); + f.tag()->setYear(ui.yearLineEdit->text().toUInt()); + f.tag()->setTrack(ui.trackLineEdit->text().toUInt()); + + f.save(); +} diff --git a/src/plugins/Input/mpc/detailsdialog.h b/src/plugins/Input/mpc/detailsdialog.h new file mode 100644 index 000000000..70540bda1 --- /dev/null +++ b/src/plugins/Input/mpc/detailsdialog.h @@ -0,0 +1,49 @@ +/*************************************************************************** + * Copyright (C) 2007 by Ilya Kotov * + * forkotov02@hotmail.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef DETAILSDIALOG_H +#define DETAILSDIALOG_H + +#include + +#include "ui_detailsdialog.h" + +/** + @author Ilya Kotov +*/ +class DetailsDialog : public QDialog +{ +Q_OBJECT +public: + DetailsDialog(QWidget *parent = 0, const QString &path = 0); + + ~DetailsDialog(); + +private slots: + void saveTag(); + +private: + void loadMPCInfo(); + void loadTag(); + Ui::DetailsDialog ui; + QString m_path; + +}; + +#endif diff --git a/src/plugins/Input/mpc/detailsdialog.ui b/src/plugins/Input/mpc/detailsdialog.ui new file mode 100644 index 000000000..918dd3abf --- /dev/null +++ b/src/plugins/Input/mpc/detailsdialog.ui @@ -0,0 +1,349 @@ + + DetailsDialog + + + + 0 + 0 + 449 + 375 + + + + Details + + + + 8 + + + 6 + + + + + + 175 + 16 + + + + Musepack Info + + + + 8 + + + 6 + + + + + Qt::Vertical + + + + 74 + 151 + + + + + + + + - + + + + + + + Length: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + - + + + + + + + Sample rate: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + - + + + + + + + Qt::LeftToRight + + + Channels: + + + Qt::PlainText + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + File size: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Bitrate: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Qt::LeftToRight + + + - + + + + + + + - + + + + + + + Stream version: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + - + + + + + + + + + + true + + + + + + + File path: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Close + + + + + + + Qt::Horizontal + + + + 111 + 20 + + + + + + + + + 5 + 5 + 0 + 0 + + + + Musepack Tag + + + + 8 + + + 6 + + + + + false + + + Save + + + + + + + + + + Track number: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + Year: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Genre: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Comment: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Album: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Artist: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Title: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + + + + + + + + + + + + + + + + + + pushButton_3 + clicked() + DetailsDialog + close() + + + 623 + 353 + + + 539 + 352 + + + + + diff --git a/src/plugins/Input/mpc/mpc.pro b/src/plugins/Input/mpc/mpc.pro new file mode 100644 index 000000000..f1a50683d --- /dev/null +++ b/src/plugins/Input/mpc/mpc.pro @@ -0,0 +1,32 @@ +include(../../plugins.pri) + +FORMS += detailsdialog.ui +HEADERS += decodermpcfactory.h \ + decoder_mpc.h \ + detailsdialog.h +SOURCES += decoder_mpc.cpp \ + decodermpcfactory.cpp \ + detailsdialog.cpp + +TARGET=$$PLUGINS_PREFIX/Input/mpc +QMAKE_CLEAN =$$PLUGINS_PREFIX/Input/libmpc.so + + +INCLUDEPATH += ../../../qmmp +CONFIG += release \ +warn_on \ +plugin \ +link_pkgconfig +TEMPLATE = lib +QMAKE_LIBDIR += ../../../../lib +LIBS += -lqmmp -L/usr/lib -lmpcdec -I/usr/include +PKGCONFIG += taglib +#TRANSLATIONS = translations/mpc_plugin_ru.ts +#RESOURCES = translations/translations.qrc + +isEmpty (LIB_DIR){ +LIB_DIR = /lib +} + +target.path = $$LIB_DIR/qmmp/Input +INSTALLS += target diff --git a/src/plugins/Input/mpc/translations/mpc_plugin_ru.qm b/src/plugins/Input/mpc/translations/mpc_plugin_ru.qm new file mode 100644 index 000000000..0eb8c1533 Binary files /dev/null and b/src/plugins/Input/mpc/translations/mpc_plugin_ru.qm differ diff --git a/src/plugins/Input/mpc/translations/mpc_plugin_ru.ts b/src/plugins/Input/mpc/translations/mpc_plugin_ru.ts new file mode 100644 index 000000000..53ecd8dc8 --- /dev/null +++ b/src/plugins/Input/mpc/translations/mpc_plugin_ru.ts @@ -0,0 +1,149 @@ + + + + DecoderMPCFactory + + + Musepack Plugin + Модуль Musepack + + + + Musepack Files + Файлы Musepack + + + + About Musepack Audio Plugin + Об аудио-модуле Musepack + + + + Qmmp Musepack Audio Plugin + Аудио-модуль Musepack для Qmmp + + + + Writen by: Ilya Kotov <forkotov02@hotmail.ru> + Разработчик: Илья Котов <forkotov02@hotmail.ru> + + + + DetailsDialog + + + Hz + Гц + + + + Musepack Info + Информация Musepack + + + + - + + + + + Length: + Длительность: + + + + Sample rate: + Дискретизация: + + + + Channels: + Каналов: + + + + File size: + Размер файла: + + + + Bitrate: + Битовая частота: + + + + Stream version: + Версия потока: + + + + File path: + Путь к файлу: + + + + Close + Закрыть + + + + Musepack Tag + Musepack-тег + + + + Save + Сохранить + + + + Track number: + Номер трека: + + + + Year: + Год: + + + + Genre: + Жанр: + + + + Comment: + Комментарий: + + + + Album: + Альбом: + + + + Artist: + Исполнитель: + + + + Title: + Название: + + + + Details + Информация + + + + kbps + Кб/с + + + + KB + Кб + + + diff --git a/src/plugins/Input/mpc/translations/translations.qrc b/src/plugins/Input/mpc/translations/translations.qrc new file mode 100644 index 000000000..cc88de9ce --- /dev/null +++ b/src/plugins/Input/mpc/translations/translations.qrc @@ -0,0 +1,6 @@ + + + + mpc_plugin_ru.qm + + -- cgit v1.2.3-13-gbd6f