tracker r2379 - in trunk: . src/tracker-extract
- From: pvanhoof svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r2379 - in trunk: . src/tracker-extract
- Date: Fri, 17 Oct 2008 09:25:06 +0000 (UTC)
Author: pvanhoof
Date: Fri Oct 17 09:25:06 2008
New Revision: 2379
URL: http://svn.gnome.org/viewvc/tracker?rev=2379&view=rev
Log:
2008-10-17 Philip Van Hoof <philip codeminded be>
* src/tracker-extract/tracker-albumart.c
* src/tracker-extract/tracker-extract-mp3.c
* src/tracker-extract/Makefile.am
* src/tracker-extract/tracker-extract-gstreamer.c: Handling of albumart
in case we don't have GDKPIXBUF (don't handle embedded albumart, for
this we would need a pixbuf lib to save the RAW data as a JPEG).
Modified:
trunk/ChangeLog
trunk/src/tracker-extract/Makefile.am
trunk/src/tracker-extract/tracker-albumart.c
trunk/src/tracker-extract/tracker-extract-gstreamer.c
trunk/src/tracker-extract/tracker-extract-mp3.c
Modified: trunk/src/tracker-extract/Makefile.am
==============================================================================
--- trunk/src/tracker-extract/Makefile.am (original)
+++ trunk/src/tracker-extract/Makefile.am Fri Oct 17 09:25:06 2008
@@ -73,15 +73,14 @@
tracker-xmp.h
# Common AlbumArt sources
-albumart_sources =
+
albumart_libs =
albumart_flags =
-
-if HAVE_GDKPIXBUF
-albumart_sources += \
+albumart_sources = \
tracker-albumart.c \
tracker-albumart.h
+if HAVE_GDKPIXBUF
albumart_flags += $(DBUS_CFLAGS)
albumart_libs += \
$(GDKPIXBUF_LIBS) $(DBUS_LIBS)
Modified: trunk/src/tracker-extract/tracker-albumart.c
==============================================================================
--- trunk/src/tracker-extract/tracker-albumart.c (original)
+++ trunk/src/tracker-extract/tracker-albumart.c Fri Oct 17 09:25:06 2008
@@ -25,7 +25,10 @@
#include <gio/gio.h>
+#ifdef HAVE_GDKPIXBUF
#include <gdk-pixbuf/gdk-pixbuf.h>
+#endif
+
#include <dbus/dbus-glib-bindings.h>
#define ALBUMARTER_SERVICE "com.nokia.albumart"
@@ -129,6 +132,8 @@
g_free (dir);
}
+#ifdef HAVE_GDKPIXBUF
+
static gboolean
tracker_save_albumart (const unsigned char *buffer,
size_t len,
@@ -186,6 +191,7 @@
return TRUE;
}
+#endif
gboolean
tracker_process_albumart (const unsigned char *buffer,
@@ -201,24 +207,33 @@
if (!g_file_test (art_path, G_FILE_TEST_EXISTS)) {
+#ifdef HAVE_GDKPIXBUF
+
if (buffer && len) {
retval = tracker_save_albumart (buffer, len,
artist,
album,
filename);
- } else if (!tracker_heuristic_albumart (artist, album, filename)) {
+ } else {
+#endif
+ if (!tracker_heuristic_albumart (artist, album, filename)) {
+
+ dbus_g_proxy_begin_call (tracker_dbus_get_albumart_requester (),
+ "Queue",
+ get_file_albumart_queue_cb,
+ NULL, NULL,
+ G_TYPE_STRING, artist,
+ G_TYPE_STRING, album,
+ G_TYPE_STRING, "album",
+ G_TYPE_UINT, 0,
+ G_TYPE_INVALID);
+ }
+#ifdef HAVE_GDKPIXBUF
- dbus_g_proxy_begin_call (tracker_dbus_get_albumart_requester (),
- "Queue",
- get_file_albumart_queue_cb,
- NULL, NULL,
- G_TYPE_STRING, artist,
- G_TYPE_STRING, album,
- G_TYPE_STRING, "album",
- G_TYPE_UINT, 0,
- G_TYPE_INVALID);
}
+
+#endif
}
g_free (art_path);
Modified: trunk/src/tracker-extract/tracker-extract-gstreamer.c
==============================================================================
--- trunk/src/tracker-extract/tracker-extract-gstreamer.c (original)
+++ trunk/src/tracker-extract/tracker-extract-gstreamer.c Fri Oct 17 09:25:06 2008
@@ -63,10 +63,7 @@
#include <gst/tag/tag.h>
#include "tracker-extract.h"
-
-#ifdef HAVE_GDKPIXBUF
#include "tracker-albumart.h"
-#endif /* HAVE_GDKPIXBUF */
typedef enum {
EXTRACT_MIME_UNDEFINED=0,
@@ -863,6 +860,12 @@
g_hash_table_lookup (metadata, "Audio:Artist") ,
g_hash_table_lookup (metadata, "Audio:Album"),
uri);
+#else
+ tracker_process_albumart (NULL, 0,
+ g_hash_table_lookup (metadata, "Audio:Artist") ,
+ g_hash_table_lookup (metadata, "Audio:Album"),
+ uri);
+
#endif /* HAVE_GDKPIXBUF */
}
Modified: trunk/src/tracker-extract/tracker-extract-mp3.c
==============================================================================
--- trunk/src/tracker-extract/tracker-extract-mp3.c (original)
+++ trunk/src/tracker-extract/tracker-extract-mp3.c Fri Oct 17 09:25:06 2008
@@ -40,10 +40,7 @@
#endif /* G_OS_WIN32 */
#include "tracker-extract.h"
-
-#ifdef HAVE_GDKPIXBUF
#include "tracker-albumart.h"
-#endif /* HAVE_GDKPIXBUF */
#define MAX_FILE_READ 1024 * 1024 * 10
#define MAX_MP3_SCAN_DEEP 16768
@@ -1183,6 +1180,11 @@
g_hash_table_lookup (metadata, "Audio:Artist"),
g_hash_table_lookup (metadata, "Audio:Album"),
filename);
+#else
+ tracker_process_albumart (NULL, 0,
+ g_hash_table_lookup (metadata, "Audio:Artist"),
+ g_hash_table_lookup (metadata, "Audio:Album"),
+ filename);
#endif /* HAVE_GDKPIXBUF */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]