summaryrefslogtreecommitdiffstats
path: root/plugins/decoder/ffmpeg
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/decoder/ffmpeg')
-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.cpp9
7 files changed, 16 insertions, 114 deletions
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 983c808..3e34c5c 100644
--- a/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
+++ b/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
@@ -217,8 +217,13 @@ bool K3bFFMpegFile::open() {
#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
+ 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);
@@ -255,7 +260,11 @@ int K3bFFMpegFile::sampleRate() const {
}
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; }