summaryrefslogtreecommitdiffstats
path: root/plugins/decoder/flac
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/decoder/flac')
-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
7 files changed, 16 insertions, 79 deletions
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