Update to (meta-)tracker-1.2.2.
This commit is contained in:
parent
c6ba77c25f
commit
d815108fc8
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.175 2014/09/02 15:36:27 ajacoutot Exp $
|
||||
# $OpenBSD: Makefile,v 1.176 2014/10/06 08:28:26 ajacoutot Exp $
|
||||
|
||||
EVO_VERSION= 3.12
|
||||
SUBST_VARS += EVO_VERSION
|
||||
@ -8,7 +8,7 @@ SHARED_ONLY= Yes
|
||||
COMMENT= powerful desktop search tool and indexer
|
||||
|
||||
GNOME_PROJECT= tracker
|
||||
GNOME_VERSION= 1.0.4
|
||||
GNOME_VERSION= 1.2.2
|
||||
|
||||
# there is already audio/tracker, so this port has to live
|
||||
# as meta-tracker.
|
||||
@ -21,15 +21,15 @@ PKGNAME= meta-tracker-${VERSION}
|
||||
# x11/gnome/online-miners
|
||||
# x11/gnome/photos
|
||||
# x11/gnome/rygel
|
||||
TRACKER_VERSION= ${GNOME_VERSION:C/^([0-9]+\.[0-9]+).*/\1/}
|
||||
TRACKER_VERSION= 1.0
|
||||
SUBST_VARS= TRACKER_VERSION
|
||||
|
||||
SHARED_LIBS += tracker-common 3.0 # unknown
|
||||
SHARED_LIBS += tracker-control-1.0 0.0 # 0.0
|
||||
SHARED_LIBS += tracker-data 3.0 # unknown
|
||||
SHARED_LIBS += tracker-sparql-1.0 0.0 # 0.0
|
||||
SHARED_LIBS += tracker-sparql-1.0 0.0 # 202.0
|
||||
SHARED_LIBS += tracker-extract 0.0 # unknown
|
||||
SHARED_LIBS += tracker-miner-1.0 0.0 # 0.0
|
||||
SHARED_LIBS += tracker-miner-1.0 0.0 # 202.0
|
||||
SHARED_LIBS += tracker-control-1.0 0.0 # 202.0
|
||||
|
||||
# GPLv2+
|
||||
PERMIT_PACKAGE_CDROM= Yes
|
||||
@ -86,10 +86,6 @@ MODPY_RUNDEP= No
|
||||
MODPY_ADJ_FILES= tests/tracker-writeback/01-writeback.py \
|
||||
utils/data-generators/cc/generate
|
||||
|
||||
# XXX libmediaart >=0.6.0; remove at next major upgrade
|
||||
CONFIGURE_STYLE= autoconf
|
||||
AUTOCONF_VERSION= 2.69
|
||||
|
||||
CONFIGURE_ARGS= --disable-miner-thunderbird \
|
||||
--disable-miner-firefox \
|
||||
--disable-network-manager
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (gnome/tracker-1.0.4.tar.xz) = zZ0Ouy8JtYGz2mB67Klux3C6FUjJj1Qdw0KLyUX/mIY=
|
||||
SIZE (gnome/tracker-1.0.4.tar.xz) = 6169216
|
||||
SHA256 (gnome/tracker-1.2.2.tar.xz) = sv6ei+vvNV2+F3EdvZW5ZDhxeqc3eH5oPVgI+dnfwig=
|
||||
SIZE (gnome/tracker-1.2.2.tar.xz) = 6118900
|
||||
|
@ -1,43 +0,0 @@
|
||||
$OpenBSD: patch-configure_ac,v 1.5 2014/08/22 12:39:41 ajacoutot Exp $
|
||||
|
||||
From a41cef78eb6d5c0a4728f08b4d4bd8f0a8f6ddfb Mon Sep 17 00:00:00 2001
|
||||
From: Martyn Russell <martyn@lanedo.com>
|
||||
Date: Mon, 28 Jul 2014 18:23:57 +0200
|
||||
Subject: tracker-extract: Depend on libmediaart 0.5.0 when enabled
|
||||
|
||||
--- configure.ac.orig Fri Aug 22 13:25:23 2014
|
||||
+++ configure.ac Fri Aug 22 14:04:18 2014
|
||||
@@ -231,7 +231,7 @@ NETWORK_MANAGER_REQUIRED=0.8
|
||||
GSTREAMER_REQUIRED=0.10.31
|
||||
GUPNP_DLNA_REQUIRED=0.9.4
|
||||
LIBPNG_REQUIRED=0.89
|
||||
-LIBMEDIAART_REQUIRED=0.1.0
|
||||
+LIBMEDIAART_REQUIRED=0.5.0
|
||||
|
||||
# 3.6.11 for sqlite_backup API
|
||||
# 3.6.16 to fix test failures
|
||||
@@ -1073,9 +1073,15 @@ if test "x$enable_libmediaart" != "xno" ; then
|
||||
LIBTRACKER_MINER_CFLAGS="$LIBTRACKER_MINER_CFLAGS $LIBMEDIAART_CFLAGS"
|
||||
LIBTRACKER_MINER_LIBS="$LIBTRACKER_MINER_LIBS $LIBMEDIAART_LIBS"
|
||||
|
||||
+ LIBTRACKER_EXTRACT_CFLAGS="$LIBTRACKER_EXTRACT_CFLAGS $LIBMEDIAART_CFLAGS"
|
||||
+ LIBTRACKER_EXTRACT_LIBS="$LIBTRACKER_EXTRACT_LIBS $LIBMEDIAART_LIBS"
|
||||
+
|
||||
TRACKER_EXTRACT_CFLAGS="$TRACKER_EXTRACT_CFLAGS $LIBMEDIAART_CFLAGS"
|
||||
TRACKER_EXTRACT_LIBS="$TRACKER_EXTRACT_LIBS $LIBMEDIAART_LIBS"
|
||||
|
||||
+ TRACKER_MINER_FS_CFLAGS="$TRACKER_MINER_FS_CFLAGS $LIBMEDIAART_CFLAGS"
|
||||
+ TRACKER_MINER_FS_LIBS="$TRACKER_MINER_FS_LIBS $LIBMEDIAART_LIBS"
|
||||
+
|
||||
# Used for .pc file...
|
||||
LIBTRACKER_MINER_PC_REQUIRES="libmediaart-1.0"
|
||||
AC_SUBST(LIBTRACKER_MINER_PC_REQUIRES)
|
||||
@@ -1762,7 +1768,7 @@ PKG_CHECK_MODULES(AVCODEC,
|
||||
AC_SUBST(AVCODEC_CFLAGS)
|
||||
AC_SUBST(AVCODEC_LIBS)
|
||||
|
||||
-PKG_CHECK_MODULES(AVCODEC,
|
||||
+PKG_CHECK_MODULES(AVUTIL,
|
||||
[libavutil >= 0.8.4],
|
||||
[have_libavutil=yes],
|
||||
[have_libavutil=no])
|
@ -1,90 +0,0 @@
|
||||
$OpenBSD: patch-src_libtracker-extract_tracker-extract-info_c,v 1.1 2014/08/20 07:39:32 ajacoutot Exp $
|
||||
|
||||
From a41cef78eb6d5c0a4728f08b4d4bd8f0a8f6ddfb Mon Sep 17 00:00:00 2001
|
||||
From: Martyn Russell <martyn@lanedo.com>
|
||||
Date: Mon, 28 Jul 2014 18:23:57 +0200
|
||||
Subject: tracker-extract: Depend on libmediaart 0.5.0 when enabled
|
||||
|
||||
--- src/libtracker-extract/tracker-extract-info.c.orig Mon Feb 24 15:39:06 2014
|
||||
+++ src/libtracker-extract/tracker-extract-info.c Wed Aug 20 08:49:29 2014
|
||||
@@ -19,6 +19,8 @@
|
||||
* Author: Carlos Garnacho <carlos@lanedo.com>
|
||||
*/
|
||||
|
||||
+#include "config.h"
|
||||
+
|
||||
#include "tracker-extract-info.h"
|
||||
|
||||
/**
|
||||
@@ -46,6 +48,10 @@ struct _TrackerExtractInfo
|
||||
gchar *mimetype;
|
||||
gchar *graph;
|
||||
|
||||
+#ifdef HAVE_LIBMEDIAART
|
||||
+ MediaArtProcess *media_art_process;
|
||||
+#endif
|
||||
+
|
||||
gint ref_count;
|
||||
};
|
||||
|
||||
@@ -84,6 +90,10 @@ tracker_extract_info_new (GFile *file,
|
||||
|
||||
info->where_clause = NULL;
|
||||
|
||||
+#ifdef HAVE_LIBMEDIAART
|
||||
+ info->media_art_process = NULL;
|
||||
+#endif
|
||||
+
|
||||
info->ref_count = 1;
|
||||
|
||||
return info;
|
||||
@@ -294,3 +304,49 @@ tracker_extract_info_set_where_clause (TrackerExtractI
|
||||
g_free (info->where_clause);
|
||||
info->where_clause = g_strdup (where);
|
||||
}
|
||||
+
|
||||
+#ifdef HAVE_LIBMEDIAART
|
||||
+
|
||||
+/**
|
||||
+ * tracker_extract_info_get_media_art_process:
|
||||
+ * @info: a #TrackerExtractInfo
|
||||
+ *
|
||||
+ * Returns the #MediaArtProcess object that can be used to retrieve
|
||||
+ * and store media art caches found in extracted content.
|
||||
+ *
|
||||
+ * Returns: (transfer none): The #MediaArtProcess. This object should
|
||||
+ * not be unreferenced.
|
||||
+ *
|
||||
+ * Since: 1.2
|
||||
+ **/
|
||||
+MediaArtProcess *
|
||||
+tracker_extract_info_get_media_art_process (TrackerExtractInfo *info)
|
||||
+{
|
||||
+ g_return_if_fail (info != NULL);
|
||||
+ return info->media_art_process;
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
+ * tracker_extract_info_set_media_art_process:
|
||||
+ * @info: a #TrackerExtractInfo
|
||||
+ * @media_art_process: a #MediaArtProcess.
|
||||
+ *
|
||||
+ * Use @media_art_process for caching and looking up media art.
|
||||
+ *
|
||||
+ * Since: 1.2
|
||||
+ **/
|
||||
+void
|
||||
+tracker_extract_info_set_media_art_process (TrackerExtractInfo *info,
|
||||
+ MediaArtProcess *media_art_process)
|
||||
+{
|
||||
+ g_return_if_fail (info != NULL);
|
||||
+ g_return_if_fail (MEDIA_ART_IS_PROCESS (media_art_process));
|
||||
+
|
||||
+ if (info->media_art_process) {
|
||||
+ g_object_unref (info->media_art_process);
|
||||
+ }
|
||||
+
|
||||
+ info->media_art_process = g_object_ref (media_art_process);
|
||||
+}
|
||||
+
|
||||
+#endif /* HAVE_LIBMEDIAART */
|
@ -1,35 +0,0 @@
|
||||
$OpenBSD: patch-src_libtracker-extract_tracker-extract-info_h,v 1.1 2014/08/20 07:39:32 ajacoutot Exp $
|
||||
|
||||
From a41cef78eb6d5c0a4728f08b4d4bd8f0a8f6ddfb Mon Sep 17 00:00:00 2001
|
||||
From: Martyn Russell <martyn@lanedo.com>
|
||||
Date: Mon, 28 Jul 2014 18:23:57 +0200
|
||||
Subject: tracker-extract: Depend on libmediaart 0.5.0 when enabled
|
||||
|
||||
--- src/libtracker-extract/tracker-extract-info.h.orig Mon Feb 24 15:39:06 2014
|
||||
+++ src/libtracker-extract/tracker-extract-info.h Wed Aug 20 08:49:29 2014
|
||||
@@ -29,6 +29,10 @@
|
||||
#include <libtracker-sparql/tracker-sparql.h>
|
||||
#include <gio/gio.h>
|
||||
|
||||
+#ifdef HAVE_LIBMEDIAART
|
||||
+#include <libmediaart/mediaart.h>
|
||||
+#endif
|
||||
+
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _TrackerExtractInfo TrackerExtractInfo;
|
||||
@@ -49,6 +53,14 @@ TrackerSparqlBuilder *tracker_extract_info_get_metadat
|
||||
const gchar * tracker_extract_info_get_where_clause (TrackerExtractInfo *info);
|
||||
void tracker_extract_info_set_where_clause (TrackerExtractInfo *info,
|
||||
const gchar *where);
|
||||
+
|
||||
+#ifdef HAVE_LIBMEDIAART
|
||||
+
|
||||
+MediaArtProcess * tracker_extract_info_get_media_art_process (TrackerExtractInfo *info);
|
||||
+void tracker_extract_info_set_media_art_process (TrackerExtractInfo *info,
|
||||
+ MediaArtProcess *media_art_process);
|
||||
+
|
||||
+#endif /* HAVE_LIBMEDIAART */
|
||||
|
||||
G_END_DECLS
|
||||
|
@ -1,143 +0,0 @@
|
||||
$OpenBSD: patch-src_tracker-extract_tracker-extract-gstreamer_c,v 1.2 2014/08/22 12:39:41 ajacoutot Exp $
|
||||
|
||||
From a41cef78eb6d5c0a4728f08b4d4bd8f0a8f6ddfb Mon Sep 17 00:00:00 2001
|
||||
From: Martyn Russell <martyn@lanedo.com>
|
||||
Date: Mon, 28 Jul 2014 18:23:57 +0200
|
||||
Subject: tracker-extract: Depend on libmediaart 0.5.0 when enabled
|
||||
|
||||
--- src/tracker-extract/tracker-extract-gstreamer.c.orig Fri Aug 22 12:55:37 2014
|
||||
+++ src/tracker-extract/tracker-extract-gstreamer.c Fri Aug 22 14:26:58 2014
|
||||
@@ -1558,18 +1558,27 @@ discoverer_init_and_run (MetadataExtractor *extractor,
|
||||
|
||||
static void
|
||||
tracker_extract_gstreamer (const gchar *uri,
|
||||
- TrackerSparqlBuilder *preupdate,
|
||||
- TrackerSparqlBuilder *postupdate,
|
||||
- TrackerSparqlBuilder *metadata,
|
||||
+ TrackerExtractInfo *info,
|
||||
ExtractMime type,
|
||||
const gchar *graph)
|
||||
{
|
||||
+ TrackerSparqlBuilder *metadata, *preupdate, *postupdate;
|
||||
MetadataExtractor *extractor;
|
||||
GstBuffer *buffer;
|
||||
gchar *cue_sheet;
|
||||
gboolean success;
|
||||
|
||||
+#ifdef HAVE_LIBMEDIAART
|
||||
+ MediaArtProcess *media_art_process;
|
||||
+#endif
|
||||
+
|
||||
g_return_if_fail (uri);
|
||||
+
|
||||
+ graph = tracker_extract_info_get_graph (info);
|
||||
+ metadata = tracker_extract_info_get_metadata_builder (info);
|
||||
+ preupdate = tracker_extract_info_get_preupdate_builder (info);
|
||||
+ postupdate = tracker_extract_info_get_postupdate_builder (info);
|
||||
+
|
||||
g_return_if_fail (metadata);
|
||||
|
||||
gst_init (NULL, NULL);
|
||||
@@ -1579,6 +1588,7 @@ tracker_extract_gstreamer (const gchar *uri,
|
||||
extractor->tagcache = gst_tag_list_new_empty ();
|
||||
|
||||
#ifdef HAVE_LIBMEDIAART
|
||||
+ media_art_process = tracker_extract_info_get_media_art_process (info);
|
||||
extractor->media_art_type = MEDIA_ART_NONE;
|
||||
#endif
|
||||
|
||||
@@ -1608,13 +1618,36 @@ tracker_extract_gstreamer (const gchar *uri,
|
||||
|
||||
#ifdef HAVE_LIBMEDIAART
|
||||
if (extractor->media_art_type != MEDIA_ART_NONE) {
|
||||
- media_art_process (extractor->media_art_buffer,
|
||||
- extractor->media_art_buffer_size,
|
||||
- extractor->media_art_buffer_mime,
|
||||
- extractor->media_art_type,
|
||||
- extractor->media_art_artist,
|
||||
- extractor->media_art_title,
|
||||
- uri);
|
||||
+ GError *error = NULL;
|
||||
+ gboolean success = TRUE;
|
||||
+
|
||||
+ if (extractor->media_art_buffer) {
|
||||
+ success = media_art_process_buffer (media_art_process,
|
||||
+ extractor->media_art_type,
|
||||
+ MEDIA_ART_PROCESS_FLAGS_NONE,
|
||||
+ tracker_extract_info_get_file (info),
|
||||
+ extractor->media_art_buffer,
|
||||
+ extractor->media_art_buffer_size,
|
||||
+ extractor->media_art_buffer_mime,
|
||||
+ extractor->media_art_artist,
|
||||
+ extractor->media_art_title,
|
||||
+ &error);
|
||||
+ } else {
|
||||
+ success = media_art_process_file (media_art_process,
|
||||
+ extractor->media_art_type,
|
||||
+ MEDIA_ART_PROCESS_FLAGS_NONE,
|
||||
+ tracker_extract_info_get_file (info),
|
||||
+ extractor->media_art_artist,
|
||||
+ extractor->media_art_title,
|
||||
+ &error);
|
||||
+ }
|
||||
+
|
||||
+ if (!success || error) {
|
||||
+ g_warning ("Could not process media art for '%s', %s",
|
||||
+ uri,
|
||||
+ error ? error->message : "No error given");
|
||||
+ g_clear_error (&error);
|
||||
+ }
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -1646,41 +1679,36 @@ tracker_extract_gstreamer (const gchar *uri,
|
||||
G_MODULE_EXPORT gboolean
|
||||
tracker_extract_get_metadata (TrackerExtractInfo *info)
|
||||
{
|
||||
- TrackerSparqlBuilder *metadata, *preupdate, *postupdate;
|
||||
- const gchar *mimetype;
|
||||
GFile *file;
|
||||
gchar *uri;
|
||||
const gchar *graph;
|
||||
+ const gchar *mimetype;
|
||||
|
||||
+ file = tracker_extract_info_get_file (info);
|
||||
+ uri = g_file_get_uri (file);
|
||||
graph = tracker_extract_info_get_graph (info);
|
||||
- metadata = tracker_extract_info_get_metadata_builder (info);
|
||||
- preupdate = tracker_extract_info_get_preupdate_builder (info);
|
||||
- postupdate = tracker_extract_info_get_postupdate_builder (info);
|
||||
mimetype = tracker_extract_info_get_mimetype (info);
|
||||
|
||||
- file = tracker_extract_info_get_file (info);
|
||||
- uri = g_file_get_uri (file);
|
||||
-
|
||||
#if defined(GSTREAMER_BACKEND_GUPNP_DLNA)
|
||||
if (g_str_has_prefix (mimetype, "dlna/")) {
|
||||
- tracker_extract_gstreamer (uri, preupdate, postupdate, metadata, EXTRACT_MIME_GUESS, graph);
|
||||
+ tracker_extract_gstreamer (uri, info, EXTRACT_MIME_GUESS, graph);
|
||||
} else
|
||||
#endif /* GSTREAMER_BACKEND_GUPNP_DLNA */
|
||||
|
||||
if (strcmp (mimetype, "image/svg+xml") == 0) {
|
||||
- tracker_extract_gstreamer (uri, preupdate, postupdate, metadata, EXTRACT_MIME_SVG, graph);
|
||||
+ tracker_extract_gstreamer (uri, info, EXTRACT_MIME_SVG, graph);
|
||||
} else if (strcmp (mimetype, "video/3gpp") == 0 ||
|
||||
strcmp (mimetype, "video/mp4") == 0 ||
|
||||
strcmp (mimetype, "video/x-ms-asf") == 0 ||
|
||||
strcmp (mimetype, "application/vnd.ms-asf") == 0 ||
|
||||
strcmp (mimetype, "application/vnd.rn-realmedia") == 0) {
|
||||
- tracker_extract_gstreamer (uri, preupdate, postupdate, metadata, EXTRACT_MIME_GUESS, graph);
|
||||
+ tracker_extract_gstreamer (uri, info, EXTRACT_MIME_GUESS, graph);
|
||||
} else if (g_str_has_prefix (mimetype, "audio/")) {
|
||||
- tracker_extract_gstreamer (uri, preupdate, postupdate, metadata, EXTRACT_MIME_AUDIO, graph);
|
||||
+ tracker_extract_gstreamer (uri, info, EXTRACT_MIME_AUDIO, graph);
|
||||
} else if (g_str_has_prefix (mimetype, "video/")) {
|
||||
- tracker_extract_gstreamer (uri, preupdate, postupdate, metadata, EXTRACT_MIME_VIDEO, graph);
|
||||
+ tracker_extract_gstreamer (uri, info, EXTRACT_MIME_VIDEO, graph);
|
||||
} else if (g_str_has_prefix (mimetype, "image/")) {
|
||||
- tracker_extract_gstreamer (uri, preupdate, postupdate, metadata, EXTRACT_MIME_IMAGE, graph);
|
||||
+ tracker_extract_gstreamer (uri, info, EXTRACT_MIME_IMAGE, graph);
|
||||
} else {
|
||||
g_free (uri);
|
||||
return FALSE;
|
@ -1,44 +0,0 @@
|
||||
$OpenBSD: patch-src_tracker-extract_tracker-extract-libav_c,v 1.1 2014/08/20 07:39:32 ajacoutot Exp $
|
||||
|
||||
From a41cef78eb6d5c0a4728f08b4d4bd8f0a8f6ddfb Mon Sep 17 00:00:00 2001
|
||||
From: Martyn Russell <martyn@lanedo.com>
|
||||
Date: Mon, 28 Jul 2014 18:23:57 +0200
|
||||
Subject: tracker-extract: Depend on libmediaart 0.5.0 when enabled
|
||||
|
||||
--- src/tracker-extract/tracker-extract-libav.c.orig Thu Jul 10 15:14:44 2014
|
||||
+++ src/tracker-extract/tracker-extract-libav.c Wed Aug 20 08:49:29 2014
|
||||
@@ -330,13 +330,27 @@ tracker_extract_get_metadata (TrackerExtractInfo *info
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBMEDIAART
|
||||
- media_art_process (NULL,
|
||||
- 0,
|
||||
- NULL,
|
||||
- MEDIA_ART_ALBUM,
|
||||
- album_artist,
|
||||
- album_title,
|
||||
- uri);
|
||||
+ if (album_artist || album_title) {
|
||||
+ MediaArtProcess *media_art_process;
|
||||
+ GError *error = NULL;
|
||||
+ gboolean success;
|
||||
+
|
||||
+ media_art_process = tracker_extract_info_get_media_art_process (info);
|
||||
+ success = media_art_process_file (media_art_process,
|
||||
+ MEDIA_ART_ALBUM,
|
||||
+ MEDIA_ART_PROCESS_FLAGS_NONE,
|
||||
+ file,
|
||||
+ album_artist,
|
||||
+ album_title,
|
||||
+ &error);
|
||||
+
|
||||
+ if (!success || error) {
|
||||
+ g_warning ("Could not process media art for '%s', %s",
|
||||
+ uri,
|
||||
+ error ? error->message : "No error given");
|
||||
+ g_clear_error (&error);
|
||||
+ }
|
||||
+ }
|
||||
#endif
|
||||
|
||||
g_free(performer_uri);
|
@ -1,58 +0,0 @@
|
||||
$OpenBSD: patch-src_tracker-extract_tracker-extract-mp3_c,v 1.18 2014/08/22 12:39:41 ajacoutot Exp $
|
||||
|
||||
From a41cef78eb6d5c0a4728f08b4d4bd8f0a8f6ddfb Mon Sep 17 00:00:00 2001
|
||||
From: Martyn Russell <martyn@lanedo.com>
|
||||
Date: Mon, 28 Jul 2014 18:23:57 +0200
|
||||
Subject: tracker-extract: Depend on libmediaart 0.5.0 when enabled
|
||||
|
||||
--- src/tracker-extract/tracker-extract-mp3.c.orig Fri Aug 22 12:55:37 2014
|
||||
+++ src/tracker-extract/tracker-extract-mp3.c Fri Aug 22 14:04:18 2014
|
||||
@@ -2647,13 +2647,41 @@ tracker_extract_get_metadata (TrackerExtractInfo *info
|
||||
mp3_parse (buffer, buffer_size, audio_offset, uri, metadata, &md);
|
||||
|
||||
#ifdef HAVE_LIBMEDIAART
|
||||
- media_art_process (md.media_art_data,
|
||||
- md.media_art_size,
|
||||
- md.media_art_mime,
|
||||
- MEDIA_ART_ALBUM,
|
||||
- md.performer,
|
||||
- md.album,
|
||||
- uri);
|
||||
+ if (md.performer || md.title) {
|
||||
+ MediaArtProcess *media_art_process;
|
||||
+ GError *error = NULL;
|
||||
+ gboolean success = TRUE;
|
||||
+
|
||||
+ media_art_process = tracker_extract_info_get_media_art_process (info);
|
||||
+
|
||||
+ if (md.media_art_data) {
|
||||
+ success = media_art_process_buffer (media_art_process,
|
||||
+ MEDIA_ART_ALBUM,
|
||||
+ MEDIA_ART_PROCESS_FLAGS_NONE,
|
||||
+ file,
|
||||
+ md.media_art_data,
|
||||
+ md.media_art_size,
|
||||
+ md.media_art_mime,
|
||||
+ md.performer,
|
||||
+ md.title,
|
||||
+ &error);
|
||||
+ } else {
|
||||
+ success = media_art_process_file (media_art_process,
|
||||
+ MEDIA_ART_ALBUM,
|
||||
+ MEDIA_ART_PROCESS_FLAGS_NONE,
|
||||
+ file,
|
||||
+ md.performer,
|
||||
+ md.title,
|
||||
+ &error);
|
||||
+ }
|
||||
+
|
||||
+ if (!success || error) {
|
||||
+ g_warning ("Could not process media art for '%s', %s",
|
||||
+ uri,
|
||||
+ error ? error->message : "No error given");
|
||||
+ g_clear_error (&error);
|
||||
+ }
|
||||
+ }
|
||||
#endif
|
||||
g_free (md.media_art_data);
|
||||
g_free (md.media_art_mime);
|
@ -1,51 +0,0 @@
|
||||
$OpenBSD: patch-src_tracker-extract_tracker-extract-vorbis_c,v 1.1 2014/08/20 07:39:32 ajacoutot Exp $
|
||||
|
||||
From a41cef78eb6d5c0a4728f08b4d4bd8f0a8f6ddfb Mon Sep 17 00:00:00 2001
|
||||
From: Martyn Russell <martyn@lanedo.com>
|
||||
Date: Mon, 28 Jul 2014 18:23:57 +0200
|
||||
Subject: tracker-extract: Depend on libmediaart 0.5.0 when enabled
|
||||
|
||||
--- src/tracker-extract/tracker-extract-vorbis.c.orig Wed May 28 10:47:09 2014
|
||||
+++ src/tracker-extract/tracker-extract-vorbis.c Wed Aug 20 08:49:29 2014
|
||||
@@ -514,16 +514,31 @@ tracker_extract_get_metadata (TrackerExtractInfo *info
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBMEDIAART
|
||||
- {
|
||||
- gchar *uri = g_file_get_uri (file);
|
||||
- media_art_process (NULL,
|
||||
- 0,
|
||||
- NULL,
|
||||
- MEDIA_ART_ALBUM,
|
||||
- vd.album_artist ? vd.album_artist : vd.artist,
|
||||
- vd.album,
|
||||
- uri);
|
||||
- g_free (uri);
|
||||
+ if ((vd.album_artist || vd.artist) || vd.album) {
|
||||
+ MediaArtProcess *media_art_process;
|
||||
+ GError *error = NULL;
|
||||
+ gboolean success;
|
||||
+
|
||||
+ media_art_process = tracker_extract_info_get_media_art_process (info);
|
||||
+
|
||||
+ success = media_art_process_file (media_art_process,
|
||||
+ MEDIA_ART_ALBUM,
|
||||
+ MEDIA_ART_PROCESS_FLAGS_NONE,
|
||||
+ file,
|
||||
+ vd.album_artist ? vd.album_artist : vd.artist,
|
||||
+ vd.album,
|
||||
+ &error);
|
||||
+
|
||||
+ if (!success || error) {
|
||||
+ gchar *uri;
|
||||
+
|
||||
+ uri = g_file_get_uri (file);
|
||||
+ g_warning ("Could not process media art for '%s', %s",
|
||||
+ uri,
|
||||
+ error ? error->message : "No error given");
|
||||
+ g_free (uri);
|
||||
+ g_clear_error (&error);
|
||||
+ }
|
||||
}
|
||||
#endif
|
||||
|
@ -1,85 +0,0 @@
|
||||
$OpenBSD: patch-src_tracker-extract_tracker-extract_c,v 1.1 2014/08/20 07:39:32 ajacoutot Exp $
|
||||
|
||||
From a41cef78eb6d5c0a4728f08b4d4bd8f0a8f6ddfb Mon Sep 17 00:00:00 2001
|
||||
From: Martyn Russell <martyn@lanedo.com>
|
||||
Date: Mon, 28 Jul 2014 18:23:57 +0200
|
||||
Subject: tracker-extract: Depend on libmediaart 0.5.0 when enabled
|
||||
|
||||
--- src/tracker-extract/tracker-extract.c.orig Wed May 28 10:47:09 2014
|
||||
+++ src/tracker-extract/tracker-extract.c Wed Aug 20 08:49:29 2014
|
||||
@@ -73,6 +73,10 @@ typedef struct {
|
||||
gchar *force_module;
|
||||
|
||||
gint unhandled_count;
|
||||
+
|
||||
+#ifdef HAVE_LIBMEDIAART
|
||||
+ MediaArtProcess *media_art_process;
|
||||
+#endif
|
||||
} TrackerExtractPrivate;
|
||||
|
||||
typedef struct {
|
||||
@@ -131,6 +135,17 @@ tracker_extract_init (TrackerExtract *object)
|
||||
priv->thread_pool = g_thread_pool_new ((GFunc) get_metadata,
|
||||
NULL, 10, TRUE, NULL);
|
||||
|
||||
+#ifdef HAVE_LIBMEDIAART
|
||||
+ GError *error = NULL;
|
||||
+
|
||||
+ priv->media_art_process = media_art_process_new (&error);
|
||||
+ if (!priv->media_art_process || error) {
|
||||
+ g_warning ("Could not initialize media art, %s",
|
||||
+ error ? error->message : _("No error given"));
|
||||
+ g_error_free (error);
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
g_mutex_init (&priv->task_mutex);
|
||||
}
|
||||
|
||||
@@ -152,6 +167,12 @@ tracker_extract_finalize (GObject *object)
|
||||
|
||||
g_hash_table_destroy (priv->statistics_data);
|
||||
|
||||
+#ifdef HAVE_LIBMEDIAART
|
||||
+ if (priv->media_art_process) {
|
||||
+ g_object_unref (priv->media_art_process);
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
g_mutex_clear (&priv->task_mutex);
|
||||
|
||||
G_OBJECT_CLASS (tracker_extract_parent_class)->finalize (object);
|
||||
@@ -280,6 +301,10 @@ get_file_metadata (TrackerExtractTask *task,
|
||||
info = tracker_extract_info_new (file, task->mimetype, task->graph);
|
||||
g_object_unref (file);
|
||||
|
||||
+#ifdef HAVE_LIBMEDIAART
|
||||
+ tracker_extract_info_set_media_art_process (info, tracker_extract_get_media_art_process (task->extract));
|
||||
+#endif
|
||||
+
|
||||
if (task->mimetype && *task->mimetype) {
|
||||
/* We know the mime */
|
||||
mime_used = g_strdup (task->mimetype);
|
||||
@@ -719,6 +744,22 @@ tracker_extract_file (TrackerExtract *extract,
|
||||
/* Task takes a ref and if this fails, we want to unref anyway */
|
||||
g_object_unref (res);
|
||||
}
|
||||
+
|
||||
+#ifdef HAVE_LIBMEDIAART
|
||||
+
|
||||
+MediaArtProcess *
|
||||
+tracker_extract_get_media_art_process (TrackerExtract *extract)
|
||||
+{
|
||||
+ TrackerExtractPrivate *priv;
|
||||
+
|
||||
+ g_return_val_if_fail (TRACKER_IS_EXTRACT (extract), NULL);
|
||||
+
|
||||
+ priv = TRACKER_EXTRACT_GET_PRIVATE (extract);
|
||||
+
|
||||
+ return priv->media_art_process;
|
||||
+}
|
||||
+
|
||||
+#endif
|
||||
|
||||
void
|
||||
tracker_extract_get_metadata_by_cmdline (TrackerExtract *object,
|
@ -1,21 +0,0 @@
|
||||
$OpenBSD: patch-src_tracker-extract_tracker-extract_h,v 1.1 2014/08/20 07:39:32 ajacoutot Exp $
|
||||
|
||||
From a41cef78eb6d5c0a4728f08b4d4bd8f0a8f6ddfb Mon Sep 17 00:00:00 2001
|
||||
From: Martyn Russell <martyn@lanedo.com>
|
||||
Date: Mon, 28 Jul 2014 18:23:57 +0200
|
||||
Subject: tracker-extract: Depend on libmediaart 0.5.0 when enabled
|
||||
|
||||
--- src/tracker-extract/tracker-extract.h.orig Wed May 28 10:47:09 2014
|
||||
+++ src/tracker-extract/tracker-extract.h Wed Aug 20 08:49:29 2014
|
||||
@@ -60,6 +60,11 @@ void tracker_extract_file
|
||||
GAsyncReadyCallback cb,
|
||||
gpointer user_data);
|
||||
|
||||
+#ifdef HAVE_LIBMEDIAART
|
||||
+MediaArtProcess *
|
||||
+ tracker_extract_get_media_art_process (TrackerExtract *extract);
|
||||
+#endif
|
||||
+
|
||||
void tracker_extract_dbus_start (TrackerExtract *extract);
|
||||
void tracker_extract_dbus_stop (TrackerExtract *extract);
|
||||
|
@ -1,65 +0,0 @@
|
||||
$OpenBSD: patch-src_tracker-extract_tracker-main_c,v 1.2 2014/08/22 12:39:41 ajacoutot Exp $
|
||||
|
||||
From a41cef78eb6d5c0a4728f08b4d4bd8f0a8f6ddfb Mon Sep 17 00:00:00 2001
|
||||
From: Martyn Russell <martyn@lanedo.com>
|
||||
Date: Mon, 28 Jul 2014 18:23:57 +0200
|
||||
Subject: tracker-extract: Depend on libmediaart 0.5.0 when enabled
|
||||
|
||||
--- src/tracker-extract/tracker-main.c.orig Fri Aug 22 12:55:37 2014
|
||||
+++ src/tracker-extract/tracker-main.c Fri Aug 22 14:04:18 2014
|
||||
@@ -262,12 +262,6 @@ run_standalone (TrackerConfig *config)
|
||||
|
||||
tracker_locale_init ();
|
||||
|
||||
-#ifdef HAVE_LIBMEDIAART
|
||||
- if (!media_art_init ()) {
|
||||
- g_warning ("Could not initialize media art, will not be available");
|
||||
- }
|
||||
-#endif
|
||||
-
|
||||
/* This makes sure we don't steal all the system's resources */
|
||||
initialize_priority_and_scheduling (tracker_config_get_sched_idle (config),
|
||||
tracker_db_manager_get_first_index_done () == FALSE);
|
||||
@@ -280,9 +274,6 @@ run_standalone (TrackerConfig *config)
|
||||
if (!object) {
|
||||
g_object_unref (file);
|
||||
g_free (uri);
|
||||
-#ifdef HAVE_LIBMEDIAART
|
||||
- media_art_shutdown ();
|
||||
-#endif
|
||||
tracker_locale_shutdown ();
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
@@ -295,9 +286,6 @@ run_standalone (TrackerConfig *config)
|
||||
g_object_unref (file);
|
||||
g_free (uri);
|
||||
|
||||
-#ifdef HAVE_LIBMEDIAART
|
||||
- media_art_shutdown ();
|
||||
-#endif
|
||||
tracker_locale_shutdown ();
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
@@ -404,12 +392,6 @@ main (int argc, char *argv[])
|
||||
|
||||
tracker_locale_init ();
|
||||
|
||||
-#ifdef HAVE_LIBMEDIAART
|
||||
- if (!media_art_init ()) {
|
||||
- g_warning ("Could not initialize media art, will not be available");
|
||||
- }
|
||||
-#endif
|
||||
-
|
||||
controller = tracker_extract_controller_new (decorator);
|
||||
tracker_miner_start (TRACKER_MINER (decorator));
|
||||
|
||||
@@ -424,9 +406,6 @@ main (int argc, char *argv[])
|
||||
tracker_miner_stop (TRACKER_MINER (decorator));
|
||||
|
||||
/* Shutdown subsystems */
|
||||
-#ifdef HAVE_LIBMEDIAART
|
||||
- media_art_shutdown ();
|
||||
-#endif
|
||||
tracker_locale_shutdown ();
|
||||
|
||||
g_object_unref (extract);
|
@ -1,4 +1,4 @@
|
||||
@comment $OpenBSD: PLIST,v 1.32 2014/09/02 15:36:27 ajacoutot Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.33 2014/10/06 08:28:26 ajacoutot Exp $
|
||||
@conflict evolution-meta-tracker-*
|
||||
@conflict nautilus-meta-tracker-*
|
||||
@pkgpath x11/gnome/tracker,-evolution
|
||||
@ -17,8 +17,10 @@ include/tracker-${TRACKER_VERSION}/libtracker-control/
|
||||
include/tracker-${TRACKER_VERSION}/libtracker-control/tracker-control.h
|
||||
include/tracker-${TRACKER_VERSION}/libtracker-control/tracker-miner-manager.h
|
||||
include/tracker-${TRACKER_VERSION}/libtracker-miner/
|
||||
include/tracker-${TRACKER_VERSION}/libtracker-miner/tracker-data-provider.h
|
||||
include/tracker-${TRACKER_VERSION}/libtracker-miner/tracker-decorator-fs.h
|
||||
include/tracker-${TRACKER_VERSION}/libtracker-miner/tracker-decorator.h
|
||||
include/tracker-${TRACKER_VERSION}/libtracker-miner/tracker-enumerator.h
|
||||
include/tracker-${TRACKER_VERSION}/libtracker-miner/tracker-indexing-tree.h
|
||||
include/tracker-${TRACKER_VERSION}/libtracker-miner/tracker-miner-common.h
|
||||
include/tracker-${TRACKER_VERSION}/libtracker-miner/tracker-miner-enum-types.h
|
||||
@ -49,6 +51,8 @@ lib/pkgconfig/tracker-sparql-${TRACKER_VERSION}.pc
|
||||
lib/tracker-${TRACKER_VERSION}/
|
||||
lib/tracker-${TRACKER_VERSION}/extract-modules/
|
||||
lib/tracker-${TRACKER_VERSION}/extract-modules/libextract-abw.so
|
||||
lib/tracker-${TRACKER_VERSION}/extract-modules/libextract-bmp.so
|
||||
lib/tracker-${TRACKER_VERSION}/extract-modules/libextract-dummy.so
|
||||
lib/tracker-${TRACKER_VERSION}/extract-modules/libextract-dvi.so
|
||||
lib/tracker-${TRACKER_VERSION}/extract-modules/libextract-epub.so
|
||||
lib/tracker-${TRACKER_VERSION}/extract-modules/libextract-gif.so
|
||||
@ -81,7 +85,9 @@ lib/tracker-${TRACKER_VERSION}/writeback-modules/
|
||||
lib/tracker-${TRACKER_VERSION}/writeback-modules/libwriteback-taglib.so
|
||||
lib/tracker-${TRACKER_VERSION}/writeback-modules/libwriteback-xmp.so
|
||||
@bin libexec/tracker-extract
|
||||
@bin libexec/tracker-miner-apps
|
||||
@bin libexec/tracker-miner-fs
|
||||
@bin libexec/tracker-miner-user-guides
|
||||
@bin libexec/tracker-store
|
||||
@bin libexec/tracker-writeback
|
||||
@man man/man1/tracker-control.1
|
||||
@ -97,11 +103,15 @@ lib/tracker-${TRACKER_VERSION}/writeback-modules/libwriteback-xmp.so
|
||||
@man man/man1/tracker-store.1
|
||||
@man man/man1/tracker-tag.1
|
||||
@man man/man1/tracker-writeback.1
|
||||
share/appdata/
|
||||
share/appdata/tracker-needle.appdata.xml
|
||||
share/appdata/tracker-preferences.appdata.xml
|
||||
share/applications/tracker-needle.desktop
|
||||
share/applications/tracker-preferences.desktop
|
||||
share/dbus-1/services/org.freedesktop.Tracker1.Miner.Applications.service
|
||||
share/dbus-1/services/org.freedesktop.Tracker1.Miner.Extract.service
|
||||
share/dbus-1/services/org.freedesktop.Tracker1.Miner.Files.service
|
||||
share/dbus-1/services/org.freedesktop.Tracker1.Miner.Userguides.service
|
||||
share/dbus-1/services/org.freedesktop.Tracker1.Writeback.service
|
||||
share/dbus-1/services/org.freedesktop.Tracker1.service
|
||||
share/examples/meta-tracker/
|
||||
@ -110,8 +120,10 @@ share/examples/meta-tracker/xdg/
|
||||
share/examples/meta-tracker/xdg/autostart/
|
||||
@sample ${SYSCONFDIR}/xdg/autostart/
|
||||
share/examples/meta-tracker/xdg/autostart/tracker-extract.desktop
|
||||
share/examples/meta-tracker/xdg/autostart/tracker-miner-apps.desktop
|
||||
share/examples/meta-tracker/xdg/autostart/tracker-miner-fs.desktop
|
||||
@sample ${SYSCONFDIR}/xdg/autostart/tracker-miner-fs.desktop
|
||||
share/examples/meta-tracker/xdg/autostart/tracker-miner-user-guides.desktop
|
||||
share/examples/meta-tracker/xdg/autostart/tracker-store.desktop
|
||||
@sample ${SYSCONFDIR}/xdg/autostart/tracker-store.desktop
|
||||
share/gir-${TRACKER_VERSION}/Tracker-${TRACKER_VERSION}.gir
|
||||
@ -142,6 +154,7 @@ share/gtk-doc/html/libtracker-control/style.css
|
||||
share/gtk-doc/html/libtracker-control/up-insensitive.png
|
||||
share/gtk-doc/html/libtracker-control/up.png
|
||||
share/gtk-doc/html/libtracker-miner/
|
||||
share/gtk-doc/html/libtracker-miner/TrackerDataProvider.html
|
||||
share/gtk-doc/html/libtracker-miner/TrackerDecorator.html
|
||||
share/gtk-doc/html/libtracker-miner/TrackerDecoratorFS.html
|
||||
share/gtk-doc/html/libtracker-miner/TrackerIndexingTree.html
|
||||
@ -152,14 +165,20 @@ share/gtk-doc/html/libtracker-miner/annotation-glossary.html
|
||||
share/gtk-doc/html/libtracker-miner/ch02.html
|
||||
share/gtk-doc/html/libtracker-miner/ch03.html
|
||||
share/gtk-doc/html/libtracker-miner/ch04.html
|
||||
share/gtk-doc/html/libtracker-miner/ch05.html
|
||||
share/gtk-doc/html/libtracker-miner/home.png
|
||||
share/gtk-doc/html/libtracker-miner/index.html
|
||||
share/gtk-doc/html/libtracker-miner/index.sgml
|
||||
share/gtk-doc/html/libtracker-miner/left-insensitive.png
|
||||
share/gtk-doc/html/libtracker-miner/left.png
|
||||
share/gtk-doc/html/libtracker-miner/libtracker-miner-Enumerations.html
|
||||
share/gtk-doc/html/libtracker-miner/libtracker-miner-Media-art-management.html
|
||||
share/gtk-doc/html/libtracker-miner/libtracker-miner-TrackerEnumerator.html
|
||||
share/gtk-doc/html/libtracker-miner/libtracker-miner-TrackerFileDataProvider.html
|
||||
share/gtk-doc/html/libtracker-miner/libtracker-miner-TrackerFileEnumerator.html
|
||||
share/gtk-doc/html/libtracker-miner/libtracker-miner-TrackerThumbnailer.html
|
||||
share/gtk-doc/html/libtracker-miner/libtracker-miner-reference.html
|
||||
share/gtk-doc/html/libtracker-miner/libtracker-miner-tracker-miner-common.html
|
||||
share/gtk-doc/html/libtracker-miner/libtracker-miner.devhelp2
|
||||
share/gtk-doc/html/libtracker-miner/right-insensitive.png
|
||||
share/gtk-doc/html/libtracker-miner/right.png
|
||||
@ -248,6 +267,7 @@ share/locale/sv/LC_MESSAGES/tracker.mo
|
||||
share/locale/te/LC_MESSAGES/tracker.mo
|
||||
share/locale/tg/LC_MESSAGES/tracker.mo
|
||||
share/locale/th/LC_MESSAGES/tracker.mo
|
||||
share/locale/tr/LC_MESSAGES/tracker.mo
|
||||
share/locale/uk/LC_MESSAGES/tracker.mo
|
||||
share/locale/zh_CN/LC_MESSAGES/tracker.mo
|
||||
share/locale/zh_HK/LC_MESSAGES/tracker.mo
|
||||
@ -257,7 +277,10 @@ share/tracker-tests/
|
||||
share/tracker-tests/01-writeback.py
|
||||
share/tracker/extract-rules/
|
||||
share/tracker/extract-rules/10-abw.rule
|
||||
share/tracker/extract-rules/10-bmp.rule
|
||||
share/tracker/extract-rules/10-comics.rule
|
||||
share/tracker/extract-rules/10-dvi.rule
|
||||
share/tracker/extract-rules/10-ebooks.rule
|
||||
share/tracker/extract-rules/10-epub.rule
|
||||
share/tracker/extract-rules/10-gif.rule
|
||||
share/tracker/extract-rules/10-html.rule
|
||||
@ -299,6 +322,7 @@ share/tracker/miners/
|
||||
share/tracker/miners/tracker-miner-applications.desktop
|
||||
share/tracker/miners/tracker-miner-extract.desktop
|
||||
share/tracker/miners/tracker-miner-files.desktop
|
||||
share/tracker/miners/tracker-miner-userguides.desktop
|
||||
share/tracker/ontologies/
|
||||
share/tracker/ontologies/10-xsd.description
|
||||
share/tracker/ontologies/10-xsd.ontology
|
||||
|
Loading…
Reference in New Issue
Block a user