[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdemultimedia/kioslave/audiocd
From:       Benjamin Meyer <ben () meyerhome ! net>
Date:       2005-08-22 10:57:37
Message-ID: 1124708257.982080.25772.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 451971 by bmeyer:

Fix HAVE_FLAC and compile issues

Bug: 110944


 M  +46 -0     configure.in.in  
 M  +4 -4      plugins/flac/encoderflac.cpp  


--- trunk/KDE/kdemultimedia/kioslave/audiocd/configure.in.in #451970:451971
@@ -0,0 +1,46 @@
+AC_DEFUN([AC_CHECK_LIBFLAC],
+[
+  AC_LANG_SAVE
+  AC_LANG_C
+  have_libFLAC=no
+  KDE_CHECK_HEADER(FLAC/metadata.h,
+  [
+     KDE_CHECK_LIB(FLAC,FLAC__seekable_stream_decoder_process_single,
+	          have_libFLAC=yes)
+
+    ])
+  if test "x$have_libFLAC" = "xyes"; then
+      LIBFLAC="-lFLAC"
+      AC_DEFINE(HAVE_LIBFLAC, 1,
+        [Define if you have libFLAC (required for loading FLAC files)])
+  fi
+  AC_SUBST(LIBFLAC)
+  AC_LANG_RESTORE
+])
+
+AC_DEFUN([AC_CHECK_LIBOGGFLAC],
+[
+  AC_LANG_SAVE
+  AC_LANG_C
+  have_libOggFLAC=no
+  KDE_CHECK_HEADER(OggFLAC/seekable_stream_decoder.h,
+  [
+     KDE_CHECK_LIB(OggFLAC,OggFLAC__seekable_stream_decoder_process_single,
+	          have_libOggFLAC=yes,,[-lm -lOggFLAC -lFLAC])
+
+    ])
+  if test "x$have_libOggFLAC" = "xyes"; then
+      LIBOGGFLAC="-lOggFLAC"
+      AC_DEFINE(HAVE_LIBOGGFLAC, 1,
+        [Define if you have libOggFLAC (required for loading OggFLAC files)])
+  fi
+  AC_SUBST(LIBOGGFLAC)
+  AC_LANG_RESTORE
+])
+
+AC_ARG_WITH(flac,AC_HELP_STRING([--with-flac],[Enable FLAC support \
@<:@default=check@:>@]),[flac_test="$withval"],[flac_test="yes"]) +
+if test "x$flac_test" = "xyes" ; then
+  AC_CHECK_LIBFLAC
+  AC_CHECK_LIBOGGFLAC
+fi
--- trunk/KDE/kdemultimedia/kioslave/audiocd/plugins/flac/encoderflac.cpp \
#451970:451971 @@ -153,14 +153,14 @@
     return 0;
 }
 
-void EncoderLame::fillSongInfo( KCDDB::CDInfo info, int track, const QString \
&comment ) +void EncoderFLAC::fillSongInfo( KCDDB::CDInfo info, int track, const \
QString &comment )  {
     d->metadata = new FLAC__StreamMetadata*[1];
     d->metadata[0] = FLAC__metadata_object_new(FLAC__METADATA_TYPE_VORBIS_COMMENT);
 //    d->metadata[1] = FLAC__metadata_object_new(FLAC__METADATA_TYPE_PADDING);
 //    d->metadata[2] = FLAC__metadata_object_new(FLAC__METADATA_TYPE_SEEKTABLE)
 
-    typedef QPair<QString, QVarient> Comment;
+    typedef QPair<QString, QVariant> Comment;
     Comment comments[7] = { Comment("Title", \
info.trackInfoList[track].get("title")),  Comment("Artist", info.get("artist")),
 	    	    	    Comment("Album",  info.get("title")),
@@ -168,8 +168,8 @@
 	    	    	    Comment("Tracknumber", QString::number(track)),
 	                    Comment("Comment", comment),
 	    	    	    Comment("Date", QString::null )};
-    if (cdYear > 0) {
-    	QDateTime dt = QDate(info.year, 1, 1);
+    if (info.get("Year").toInt() > 0) {
+    	QDateTime dt = QDate(info.get("Year").toInt(), 1, 1);
     	comments[6] = Comment("Date", dt.toString(Qt::ISODate));
     }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic