[tracker] Bug 166638 - Some of the metadata details of " avi " files are not extracted by tracker.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] Bug 166638 - Some of the metadata details of " avi " files are not extracted by tracker.
- Date: Wed, 12 May 2010 12:54:03 +0000 (UTC)
commit d6aaa37e7734db07879dd0205984481a059d3afc
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 98eaddb..fe69236 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)
{
@@ -720,6 +746,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]