Revision: 2114
http://gtkpod.svn.sourceforge.net/gtkpod/?rev=2114&view=rev
Author: jcsjcs
Date: 2008-09-07 02:15:30 +0000 (Sun, 07 Sep 2008)
Log Message:
-----------
* configure.in
src/mp4file.c: Check whether MP4 AlbumArtist functions are
available (fixes compilation error with older versions of
libmp4v2).
Modified Paths:
--------------
gtkpod/trunk/ChangeLog
gtkpod/trunk/configure.in
gtkpod/trunk/src/mp4file.c
Modified: gtkpod/trunk/ChangeLog
===================================================================
--- gtkpod/trunk/ChangeLog 2008-08-31 02:02:16 UTC (rev 2113)
+++ gtkpod/trunk/ChangeLog 2008-09-07 02:15:30 UTC (rev 2114)
@@ -1,3 +1,10 @@
+2008-09-07 Jorg Schuler <jcsjcs at users.sourceforge.net>
+
+ * configure.in
+ src/mp4file.c: Check whether MP4 AlbumArtist functions are
+ available (fixes compilation error with older versions of
+ libmp4v2).
+
2008-08-31 Jorg Schuler <jcsjcs at users.sourceforge.net>
* src/mp3file.c: Handle Artist and AlbumArtist fields differently:
Modified: gtkpod/trunk/configure.in
===================================================================
--- gtkpod/trunk/configure.in 2008-08-31 02:02:16 UTC (rev 2113)
+++ gtkpod/trunk/configure.in 2008-09-07 02:15:30 UTC (rev 2114)
@@ -125,7 +125,7 @@
have_gnome_vfs="*no -- will build without iPod autodetection support"
fi
-#dnl Check for HAL
+dnl Check for HAL
AC_ARG_WITH(hal, AC_HELP_STRING([--without-hal],[Disable HAL support]))
if test "x$with_hal" != "xno"; then
PKG_CHECK_MODULES(HAL, hal >= 0.5 hal < 0.6, have_hal=yes, have_hal=no)
@@ -154,28 +154,41 @@
have_mp4v2="no"
AC_MSG_WARN([mp4.h cannot be found or is unusable. Check your mp4v2
installation.])
else
- AC_TRY_COMPILE( [#include <mp4.h> ],
- [bool TestMP4GetMetadataFreeForm(MP4FileHandle hFile, const char *name,
- u_int8_t** pValue, u_int32_t* valueSize, const char *owner)
- {
- MP4GetMetadataFreeForm(hFile, name,pValue, valueSize, owner);
- } ], freeform_accepts_extra_arg=yes)
- AC_TRY_COMPILE( [#include <mp4.h>],
- [bool TestMP4GetMetadataCoverArt(MP4FileHandle hFile,
- u_int8_t **coverArt, u_int32_t* size, uint32_t index)
- {
- MP4GetMetadataCoverArt(hFile, coverArt, size, index);
- }], coverart_accepts_extra_arg=yes)
+dnl Check if MP4GetMetadataFreeForm() requires an extra argument
+ AC_TRY_COMPILE( [#include <mp4.h> ],
+ [bool TestMP4GetMetadataFreeForm(MP4FileHandle hFile, const char
*name,
+ u_int8_t** pValue, u_int32_t* valueSize, const char *owner)
+ {
+ MP4GetMetadataFreeForm(hFile, name,pValue, valueSize,
owner);
+ } ], freeform_accepts_extra_arg=yes)
+ if test "x$freeform_accepts_extra_arg" = "xyes"; then
+ AC_DEFINE(FREEFORM_ACCEPTS_EXTRA_ARG, 1,[libmp4v2 probably version
1.6 or higher:
+ MP4GetMetadataFreeForm accepts extra argument])
+ fi
+dnl Check if MP4GetMetadataCoverArt() requires an extra argument
+ AC_TRY_COMPILE( [#include <mp4.h>],
+ [bool TestMP4GetMetadataCoverArt(MP4FileHandle hFile,
+ u_int8_t **coverArt, u_int32_t* size, uint32_t index)
+ {
+ MP4GetMetadataCoverArt(hFile, coverArt, size, index);
+ }], coverart_accepts_extra_arg=yes)
- if test "x$freeform_accepts_extra_arg" = "xyes"; then
- AC_DEFINE(FREEFORM_ACCEPTS_EXTRA_ARG, 1,[libmp4v2 probably version 1.6
or higher:
- MP4GetMetadataFreeForm accepts extra argument])
+ if test "x$coverart_accepts_extra_arg" = "xyes"; then
+ AC_DEFINE(COVERART_ACCEPTS_EXTRA_ARG, 1,[libmp4v2 probably version
1.6 or higher:
+ MP4GetMetadataCoverArt accepts an extra argument] )
+ fi
+dnl Check if MP4SetMetadataAlbumArtist() exists
+ AC_TRY_COMPILE( [#include <mp4.h>],
+ [bool TestMP4SetMetadataAlbumArtist(MP4FileHandle hFile,
+ const char* value)
+ {
+ MP4SetMetadataAlbumArtist(hFile, value);
+ }], mp4_albumartist_exists=yes)
+ if test "x$mp4_albumartist_exists" = "xyes"; then
+ AC_DEFINE(MP4_ALBUMARTIST_EXISTS, 1,[libmp4v2 probably version 1.6
or higher:
+ MP4SetMetadataAlbumArtist exists] )
+ fi
fi
- if test "x$coverart_accepts_extra_arg" = "xyes"; then
- AC_DEFINE(COVERART_ACCEPTS_EXTRA_ARG, 1,[libmp4v2 probably version 1.6
or higher:
- MP4GetMetadataCoverArt accepts an extra argument] )
- fi
- fi
if test "x$with_mp4v2" = "xyes" -a "x$have_mp4v2" = "xno"; then
AC_MSG_ERROR([MP4/AAC support explicitly requested but libmp4v2
couldn't be found])
fi
Modified: gtkpod/trunk/src/mp4file.c
===================================================================
--- gtkpod/trunk/src/mp4file.c 2008-08-31 02:02:16 UTC (rev 2113)
+++ gtkpod/trunk/src/mp4file.c 2008-09-07 02:15:30 UTC (rev 2114)
@@ -1,4 +1,4 @@
-/* Time-stamp: <2008-08-31 11:00:33 jcs>
+/* Time-stamp: <2008-09-07 11:16:18 jcs>
|
| Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
| Part of the gtkpod project.
@@ -375,6 +375,7 @@
track->artist = charset_to_utf8 (value);
g_free(value);
}
+#if MP4_ALBUMARTIST_EXISTS
if (!track->artist || !*track->artist)
{
g_free (track->artist);
@@ -391,6 +392,9 @@
track->albumartist = charset_to_utf8 (value);
}
}
+#else
+#warning "Album Artist field not supported with this version of libmp4v2.
Album Artist support requires at least V1.6.0"
+#endif
if (MP4GetMetadataWriter(mp4File, &value) && value != NULL)
{
track->composer = charset_to_utf8 (value);
@@ -541,10 +545,11 @@
MP4SetMetadataArtist (mp4File, value);
g_free (value);
+#if MP4_ALBUMARTIST_EXISTS
value = charset_from_utf8 (track->albumartist);
MP4SetMetadataAlbumArtist (mp4File, value);
g_free (value);
-
+#endif
value = charset_from_utf8 (track->composer);
MP4SetMetadataWriter (mp4File, value);
g_free (value);
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2