summaryrefslogtreecommitdiffstats
path: root/plugins/decoder
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/decoder')
-rw-r--r--plugins/decoder/ffmpeg/k3bffmpegdecoder.h4
-rw-r--r--plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp9
-rw-r--r--plugins/decoder/flac/CMakeLists.txt4
-rw-r--r--plugins/decoder/flac/k3bflacdecoder.cpp11
-rw-r--r--plugins/decoder/flac/k3bflacdecoder.h4
-rw-r--r--plugins/decoder/libsndfile/CMakeLists.txt1
-rw-r--r--plugins/decoder/libsndfile/k3blibsndfiledecoder.cpp2
-rw-r--r--plugins/decoder/libsndfile/k3blibsndfiledecoder.h4
-rw-r--r--plugins/decoder/mp3/CMakeLists.txt4
-rw-r--r--plugins/decoder/mp3/k3bmaddecoder.cpp7
-rw-r--r--plugins/decoder/mp3/k3bmaddecoder.h4
-rw-r--r--plugins/decoder/musepack/k3bmpcdecoder.h4
-rw-r--r--plugins/decoder/ogg/k3boggvorbisdecoder.h4
-rw-r--r--plugins/decoder/skeleton.h4
-rw-r--r--plugins/decoder/wave/k3bwavedecoder.h4
15 files changed, 43 insertions, 27 deletions
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/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; }
diff --git a/plugins/decoder/flac/CMakeLists.txt b/plugins/decoder/flac/CMakeLists.txt
index 20e4256..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,7 +36,7 @@ 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}
)
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/libsndfile/CMakeLists.txt b/plugins/decoder/libsndfile/CMakeLists.txt
index 7f8c947..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(
diff --git a/plugins/decoder/libsndfile/k3blibsndfiledecoder.cpp b/plugins/decoder/libsndfile/k3blibsndfiledecoder.cpp
index ad094a6..6e00aa1 100644
--- a/plugins/decoder/libsndfile/k3blibsndfiledecoder.cpp
+++ b/plugins/decoder/libsndfile/k3blibsndfiledecoder.cpp
@@ -26,7 +26,7 @@
#include <kurl.h>
#include <kdebug.h>
#include <tdelocale.h>
-#include <kinstance.h>
+#include <tdeinstance.h>
#include <math.h>
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/mp3/CMakeLists.txt b/plugins/decoder/mp3/CMakeLists.txt
index 4b180f5..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,7 +33,7 @@ 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}
)
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/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/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/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/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: