summaryrefslogtreecommitdiffstats
path: root/plugins/encoder
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/encoder')
-rw-r--r--plugins/encoder/Makefile.am9
-rw-r--r--plugins/encoder/external/CMakeLists.txt3
-rw-r--r--plugins/encoder/external/Makefile.am15
-rw-r--r--plugins/encoder/external/k3bexternalencoder.cpp14
-rw-r--r--plugins/encoder/external/k3bexternalencoder.h2
-rw-r--r--plugins/encoder/external/k3bexternalencoder.plugin6
-rw-r--r--plugins/encoder/external/k3bexternalencodercommand.cpp2
-rw-r--r--plugins/encoder/external/k3bexternalencoderconfigwidget.cpp16
-rw-r--r--plugins/encoder/external/k3bexternalencoderconfigwidget.h4
-rw-r--r--plugins/encoder/lame/CMakeLists.txt3
-rw-r--r--plugins/encoder/lame/Makefile.am15
-rw-r--r--plugins/encoder/lame/configure.in.bot11
-rw-r--r--plugins/encoder/lame/configure.in.in20
-rw-r--r--plugins/encoder/lame/k3blameencoder.cpp10
-rw-r--r--plugins/encoder/lame/k3blameencoder.h4
-rw-r--r--plugins/encoder/lame/k3blameencoder.plugin6
-rw-r--r--plugins/encoder/ogg/CMakeLists.txt3
-rw-r--r--plugins/encoder/ogg/Makefile.am13
-rw-r--r--plugins/encoder/ogg/k3boggvorbisencoder.cpp4
-rw-r--r--plugins/encoder/ogg/k3boggvorbisencoder.h4
-rw-r--r--plugins/encoder/ogg/k3boggvorbisencoder.plugin6
-rw-r--r--plugins/encoder/skeleton.h4
-rw-r--r--plugins/encoder/skeleton.plugin6
-rw-r--r--plugins/encoder/sox/CMakeLists.txt3
-rw-r--r--plugins/encoder/sox/Makefile.am13
-rw-r--r--plugins/encoder/sox/k3bsoxencoder.cpp179
-rw-r--r--plugins/encoder/sox/k3bsoxencoder.h4
-rw-r--r--plugins/encoder/sox/k3bsoxencoder.plugin6
28 files changed, 140 insertions, 245 deletions
diff --git a/plugins/encoder/Makefile.am b/plugins/encoder/Makefile.am
deleted file mode 100644
index 35724e1..0000000
--- a/plugins/encoder/Makefile.am
+++ /dev/null
@@ -1,9 +0,0 @@
-if include_LAME
-ENCLAMEDIR = lame
-endif
-
-if include_OGG
-ENCOGGDIR = ogg
-endif
-
-SUBDIRS = sox external $(ENCLAMEDIR) $(ENCOGGDIR)
diff --git a/plugins/encoder/external/CMakeLists.txt b/plugins/encoder/external/CMakeLists.txt
index e2b9f1a..334dbea 100644
--- a/plugins/encoder/external/CMakeLists.txt
+++ b/plugins/encoder/external/CMakeLists.txt
@@ -38,6 +38,7 @@ tde_add_kpart( libk3bexternalencoder AUTOMOC
##### other data ################################
-install( FILES k3bexternalencoder.plugin
+tde_create_translated_desktop(
+ SOURCE k3bexternalencoder.plugin
DESTINATION ${DATA_INSTALL_DIR}/k3b/plugins
)
diff --git a/plugins/encoder/external/Makefile.am b/plugins/encoder/external/Makefile.am
deleted file mode 100644
index b092cde..0000000
--- a/plugins/encoder/external/Makefile.am
+++ /dev/null
@@ -1,15 +0,0 @@
-AM_CPPFLAGS = -I$(srcdir)/../../../libk3b/core -I$(srcdir)/../../../libk3b/plugin -I$(srcdir)/../../../libk3b/core -I$(srcdir)/../../../libk3bdevice $(all_includes)
-
-kde_module_LTLIBRARIES = libk3bexternalencoder.la
-
-libk3bexternalencoder_la_SOURCES = base_k3bexternalencoderconfigwidget.ui \
- base_k3bexternalencodereditwidget.ui k3bexternalencoder.cpp \
- k3bexternalencoderconfigwidget.cpp k3bexternalencodercommand.cpp
-
-libk3bexternalencoder_la_LIBADD = ../../../libk3b/libk3b.la ../../../libk3bdevice/libk3bdevice.la $(LIB_TDECORE) $(LIB_TQT) $(LIB_TDEUI)
-libk3bexternalencoder_la_LDFLAGS = -avoid-version -module -no-undefined $(all_libraries)
-
-pluginsdir = $(kde_datadir)/k3b/plugins
-plugins_DATA = k3bexternalencoder.plugin
-
-METASOURCES = AUTO
diff --git a/plugins/encoder/external/k3bexternalencoder.cpp b/plugins/encoder/external/k3bexternalencoder.cpp
index 2a3ccba..bf487ed 100644
--- a/plugins/encoder/external/k3bexternalencoder.cpp
+++ b/plugins/encoder/external/k3bexternalencoder.cpp
@@ -26,7 +26,7 @@
#include <kdebug.h>
#include <tdeconfig.h>
#include <tdelocale.h>
-#include <kstandarddirs.h>
+#include <tdestandarddirs.h>
#include <tqregexp.h>
#include <tqfile.h>
@@ -207,12 +207,12 @@ bool K3bExternalEncoder::initEncoderInternal( const TQString& extension )
d->process->setSplitStdout(true);
d->process->setRawStdin(true);
- connect( d->process, TQT_SIGNAL(processExited(TDEProcess*)),
- this, TQT_SLOT(slotExternalProgramFinished(TDEProcess*)) );
- connect( d->process, TQT_SIGNAL(stderrLine(const TQString&)),
- this, TQT_SLOT(slotExternalProgramOutputLine(const TQString&)) );
- connect( d->process, TQT_SIGNAL(stdoutLine(const TQString&)),
- this, TQT_SLOT(slotExternalProgramOutputLine(const TQString&)) );
+ connect( d->process, TQ_SIGNAL(processExited(TDEProcess*)),
+ this, TQ_SLOT(slotExternalProgramFinished(TDEProcess*)) );
+ connect( d->process, TQ_SIGNAL(stderrLine(const TQString&)),
+ this, TQ_SLOT(slotExternalProgramOutputLine(const TQString&)) );
+ connect( d->process, TQ_SIGNAL(stdoutLine(const TQString&)),
+ this, TQ_SLOT(slotExternalProgramOutputLine(const TQString&)) );
// create the commandline
diff --git a/plugins/encoder/external/k3bexternalencoder.h b/plugins/encoder/external/k3bexternalencoder.h
index 1ef865a..4ab5930 100644
--- a/plugins/encoder/external/k3bexternalencoder.h
+++ b/plugins/encoder/external/k3bexternalencoder.h
@@ -26,7 +26,7 @@ class TDEProcess;
class K3bExternalEncoder : public K3bAudioEncoder
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/plugins/encoder/external/k3bexternalencoder.plugin b/plugins/encoder/external/k3bexternalencoder.plugin
index 2faaa3a..de0a5d3 100644
--- a/plugins/encoder/external/k3bexternalencoder.plugin
+++ b/plugins/encoder/external/k3bexternalencoder.plugin
@@ -1,9 +1,9 @@
[K3b Plugin]
-Lib=libk3bexternalencoder
-Group=AudioEncoder
Name=K3b External Audio Encoder
+Comment=Encoding module that allows specifying an encoding commmand
Author=Sebastian Trueg
Email=trueg@k3b.org
Version=4.0
-Comment=Encoding module that allows specifying an encoding commmand
License=GPL
+Group=AudioEncoder
+Lib=libk3bexternalencoder
diff --git a/plugins/encoder/external/k3bexternalencodercommand.cpp b/plugins/encoder/external/k3bexternalencodercommand.cpp
index 7ab974a..1d68328 100644
--- a/plugins/encoder/external/k3bexternalencodercommand.cpp
+++ b/plugins/encoder/external/k3bexternalencodercommand.cpp
@@ -20,7 +20,7 @@
#include <k3bcore.h>
#include <tdeconfig.h>
-#include <kstandarddirs.h>
+#include <tdestandarddirs.h>
TQValueList<K3bExternalEncoderCommand> K3bExternalEncoderCommand::readCommands()
diff --git a/plugins/encoder/external/k3bexternalencoderconfigwidget.cpp b/plugins/encoder/external/k3bexternalencoderconfigwidget.cpp
index 0f89798..18a986d 100644
--- a/plugins/encoder/external/k3bexternalencoderconfigwidget.cpp
+++ b/plugins/encoder/external/k3bexternalencoderconfigwidget.cpp
@@ -119,14 +119,14 @@ K3bExternalEncoderSettingsWidget::K3bExternalEncoderSettingsWidget( TQWidget* pa
lay->setMargin( 0 );
lay->addWidget( w );
- connect( w->m_viewEncoders, TQT_SIGNAL(selectionChanged()),
- this, TQT_SLOT(slotSelectionChanged()) );
- connect( w->m_buttonAdd, TQT_SIGNAL(clicked()),
- this, TQT_SLOT(slotNewCommand()) );
- connect( w->m_buttonEdit, TQT_SIGNAL(clicked()),
- this, TQT_SLOT(slotEditCommand()) );
- connect( w->m_buttonRemove, TQT_SIGNAL(clicked()),
- this, TQT_SLOT(slotRemoveCommand()) );
+ connect( w->m_viewEncoders, TQ_SIGNAL(selectionChanged()),
+ this, TQ_SLOT(slotSelectionChanged()) );
+ connect( w->m_buttonAdd, TQ_SIGNAL(clicked()),
+ this, TQ_SLOT(slotNewCommand()) );
+ connect( w->m_buttonEdit, TQ_SIGNAL(clicked()),
+ this, TQ_SLOT(slotEditCommand()) );
+ connect( w->m_buttonRemove, TQ_SIGNAL(clicked()),
+ this, TQ_SLOT(slotRemoveCommand()) );
m_editDlg = new K3bExternalEncoderEditDialog( this );
}
diff --git a/plugins/encoder/external/k3bexternalencoderconfigwidget.h b/plugins/encoder/external/k3bexternalencoderconfigwidget.h
index 8fe19c6..68027f0 100644
--- a/plugins/encoder/external/k3bexternalencoderconfigwidget.h
+++ b/plugins/encoder/external/k3bexternalencoderconfigwidget.h
@@ -26,7 +26,7 @@
class K3bExternalEncoderEditDialog : public KDialogBase
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -46,7 +46,7 @@ class K3bExternalEncoderEditDialog : public KDialogBase
class K3bExternalEncoderSettingsWidget : public K3bPluginConfigWidget
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/plugins/encoder/lame/CMakeLists.txt b/plugins/encoder/lame/CMakeLists.txt
index 940ed62..ebee326 100644
--- a/plugins/encoder/lame/CMakeLists.txt
+++ b/plugins/encoder/lame/CMakeLists.txt
@@ -37,6 +37,7 @@ tde_add_kpart( libk3blameencoder AUTOMOC
##### other data ################################
-install( FILES k3blameencoder.plugin
+tde_create_translated_desktop(
+ SOURCE k3blameencoder.plugin
DESTINATION ${DATA_INSTALL_DIR}/k3b/plugins
)
diff --git a/plugins/encoder/lame/Makefile.am b/plugins/encoder/lame/Makefile.am
deleted file mode 100644
index 15e310e..0000000
--- a/plugins/encoder/lame/Makefile.am
+++ /dev/null
@@ -1,15 +0,0 @@
-AM_CPPFLAGS = -I$(srcdir)/../../../libk3b/core -I$(srcdir)/../../../libk3b/plugin -I$(srcdir)/../../../libk3b/core -I$(srcdir)/../../../libk3bdevice $(all_includes)
-
-kde_module_LTLIBRARIES = libk3blameencoder.la
-
-libk3blameencoder_la_SOURCES = base_k3blameencodersettingswidget.ui \
- base_k3bmanualbitratesettingswidget.ui \
- k3blameencoder.cpp
-
-libk3blameencoder_la_LIBADD = ../../../libk3b/libk3b.la $(LIB_TDECORE) -lmp3lame
-libk3blameencoder_la_LDFLAGS = -avoid-version -module -no-undefined $(all_libraries)
-
-pluginsdir = $(kde_datadir)/k3b/plugins
-plugins_DATA = k3blameencoder.plugin
-
-METASOURCES = AUTO
diff --git a/plugins/encoder/lame/configure.in.bot b/plugins/encoder/lame/configure.in.bot
deleted file mode 100644
index 5bb35c9..0000000
--- a/plugins/encoder/lame/configure.in.bot
+++ /dev/null
@@ -1,11 +0,0 @@
-echo ""
-
-if test x$have_lame = xyes; then
- echo "K3b - Lame Mp3 encoder plugin: yes"
-else
- echo "K3b - Lame Mp3 encoder plugin no"
-if test "$ac_cv_use_lame" = "yes"; then
- echo "K3b - You are missing the Lame headers and libraries."
- echo "K3b - The Lame Mp3 encoding plugin won't be compiled."
-fi
-fi
diff --git a/plugins/encoder/lame/configure.in.in b/plugins/encoder/lame/configure.in.in
deleted file mode 100644
index 11ce49d..0000000
--- a/plugins/encoder/lame/configure.in.in
+++ /dev/null
@@ -1,20 +0,0 @@
-dnl === test for LAME - begin ====
-AC_ARG_WITH(
- lame,
- AS_HELP_STRING([--without-lame], [build K3b without LAME support (default=no)]),
- [ac_cv_use_lame=$withval],
- [ac_cv_use_lame=yes]
-)
-
-have_lame=no
-if test "$ac_cv_use_lame" = "yes"; then
- KDE_CHECK_HEADERS(lame/lame.h, [
- KDE_CHECK_LIB(mp3lame, lame_init, [
- have_lame=yes
- AC_DEFINE(HAVE_LAME,1,[defined if you have the lame header and lib])
- ], [], $all_libraries -lm)
- ])
-fi
-
-AM_CONDITIONAL(include_LAME, [test x$have_lame = xyes])
-dnl === test for LAME - end ====
diff --git a/plugins/encoder/lame/k3blameencoder.cpp b/plugins/encoder/lame/k3blameencoder.cpp
index 127422b..3be21df 100644
--- a/plugins/encoder/lame/k3blameencoder.cpp
+++ b/plugins/encoder/lame/k3blameencoder.cpp
@@ -23,7 +23,7 @@
#include <tdelocale.h>
#include <tdeconfig.h>
#include <kdebug.h>
-#include <kinstance.h>
+#include <tdeinstance.h>
#include <knuminput.h>
#include <kcombobox.h>
#include <kdialogbase.h>
@@ -427,10 +427,10 @@ K3bLameEncoderSettingsWidget::K3bLameEncoderSettingsWidget( TQWidget* parent, co
// TODO: add whatsthis help for the quality level.
// TQString qualityLevelWhatsThis = i18n("<p>");
- connect( m_w->m_buttonManualSettings, TQT_SIGNAL(clicked()),
- this, TQT_SLOT(slotShowManualSettings()) );
- connect( m_w->m_sliderQuality, TQT_SIGNAL(valueChanged(int)),
- this, TQT_SLOT(slotQualityLevelChanged(int)) );
+ connect( m_w->m_buttonManualSettings, TQ_SIGNAL(clicked()),
+ this, TQ_SLOT(slotShowManualSettings()) );
+ connect( m_w->m_sliderQuality, TQ_SIGNAL(valueChanged(int)),
+ this, TQ_SLOT(slotQualityLevelChanged(int)) );
updateManualSettingsLabel();
slotQualityLevelChanged( 5 );
diff --git a/plugins/encoder/lame/k3blameencoder.h b/plugins/encoder/lame/k3blameencoder.h
index 2e3ca09..7e2a95b 100644
--- a/plugins/encoder/lame/k3blameencoder.h
+++ b/plugins/encoder/lame/k3blameencoder.h
@@ -29,7 +29,7 @@ class KDialogBase;
class K3bLameEncoder : public K3bAudioEncoder
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -65,7 +65,7 @@ class K3bLameEncoder : public K3bAudioEncoder
class K3bLameEncoderSettingsWidget : public K3bPluginConfigWidget
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/plugins/encoder/lame/k3blameencoder.plugin b/plugins/encoder/lame/k3blameencoder.plugin
index 432bc58..2c92052 100644
--- a/plugins/encoder/lame/k3blameencoder.plugin
+++ b/plugins/encoder/lame/k3blameencoder.plugin
@@ -1,9 +1,9 @@
[K3b Plugin]
-Lib=libk3blameencoder
-Group=AudioEncoder
Name=K3b Lame Mp3 Encoder
+Comment=Encoding module to encode MPEG1 Layer III (mp3) files
Author=Sebastian Trueg
Email=trueg@k3b.org
Version=3.0
-Comment=Encoding module to encode MPEG1 Layer III (mp3) files
License=GPL
+Group=AudioEncoder
+Lib=libk3blameencoder
diff --git a/plugins/encoder/ogg/CMakeLists.txt b/plugins/encoder/ogg/CMakeLists.txt
index cb7208b..b58d6a9 100644
--- a/plugins/encoder/ogg/CMakeLists.txt
+++ b/plugins/encoder/ogg/CMakeLists.txt
@@ -40,6 +40,7 @@ tde_add_kpart( libk3boggvorbisencoder AUTOMOC
##### other data ################################
-install( FILES k3boggvorbisencoder.plugin
+tde_create_translated_desktop(
+ SOURCE k3boggvorbisencoder.plugin
DESTINATION ${DATA_INSTALL_DIR}/k3b/plugins
)
diff --git a/plugins/encoder/ogg/Makefile.am b/plugins/encoder/ogg/Makefile.am
deleted file mode 100644
index e712a82..0000000
--- a/plugins/encoder/ogg/Makefile.am
+++ /dev/null
@@ -1,13 +0,0 @@
-AM_CPPFLAGS = -I$(srcdir)/../../../libk3b/core -I$(srcdir)/../../../libk3b/plugin -I$(srcdir)/../../../libk3b/core -I$(srcdir)/../../../libk3bdevice $(all_includes)
-
-kde_module_LTLIBRARIES = libk3boggvorbisencoder.la
-
-libk3boggvorbisencoder_la_SOURCES = base_k3boggvorbisencodersettingswidget.ui k3boggvorbisencoder.cpp
-
-libk3boggvorbisencoder_la_LIBADD = ../../../libk3b/libk3b.la $(LIB_TDECORE) -logg -lvorbis -lvorbisenc $(LIB_TQT) $(LIB_TDEUI)
-libk3boggvorbisencoder_la_LDFLAGS = -avoid-version -module -no-undefined $(all_libraries)
-
-pluginsdir = $(kde_datadir)/k3b/plugins
-plugins_DATA = k3boggvorbisencoder.plugin
-
-METASOURCES = AUTO
diff --git a/plugins/encoder/ogg/k3boggvorbisencoder.cpp b/plugins/encoder/ogg/k3boggvorbisencoder.cpp
index c2ce5b3..2936a3c 100644
--- a/plugins/encoder/ogg/k3boggvorbisencoder.cpp
+++ b/plugins/encoder/ogg/k3boggvorbisencoder.cpp
@@ -455,8 +455,8 @@ K3bOggVorbisEncoderSettingsWidget::K3bOggVorbisEncoderSettingsWidget( TQWidget*
lay->addWidget( w );
- connect( w->m_slideQualityLevel, TQT_SIGNAL(valueChanged(int)),
- this, TQT_SLOT(slotQualityLevelChanged(int)) );
+ connect( w->m_slideQualityLevel, TQ_SIGNAL(valueChanged(int)),
+ this, TQ_SLOT(slotQualityLevelChanged(int)) );
slotQualityLevelChanged( 4 );
}
diff --git a/plugins/encoder/ogg/k3boggvorbisencoder.h b/plugins/encoder/ogg/k3boggvorbisencoder.h
index 8f632f3..50dbcf5 100644
--- a/plugins/encoder/ogg/k3boggvorbisencoder.h
+++ b/plugins/encoder/ogg/k3boggvorbisencoder.h
@@ -26,7 +26,7 @@ class base_K3bOggVorbisEncoderSettingsWidget;
class K3bOggVorbisEncoder : public K3bAudioEncoder
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -62,7 +62,7 @@ class K3bOggVorbisEncoder : public K3bAudioEncoder
class K3bOggVorbisEncoderSettingsWidget : public K3bPluginConfigWidget
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/plugins/encoder/ogg/k3boggvorbisencoder.plugin b/plugins/encoder/ogg/k3boggvorbisencoder.plugin
index 2f73e8e..57e2989 100644
--- a/plugins/encoder/ogg/k3boggvorbisencoder.plugin
+++ b/plugins/encoder/ogg/k3boggvorbisencoder.plugin
@@ -1,9 +1,9 @@
[K3b Plugin]
-Lib=libk3boggvorbisencoder
-Group=AudioEncoder
Name=K3b Ogg Vorbis Encoder
+Comment=Encoding module to encode Ogg Vorbis files
Author=Sebastian Trueg
Email=trueg@k3b.org
Version=2.1
-Comment=Encoding module to encode Ogg Vorbis files
License=GPL
+Group=AudioEncoder
+Lib=libk3boggvorbisencoder
diff --git a/plugins/encoder/skeleton.h b/plugins/encoder/skeleton.h
index c353349..0fcf1cc 100644
--- a/plugins/encoder/skeleton.h
+++ b/plugins/encoder/skeleton.h
@@ -23,7 +23,7 @@
class K3b<name>Encoder : public K3bAudioEncoder
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -51,7 +51,7 @@ class K3b<name>Encoder : public K3bAudioEncoder
class K3b<name>EncoderSettingsWidget : public K3bPluginConfigWidget
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/plugins/encoder/skeleton.plugin b/plugins/encoder/skeleton.plugin
index cf178b7..1711f52 100644
--- a/plugins/encoder/skeleton.plugin
+++ b/plugins/encoder/skeleton.plugin
@@ -1,9 +1,9 @@
[K3b Plugin]
-Lib=libk3b<name>encoder
-Group=AudioEncoder
Name=K3b ??? Encoder
+Comment=Encoding module to encode <name> files
Author=???
Email=???
Version=??
-Comment=Encoding module to encode <name> files
License=???
+Group=AudioEncoder
+Lib=libk3b<name>encoder
diff --git a/plugins/encoder/sox/CMakeLists.txt b/plugins/encoder/sox/CMakeLists.txt
index f0c4c38..4fc9f18 100644
--- a/plugins/encoder/sox/CMakeLists.txt
+++ b/plugins/encoder/sox/CMakeLists.txt
@@ -36,6 +36,7 @@ tde_add_kpart( libk3bsoxencoder AUTOMOC
##### other data ################################
-install( FILES k3bsoxencoder.plugin
+tde_create_translated_desktop(
+ SOURCE k3bsoxencoder.plugin
DESTINATION ${DATA_INSTALL_DIR}/k3b/plugins
)
diff --git a/plugins/encoder/sox/Makefile.am b/plugins/encoder/sox/Makefile.am
deleted file mode 100644
index 7cd09fe..0000000
--- a/plugins/encoder/sox/Makefile.am
+++ /dev/null
@@ -1,13 +0,0 @@
-AM_CPPFLAGS = -I$(srcdir)/../../../libk3b/core -I$(srcdir)/../../../libk3b/plugin -I$(srcdir)/../../../libk3b/core -I$(srcdir)/../../../libk3bdevice $(all_includes)
-
-kde_module_LTLIBRARIES = libk3bsoxencoder.la
-
-libk3bsoxencoder_la_SOURCES = base_k3bsoxencoderconfigwidget.ui k3bsoxencoder.cpp
-
-libk3bsoxencoder_la_LIBADD = ../../../libk3b/libk3b.la ../../../libk3bdevice/libk3bdevice.la $(LIB_TDECORE) $(LIB_TQT)
-libk3bsoxencoder_la_LDFLAGS = -avoid-version -module -no-undefined $(all_libraries)
-
-pluginsdir = $(kde_datadir)/k3b/plugins
-plugins_DATA = k3bsoxencoder.plugin
-
-METASOURCES = AUTO
diff --git a/plugins/encoder/sox/k3bsoxencoder.cpp b/plugins/encoder/sox/k3bsoxencoder.cpp
index d91502f..1cc7c3a 100644
--- a/plugins/encoder/sox/k3bsoxencoder.cpp
+++ b/plugins/encoder/sox/k3bsoxencoder.cpp
@@ -34,6 +34,7 @@
#include <tqcombobox.h>
#include <tqcheckbox.h>
#include <tqlayout.h>
+#include <tqregexp.h>
#include <sys/types.h>
#include <sys/wait.h>
@@ -58,61 +59,47 @@ class K3bSoxProgram : public K3bExternalProgram
TQFileInfo fi( path );
if( fi.isDir() ) {
if( path[path.length()-1] != '/' )
- path.append("/");
+ path.append("/");
path.append("sox");
}
if( !TQFile::exists( path ) )
return false;
- K3bExternalBin* bin = 0;
-
// probe version
TDEProcess vp;
K3bProcessOutputCollector out( &vp );
vp << path << "-h";
if( vp.start( TDEProcess::Block, TDEProcess::AllOutput ) ) {
- int pos = out.output().find( "sox: SoX Version" );
- if ( pos < 0 )
- pos = out.output().find( "sox: SoX v" ); // newer sox versions
- int endPos = out.output().find( "\n", pos );
- if( pos > 0 && endPos > 0 ) {
- pos += 17;
- bin = new K3bExternalBin( this );
- bin->path = path;
- bin->version = out.output().mid( pos, endPos-pos );
-
- addBin( bin );
-
- return true;
- }
- else {
- pos = out.output().find( "sox: Version" );
- endPos = out.output().find( "\n", pos );
- if( pos > 0 && endPos > 0 ) {
- pos += 13;
- bin = new K3bExternalBin( this );
- bin->path = path;
- bin->version = out.output().mid( pos, endPos-pos );
-
- addBin( bin );
-
- return true;
+ TQRegExp versionRe ("sox: +(SoX )?(Version |v)([^\\n]+)");
+ // Should match:
+ // * sox: Version 12.2.3
+ // * sox: SoX Version 12.18.1
+ // * sox: SoX v14.0.0
+ // * sox: SoX v14.4.0
+ int pos = versionRe.search( out.output() );
+ if( pos > 0 ) {
+ TQString version = versionRe.cap(3);
+
+ K3bExternalBin* bin = new K3bExternalBin( this );
+
+ bin->path = path;
+ bin->version = version;
+
+ addBin( bin );
+
+ return true;
}
- else
- return false;
- }
}
- else
- return false;
+ return false;
}
};
class K3bSoxEncoder::Private
{
-public:
+ public:
Private()
: process(0) {
}
@@ -182,21 +169,21 @@ bool K3bSoxEncoder::initEncoderInternal( const TQString& extension )
d->process->setSplitStdout(true);
d->process->setRawStdin(true);
- connect( d->process, TQT_SIGNAL(processExited(TDEProcess*)),
- this, TQT_SLOT(slotSoxFinished(TDEProcess*)) );
- connect( d->process, TQT_SIGNAL(stderrLine(const TQString&)),
- this, TQT_SLOT(slotSoxOutputLine(const TQString&)) );
- connect( d->process, TQT_SIGNAL(stdoutLine(const TQString&)),
- this, TQT_SLOT(slotSoxOutputLine(const TQString&)) );
+ connect( d->process, TQ_SIGNAL(processExited(TDEProcess*)),
+ this, TQ_SLOT(slotSoxFinished(TDEProcess*)) );
+ connect( d->process, TQ_SIGNAL(stderrLine(const TQString&)),
+ this, TQ_SLOT(slotSoxOutputLine(const TQString&)) );
+ connect( d->process, TQ_SIGNAL(stdoutLine(const TQString&)),
+ this, TQ_SLOT(slotSoxOutputLine(const TQString&)) );
// input settings
*d->process << soxBin->path
- << "-t" << "raw" // raw samples
- << "-r" << "44100" // samplerate
- << "-s" // signed linear
- << "-w" // 16-bit words
- << "-c" << "2" // stereo
- << "-"; // read from stdin
+ << "-t" << "raw" // raw samples
+ << "-r" << "44100" // samplerate
+ << "-s" // signed linear
+ << "-w" // 16-bit words
+ << "-c" << "2" // stereo
+ << "-"; // read from stdin
// output settings
*d->process << "-t" << extension;
@@ -205,28 +192,28 @@ bool K3bSoxEncoder::initEncoderInternal( const TQString& extension )
c->setGroup( "K3bSoxEncoderPlugin" );
if( c->readBoolEntry( "manual settings", false ) ) {
*d->process << "-r" << TQString::number( c->readNumEntry( "samplerate", 44100 ) )
- << "-c" << TQString::number( c->readNumEntry( "channels", 2 ) );
+ << "-c" << TQString::number( c->readNumEntry( "channels", 2 ) );
int size = c->readNumEntry( "data size", 16 );
*d->process << ( size == 8 ? TQString("-b") : ( size == 32 ? TQString("-l") : TQString("-w") ) );
TQString encoding = c->readEntry( "data encoding", "signed" );
if( encoding == "unsigned" )
- *d->process << "-u";
+ *d->process << "-u";
else if( encoding == "u-law" )
- *d->process << "-U";
+ *d->process << "-U";
else if( encoding == "A-law" )
- *d->process << "-A";
+ *d->process << "-A";
else if( encoding == "ADPCM" )
- *d->process << "-a";
+ *d->process << "-a";
else if( encoding == "IMA_ADPCM" )
- *d->process << "-i";
+ *d->process << "-i";
else if( encoding == "GSM" )
- *d->process << "-g";
+ *d->process << "-g";
else if( encoding == "Floating-point" )
- *d->process << "-f";
+ *d->process << "-f";
else
- *d->process << "-s";
+ *d->process << "-s";
}
*d->process << d->fileName;
@@ -273,24 +260,24 @@ TQStringList K3bSoxEncoder::extensions() const
static TQStringList s_extensions;
if( s_extensions.isEmpty() ) {
s_extensions << "au"
- << "8svx"
- << "aiff"
- << "avr"
- << "cdr"
- << "cvs"
- << "dat"
- << "gsm"
- << "hcom"
- << "maud"
- << "sf"
- << "sph"
- << "smp"
- << "txw"
- << "vms"
- << "voc"
- << "wav"
- << "wve"
- << "raw";
+ << "8svx"
+ << "aiff"
+ << "avr"
+ << "cdr"
+ << "cvs"
+ << "dat"
+ << "gsm"
+ << "hcom"
+ << "maud"
+ << "sf"
+ << "sph"
+ << "smp"
+ << "txw"
+ << "vms"
+ << "voc"
+ << "wav"
+ << "wve"
+ << "raw";
}
if( k3bcore->externalBinManager()->foundBin( "sox" ) )
@@ -348,24 +335,24 @@ TQString K3bSoxEncoder::fileTypeComment( const TQString& ext ) const
long long K3bSoxEncoder::fileSize( const TQString&, const K3b::Msf& msf ) const
{
// for now we make a rough assumption based on the settings
- TDEConfig* c = k3bcore->config();
- c->setGroup( "K3bSoxEncoderPlugin" );
- if( c->readBoolEntry( "manual settings", false ) ) {
- int sr = c->readNumEntry( "samplerate", 44100 );
- int ch = c->readNumEntry( "channels", 2 );
- int wsize = c->readNumEntry( "data size", 16 );
+ TDEConfig* c = k3bcore->config();
+ c->setGroup( "K3bSoxEncoderPlugin" );
+ if( c->readBoolEntry( "manual settings", false ) ) {
+ int sr = c->readNumEntry( "samplerate", 44100 );
+ int ch = c->readNumEntry( "channels", 2 );
+ int wsize = c->readNumEntry( "data size", 16 );
- return msf.totalFrames()*sr*ch*wsize/75;
- }
- else {
- // fallback to raw
- return msf.audioBytes();
- }
+ return msf.totalFrames()*sr*ch*wsize/75;
+ }
+ else {
+ // fallback to raw
+ return msf.audioBytes();
+ }
}
K3bPluginConfigWidget* K3bSoxEncoder::createConfigWidget( TQWidget* parent,
- const char* name ) const
+ const char* name ) const
{
return new K3bSoxEncoderSettingsWidget( parent, name );
}
@@ -376,7 +363,7 @@ K3bSoxEncoderSettingsWidget::K3bSoxEncoderSettingsWidget( TQWidget* parent, cons
: K3bPluginConfigWidget( parent, name )
{
w = new base_K3bSoxEncoderConfigWidget( this );
- w->m_editSamplerate->setValidator( new TQIntValidator( TQT_TQOBJECT(w->m_editSamplerate) ) );
+ w->m_editSamplerate->setValidator( new TQIntValidator( w->m_editSamplerate ) );
TQHBoxLayout* lay = new TQHBoxLayout( this );
lay->setMargin( 0 );
@@ -435,16 +422,16 @@ void K3bSoxEncoderSettingsWidget::saveConfig()
c->writeEntry( "manual settings", w->m_checkManual->isChecked() );
c->writeEntry( "channels", w->m_comboChannels->currentItem() == 0
- ? 1
- : ( w->m_comboChannels->currentItem() == 2
- ? 4
- : 2 ) );
+ ? 1
+ : ( w->m_comboChannels->currentItem() == 2
+ ? 4
+ : 2 ) );
c->writeEntry( "data size", w->m_comboSize->currentItem() == 0
- ? 8
- : ( w->m_comboSize->currentItem() == 2
- ? 32
- : 16 ) );
+ ? 8
+ : ( w->m_comboSize->currentItem() == 2
+ ? 32
+ : 16 ) );
c->writeEntry( "samplerate", w->m_editSamplerate->text().toInt() );
diff --git a/plugins/encoder/sox/k3bsoxencoder.h b/plugins/encoder/sox/k3bsoxencoder.h
index a34271f..d495dd3 100644
--- a/plugins/encoder/sox/k3bsoxencoder.h
+++ b/plugins/encoder/sox/k3bsoxencoder.h
@@ -26,7 +26,7 @@ class TDEProcess;
class K3bSoxEncoder : public K3bAudioEncoder
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -66,7 +66,7 @@ class K3bSoxEncoder : public K3bAudioEncoder
class K3bSoxEncoderSettingsWidget : public K3bPluginConfigWidget
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/plugins/encoder/sox/k3bsoxencoder.plugin b/plugins/encoder/sox/k3bsoxencoder.plugin
index dd43f7d..6f80b1b 100644
--- a/plugins/encoder/sox/k3bsoxencoder.plugin
+++ b/plugins/encoder/sox/k3bsoxencoder.plugin
@@ -1,9 +1,9 @@
[K3b Plugin]
-Lib=libk3bsoxencoder
-Group=AudioEncoder
Name=K3b SoX Audio Encoder
+Comment=Encoding module to encode many file formats using SoX
Author=Sebastian Trueg
Email=trueg@k3b.org
Version=2.0
-Comment=Encoding module to encode many file formats using SoX
License=GPL
+Group=AudioEncoder
+Lib=libk3bsoxencoder