[tracker/tracker-0.8] Bug 166638 - Some of the metadata details of " avi " files are not extracted by tracker.
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-0.8] Bug 166638 - Some of the metadata details of " avi " files are not extracted by tracker.
- Date: Thu, 13 May 2010 14:14:58 +0000 (UTC)
commit 8c866a3ad92347c8e724a488a686fb8b94679848
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed May 12 14:47:45 2010 +0200
Bug 166638 - Some of the metadata details of " avi " files are not extracted by tracker.
Extract "keywords" Gst tag.
src/tracker-extract/tracker-extract-gstreamer.c | 28 +++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-gstreamer.c b/src/tracker-extract/tracker-extract-gstreamer.c
index 4e591c5..d4b364a 100644
--- a/src/tracker-extract/tracker-extract-gstreamer.c
+++ b/src/tracker-extract/tracker-extract-gstreamer.c
@@ -325,6 +325,32 @@ add_time_gst_tag (TrackerSparqlBuilder *metadata,
}
}
+static void
+add_keywords_gst_tag (TrackerSparqlBuilder *metadata,
+ GstTagList *tag_list)
+{
+ gboolean ret;
+ gchar *str;
+
+ ret = gst_tag_list_get_string (tag_list, GST_TAG_KEYWORDS, &str);
+
+ if (ret) {
+ GStrv keywords;
+ gint i = 0;
+
+ keywords = g_strsplit_set (str, " ,", -1);
+
+ while (keywords[i]) {
+ tracker_sparql_builder_predicate (metadata, "nie:keyword");
+ tracker_sparql_builder_object_unvalidated (metadata, g_strstrip (keywords[i]));
+ i++;
+ }
+
+ g_strfreev (keywords);
+ g_free (str);
+ }
+}
+
static gboolean
get_embedded_album_art(MetadataExtractor *extractor)
{
@@ -716,6 +742,8 @@ extract_metadata (MetadataExtractor *extractor,
tracker_sparql_builder_predicate (metadata, "nmm:director");
tracker_sparql_builder_object_iri (metadata, composer_uri);
}
+
+ add_keywords_gst_tag (metadata, extractor->tagcache);
}
if (needs_audio) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]