Re: [Easytag-mailing] Bugfix, changed signature of MP4GetMetadataCoverArt() in libmp4v2-1.6.1



On Nov 22, 2007 9:00 PM, Jérôme COUDERC <easytag gmail com> wrote:
>  Thanks again for this new patch to enable compilation with the last
> version of mpeg4ip 1.6.1.
> But also, I need a solution to be compatible with the previous version.

Hi Jéròme,

I remember I had promised something like that. I wrote a little
configure check, but maybe some autoconf guru can improve it.

Regards, Götz


-- 
AL I:40: Do what thou wilt shall be the whole of the Law.
--- easytag-2.1.3/src/mp4_tag.c~	2007-06-14 17:52:38.000000000 -0400
+++ easytag-2.1.3/src/mp4_tag.c	2007-11-22 16:14:17.731161567 -0500
@@ -185,7 +185,11 @@
      * Picture *
      ***********/
     // There is only one picture!
+#ifdef NEWMP4
+    if ( MP4GetMetadataCoverArt( mp4file, &coverArt, &coverSize,0 ) )
+#else
     if ( MP4GetMetadataCoverArt( mp4file, &coverArt, &coverSize ) )
+#endif
     {
         Picture *pic = Picture_Allocate();
         pic->size = coverSize;
--- easytag-2.1.3/configure.in~	2007-10-07 04:00:55.000000000 -0400
+++ easytag-2.1.3/configure.in	2007-11-22 16:20:43.407312078 -0500
@@ -313,8 +313,14 @@
 if test "x$enable_mp4" = "xyes"; then
     dnl Librairies required for mp4 files, if not found 'enable_mp4' is disabled
     AC_CHECK_LIB(m, cos)
-    dnl AC_CHECK_LIB(mp4v2, MP4Read, , mp4_available=no)
-    AC_CHECK_LIB(mp4v2, MP4GetTrackMediaDataName, , mp4_available=no)
+    AC_CHECK_LIB(mp4v2, MP4GetTrackMediaDataName,[
+     AC_COMPILE_IFELSE([
+       #include <mp4.h>
+       main () {
+       MP4FileHandle hFile;
+       MP4GetMetadataCoverArt(hFile, NULL, NULL,0); }
+], AC_DEFINE(NEWMP4,1,[Define for MP4 lib with multiple image support]),)
+     ], mp4_available=no)
 fi
 
 AC_MSG_CHECKING(for MP4/AAC file support)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]