summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Makefile.am1
-rw-r--r--plugins/audiooutput/Makefile.am9
-rw-r--r--plugins/audiooutput/alsa/CMakeLists.txt3
-rw-r--r--plugins/audiooutput/alsa/Makefile.am14
-rw-r--r--plugins/audiooutput/alsa/configure.in.bot7
-rw-r--r--plugins/audiooutput/alsa/configure.in.in26
-rw-r--r--plugins/audiooutput/alsa/k3balsaoutputplugin.h2
-rw-r--r--plugins/audiooutput/alsa/k3balsaoutputplugin.plugin6
-rw-r--r--plugins/audiooutput/arts/CMakeLists.txt3
-rw-r--r--plugins/audiooutput/arts/Makefile.am13
-rw-r--r--plugins/audiooutput/arts/k3bartsoutputplugin.plugin8
-rw-r--r--plugins/decoder/Makefile.am26
-rw-r--r--plugins/decoder/ffmpeg/CMakeLists.txt3
-rw-r--r--plugins/decoder/ffmpeg/Makefile.am15
-rw-r--r--plugins/decoder/ffmpeg/configure.in.bot25
-rw-r--r--plugins/decoder/ffmpeg/configure.in.in68
-rw-r--r--plugins/decoder/ffmpeg/k3bffmpegdecoder.h4
-rw-r--r--plugins/decoder/ffmpeg/k3bffmpegdecoder.plugin6
-rw-r--r--plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp588
-rw-r--r--plugins/decoder/flac/CMakeLists.txt7
-rw-r--r--plugins/decoder/flac/Makefile.am13
-rw-r--r--plugins/decoder/flac/configure.in.bot13
-rw-r--r--plugins/decoder/flac/configure.in.in41
-rw-r--r--plugins/decoder/flac/k3bflacdecoder.cpp11
-rw-r--r--plugins/decoder/flac/k3bflacdecoder.h4
-rw-r--r--plugins/decoder/flac/k3bflacdecoder.plugin6
-rw-r--r--plugins/decoder/libsndfile/CMakeLists.txt4
-rw-r--r--plugins/decoder/libsndfile/Makefile.am14
-rw-r--r--plugins/decoder/libsndfile/configure.in.bot11
-rw-r--r--plugins/decoder/libsndfile/configure.in.in52
-rw-r--r--plugins/decoder/libsndfile/k3blibsndfiledecoder.h4
-rw-r--r--plugins/decoder/libsndfile/k3blibsndfiledecoder.plugin6
-rw-r--r--plugins/decoder/mp3/CMakeLists.txt7
-rw-r--r--plugins/decoder/mp3/Makefile.am13
-rw-r--r--plugins/decoder/mp3/configure.in.bot11
-rw-r--r--plugins/decoder/mp3/configure.in.in24
-rw-r--r--plugins/decoder/mp3/k3bmaddecoder.cpp7
-rw-r--r--plugins/decoder/mp3/k3bmaddecoder.h4
-rw-r--r--plugins/decoder/mp3/k3bmaddecoder.plugin6
-rw-r--r--plugins/decoder/musepack/CMakeLists.txt3
-rw-r--r--plugins/decoder/musepack/Makefile.am16
-rw-r--r--plugins/decoder/musepack/configure.in.bot12
-rw-r--r--plugins/decoder/musepack/configure.in.in66
-rw-r--r--plugins/decoder/musepack/k3bmpcdecoder.h4
-rw-r--r--plugins/decoder/musepack/k3bmpcdecoder.plugin6
-rw-r--r--plugins/decoder/ogg/CMakeLists.txt3
-rw-r--r--plugins/decoder/ogg/Makefile.am15
-rw-r--r--plugins/decoder/ogg/configure.in.bot11
-rw-r--r--plugins/decoder/ogg/configure.in.in32
-rw-r--r--plugins/decoder/ogg/k3boggvorbisdecoder.h4
-rw-r--r--plugins/decoder/ogg/k3boggvorbisdecoder.plugin6
-rw-r--r--plugins/decoder/skeleton.h4
-rw-r--r--plugins/decoder/skeleton.plugin6
-rw-r--r--plugins/decoder/wave/CMakeLists.txt3
-rw-r--r--plugins/decoder/wave/Makefile.am13
-rw-r--r--plugins/decoder/wave/k3bwavedecoder.h4
-rw-r--r--plugins/decoder/wave/k3bwavedecoder.plugin6
-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.cpp8
-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
-rw-r--r--plugins/project/Makefile.am1
-rw-r--r--plugins/project/audiometainforenamer/CMakeLists.txt3
-rw-r--r--plugins/project/audiometainforenamer/Makefile.am19
-rw-r--r--plugins/project/audiometainforenamer/k3baudiometainforenamerplugin.cpp8
-rw-r--r--plugins/project/audiometainforenamer/k3baudiometainforenamerplugin.h4
-rw-r--r--plugins/project/audiometainforenamer/k3baudiometainforenamerplugin.plugin6
-rw-r--r--plugins/project/audioprojectcddb/CMakeLists.txt3
-rw-r--r--plugins/project/audioprojectcddb/Makefile.am22
-rw-r--r--plugins/project/audioprojectcddb/k3baudioprojectcddbplugin.cpp8
-rw-r--r--plugins/project/audioprojectcddb/k3baudioprojectcddbplugin.h2
-rw-r--r--plugins/project/audioprojectcddb/k3baudioprojectcddbplugin.plugin6
96 files changed, 558 insertions, 1206 deletions
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
deleted file mode 100644
index 9523e70..0000000
--- a/plugins/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-SUBDIRS = decoder encoder audiooutput project
diff --git a/plugins/audiooutput/Makefile.am b/plugins/audiooutput/Makefile.am
deleted file mode 100644
index d8335ad..0000000
--- a/plugins/audiooutput/Makefile.am
+++ /dev/null
@@ -1,9 +0,0 @@
-if include_arts
-ARTSDIR=arts
-endif
-
-if include_ALSA
-ALSADIR=alsa
-endif
-
-SUBDIRS = $(ARTSDIR) $(ALSADIR)
diff --git a/plugins/audiooutput/alsa/CMakeLists.txt b/plugins/audiooutput/alsa/CMakeLists.txt
index efbe574..562babc 100644
--- a/plugins/audiooutput/alsa/CMakeLists.txt
+++ b/plugins/audiooutput/alsa/CMakeLists.txt
@@ -36,6 +36,7 @@ tde_add_kpart( libk3balsaoutputplugin AUTOMOC
##### other data ################################
-install( FILES k3balsaoutputplugin.plugin
+tde_create_translated_desktop(
+ SOURCE k3balsaoutputplugin.plugin
DESTINATION ${DATA_INSTALL_DIR}/k3b/plugins
)
diff --git a/plugins/audiooutput/alsa/Makefile.am b/plugins/audiooutput/alsa/Makefile.am
deleted file mode 100644
index 9cd7c03..0000000
--- a/plugins/audiooutput/alsa/Makefile.am
+++ /dev/null
@@ -1,14 +0,0 @@
-AM_CPPFLAGS = -I$(srcdir)/../../../libk3b/core -I$(srcdir)/../../../libk3b/plugin $(all_includes)
-
-kde_module_LTLIBRARIES = libk3balsaoutputplugin.la
-
-libk3balsaoutputplugin_la_SOURCES = k3balsaoutputplugin.cpp
-
-libk3balsaoutputplugin_la_CFLAGS = $(ALSA_CFLAGS)
-libk3balsaoutputplugin_la_LIBADD = ../../../libk3b/libk3b.la $(ALSA_LIBS) $(LIB_TDECORE) $(LIB_TQT) $(LIB_TDEUI)
-libk3balsaoutputplugin_la_LDFLAGS = -avoid-version -module -no-undefined $(all_libraries)
-
-pluginsdir = $(kde_datadir)/k3b/plugins
-plugins_DATA = k3balsaoutputplugin.plugin
-
-METASOURCES = AUTO
diff --git a/plugins/audiooutput/alsa/configure.in.bot b/plugins/audiooutput/alsa/configure.in.bot
deleted file mode 100644
index d5c8d17..0000000
--- a/plugins/audiooutput/alsa/configure.in.bot
+++ /dev/null
@@ -1,7 +0,0 @@
-echo ""
-
-if test "x$have_alsa" = xyes; then
- echo "K3b - Audioplayer available (alsa) yes"
-else
- echo "K3b - Audioplayer available (alsa) no"
-fi
diff --git a/plugins/audiooutput/alsa/configure.in.in b/plugins/audiooutput/alsa/configure.in.in
deleted file mode 100644
index 244dce4..0000000
--- a/plugins/audiooutput/alsa/configure.in.in
+++ /dev/null
@@ -1,26 +0,0 @@
-dnl --------- ALSA CHECK BEGIN -------------
-
-AC_DEFUN([KDE_CHECK_ALSA],
-[
- PKG_CHECK_MODULES([ALSA], [alsa >= 0.9], [have_alsa=yes], [have_alsa=no])
- AC_SUBST([ALSA_CFLAGS])
- AC_SUBST([ALSA_LIBS])
-])
-
-AC_ARG_WITH(alsa,
- [AS_HELP_STRING(--with-alsa,
- [enable support for ALSA output @<:@default=check@:>@])],
- [], with_alsa=check)
-
-have_alsa=no
-if test "x$with_alsa" != xno; then
- KDE_CHECK_ALSA
-
- if test "x$with_alsa" != xcheck && test "x$have_alsa" != xyes; then
- AC_MSG_FAILURE([--with-alsa was given, but test for ALSA failed])
- fi
-fi
-
-AM_CONDITIONAL(include_ALSA, [test "x$have_alsa" = "xyes"])
-
-dnl --------- ALSA CHECK END ---------------
diff --git a/plugins/audiooutput/alsa/k3balsaoutputplugin.h b/plugins/audiooutput/alsa/k3balsaoutputplugin.h
index 3f02749..866ef16 100644
--- a/plugins/audiooutput/alsa/k3balsaoutputplugin.h
+++ b/plugins/audiooutput/alsa/k3balsaoutputplugin.h
@@ -52,7 +52,7 @@ class K3bAlsaOutputPlugin : public K3bAudioOutputPlugin
class K3bAlsaOutputPluginConfigWidget : public K3bPluginConfigWidget
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/plugins/audiooutput/alsa/k3balsaoutputplugin.plugin b/plugins/audiooutput/alsa/k3balsaoutputplugin.plugin
index b5957d7..fcdd03f 100644
--- a/plugins/audiooutput/alsa/k3balsaoutputplugin.plugin
+++ b/plugins/audiooutput/alsa/k3balsaoutputplugin.plugin
@@ -1,9 +1,9 @@
[K3b Plugin]
-Lib=libk3balsaoutputplugin
-Group=AudioOutput
Name=K3b Alsa Audio Output Plugin
+Comment=Audio Output plugin which plays through alsa
Author=Sebastian Trueg
Email=trueg@k3b.org
Version=1.0
-Comment=Audio Output plugin which plays through alsa
License=GPL
+Group=AudioOutput
+Lib=libk3balsaoutputplugin
diff --git a/plugins/audiooutput/arts/CMakeLists.txt b/plugins/audiooutput/arts/CMakeLists.txt
index ed41002..c3f4a6d 100644
--- a/plugins/audiooutput/arts/CMakeLists.txt
+++ b/plugins/audiooutput/arts/CMakeLists.txt
@@ -38,6 +38,7 @@ tde_add_kpart( libk3bartsoutputplugin AUTOMOC
##### other data ################################
-install( FILES k3bartsoutputplugin.plugin
+tde_create_translated_desktop(
+ SOURCE k3bartsoutputplugin.plugin
DESTINATION ${DATA_INSTALL_DIR}/k3b/plugins
)
diff --git a/plugins/audiooutput/arts/Makefile.am b/plugins/audiooutput/arts/Makefile.am
deleted file mode 100644
index 9197630..0000000
--- a/plugins/audiooutput/arts/Makefile.am
+++ /dev/null
@@ -1,13 +0,0 @@
-AM_CPPFLAGS = -I$(srcdir)/../../../libk3b/core -I$(srcdir)/../../../libk3b/plugin $(ARTS_INCLUDES) $(all_includes)
-
-kde_module_LTLIBRARIES = libk3bartsoutputplugin.la
-
-libk3bartsoutputplugin_la_SOURCES = k3bartsoutputplugin.cpp
-
-libk3bartsoutputplugin_la_LIBADD = ../../../libk3b/libk3b.la -lartsc $(LIB_TDECORE) $(LIB_TQT)
-libk3bartsoutputplugin_la_LDFLAGS = -avoid-version -module -no-undefined $(all_libraries)
-
-pluginsdir = $(kde_datadir)/k3b/plugins
-plugins_DATA = k3bartsoutputplugin.plugin
-
-METASOURCES = AUTO
diff --git a/plugins/audiooutput/arts/k3bartsoutputplugin.plugin b/plugins/audiooutput/arts/k3bartsoutputplugin.plugin
index 599869f..1549d9d 100644
--- a/plugins/audiooutput/arts/k3bartsoutputplugin.plugin
+++ b/plugins/audiooutput/arts/k3bartsoutputplugin.plugin
@@ -1,9 +1,9 @@
[K3b Plugin]
-Lib=libk3bartsoutputplugin
-Group=AudioOutput
Name=K3b Arts Audio Output Plugin
+Comment=Audio Output plugin which plays through arts
Author=Sebastian Trueg
Email=trueg@k3b.org
-Version=1.0
-Comment=Audio Output plugin which plays through arts
License=GPL
+Version=1.0
+Group=AudioOutput
+Lib=libk3bartsoutputplugin
diff --git a/plugins/decoder/Makefile.am b/plugins/decoder/Makefile.am
deleted file mode 100644
index 1b4eafa..0000000
--- a/plugins/decoder/Makefile.am
+++ /dev/null
@@ -1,26 +0,0 @@
-
-if include_OGG
-DECOGGDIR = ogg
-endif
-
-if include_MP3
-DECMP3DIR = mp3
-endif
-
-if include_FLAC
-DECFLACDIR = flac
-endif
-
-if include_AIFF
-DECAIFFDIR = libsndfile
-endif
-
-if include_FFMPEG
-FFMPEGDIR = ffmpeg
-endif
-
-if include_MPC
-MPCDIR = musepack
-endif
-
-SUBDIRS = wave $(DECOGGDIR) $(DECMP3DIR) $(DECFLACDIR) $(DECAIFFDIR) $(FFMPEGDIR) $(MPCDIR)
diff --git a/plugins/decoder/ffmpeg/CMakeLists.txt b/plugins/decoder/ffmpeg/CMakeLists.txt
index 08a977c..7197348 100644
--- a/plugins/decoder/ffmpeg/CMakeLists.txt
+++ b/plugins/decoder/ffmpeg/CMakeLists.txt
@@ -44,6 +44,7 @@ tde_add_kpart( libk3bffmpegdecoder AUTOMOC
##### other data ################################
-install( FILES k3bffmpegdecoder.plugin
+tde_create_translated_desktop(
+ SOURCE k3bffmpegdecoder.plugin
DESTINATION ${DATA_INSTALL_DIR}/k3b/plugins
)
diff --git a/plugins/decoder/ffmpeg/Makefile.am b/plugins/decoder/ffmpeg/Makefile.am
deleted file mode 100644
index 2e00dc5..0000000
--- a/plugins/decoder/ffmpeg/Makefile.am
+++ /dev/null
@@ -1,15 +0,0 @@
-AM_CPPFLAGS = -I$(srcdir)/../../../libk3b/core -I$(srcdir)/../../../libk3b/plugin -I$(srcdir)/../../../libk3bdevice $(all_includes)
-KDE_CXXFLAGS = -D__STDC_CONSTANT_MACROS
-
-kde_module_LTLIBRARIES = libk3bffmpegdecoder.la
-
-libk3bffmpegdecoder_la_SOURCES = k3bffmpegdecoder.cpp k3bffmpegwrapper.cpp
-
-libk3bffmpegdecoder_la_LIBADD = ../../../libk3b/libk3b.la $(LIB_TDEUI) -lavcodec -lavformat
-libk3bffmpegdecoder_la_LDFLAGS = -avoid-version -module -no-undefined $(all_libraries)
-
-pluginsdir = $(kde_datadir)/k3b/plugins
-plugins_DATA = k3bffmpegdecoder.plugin
-
-METASOURCES = AUTO
-
diff --git a/plugins/decoder/ffmpeg/configure.in.bot b/plugins/decoder/ffmpeg/configure.in.bot
deleted file mode 100644
index 3d24645..0000000
--- a/plugins/decoder/ffmpeg/configure.in.bot
+++ /dev/null
@@ -1,25 +0,0 @@
-echo ""
-
-echo "K3b - FFMpeg decoder plugin (decodes wma and others):"
-if test x$have_ffmpeg = xyes; then
- echo "K3b - yes"
- if test x$enable_ffmpeg_all_codecs = xyes; then
- echo "K3b - WARNING: You enabled all codecs in the ffmpeg decoder plugin."
- echo "K3b - Be aware that most are not tested and track lengths"
- echo "K3b - will be wrong in many cases."
- fi
-else
- echo "K3b - no"
-if test "$ac_cv_use_ffmpeg" = "yes"; then
- if test "$ffmpeg_compiles" = "yes"; then
- echo "K3b - You are missing the ffmpeg libraries."
- echo "K3b - Make sure ffmpeg has been configured as a"
- echo "K3b - shared library (which is not the default)."
- else
- echo "K3b - You are missing the ffmpeg headers and libraries"
- echo "K3b - version 0.4.9 or higher."
- fi
- echo "K3b - The ffmpeg audio decoding plugin (decodes wma and"
- echo "K3b - others) won't be compiled."
-fi
-fi
diff --git a/plugins/decoder/ffmpeg/configure.in.in b/plugins/decoder/ffmpeg/configure.in.in
deleted file mode 100644
index 84b345a..0000000
--- a/plugins/decoder/ffmpeg/configure.in.in
+++ /dev/null
@@ -1,68 +0,0 @@
-dnl --------------- FFMPEG CHECK ---------------------------------
-
-AC_ARG_WITH(
- ffmpeg,
- AS_HELP_STRING(
- [--without-ffmpeg],
- [build K3b without ffmpeg audio decoder support (default=no)]),
- [ac_cv_use_ffmpeg=$withval],
- [ac_cv_use_ffmpeg=yes]
-)
-
-#
-# The ffmpeg decoder plugin needs ffmpeg 0.4.9 or higher
-#
-have_ffmpeg=no
-if test "$ac_cv_use_ffmpeg" = "yes"; then
- k3b_cxxflags_save="$CXXFLAGS"
- CXXFLAGS="$CXXFLAGS -D__STDC_CONSTANT_MACROS"
- AC_MSG_CHECKING(for ffmpeg >= 0.4.9)
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
- AC_COMPILE_IFELSE(
- extern "C" {
- #include <libavformat/avformat.h>
- #include <libavcodec/avcodec.h>
- }
-
- int main() {
- AVFormatContext* fc = 0;
- AVPacket* p = 0;
- av_register_all();
- return av_read_frame( fc, p );
- },
- [ffmpeg_compiles=yes], [ffmpeg_compiles=no] )
- OLD_LIBS=$LIBS
- LIBS="-lavformat -lavcodec $LIBS"
- AC_LINK_IFELSE(
- extern "C" {
- #include <libavformat/avformat.h>
- #include <libavcodec/avcodec.h>
- }
-
- int main() {
- AVFormatContext* fc = 0;
- AVPacket* p = 0;
- av_register_all();
- return av_read_frame( fc, p );
- },
- [ffmpeg_links=yes], [ffmpeg_links=no] )
- AC_LANG_RESTORE
- LIBS=$OLD_LIBS
- have_ffmpeg=$ffmpeg_links
- AC_MSG_RESULT($have_ffmpeg)
- CXXFLAGS=$k3b_cxxflags_save
-fi
-AM_CONDITIONAL(include_FFMPEG, [test x$have_ffmpeg = xyes])
-
-dnl --------------- FFMPEG CHECK END ------------------------------
-
-AC_ARG_ENABLE(
- ffmpeg-all-codecs,
- AS_HELP_STRING(
- [--enable-ffmpeg-all-codecs],
- [Build K3b's ffmeg decoder plugin with all audio codecs enabled (default=disabled)]),
- [AC_DEFINE(K3B_FFMPEG_ALL_CODECS, 1, [Defined if all ffmpeg codecs should be allowed])
- enable_ffmpeg_all_codecs=yes],
- [enable_ffmpeg_all_codecs=no]
-)
diff --git a/plugins/decoder/ffmpeg/k3bffmpegdecoder.h b/plugins/decoder/ffmpeg/k3bffmpegdecoder.h
index 1b493b7..0afd20a 100644
--- a/plugins/decoder/ffmpeg/k3bffmpegdecoder.h
+++ b/plugins/decoder/ffmpeg/k3bffmpegdecoder.h
@@ -23,7 +23,7 @@ class K3bFFMpegFile;
class K3bFFMpegDecoderFactory : public K3bAudioDecoderFactory
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -43,7 +43,7 @@ class K3bFFMpegDecoderFactory : public K3bAudioDecoderFactory
class K3bFFMpegDecoder : public K3bAudioDecoder
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/plugins/decoder/ffmpeg/k3bffmpegdecoder.plugin b/plugins/decoder/ffmpeg/k3bffmpegdecoder.plugin
index 3592388..a3e3251 100644
--- a/plugins/decoder/ffmpeg/k3bffmpegdecoder.plugin
+++ b/plugins/decoder/ffmpeg/k3bffmpegdecoder.plugin
@@ -1,9 +1,9 @@
[K3b Plugin]
-Lib=libk3bffmpegdecoder
-Group=AudioDecoder
Name=K3b FFMpeg Decoder
+Comment=Decoding module to decode wma files
Author=Sebastian Trueg
Email=trueg@k3b.org
Version=0.9.1
-Comment=Decoding module to decode wma files
License=GPL
+Group=AudioDecoder
+Lib=libk3bffmpegdecoder
diff --git a/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp b/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
index 96f8bfe..3e34c5c 100644
--- a/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
+++ b/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
@@ -1,10 +1,10 @@
/*
*
- * $Id: k3bffmpegwrapper.cpp 641819 2007-03-12 17:29:23Z trueg $
- * Copyright (C) 2004-2007 Sebastian Trueg <trueg@k3b.org>
+ *
+ * Copyright (C) 2004-2008 Sebastian Trueg <trueg@k3b.org>
*
* This file is part of the K3b project.
- * Copyright (C) 1998-2007 Sebastian Trueg <trueg@k3b.org>
+ * Copyright (C) 1998-2008 Sebastian Trueg <trueg@k3b.org>
*
* 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
@@ -16,19 +16,48 @@
#include <config.h>
#include "k3bffmpegwrapper.h"
+#include <tdelocale.h>
extern "C" {
+/*
+ Recent versions of FFmpeg uses C99 constant macros which are not present in C++
+ standard. The macro __STDC_CONSTANT_MACROS allow C++ to use these macros.
+ Although it's not defined by C++ standard it's supported by many
+ implementations. See bug 236036 and discussion:
+ https://lists.ffmpeg.org/pipermail/ffmpeg-devel/2010-May/095488.html
+ */
+#define __STDC_CONSTANT_MACROS
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
}
+#include <math.h>
#include <string.h>
-#include <tdelocale.h>
-
+#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(52, 101, 0)
+#define av_dump_format(c, x, f, y) dump_format(c, x, f, y)
+#endif
+#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(53, 2, 0)
+// this works because the parameters/options are not used
+#define avformat_open_input(c, s, f, o) av_open_input_file(c, s, f, 0, o)
+#endif
+#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(53, 6, 0)
+#define avformat_find_stream_info(c, o) av_find_stream_info(c)
+#endif
+#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(53, 17, 0)
+#define avformat_close_input(c) av_close_input_file(*c)
+#endif
+#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(57, 41, 100)
+#define codecpar codec
+#endif
-#if LIBAVFORMAT_BUILD < 4629
-#define FFMPEG_BUILD_PRE_4629
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55, 45, 101)
+#define av_frame_alloc avcodec_alloc_frame
+#endif
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 28, 0)
+#define av_frame_free(f) av_free(*(f))
+#elif LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55, 45, 101)
+#define av_frame_free avcodec_free_frame
#endif
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(52, 64, 0)
@@ -36,416 +65,429 @@ extern "C" {
#define AVMEDIA_TYPE_VIDEO CODEC_TYPE_VIDEO
#define AVMEDIA_TYPE_SUBTITLE CODEC_TYPE_SUBTITLE
#endif
-
-// From libavcodec version 54.25, CodecID have been renamed to AVCodecID and all CODEC_ID_* to AV_CODEC_ID_*.
-// This code can be simplified once all supported distros have updated to libavcodec version >=54.25
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(53, 8, 0)
+#define avcodec_open2(a, c, o) avcodec_open(a, c)
+#endif
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 25, 0)
-#define K3B_CODEC_ID_WMAV1 CODEC_ID_WMAV1
-#define K3B_CODEC_ID_WMAV2 CODEC_ID_WMAV2
-#define K3B_CODEC_ID_MP3 CODEC_ID_MP3
-#define K3B_CODEC_ID_AAC CODEC_ID_AAC
-#else
-#define K3B_CODEC_ID_WMAV1 AV_CODEC_ID_WMAV1
-#define K3B_CODEC_ID_WMAV2 AV_CODEC_ID_WMAV2
-#define K3B_CODEC_ID_MP3 AV_CODEC_ID_MP3
-#define K3B_CODEC_ID_AAC AV_CODEC_ID_AAC
+// From libavcodec version 54.25, CodecID have been renamed to AVCodecID and all
+// CODEC_ID_* to AV_CODEC_ID_*. This code can be simplified once all supported
+// distros have updated to libavcodec version >=54.25
+#define AV_CODEC_ID_WMAV1 CODEC_ID_WMAV1
+#define AV_CODEC_ID_WMAV2 CODEC_ID_WMAV2
+#define AV_CODEC_ID_MP3 CODEC_ID_MP3
+#define AV_CODEC_ID_AAC CODEC_ID_AAC
+#define AV_CODEC_ID_APE CODEC_ID_APE
+#define AV_CODEC_ID_WAVPACK CODEC_ID_WAVPACK
+#endif
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55,39,101)
+#define av_packet_unref av_free_packet
#endif
+// TODO: most of the used av_functions there are deprecated and there
+// are troubles with improper frame/packet processing that
+// leads to aborting of decode process
+//
+// [wmav2 @ 0xxxxx] Multiple frames in a packet.
+// [wmav2 @ 0xxxxx] Got unexpected packet size after a partial decode
-K3bFFMpegWrapper* K3bFFMpegWrapper::s_instance = 0;
-
+K3bFFMpegWrapper *K3bFFMpegWrapper::s_instance = NULL;
-class K3bFFMpegFile::Private
-{
+class K3bFFMpegFile::Private {
public:
- AVFormatContext* formatContext;
- AVCodec* codec;
-
+ TQ_UINT8 *packetData;
K3b::Msf length;
- // for decoding
- char outputBuffer[192000];
- char* outputBufferPos;
+ ::AVFormatContext *formatContext;
+ ::AVCodec *codec;
+ ::AVStream *audio_stream;
+ ::AVCodecContext *audio_stream_ctx;
+ ::AVSampleFormat sampleFormat;
+ ::AVFrame *frame;
+ ::AVPacket *packet;
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(57, 12, 100)
+ ::AVPacket _packet;
+#endif
+
+ char *outputBufferPos;
int outputBufferSize;
- AVPacket packet;
- TQ_UINT8* packetData;
int packetSize;
+ bool isSpacious;
};
-
-K3bFFMpegFile::K3bFFMpegFile( const TQString& filename )
- : m_filename(filename)
-{
+K3bFFMpegFile::K3bFFMpegFile(const TQString &filename) : m_filename(filename) {
d = new Private;
- d->formatContext = 0;
- d->codec = 0;
+ d->formatContext = NULL;
+ d->codec = NULL;
+ d->audio_stream = NULL;
+ d->audio_stream_ctx = NULL;
+ d->frame = av_frame_alloc();
+ d->outputBufferPos = NULL;
+ d->packet = NULL;
}
-
-K3bFFMpegFile::~K3bFFMpegFile()
-{
+K3bFFMpegFile::~K3bFFMpegFile() {
close();
+ av_frame_free(&d->frame);
delete d;
}
-
-bool K3bFFMpegFile::open()
-{
+bool K3bFFMpegFile::open() {
close();
// open the file
-# if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 2, 0)
- int err = avformat_open_input( &d->formatContext, m_filename.local8Bit(), 0, 0);
-# else
- int err = av_open_input_file( &d->formatContext, m_filename.local8Bit(), 0, 0, 0);
-# endif
- if( err < 0 ) {
- kdDebug() << "(K3bFFMpegFile) unable to open " << m_filename << " with error " << err << endl;
+ int err = ::avformat_open_input(&d->formatContext, m_filename.local8Bit(),
+ NULL, NULL);
+ if (err < 0) {
+ kdDebug() << "(K3bFFMpegFile) unable to open " << m_filename
+ << " with error " << err;
return false;
}
// analyze the streams
-# if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 6, 0)
- avformat_find_stream_info( d->formatContext, NULL );
-# else
- av_find_stream_info( d->formatContext );
-# endif
+ ::avformat_find_stream_info(d->formatContext, NULL);
// we only handle files containing one audio stream
- if( d->formatContext->nb_streams != 1 ) {
- kdDebug() << "(K3bFFMpegFile) more than one stream in " << m_filename << endl;
- return false;
+ for (uint i = 0; i < d->formatContext->nb_streams; ++i) {
+ if (d->formatContext->streams[i]->codecpar->codec_type ==
+ AVMEDIA_TYPE_AUDIO) {
+ if (!d->audio_stream) {
+ d->audio_stream = d->formatContext->streams[i];
+ } else {
+ d->audio_stream = NULL;
+ kdDebug() << "(K3bFFMpegFile) more than one audio stream in "
+ << m_filename;
+ return false;
+ }
+ }
}
// urgh... ugly
-#ifdef FFMPEG_BUILD_PRE_4629
- AVCodecContext* codecContext = &d->formatContext->streams[0]->codec;
+#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(57, 33, 100)
+ if (d->audio_stream->codecpar->codec_type != AVMEDIA_TYPE_AUDIO)
#else
- AVCodecContext* codecContext = d->formatContext->streams[0]->codec;
+ d->audio_stream_ctx = d->audio_stream->codec;
+ if (d->audio_stream_ctx->codec_type != AVMEDIA_TYPE_AUDIO)
#endif
- if( codecContext->codec_type != AVMEDIA_TYPE_AUDIO ) {
- kdDebug() << "(K3bFFMpegFile) not a simple audio stream: " << m_filename << endl;
+ {
+ kdDebug() << "(K3bFFMpegFile) not a simple audio stream: " << m_filename;
return false;
}
// get the codec
- d->codec = avcodec_find_decoder(codecContext->codec_id);
- if( !d->codec ) {
- kdDebug() << "(K3bFFMpegFile) no codec found for " << m_filename << endl;
+#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(57, 33, 100)
+ d->codec = (AVCodec *)::avcodec_find_decoder(d->audio_stream->codecpar->codec_id);
+#else
+ d->codec = (AVCodec *)::avcodec_find_decoder(d->audio_stream_ctx->codec_id);
+#endif
+ if (!d->codec) {
+ kdDebug() << "(K3bFFMpegFile) no codec found for " << m_filename;
return false;
}
+#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(57, 33, 100)
+ // allocate a codec context
+ d->audio_stream_ctx = avcodec_alloc_context3(d->codec);
+ if (d->audio_stream_ctx) {
+ avcodec_parameters_to_context(d->audio_stream_ctx, d->audio_stream->codecpar);
+ }
+ else {
+ kdDebug() << "(K3bFFMpegFile) failed to allocate a codec context for "
+ << m_filename;
+ }
+#endif
+
// open the codec on our context
kdDebug() << "(K3bFFMpegFile) found codec for " << m_filename << endl;
- if(
-# if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53, 8, 0)
- avcodec_open2( codecContext, d->codec, NULL ) < 0
-# else
- avcodec_open( codecContext, d->codec ) < 0
-# endif
- ) {
- kdDebug() << "(K3bFFMpegDecoderFactory) could not open codec." << endl;
+ if (::avcodec_open2(d->audio_stream_ctx, d->codec, NULL) < 0) {
+ kdDebug() << "(K3bFFMpegDecoderFactory) could not open codec.";
return false;
}
// determine the length of the stream
- d->length = K3b::Msf::fromSeconds( (double)d->formatContext->duration / (double)AV_TIME_BASE );
+ d->length = K3b::Msf::fromSeconds(double(d->formatContext->duration) /
+ double(AV_TIME_BASE));
- if( d->length == 0 ) {
- kdDebug() << "(K3bFFMpegDecoderFactory) invalid length." << endl;
+ if (d->length == 0) {
+ kdDebug() << "(K3bFFMpegDecoderFactory) invalid length.";
return false;
}
- // dump some debugging info
-# if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(52, 101, 0)
- av_dump_format( d->formatContext, 0, m_filename.local8Bit(), 0 );
+#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(57, 41, 100)
+ d->sampleFormat = d->audio_stream->codec->sample_fmt;
+#else
+ d->sampleFormat = static_cast<::AVSampleFormat>(d->audio_stream->codecpar->format);
+#endif
+# if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(59, 24, 100)
+ d->isSpacious = ::av_sample_fmt_is_planar(d->sampleFormat) &&
+ d->audio_stream->codecpar->channels > 1;
# else
- dump_format( d->formatContext, 0, m_filename.local8Bit(), 0 );
+ d->isSpacious = ::av_sample_fmt_is_planar(d->sampleFormat) &&
+ d->audio_stream->codecpar->ch_layout.nb_channels > 1;
# endif
+ // dump some debugging info
+ ::av_dump_format(d->formatContext, 0, m_filename.local8Bit(), 0);
+
return true;
}
-
-void K3bFFMpegFile::close()
-{
+void K3bFFMpegFile::close() {
d->outputBufferSize = 0;
d->packetSize = 0;
- d->packetData = 0;
+ d->packetData = NULL;
- if( d->codec ) {
-#ifdef FFMPEG_BUILD_PRE_4629
- avcodec_close( &d->formatContext->streams[0]->codec );
+ if (d->codec) {
+#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(57, 33, 100)
+ ::avcodec_free_context(&d->audio_stream_ctx);
#else
- avcodec_close( d->formatContext->streams[0]->codec );
+ ::avcodec_close(d->audio_stream_ctx);
+ d->codec = NULL;
#endif
- d->codec = 0;
}
- if( d->formatContext ) {
-# if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 17, 0)
- avformat_close_input( &d->formatContext );
-# else
- av_close_input_file( d->formatContext );
-# endif
- d->formatContext = 0;
+ if (d->formatContext) {
+ ::avformat_close_input(&d->formatContext);
+ d->formatContext = NULL;
}
-}
-
-
-K3b::Msf K3bFFMpegFile::length() const
-{
- return d->length;
-}
-
-int K3bFFMpegFile::sampleRate() const
-{
-#ifdef FFMPEG_BUILD_PRE_4629
- return d->formatContext->streams[0]->codec.sample_rate;
-#else
- return d->formatContext->streams[0]->codec->sample_rate;
-#endif
+ d->audio_stream = NULL;
}
+K3b::Msf K3bFFMpegFile::length() const { return d->length; }
-int K3bFFMpegFile::channels() const
-{
-#ifdef FFMPEG_BUILD_PRE_4629
- return d->formatContext->streams[0]->codec.channels;
-#else
- return d->formatContext->streams[0]->codec->channels;
-#endif
+int K3bFFMpegFile::sampleRate() const {
+ return d->audio_stream->codecpar->sample_rate;
}
-
-int K3bFFMpegFile::type() const
-{
-#ifdef FFMPEG_BUILD_PRE_4629
- return d->formatContext->streams[0]->codec.codec_id;
-#else
- return d->formatContext->streams[0]->codec->codec_id;
-#endif
+int K3bFFMpegFile::channels() const {
+# if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(59, 24, 100)
+ return d->audio_stream->codecpar->channels;
+# else
+ return d->audio_stream->codecpar->ch_layout.nb_channels;
+# endif
}
+int K3bFFMpegFile::type() const { return d->audio_stream->codecpar->codec_id; }
-TQString K3bFFMpegFile::typeComment() const
-{
- switch( type() ) {
- case K3B_CODEC_ID_WMAV1:
+TQString K3bFFMpegFile::typeComment() const {
+ switch (type()) {
+ case AV_CODEC_ID_WMAV1:
return i18n("Windows Media v1");
- case K3B_CODEC_ID_WMAV2:
+ case AV_CODEC_ID_WMAV2:
return i18n("Windows Media v2");
- case K3B_CODEC_ID_MP3:
- return i18n("MPEG 1 Layer III");
- case K3B_CODEC_ID_AAC:
+ case AV_CODEC_ID_WAVPACK:
+ return i18n("WavPack");
+ case AV_CODEC_ID_APE:
+ return i18n("Monkey's Audio (APE)");
+ case AV_CODEC_ID_AAC:
return i18n("Advanced Audio Coding (AAC)");
default:
- return TQString::fromLocal8Bit( d->codec->name );
+ return TQString::fromLocal8Bit(d->codec->name);
}
}
-
-TQString K3bFFMpegFile::title() const
-{
+TQString K3bFFMpegFile::title() const {
// FIXME: is this UTF8 or something??
-#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(53, 2, 0)
- if( d->formatContext->title[0] != '\0' )
- return TQString::fromLocal8Bit( d->formatContext->title );
-#else
- AVDictionaryEntry *entry = av_dict_get(d->formatContext->metadata, "title", NULL, 0);
- if( entry->value[0] != '\0' )
- return TQString::fromLocal8Bit( entry->value );
-#endif
- else
- return TQString();
+ AVDictionaryEntry *ade =
+ av_dict_get(d->formatContext->metadata, "TITLE", NULL, 0);
+ return ade && ade->value && ade->value[0] != '\0'
+ ? TQString::fromLocal8Bit(ade->value)
+ : TQString();
}
-
-TQString K3bFFMpegFile::author() const
-{
+TQString K3bFFMpegFile::author() const {
// FIXME: is this UTF8 or something??
-#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(53, 2, 0)
- if( d->formatContext->author[0] != '\0' )
- return TQString::fromLocal8Bit( d->formatContext->author );
-#else
- AVDictionaryEntry *entry = av_dict_get(d->formatContext->metadata, "author", NULL, 0);
- if( entry->value[0] != '\0' )
- return TQString::fromLocal8Bit( entry->value );
-#endif
- else
- return TQString();
+ AVDictionaryEntry *ade =
+ av_dict_get(d->formatContext->metadata, "ARTIST", NULL, 0);
+ return ade && ade->value && ade->value[0] != '\0'
+ ? TQString::fromLocal8Bit(ade->value)
+ : TQString();
}
-
-TQString K3bFFMpegFile::comment() const
-{
+TQString K3bFFMpegFile::comment() const {
// FIXME: is this UTF8 or something??
-#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(53, 2, 0)
- if( d->formatContext->comment[0] != '\0' )
- return TQString::fromLocal8Bit( d->formatContext->comment );
-#else
- AVDictionaryEntry *entry = av_dict_get(d->formatContext->metadata, "comment", NULL, 0);
- if( entry->value[0] != '\0' )
- return TQString::fromLocal8Bit( entry->value );
-#endif
- else
- return TQString();
+ AVDictionaryEntry *ade =
+ av_dict_get(d->formatContext->metadata, "COMMENT", NULL, 0);
+ return ade && ade->value && ade->value[0] != '\0'
+ ? TQString::fromLocal8Bit(ade->value)
+ : TQString();
}
+int K3bFFMpegFile::read(char *buf, int bufLen) {
-int K3bFFMpegFile::read( char* buf, int bufLen )
-{
- if( fillOutputBuffer() > 0 ) {
- int len = TQMIN(bufLen, d->outputBufferSize);
- ::memcpy( buf, d->outputBufferPos, len );
+ int ret = fillOutputBuffer();
+ if (ret <= 0) {
+ return ret;
+ }
- // TODO: only swap if needed
- for( int i = 0; i < len-1; i+=2 ) {
- char a = buf[i];
- buf[i] = buf[i+1];
- buf[i+1] = a;
- }
+ int len = TQMIN(bufLen, d->outputBufferSize);
+ ::memcpy(buf, d->outputBufferPos, len);
+
+ if (d->isSpacious && bufLen > d->outputBufferSize)
+ delete[] d->outputBufferPos; // clean up allocated space
+ // TODO: only swap if needed
+ for (int i = 0; i < len - 1; i += 2)
+ tqSwap(buf[i], buf[i + 1]); // BE -> LE
+
+ d->outputBufferSize -= len;
+ if (d->outputBufferSize > 0)
d->outputBufferPos += len;
- d->outputBufferSize -= len;
- return len;
- }
- else
- return 0;
+ return len;
}
-
// fill d->packetData with data to decode
-int K3bFFMpegFile::readPacket()
-{
- if( d->packetSize <= 0 ) {
- av_init_packet( &d->packet );
+int K3bFFMpegFile::readPacket() {
+ if (d->packetSize <= 0) {
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 12, 100)
+ d->packet = ::av_packet_alloc();
+#else
+ ::av_init_packet(&d->_packet);
+ d->packet = &d->_packet;
+#endif
- if( av_read_frame( d->formatContext, &d->packet ) < 0 ) {
+ if (::av_read_frame(d->formatContext, d->packet) < 0) {
return 0;
}
-
- d->packetSize = d->packet.size;
- d->packetData = d->packet.data;
+ d->packetSize = d->packet->size;
+ d->packetData = d->packet->data;
}
return d->packetSize;
}
-
// decode data in d->packetData and fill d->outputBuffer
-int K3bFFMpegFile::fillOutputBuffer()
-{
+int K3bFFMpegFile::fillOutputBuffer() {
// decode if the output buffer is empty
- if( d->outputBufferSize <= 0 ) {
+ while (d->outputBufferSize <= 0) {
// make sure we have data to decode
- if( readPacket() == 0 ) {
+ if (readPacket() == 0) {
return 0;
}
- d->outputBufferPos = d->outputBuffer;
-
-#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52, 64, 0)
- AVPacket avp;
- av_init_packet( &avp );
- avp.data = d->packetData;
- avp.size = d->packetSize;
-# if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53, 25, 0)
-int len = avcodec_decode_audio4( d->formatContext->streams[0]->codec,
- (AVFrame*)d->outputBuffer, &d->outputBufferSize,
- &avp );
-# else
-int len = avcodec_decode_audio3( d->formatContext->streams[0]->codec,
- (short*)d->outputBuffer, &d->outputBufferSize,
- &avp );
-# endif
+ int gotFrame = 0;
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 106, 100)
+ int len = avcodec_receive_frame(d->audio_stream_ctx, d->frame);
+ if (len == 0) {
+ gotFrame = 1;
+ }
+ else if (len == AVERROR(EAGAIN)) {
+ len = 0;
+ }
+
+ if (len == 0) {
+ len = avcodec_send_packet(d->audio_stream_ctx, d->packet);
+ if (len == AVERROR(EAGAIN)) {
+ len = 0;
+ }
+ }
#else
-#ifdef FFMPEG_BUILD_PRE_4629
- int len = avcodec_decode_audio2( &d->formatContext->streams[0]->codec,
+ int len = ::avcodec_decode_audio4(d->audio_stream_ctx, d->frame,
+ &gotFrame, d->packet);
+#endif
+
+ if (d->packetSize <= 0 || len < 0) {
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 12, 100)
+ ::av_packet_free(&d->packet);
#else
- int len = avcodec_decode_audio2( d->formatContext->streams[0]->codec,
+ ::av_packet_unref(d->packet);
+ d->packet = NULL;
#endif
- (short*)d->outputBuffer, &d->outputBufferSize,
- d->packetData, d->packetSize );
+ }
+ if (len < 0) {
+ kdDebug() << "(K3bFFMpegFile) decoding failed for " << m_filename;
+ return -1;
+ }
+
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 12, 100)
+ len = d->packet->size;
#endif
+ if (gotFrame) {
+ int nb_s = d->frame->nb_samples;
+ int nb_ch = 2; // copy only two channels even if there're more
+ d->outputBufferSize = nb_s * nb_ch * 2; // 2 means 2 bytes (16bit)
+ d->outputBufferPos = reinterpret_cast<char *>(d->frame->extended_data[0]);
+ if (d->isSpacious) {
+ d->outputBufferPos = new char[d->outputBufferSize];
+ if (d->sampleFormat == AV_SAMPLE_FMT_FLTP) {
+ int width = sizeof(float); // sample width of float audio
+ for (int sample = 0; sample < nb_s; sample++) {
+ for (int ch = 0; ch < nb_ch; ch++) {
+ double val = *(reinterpret_cast<float *>(
+ d->frame->extended_data[ch] + sample * width));
+ val = ::abs(val) > 1 ? ::copysign(1.0, val) : val;
+ int16_t result =
+ static_cast<int16_t>(val * 32767.0 + 32768.5) - 32768;
+ ::memcpy(d->outputBufferPos + (sample * nb_ch + ch) * 2, &result,
+ 2); // 2 is sample width of 16 bit audio
+ }
+ }
+ } else {
+ for (int sample = 0; sample < nb_s; sample++) {
+ for (int ch = 0; ch < nb_ch; ch++) {
+ ::memcpy(d->outputBufferPos + (sample * nb_ch + ch) * 2,
+ d->frame->extended_data[ch] + sample * 2,
+ 2); // 16 bit here as well
+ }
+ }
+ }
+ }
+ }
d->packetSize -= len;
d->packetData += len;
-
- if( d->packetSize <= 0 )
- av_free_packet( &d->packet );
}
- // if it is still empty try again
- if( d->outputBufferSize <= 0 )
- return fillOutputBuffer();
- else
- return d->outputBufferSize;
+ return d->outputBufferSize;
}
-
-bool K3bFFMpegFile::seek( const K3b::Msf& msf )
-{
+bool K3bFFMpegFile::seek(const K3b::Msf &msf) {
d->outputBufferSize = 0;
d->packetSize = 0;
- double seconds = (double)msf.totalFrames()/75.0;
- TQ_UINT64 timestamp = (TQ_UINT64)(seconds * (double)AV_TIME_BASE);
+ double seconds = double(msf.totalFrames()) / 75.0;
+ int64_t timestamp = static_cast<int64_t>(seconds * double(AV_TIME_BASE));
// FIXME: do we really need the start_time and why?
-#if LIBAVFORMAT_BUILD >= 4619
- return ( av_seek_frame( d->formatContext, -1, timestamp + d->formatContext->start_time, 0 ) >= 0 );
-#else
- return ( av_seek_frame( d->formatContext, -1, timestamp + d->formatContext->start_time ) >= 0 );
-#endif
-}
-
-
-
-
-
-
-K3bFFMpegWrapper::K3bFFMpegWrapper()
-{
- av_register_all();
+ return (::av_seek_frame(d->formatContext, -1,
+ timestamp + d->formatContext->start_time, 0) >= 0);
}
-
-K3bFFMpegWrapper::~K3bFFMpegWrapper()
-{
- s_instance = 0;
+//
+// av_register_all is deprecated since ffmpeg 4.0, can be dropped
+K3bFFMpegWrapper::K3bFFMpegWrapper() {
+#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(58,9,100)
+ ::av_register_all();
+#endif
}
+K3bFFMpegWrapper::~K3bFFMpegWrapper() { s_instance = NULL; }
-K3bFFMpegWrapper* K3bFFMpegWrapper::instance()
-{
- if( !s_instance ) {
+K3bFFMpegWrapper *K3bFFMpegWrapper::instance() {
+ if (!s_instance) {
s_instance = new K3bFFMpegWrapper();
}
return s_instance;
}
-
-K3bFFMpegFile* K3bFFMpegWrapper::open( const TQString& filename ) const
-{
- K3bFFMpegFile* file = new K3bFFMpegFile( filename );
- if( file->open() ) {
+K3bFFMpegFile *K3bFFMpegWrapper::open(const TQString &filename) const {
+ K3bFFMpegFile *file = new K3bFFMpegFile(filename);
+ if (file->open()) {
#ifndef K3B_FFMPEG_ALL_CODECS
//
- // only allow tested formats. ffmpeg seems not to be too reliable with every format.
- // mp3 being one of them sadly. Most importantly: allow the libsndfile decoder to do
- // its thing.
+ // only allow tested formats. ffmpeg seems not to be too reliable with every
+ // format. mp3 being one of them sadly. Most importantly: allow the
+ // libsndfile decoder to do its thing.
//
- if( file->type() == K3B_CODEC_ID_WMAV1 ||
- file->type() == K3B_CODEC_ID_WMAV2 ||
- file->type() == K3B_CODEC_ID_AAC )
+ if (file->type() == AV_CODEC_ID_WMAV1 ||
+ file->type() == AV_CODEC_ID_WMAV2 || file->type() == AV_CODEC_ID_AAC ||
+ file->type() == AV_CODEC_ID_APE || file->type() == AV_CODEC_ID_WAVPACK)
#endif
return file;
}
delete file;
- return 0;
+ return NULL;
}
diff --git a/plugins/decoder/flac/CMakeLists.txt b/plugins/decoder/flac/CMakeLists.txt
index 75eea0d..090e3d6 100644
--- a/plugins/decoder/flac/CMakeLists.txt
+++ b/plugins/decoder/flac/CMakeLists.txt
@@ -18,11 +18,13 @@ include_directories(
${CMAKE_SOURCE_DIR}/libk3bdevice
${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS}
+ ${TAGLIB_INCLUDE_DIRS}
)
link_directories(
${TQT_LIBRARY_DIRS}
${FLAC_LIBRARY_DIRS}
+ ${TAGLIB_LIBRARY_DIRS}
)
if( ${FLAC_VERSION} VERSION_GREATER "1.1.1" )
@@ -34,13 +36,14 @@ endif( )
tde_add_kpart( libk3bflacdecoder AUTOMOC
SOURCES k3bflacdecoder.cpp
LINK tdecore-shared k3b-shared k3bdevice-shared
- ${FLAC_LIBRARIES}
+ ${FLAC_LIBRARIES} ${TAGLIB_LIBRARIES}
DESTINATION ${PLUGIN_INSTALL_DIR}
)
##### other data ################################
-install( FILES k3bflacdecoder.plugin
+tde_create_translated_desktop(
+ SOURCE k3bflacdecoder.plugin
DESTINATION ${DATA_INSTALL_DIR}/k3b/plugins
)
diff --git a/plugins/decoder/flac/Makefile.am b/plugins/decoder/flac/Makefile.am
deleted file mode 100644
index 36ed8ef..0000000
--- a/plugins/decoder/flac/Makefile.am
+++ /dev/null
@@ -1,13 +0,0 @@
-AM_CPPFLAGS = -I$(srcdir)/../../../libk3b/plugin -I$(srcdir)/../../../libk3bdevice -I$(srcdir)/../../../libk3b/core $(taglib_includes) $(all_includes)
-
-kde_module_LTLIBRARIES = libk3bflacdecoder.la
-
-libk3bflacdecoder_la_SOURCES = k3bflacdecoder.cpp
-
-libk3bflacdecoder_la_LIBADD = ../../../libk3b/libk3b.la ../../../libk3bdevice/libk3bdevice.la $(LIB_TDEUI) $(LIB_TDECORE) $(LIB_TQT) -lFLAC++ -lFLAC $(taglib_libs)
-libk3bflacdecoder_la_LDFLAGS = -avoid-version -module -no-undefined $(all_libraries)
-
-pluginsdir = $(kde_datadir)/k3b/plugins
-plugins_DATA = k3bflacdecoder.plugin
-
-METASOURCES = AUTO
diff --git a/plugins/decoder/flac/configure.in.bot b/plugins/decoder/flac/configure.in.bot
deleted file mode 100644
index f2d95a4..0000000
--- a/plugins/decoder/flac/configure.in.bot
+++ /dev/null
@@ -1,13 +0,0 @@
-echo ""
-
-if test x$have_flac = xyes; then
- echo "K3b - FLAC support: yes"
-else
- echo "K3b - FLAC support: no"
-if test "$ac_cv_use_flac" = "yes"; then
- if test "$have_flac" = "no"; then
- echo "K3b - You are missing the FLAC++ headers and libraries."
- echo "K3b - The FLAC decoding plugin won't be compiled."
- fi
-fi
-fi
diff --git a/plugins/decoder/flac/configure.in.in b/plugins/decoder/flac/configure.in.in
deleted file mode 100644
index 4679bf7..0000000
--- a/plugins/decoder/flac/configure.in.in
+++ /dev/null
@@ -1,41 +0,0 @@
-dnl === test for FLAC++ and FLAC - begin ====
-AC_ARG_WITH(
- flac,
- AS_HELP_STRING([--without-flac], [build K3b without FLAC support (default=no)]),
- [ac_cv_use_flac=$withval],
- [ac_cv_use_flac=yes]
-)
-
-have_flac=no
-if test "$ac_cv_use_flac" = "yes"; then
- KDE_CHECK_HEADERS(FLAC++/decoder.h, [
- KDE_CHECK_LIB(FLAC,FLAC__stream_decoder_process_single,
- have_flac=yes,[],$all_libraries)])
-
- AC_MSG_CHECKING(for libFLAC newer than 1.1.1)
- AC_CACHE_VAL(k3b_flac_new,
- [
- AC_LANG_SAVE
- AC_LANG_CPLUSPLUS
- AC_TRY_COMPILE(
- [
- #include <FLAC++/metadata.h>
- ], [
- FLAC::Metadata::VorbisComment* vc;
- vc->get_vendor_string().get_field();
- ], k3b_flac_new=no, k3b_flac_new=yes )
- AC_LANG_RESTORE
- ])
- AC_MSG_RESULT($k3b_flac_new)
- if test $k3b_flac_new = yes; then
- AC_DEFINE(FLAC_NEWER_THAN_1_1_1,
- 1,
- [Define to 1 if your flac library's version is newer than or equal to 1.1.2]
- )
- fi
-else
- have_flac=no
-fi
-
-AM_CONDITIONAL(include_FLAC, [test x$have_flac = xyes])
-dnl === test for FLAC++ and FLAC - end ====
diff --git a/plugins/decoder/flac/k3bflacdecoder.cpp b/plugins/decoder/flac/k3bflacdecoder.cpp
index 671bf4c..2d814d8 100644
--- a/plugins/decoder/flac/k3bflacdecoder.cpp
+++ b/plugins/decoder/flac/k3bflacdecoder.cpp
@@ -33,6 +33,7 @@
#ifdef HAVE_TAGLIB
#include <taglib/tag.h>
#include <taglib/flacfile.h>
+#define TStringToTQString(s) TQString::fromUtf8((s).toCString(true))
#endif
#if !defined FLACPP_API_VERSION_CURRENT || FLACPP_API_VERSION_CURRENT < 6
@@ -56,7 +57,7 @@ public:
file = f;
file->open(IO_ReadOnly);
- TQT_TQIODEVICE(internalBuffer)->flush();
+ internalBuffer->flush();
set_metadata_respond(FLAC__METADATA_TYPE_STREAMINFO);
set_metadata_respond(FLAC__METADATA_TYPE_VORBIS_COMMENT);
@@ -165,7 +166,7 @@ K3bFLACDecoder::Private::seek_callback(FLAC__uint64 absolute_byte_offset) {
#else
FLAC__StreamDecoderSeekStatus
K3bFLACDecoder::Private::seek_callback(FLAC__uint64 absolute_byte_offset) {
- if(file->at(absolute_byte_offset) == FALSE)
+ if(file->at(absolute_byte_offset) == false)
return FLAC__STREAM_DECODER_SEEK_STATUS_ERROR;
else
return FLAC__STREAM_DECODER_SEEK_STATUS_OK;
@@ -293,9 +294,9 @@ bool K3bFLACDecoder::analyseFileInternal( K3b::Msf& frames, int& samplerate, int
kdDebug() << "(K3bFLACDecoder) using taglib to read tag" << endl;
TagLib::FLAC::File f( TQFile::encodeName(filename()) );
if( f.isOpen() ) {
- addMetaInfo( META_TITLE, TStringToQString( f.tag()->title() ) );
- addMetaInfo( META_ARTIST, TStringToQString( f.tag()->artist() ) );
- addMetaInfo( META_COMMENT, TStringToQString( f.tag()->comment() ) );
+ addMetaInfo( META_TITLE, TStringToTQString( f.tag()->title() ) );
+ addMetaInfo( META_ARTIST, TStringToTQString( f.tag()->artist() ) );
+ addMetaInfo( META_COMMENT, TStringToTQString( f.tag()->comment() ) );
}
}
#endif
diff --git a/plugins/decoder/flac/k3bflacdecoder.h b/plugins/decoder/flac/k3bflacdecoder.h
index 83904dd..d2f1d87 100644
--- a/plugins/decoder/flac/k3bflacdecoder.h
+++ b/plugins/decoder/flac/k3bflacdecoder.h
@@ -23,7 +23,7 @@ class KURL;
class K3bFLACDecoderFactory : public K3bAudioDecoderFactory
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -41,7 +41,7 @@ class K3bFLACDecoderFactory : public K3bAudioDecoderFactory
class K3bFLACDecoder : public K3bAudioDecoder
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/plugins/decoder/flac/k3bflacdecoder.plugin b/plugins/decoder/flac/k3bflacdecoder.plugin
index 1e1bcbb..5b7ded9 100644
--- a/plugins/decoder/flac/k3bflacdecoder.plugin
+++ b/plugins/decoder/flac/k3bflacdecoder.plugin
@@ -1,9 +1,9 @@
[K3b Plugin]
-Lib=libk3bflacdecoder
-Group=AudioDecoder
Name=K3b FLAC Decoder
+Comment=Decoding module to decode FLAC files
Author=John Steele Scott
Email=toojays@toojays.net
Version=2.1
-Comment=Decoding module to decode FLAC files
License=GPL
+Group=AudioDecoder
+Lib=libk3bflacdecoder
diff --git a/plugins/decoder/libsndfile/CMakeLists.txt b/plugins/decoder/libsndfile/CMakeLists.txt
index fa387c0..f9a35ed 100644
--- a/plugins/decoder/libsndfile/CMakeLists.txt
+++ b/plugins/decoder/libsndfile/CMakeLists.txt
@@ -18,6 +18,7 @@ include_directories(
${CMAKE_SOURCE_DIR}/libk3bdevice
${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS}
+ ${SNDFILE_INCLUDE_DIRS}
)
link_directories(
@@ -38,6 +39,7 @@ tde_add_kpart( libk3blibsndfiledecoder AUTOMOC
##### other data ################################
-install( FILES k3blibsndfiledecoder.plugin
+tde_create_translated_desktop(
+ SOURCE k3blibsndfiledecoder.plugin
DESTINATION ${DATA_INSTALL_DIR}/k3b/plugins
)
diff --git a/plugins/decoder/libsndfile/Makefile.am b/plugins/decoder/libsndfile/Makefile.am
deleted file mode 100644
index b01e30f..0000000
--- a/plugins/decoder/libsndfile/Makefile.am
+++ /dev/null
@@ -1,14 +0,0 @@
-AM_CPPFLAGS = -I$(srcdir)/../../../libk3b/core -I$(srcdir)/../../../libk3b/plugin -I$(srcdir)/../../../libk3bdevice $(all_includes)
-
-kde_module_LTLIBRARIES = libk3blibsndfiledecoder.la
-
-libk3blibsndfiledecoder_la_SOURCES = k3blibsndfiledecoder.cpp
-
-libk3blibsndfiledecoder_la_LIBADD = ../../../libk3b/libk3b.la ../../../libk3bdevice/libk3bdevice.la ../../../libk3b/plugin/libk3bplugin.la $(LIB_TQT) $(LIB_TDECORE) $(LIB_TDEUI) $(LIB_TDEIO) -lsndfile
-libk3blibsndfiledecoder_la_LDFLAGS = -avoid-version -module -no-undefined $(all_libraries)
-
-pluginsdir = $(kde_datadir)/k3b/plugins
-plugins_DATA = k3blibsndfiledecoder.plugin
-
-METASOURCES = AUTO
-
diff --git a/plugins/decoder/libsndfile/configure.in.bot b/plugins/decoder/libsndfile/configure.in.bot
deleted file mode 100644
index cf1e4e9..0000000
--- a/plugins/decoder/libsndfile/configure.in.bot
+++ /dev/null
@@ -1,11 +0,0 @@
-echo ""
-
-if $av_cv_sndfile; then
- echo "K3b - libsndfile audio decoding support: yes"
-else
- echo "K3b - libsndfile audio decoding support: no"
-if test "$ac_cv_use_sndfile" = "yes"; then
- echo "K3b - You are missing the libsndfile headers and libraries."
- echo "K3b - The libsndfile audio decoding plugin won't be compiled."
-fi
-fi
diff --git a/plugins/decoder/libsndfile/configure.in.in b/plugins/decoder/libsndfile/configure.in.in
deleted file mode 100644
index 6b50a68..0000000
--- a/plugins/decoder/libsndfile/configure.in.in
+++ /dev/null
@@ -1,52 +0,0 @@
-dnl === test for libsndfile - begin ===
-dnl
-dnl Don't use PKG_CHECK, since if there is no pkg-config installed,
-dnl then there is no auto* magic for it either.
-dnl
-dnl Tests copied from tdebase/tdeioslave/thumbnail/
-dnl
-if test -z "$PKG_CONFIG"; then
- AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
-fi
-
-AC_ARG_WITH(
- sndfile,
- AS_HELP_STRING([--without-sndfile],
- [build K3b without libsndfile support (default=no)]),
- [ac_cv_use_sndfile=$withval],
- [ac_cv_use_sndfile=yes]
-)
-
-if test "$ac_cv_use_sndfile" = "yes"; then
- SNDFILE_CFLAGS=""
- SNDFILE_LIBS=""
- if test "$PKG_CONFIG" = "no" ; then
- ac_cv_sndfile=0
- echo "*** The pkg-config script could not be found. Make sure it is"
- echo "*** in your path, or set the PKG_CONFIG environment variable"
- echo "*** to the full path to pkg-config."
- echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
- else
- if !(`$PKG_CONFIG --exists sndfile`) ; then
- echo "*** sndfile is not installed."
- ac_cv_sndfile=0
- else
- if !(`$PKG_CONFIG --atleast-version="1.0.2" sndfile`) ; then
- echo "*** You need at least version 1.0.2 of sndfile."
- ac_cv_sndfile=0
- else
- ac_cv_sndfile=1
- SNDFILE_CFLAGS=`$PKG_CONFIG --cflags sndfile`
- SNDFILE_LIBS=`$PKG_CONFIG --libs sndfile`
- fi
- fi
- fi
-
- AC_DEFINE_UNQUOTED([HAVE_SNDFILE],${ac_cv_sndfile},
- [Set to 1 if you have libsndfile.])
- AC_SUBST(SNDFILE_CFLAGS)
- AC_SUBST(SNDFILE_LIBS)
-fi
-
-AM_CONDITIONAL(include_AIFF, [test x$ac_cv_sndfile = x1])
-dnl === test for libsndfile - end ===
diff --git a/plugins/decoder/libsndfile/k3blibsndfiledecoder.h b/plugins/decoder/libsndfile/k3blibsndfiledecoder.h
index 5840ee7..8cf5e97 100644
--- a/plugins/decoder/libsndfile/k3blibsndfiledecoder.h
+++ b/plugins/decoder/libsndfile/k3blibsndfiledecoder.h
@@ -24,7 +24,7 @@ class KURL;
class K3bLibsndfileDecoderFactory : public K3bAudioDecoderFactory
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -44,7 +44,7 @@ class K3bLibsndfileDecoderFactory : public K3bAudioDecoderFactory
class K3bLibsndfileDecoder : public K3bAudioDecoder
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/plugins/decoder/libsndfile/k3blibsndfiledecoder.plugin b/plugins/decoder/libsndfile/k3blibsndfiledecoder.plugin
index 7ae05f1..f0945fb 100644
--- a/plugins/decoder/libsndfile/k3blibsndfiledecoder.plugin
+++ b/plugins/decoder/libsndfile/k3blibsndfiledecoder.plugin
@@ -1,9 +1,9 @@
[K3b Plugin]
-Lib=libk3blibsndfiledecoder
-Group=AudioDecoder
Name=K3b Libsndfile Decoder
+Comment=Decoding module to decode audio files supported by libsndfile
Author=Matthieu Bedouet
Email=mbedouet@no-log.org
Version=1.0
-Comment=Decoding module to decode audio files supported by libsndfile
License=GPL
+Group=AudioDecoder
+Lib=libk3blibsndfiledecoder
diff --git a/plugins/decoder/mp3/CMakeLists.txt b/plugins/decoder/mp3/CMakeLists.txt
index 2c31bae..a04a4e9 100644
--- a/plugins/decoder/mp3/CMakeLists.txt
+++ b/plugins/decoder/mp3/CMakeLists.txt
@@ -18,11 +18,13 @@ include_directories(
${CMAKE_SOURCE_DIR}/libk3bdevice
${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS}
+ ${TAGLIB_INCLUDE_DIRS}
)
link_directories(
${TQT_LIBRARY_DIRS}
${MAD_LIBRARY_DIRS}
+ ${TAGLIB_LIBRARY_DIRS}
)
@@ -31,13 +33,14 @@ link_directories(
tde_add_kpart( libk3bmaddecoder AUTOMOC
SOURCES k3bmad.cpp k3bmaddecoder.cpp
LINK tdecore-shared k3b-shared k3bdevice-shared
- ${MAD_LIBRARIES}
+ ${MAD_LIBRARIES} ${TAGLIB_LIBRARIES}
DESTINATION ${PLUGIN_INSTALL_DIR}
)
##### other data ################################
-install( FILES k3bmaddecoder.plugin
+tde_create_translated_desktop(
+ SOURCE k3bmaddecoder.plugin
DESTINATION ${DATA_INSTALL_DIR}/k3b/plugins
)
diff --git a/plugins/decoder/mp3/Makefile.am b/plugins/decoder/mp3/Makefile.am
deleted file mode 100644
index a2befe9..0000000
--- a/plugins/decoder/mp3/Makefile.am
+++ /dev/null
@@ -1,13 +0,0 @@
-AM_CPPFLAGS = -I$(srcdir)/../../../libk3b/core -I$(srcdir)/../../../libk3b/plugin -I$(srcdir)/../../../libk3bdevice $(taglib_includes) $(all_includes)
-
-kde_module_LTLIBRARIES = libk3bmaddecoder.la
-
-libk3bmaddecoder_la_SOURCES = k3bmad.cpp k3bmaddecoder.cpp
-
-libk3bmaddecoder_la_LIBADD = $(LIB_TDECORE) $(MAD_LIB) $(taglib_libs) ../../../libk3b/libk3b.la
-libk3bmaddecoder_la_LDFLAGS = -avoid-version -module -no-undefined $(all_libraries)
-
-pluginsdir = $(kde_datadir)/k3b/plugins
-plugins_DATA = k3bmaddecoder.plugin
-
-METASOURCES = AUTO
diff --git a/plugins/decoder/mp3/configure.in.bot b/plugins/decoder/mp3/configure.in.bot
deleted file mode 100644
index 0ee4872..0000000
--- a/plugins/decoder/mp3/configure.in.bot
+++ /dev/null
@@ -1,11 +0,0 @@
-echo ""
-
-if test -n "$MAD_LIB"; then
- echo "K3b - Mp3 decoding support (libmad): yes"
-else
- echo "K3b - Mp3 decoding support (libmad): no"
-if test "$ac_cv_use_libmad" = "yes"; then
- echo "K3b - You are missing the libmad headers and libraries."
- echo "K3b - The Mp3 decoding plugin won't be compiled."
-fi
-fi
diff --git a/plugins/decoder/mp3/configure.in.in b/plugins/decoder/mp3/configure.in.in
deleted file mode 100644
index 9da5da7..0000000
--- a/plugins/decoder/mp3/configure.in.in
+++ /dev/null
@@ -1,24 +0,0 @@
-dnl === libmad MPEG decoder check - begin ===
-AC_ARG_WITH(
- libmad,
- AS_HELP_STRING([--without-libmad], [build K3b without libmad support (default=no)]),
- [ac_cv_use_libmad=$withval],
- [ac_cv_use_libmad=yes]
-)
-
-if test "$ac_cv_use_libmad" = "yes"; then
- MAD_LIB=""
- KDE_CHECK_HEADER(mad.h, [
- KDE_CHECK_LIB(mad, mad_synth_frame, [
- MAD_LIB="-lmad"
- AC_DEFINE(HAVE_LIBMAD,1,[defined if you have libmad headers and libraries])],
- [],
- $all_libraries
- )
- ])
- AC_SUBST(MAD_LIB)
-
-fi
-
-AM_CONDITIONAL(include_MP3, [test -n "$MAD_LIB"])
-dnl === libmad MPeg decoder check - end ===
diff --git a/plugins/decoder/mp3/k3bmaddecoder.cpp b/plugins/decoder/mp3/k3bmaddecoder.cpp
index a28e24b..ece3ea7 100644
--- a/plugins/decoder/mp3/k3bmaddecoder.cpp
+++ b/plugins/decoder/mp3/k3bmaddecoder.cpp
@@ -48,6 +48,7 @@
#ifdef HAVE_TAGLIB
#include <taglib/tag.h>
#include <taglib/mpegfile.h>
+#define TStringToTQString(s) TQString::fromUtf8((s).toCString(true))
#endif
@@ -110,11 +111,11 @@ TQString K3bMadDecoder::metaInfo( MetaDataField f )
if ( file.tag() ) {
switch( f ) {
case META_TITLE:
- return TStringToQString( file.tag()->title() );
+ return TStringToTQString( file.tag()->title() );
case META_ARTIST:
- return TStringToQString( file.tag()->artist() );
+ return TStringToTQString( file.tag()->artist() );
case META_COMMENT:
- return TStringToQString( file.tag()->comment() );
+ return TStringToTQString( file.tag()->comment() );
default:
return TQString();
}
diff --git a/plugins/decoder/mp3/k3bmaddecoder.h b/plugins/decoder/mp3/k3bmaddecoder.h
index df63a1d..de1fe9e 100644
--- a/plugins/decoder/mp3/k3bmaddecoder.h
+++ b/plugins/decoder/mp3/k3bmaddecoder.h
@@ -26,7 +26,7 @@ extern "C" {
class K3bMadDecoderFactory : public K3bAudioDecoderFactory
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -44,7 +44,7 @@ class K3bMadDecoderFactory : public K3bAudioDecoderFactory
class K3bMadDecoder : public K3bAudioDecoder
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/plugins/decoder/mp3/k3bmaddecoder.plugin b/plugins/decoder/mp3/k3bmaddecoder.plugin
index 69fbbb8..2acb7ba 100644
--- a/plugins/decoder/mp3/k3bmaddecoder.plugin
+++ b/plugins/decoder/mp3/k3bmaddecoder.plugin
@@ -1,9 +1,9 @@
[K3b Plugin]
-Lib=libk3bmaddecoder
-Group=AudioDecoder
Name=K3b MAD Decoder
+Comment=Decoding module to decode MPEG 1 Layer III files
Author=Sebastian Trueg
Email=trueg@k3b.org
Version=3.1
-Comment=Decoding module to decode MPEG 1 Layer III files
License=GPL
+Group=AudioDecoder
+Lib=libk3bmaddecoder
diff --git a/plugins/decoder/musepack/CMakeLists.txt b/plugins/decoder/musepack/CMakeLists.txt
index 95fb7ae..71d1e00 100644
--- a/plugins/decoder/musepack/CMakeLists.txt
+++ b/plugins/decoder/musepack/CMakeLists.txt
@@ -40,6 +40,7 @@ tde_add_kpart( libk3bmpcdecoder AUTOMOC
##### other data ################################
-install( FILES k3bmpcdecoder.plugin
+tde_create_translated_desktop(
+ SOURCE k3bmpcdecoder.plugin
DESTINATION ${DATA_INSTALL_DIR}/k3b/plugins
)
diff --git a/plugins/decoder/musepack/Makefile.am b/plugins/decoder/musepack/Makefile.am
deleted file mode 100644
index b412ee6..0000000
--- a/plugins/decoder/musepack/Makefile.am
+++ /dev/null
@@ -1,16 +0,0 @@
-AM_CPPFLAGS = -I$(srcdir)/../../../libk3b/plugin \
- -I$(srcdir)/../../../libk3b/core \
- -I$(srcdir)/../../../libk3bdevice \
- $(all_includes)
-
-kde_module_LTLIBRARIES = libk3bmpcdecoder.la
-
-libk3bmpcdecoder_la_SOURCES = k3bmpcdecoder.cpp k3bmpcwrapper.cpp
-
-libk3bmpcdecoder_la_LIBADD = ../../../libk3b/libk3b.la ../../../libk3bdevice/libk3bdevice.la ../../../libk3b/plugin/libk3bplugin.la $(MPC_LIBS) $(LIB_TQT) $(LIB_TDECORE) $(LIB_TDEIO) $(LIB_TDEUI)
-libk3bmpcdecoder_la_LDFLAGS = -avoid-version -module -no-undefined $(all_libraries)
-
-pluginsdir = $(kde_datadir)/k3b/plugins
-plugins_DATA = k3bmpcdecoder.plugin
-
-METASOURCES = AUTO
diff --git a/plugins/decoder/musepack/configure.in.bot b/plugins/decoder/musepack/configure.in.bot
deleted file mode 100644
index 8fb871b..0000000
--- a/plugins/decoder/musepack/configure.in.bot
+++ /dev/null
@@ -1,12 +0,0 @@
-echo ""
-
-if test x$have_mpc = xyes; then
- echo "K3b - Musepack support: yes"
-else
- echo "K3b - Musepack support: no"
-if test "$ac_cv_use_mpc" = "yes"; then
- echo "K3b - You are missing the Musepack headers and libraries >= 1.1."
- echo "K3b - The Musepack audio decoding plugin won't be compiled."
-fi
-fi
-
diff --git a/plugins/decoder/musepack/configure.in.in b/plugins/decoder/musepack/configure.in.in
deleted file mode 100644
index 1500ae3..0000000
--- a/plugins/decoder/musepack/configure.in.in
+++ /dev/null
@@ -1,66 +0,0 @@
-dnl --------- MUSEPACK CHECK ---------------
-
-AC_ARG_WITH(
- musepack,
- AS_HELP_STRING(
- [--without-musepack],
- [build K3b without Musepack audio support (default=no)]),
- [ac_cv_use_mpc=$withval],
- [ac_cv_use_mpc=yes]
-)
-
-have_mpc=no
-if test "$ac_cv_use_mpc" = "yes"; then
-
- dnl - search for both the new and the old naming -
-
- KDE_CHECK_HEADERS(mpcdec/mpcdec.h, [
- KDE_CHECK_LIB(mpcdec, mpc_decoder_setup, [
- have_mpc=yes
- MPC_LIBS="-lmpcdec"
- AC_DEFINE(
- MPC_HEADER_FILE,
- <mpcdec/mpcdec.h>,
- [The header to include for MPC decoding.])
- ],
- [], [], [])
- ])
-
- if test "$have_mpc" = "no"; then
- KDE_CHECK_HEADERS(mpc/mpcdec.h, [
- KDE_CHECK_LIB(mpcdec, mpc_decoder_setup, [
- have_mpc=yes
- MPC_LIBS="-lmpcdec"
- AC_DEFINE(
- MPC_HEADER_FILE,
- <mpc/mpcdec.h>,
- [The header to include for MPC decoding.])
- ],
- [], [], [])
- ])
- fi
-
- if test "$have_mpc" = "no"; then
- KDE_CHECK_HEADERS(musepack/musepack.h, [
- KDE_CHECK_LIB(musepack, mpc_decoder_setup, [
- have_mpc=yes
- MPC_LIBS="-lmusepack"
- AC_DEFINE(
- MPC_HEADER_FILE,
- <musepack/musepack.h>,
- [The header to include for MPC decoding.]
- )
- AC_DEFINE(
- mpc_bool_t,
- BOOL,
- [backwards compatibility stuff]
- )
- ], [], [])
- ])
- fi
-fi
-AC_SUBST(MPC_LIBS)
-
-AM_CONDITIONAL(include_MPC, [test x$have_mpc = xyes])
-
-dnl --------- MUSEPACK CHECK END -----------
diff --git a/plugins/decoder/musepack/k3bmpcdecoder.h b/plugins/decoder/musepack/k3bmpcdecoder.h
index a7f8ae7..aac2312 100644
--- a/plugins/decoder/musepack/k3bmpcdecoder.h
+++ b/plugins/decoder/musepack/k3bmpcdecoder.h
@@ -23,7 +23,7 @@ class K3bMpcWrapper;
class K3bMpcDecoderFactory : public K3bAudioDecoderFactory
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -41,7 +41,7 @@ class K3bMpcDecoderFactory : public K3bAudioDecoderFactory
class K3bMpcDecoder : public K3bAudioDecoder
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/plugins/decoder/musepack/k3bmpcdecoder.plugin b/plugins/decoder/musepack/k3bmpcdecoder.plugin
index 6e350dc..4404add 100644
--- a/plugins/decoder/musepack/k3bmpcdecoder.plugin
+++ b/plugins/decoder/musepack/k3bmpcdecoder.plugin
@@ -1,9 +1,9 @@
[K3b Plugin]
-Lib=libk3bmpcdecoder
-Group=AudioDecoder
Name=K3b Musepack Decoder
+Comment=Decoding module to decode Musepack audio files
Author=Sebastian Trueg
Email=trueg@k3b.org
Version=1.0
-Comment=Decoding module to decode Musepack audio files
License=GPL
+Group=AudioDecoder
+Lib=libk3bmpcdecoder
diff --git a/plugins/decoder/ogg/CMakeLists.txt b/plugins/decoder/ogg/CMakeLists.txt
index d240d82..6b67679 100644
--- a/plugins/decoder/ogg/CMakeLists.txt
+++ b/plugins/decoder/ogg/CMakeLists.txt
@@ -41,6 +41,7 @@ tde_add_kpart( libk3boggvorbisdecoder AUTOMOC
##### other data ################################
-install( FILES k3boggvorbisdecoder.plugin
+tde_create_translated_desktop(
+ SOURCE k3boggvorbisdecoder.plugin
DESTINATION ${DATA_INSTALL_DIR}/k3b/plugins
)
diff --git a/plugins/decoder/ogg/Makefile.am b/plugins/decoder/ogg/Makefile.am
deleted file mode 100644
index e76fc5d..0000000
--- a/plugins/decoder/ogg/Makefile.am
+++ /dev/null
@@ -1,15 +0,0 @@
-AM_CPPFLAGS = -I$(srcdir)/../../../libk3b/plugin -I$(srcdir)/../../../libk3b/core -I$(srcdir)/../../../libk3bdevice $(all_includes)
-
-kde_module_LTLIBRARIES = libk3boggvorbisdecoder.la
-
-libk3boggvorbisdecoder_la_SOURCES = k3boggvorbisdecoder.cpp
-
-libk3boggvorbisdecoder_la_LIBADD = ../../../libk3b/libk3b.la -logg -lvorbis -lvorbisfile
-libk3boggvorbisdecoder_la_LIBADD = ../../../libk3b/libk3b.la ../../../libk3b/plugin/libk3bplugin.la ../../../libk3bdevice/libk3bdevice.la -logg -lvorbis -lvorbisfile $(LIB_TQT) $(LIB_TDECORE) $(LIB_TDEUI) $(LIB_TDEIO)
-
-libk3boggvorbisdecoder_la_LDFLAGS = -avoid-version -module -no-undefined $(all_libraries)
-
-pluginsdir = $(kde_datadir)/k3b/plugins
-plugins_DATA = k3boggvorbisdecoder.plugin
-
-METASOURCES = AUTO
diff --git a/plugins/decoder/ogg/configure.in.bot b/plugins/decoder/ogg/configure.in.bot
deleted file mode 100644
index b27ab18..0000000
--- a/plugins/decoder/ogg/configure.in.bot
+++ /dev/null
@@ -1,11 +0,0 @@
-echo ""
-
-if test x$ogg_vorbis = xyes; then
- echo "K3b - Ogg Vorbis support: yes"
-else
- echo "K3b - Ogg Vorbis support: no"
-if test "$ac_cv_use_oggvorbis" = "yes"; then
- echo "K3b - You are missing the Ogg-Vorbis headers and libraries."
- echo "K3b - The Ogg Vorbis decoding and encoding plugins won't be compiled."
-fi
-fi
diff --git a/plugins/decoder/ogg/configure.in.in b/plugins/decoder/ogg/configure.in.in
deleted file mode 100644
index 69b1b9c..0000000
--- a/plugins/decoder/ogg/configure.in.in
+++ /dev/null
@@ -1,32 +0,0 @@
-dnl === Ogg Vorbis Test - Begin ===
-AC_ARG_WITH(
- oggvorbis,
- AS_HELP_STRING([--without-oggvorbis], [build K3b without OggVorbis support (default=no)]),
- [ac_cv_use_oggvorbis=$withval],
- [ac_cv_use_oggvorbis=yes]
-)
-
-if test "$ac_cv_use_oggvorbis" = "yes"; then
-
- AC_MSG_CHECKING(for ogg/vorbis headers)
- ogg_vorbis=no
- AC_TRY_COMPILE([
- #include <vorbis/codec.h>
- #include <vorbis/vorbisfile.h>
- ],[
- ],[
- ogg_vorbis=yes
- ])
- AC_MSG_RESULT($ogg_vorbis)
- if test x$ogg_vorbis = xyes; then
- dnl we need the ogg_vorbis_lib because otherwise we override LIBS !
- AC_CHECK_LIB(vorbisfile,ov_open,ogg_vorbis_lib=yes,
- ogg_vorbis=no,[$all_libraries -lvorbisfile -lvorbis -logg])
- fi
- if test x$ogg_vorbis = xyes; then
- AC_DEFINE(OGG_VORBIS,1,[Define if you have ogg/vorbis installed])
- fi
-fi
-
-AM_CONDITIONAL(include_OGG, [test x$ogg_vorbis = xyes])
-dnl === Ogg Vorbis Test - End ===
diff --git a/plugins/decoder/ogg/k3boggvorbisdecoder.h b/plugins/decoder/ogg/k3boggvorbisdecoder.h
index 6f298bc..8a465e6 100644
--- a/plugins/decoder/ogg/k3boggvorbisdecoder.h
+++ b/plugins/decoder/ogg/k3boggvorbisdecoder.h
@@ -25,7 +25,7 @@ class KURL;
class K3bOggVorbisDecoderFactory : public K3bAudioDecoderFactory
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -46,7 +46,7 @@ class K3bOggVorbisDecoderFactory : public K3bAudioDecoderFactory
*/
class K3bOggVorbisDecoder : public K3bAudioDecoder
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/plugins/decoder/ogg/k3boggvorbisdecoder.plugin b/plugins/decoder/ogg/k3boggvorbisdecoder.plugin
index 0f1c48e..2da56d0 100644
--- a/plugins/decoder/ogg/k3boggvorbisdecoder.plugin
+++ b/plugins/decoder/ogg/k3boggvorbisdecoder.plugin
@@ -1,9 +1,9 @@
[K3b Plugin]
-Lib=libk3boggvorbisdecoder
-Group=AudioDecoder
Name=K3b Ogg Vorbis Decoder
+Comment=Decoding module to decode Ogg Vorbis files
Author=Sebastian Trueg
Email=trueg@k3b.org
Version=3.0
-Comment=Decoding module to decode Ogg Vorbis files
License=GPL
+Group=AudioDecoder
+Lib=libk3boggvorbisdecoder
diff --git a/plugins/decoder/skeleton.h b/plugins/decoder/skeleton.h
index 19602a6..64cef9d 100644
--- a/plugins/decoder/skeleton.h
+++ b/plugins/decoder/skeleton.h
@@ -21,7 +21,7 @@
class K3b<name>DecoderFactory : public K3bAudioDecoderFactory
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -39,7 +39,7 @@ class K3b<name>DecoderFactory : public K3bAudioDecoderFactory
class K3b<name>Decoder : public K3bAudioDecoder
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/plugins/decoder/skeleton.plugin b/plugins/decoder/skeleton.plugin
index c9bc0f4..dd3f1b8 100644
--- a/plugins/decoder/skeleton.plugin
+++ b/plugins/decoder/skeleton.plugin
@@ -1,9 +1,9 @@
[K3b Plugin]
-Lib=lib<name>decoder
-Group=AudioDecoder
Name=K3b ??? Decoder
+Comment=Decoding module to decode ??? files
Author=???
Email=???
Version=0.1
-Comment=Decoding module to decode ??? files
License=???
+Group=AudioDecoder
+Lib=lib<name>decoder
diff --git a/plugins/decoder/wave/CMakeLists.txt b/plugins/decoder/wave/CMakeLists.txt
index 570cf4e..917020e 100644
--- a/plugins/decoder/wave/CMakeLists.txt
+++ b/plugins/decoder/wave/CMakeLists.txt
@@ -36,6 +36,7 @@ tde_add_kpart( libk3bwavedecoder AUTOMOC
##### other data ################################
-install( FILES k3bwavedecoder.plugin
+tde_create_translated_desktop(
+ SOURCE k3bwavedecoder.plugin
DESTINATION ${DATA_INSTALL_DIR}/k3b/plugins
)
diff --git a/plugins/decoder/wave/Makefile.am b/plugins/decoder/wave/Makefile.am
deleted file mode 100644
index 61aa8d6..0000000
--- a/plugins/decoder/wave/Makefile.am
+++ /dev/null
@@ -1,13 +0,0 @@
-AM_CPPFLAGS = -I$(srcdir)/../../../libk3b/plugin -I$(srcdir)/../../../libk3b/core -I$(srcdir)/../../../libk3bdevice $(all_includes)
-
-kde_module_LTLIBRARIES = libk3bwavedecoder.la
-
-libk3bwavedecoder_la_SOURCES = k3bwavedecoder.cpp
-
-libk3bwavedecoder_la_LIBADD = $(LIB_TDECORE) $(LIB_TQT) ../../../libk3b/libk3b.la ../../../libk3bdevice/libk3bdevice.la
-libk3bwavedecoder_la_LDFLAGS = -avoid-version -module -no-undefined $(all_libraries)
-
-pluginsdir = $(kde_datadir)/k3b/plugins
-plugins_DATA = k3bwavedecoder.plugin
-
-METASOURCES = AUTO
diff --git a/plugins/decoder/wave/k3bwavedecoder.h b/plugins/decoder/wave/k3bwavedecoder.h
index 892425d..bdd0a8d 100644
--- a/plugins/decoder/wave/k3bwavedecoder.h
+++ b/plugins/decoder/wave/k3bwavedecoder.h
@@ -28,7 +28,7 @@ class TQFile;
class LIBK3B_EXPORT K3bWaveDecoderFactory : public K3bAudioDecoderFactory
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -46,7 +46,7 @@ class LIBK3B_EXPORT K3bWaveDecoderFactory : public K3bAudioDecoderFactory
class LIBK3B_EXPORT K3bWaveDecoder : public K3bAudioDecoder
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/plugins/decoder/wave/k3bwavedecoder.plugin b/plugins/decoder/wave/k3bwavedecoder.plugin
index 7b0a4f4..26cfc6e 100644
--- a/plugins/decoder/wave/k3bwavedecoder.plugin
+++ b/plugins/decoder/wave/k3bwavedecoder.plugin
@@ -1,9 +1,9 @@
[K3b Plugin]
-Lib=libk3bwavedecoder
-Group=AudioDecoder
Name=K3b Wave Decoder
+Comment=Decoding module to decode wave files
Author=Sebastian Trueg
Email=trueg@k3b.org
Version=3.0
-Comment=Decoding module to decode wave files
License=GPL
+Group=AudioDecoder
+Lib=libk3bwavedecoder
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..9b08dcd 100644
--- a/plugins/encoder/lame/k3blameencoder.cpp
+++ b/plugins/encoder/lame/k3blameencoder.cpp
@@ -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
diff --git a/plugins/project/Makefile.am b/plugins/project/Makefile.am
deleted file mode 100644
index d762841..0000000
--- a/plugins/project/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-SUBDIRS = audioprojectcddb audiometainforenamer
diff --git a/plugins/project/audiometainforenamer/CMakeLists.txt b/plugins/project/audiometainforenamer/CMakeLists.txt
index 55566c0..afba9e3 100644
--- a/plugins/project/audiometainforenamer/CMakeLists.txt
+++ b/plugins/project/audiometainforenamer/CMakeLists.txt
@@ -39,6 +39,7 @@ tde_add_kpart( libk3baudiometainforenamerplugin AUTOMOC
##### other data ################################
-install( FILES k3baudiometainforenamerplugin.plugin
+tde_create_translated_desktop(
+ SOURCE k3baudiometainforenamerplugin.plugin
DESTINATION ${DATA_INSTALL_DIR}/k3b/plugins
)
diff --git a/plugins/project/audiometainforenamer/Makefile.am b/plugins/project/audiometainforenamer/Makefile.am
deleted file mode 100644
index 79d37bc..0000000
--- a/plugins/project/audiometainforenamer/Makefile.am
+++ /dev/null
@@ -1,19 +0,0 @@
-AM_CPPFLAGS = -I$(srcdir)/../../../libk3b/core \
- -I$(srcdir)/../../../libk3b/core \
- -I$(srcdir)/../../../libk3b/plugin \
- -I$(srcdir)/../../../libk3b/tools \
- -I$(srcdir)/../../../libk3b/projects \
- -I$(srcdir)/../../../libk3b/projects/datacd \
- -I$(srcdir)/../../../libk3bdevice \
- $(all_includes)
-
-kde_module_LTLIBRARIES = libk3baudiometainforenamerplugin.la
-
-libk3baudiometainforenamerplugin_la_SOURCES = k3baudiometainforenamerplugin.cpp
-libk3baudiometainforenamerplugin_la_LIBADD = ../../../libk3b/libk3b.la
-libk3baudiometainforenamerplugin_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) $(LIB_TQT) -ltdeio -ltdecore -ltdeui -L../../../libk3bdevice/.libs -lk3bdevice
-
-pluginsdir = $(kde_datadir)/k3b/plugins
-plugins_DATA = k3baudiometainforenamerplugin.plugin
-
-METASOURCES = AUTO
diff --git a/plugins/project/audiometainforenamer/k3baudiometainforenamerplugin.cpp b/plugins/project/audiometainforenamer/k3baudiometainforenamerplugin.cpp
index aa708d2..d4f4334 100644
--- a/plugins/project/audiometainforenamer/k3baudiometainforenamerplugin.cpp
+++ b/plugins/project/audiometainforenamer/k3baudiometainforenamerplugin.cpp
@@ -83,7 +83,7 @@ K3bAudioMetainfoRenamerPluginWidget::K3bAudioMetainfoRenamerPluginWidget( K3bDoc
// d->progressDialog = 0;
// pattern group
- TQGroupBox* patternGroup = new TQGroupBox( 2, Qt::Horizontal,
+ TQGroupBox* patternGroup = new TQGroupBox( 2, TQt::Horizontal,
i18n("Rename Pattern"), this );
patternGroup->setInsideMargin( KDialog::marginHint() );
patternGroup->setInsideSpacing( KDialog::spacingHint() );
@@ -94,7 +94,7 @@ K3bAudioMetainfoRenamerPluginWidget::K3bAudioMetainfoRenamerPluginWidget( K3bDoc
d->scanButton = new TQPushButton( i18n("Scan"), patternGroup );
// the files view
- TQGroupBox* filesGroup = new TQGroupBox( 1, Qt::Horizontal,
+ TQGroupBox* filesGroup = new TQGroupBox( 1, TQt::Horizontal,
i18n("Found Files"), this );
filesGroup->setInsideMargin( KDialog::marginHint() );
filesGroup->setInsideSpacing( KDialog::spacingHint() );
@@ -112,7 +112,7 @@ K3bAudioMetainfoRenamerPluginWidget::K3bAudioMetainfoRenamerPluginWidget( K3bDoc
box->addWidget( patternGroup );
box->addWidget( filesGroup );
- connect( d->scanButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotScanClicked()) );
+ connect( d->scanButton, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotScanClicked()) );
TQToolTip::add( d->scanButton, i18n("Scan for renamable files") );
TQWhatsThis::add( d->comboPattern, i18n("<qt>This specifies how the files should be renamed. "
@@ -215,7 +215,7 @@ void K3bAudioMetainfoRenamerPluginWidget::scanDir( K3bDirItem* dir, TQListViewIt
TQCheckListItem::CheckBox );
fileViewItem->setText(1, item->k3bName() );
fileViewItem->setOn(true);
- d->renamableItems.append( tqMakePair( (K3bFileItem*)item, fileViewItem ) );
+ d->renamableItems.append( qMakePair( (K3bFileItem*)item, fileViewItem ) );
}
}
diff --git a/plugins/project/audiometainforenamer/k3baudiometainforenamerplugin.h b/plugins/project/audiometainforenamer/k3baudiometainforenamerplugin.h
index 649e40f..69aeacd 100644
--- a/plugins/project/audiometainforenamer/k3baudiometainforenamerplugin.h
+++ b/plugins/project/audiometainforenamer/k3baudiometainforenamerplugin.h
@@ -29,7 +29,7 @@ class TQListViewItem;
class K3bAudioMetainfoRenamerPluginWidget : public TQWidget, public K3bProjectPluginGUIBase
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -62,7 +62,7 @@ class K3bAudioMetainfoRenamerPluginWidget : public TQWidget, public K3bProjectPl
class K3bAudioMetainfoRenamerPlugin : public K3bProjectPlugin
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/plugins/project/audiometainforenamer/k3baudiometainforenamerplugin.plugin b/plugins/project/audiometainforenamer/k3baudiometainforenamerplugin.plugin
index 42c24d8..1d032f0 100644
--- a/plugins/project/audiometainforenamer/k3baudiometainforenamerplugin.plugin
+++ b/plugins/project/audiometainforenamer/k3baudiometainforenamerplugin.plugin
@@ -1,9 +1,9 @@
[K3b Plugin]
-Lib=libk3baudiometainforenamerplugin
-Group=ProjectPlugin
Name=K3b Audio Metainfo Renamer
+Comment=Plugin to rename audio files in a data project based on the meta info.
Author=Sebastian Trueg
Email=trueg@k3b.org
Version=1.0
-Comment=Plugin to rename audio files in a data project based on the meta info.
License=GPL
+Group=ProjectPlugin
+Lib=libk3baudiometainforenamerplugin
diff --git a/plugins/project/audioprojectcddb/CMakeLists.txt b/plugins/project/audioprojectcddb/CMakeLists.txt
index fae15a0..bd254de 100644
--- a/plugins/project/audioprojectcddb/CMakeLists.txt
+++ b/plugins/project/audioprojectcddb/CMakeLists.txt
@@ -40,6 +40,7 @@ tde_add_kpart( libk3baudioprojectcddbplugin AUTOMOC
##### other data ################################
-install( FILES k3baudioprojectcddbplugin.plugin
+tde_create_translated_desktop(
+ SOURCE k3baudioprojectcddbplugin.plugin
DESTINATION ${DATA_INSTALL_DIR}/k3b/plugins
)
diff --git a/plugins/project/audioprojectcddb/Makefile.am b/plugins/project/audioprojectcddb/Makefile.am
deleted file mode 100644
index 3578ec0..0000000
--- a/plugins/project/audioprojectcddb/Makefile.am
+++ /dev/null
@@ -1,22 +0,0 @@
-AM_CPPFLAGS = -I$(srcdir)/../../../libk3b/core \
- -I$(srcdir)/../../../libk3b/tools \
- -I$(srcdir)/../../../libk3b/core \
- -I$(srcdir)/../../../libk3b/projects/audiocd \
- -I$(srcdir)/../../../libk3b/projects \
- -I$(srcdir)/../../../libk3bdevice \
- -I$(srcdir)/../../../libk3b/cddb \
- -I$(srcdir)/../../../libk3b/plugin \
- $(all_includes)
-
-kde_module_LTLIBRARIES = libk3baudioprojectcddbplugin.la
-
-libk3baudioprojectcddbplugin_la_SOURCES = k3baudioprojectcddbplugin.cpp
-
-libk3baudioprojectcddbplugin_la_LIBADD = ../../../libk3b/libk3b.la
-
-libk3baudioprojectcddbplugin_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) $(LIB_TQT) -ltdeio -ltdecore -ltdeui -L../../../libk3bdevice/.libs -lk3bdevice
-
-pluginsdir = $(kde_datadir)/k3b/plugins
-plugins_DATA = k3baudioprojectcddbplugin.plugin
-
-METASOURCES = AUTO
diff --git a/plugins/project/audioprojectcddb/k3baudioprojectcddbplugin.cpp b/plugins/project/audioprojectcddb/k3baudioprojectcddbplugin.cpp
index 21b620a..7d254f8 100644
--- a/plugins/project/audioprojectcddb/k3baudioprojectcddbplugin.cpp
+++ b/plugins/project/audioprojectcddb/k3baudioprojectcddbplugin.cpp
@@ -73,13 +73,13 @@ void K3bAudioProjectCddbPlugin::activate( K3bDoc* doc, TQWidget* parent )
else {
if( !m_cddb ) {
m_cddb = new K3bCddb( this );
- connect( m_cddb, TQT_SIGNAL(queryFinished(int)),
- this, TQT_SLOT(slotCddbQueryFinished(int)) );
+ connect( m_cddb, TQ_SIGNAL(queryFinished(int)),
+ this, TQ_SLOT(slotCddbQueryFinished(int)) );
}
if( !m_progress ) {
m_progress = new K3bProgressDialog( i18n("Query Cddb"), parent, i18n("Audio Project") );
- connect( m_progress, TQT_SIGNAL(cancelClicked()),
- this, TQT_SLOT(slotCancelClicked()) );
+ connect( m_progress, TQ_SIGNAL(cancelClicked()),
+ this, TQ_SLOT(slotCancelClicked()) );
}
// read the k3b config :)
diff --git a/plugins/project/audioprojectcddb/k3baudioprojectcddbplugin.h b/plugins/project/audioprojectcddb/k3baudioprojectcddbplugin.h
index 6a9470f..d0d5c63 100644
--- a/plugins/project/audioprojectcddb/k3baudioprojectcddbplugin.h
+++ b/plugins/project/audioprojectcddb/k3baudioprojectcddbplugin.h
@@ -26,7 +26,7 @@ class TQWidget;
class K3bAudioProjectCddbPlugin : public K3bProjectPlugin
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/plugins/project/audioprojectcddb/k3baudioprojectcddbplugin.plugin b/plugins/project/audioprojectcddb/k3baudioprojectcddbplugin.plugin
index 8fbea0f..2a8eb81 100644
--- a/plugins/project/audioprojectcddb/k3baudioprojectcddbplugin.plugin
+++ b/plugins/project/audioprojectcddb/k3baudioprojectcddbplugin.plugin
@@ -1,9 +1,9 @@
[K3b Plugin]
-Lib=libk3baudioprojectcddbplugin
-Group=ProjectPlugin
Name=K3b Cddb Audio Plugin
+Comment=Plugin to query a cddb server for information about an audio project.
Author=Sebastian Trueg
Email=trueg@k3b.org
Version=0.1
-Comment=Plugin to query a cddb server for information about an audio project.
License=GPL
+Group=ProjectPlugin
+Lib=libk3baudioprojectcddbplugin