[tracker/tracker-0.10] tracker-extract: include DLNA mimetype in non-gstreamer media extractors
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-0.10] tracker-extract: include DLNA mimetype in non-gstreamer media extractors
- Date: Thu, 6 Oct 2011 16:44:37 +0000 (UTC)
commit 76e35b1fb516d7a5e540d9745c7cea1a6783865e
Author: Aleksander Morgado <aleksander lanedo com>
Date: Thu Oct 6 17:38:22 2011 +0100
tracker-extract: include DLNA mimetype in non-gstreamer media extractors
Fixes GB#647575.
src/tracker-extract/tracker-extract-jpeg.c | 6 ++++--
src/tracker-extract/tracker-extract-mp3.c | 2 ++
src/tracker-extract/tracker-extract-png.c | 6 ++++--
3 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-jpeg.c b/src/tracker-extract/tracker-extract-jpeg.c
index 149bd30..f97e80e 100644
--- a/src/tracker-extract/tracker-extract-jpeg.c
+++ b/src/tracker-extract/tracker-extract-jpeg.c
@@ -164,7 +164,7 @@ extract_jpeg (const gchar *uri,
goffset size;
gchar *filename;
gchar *comment = NULL;
- const gchar *dlna_profile;
+ const gchar *dlna_profile, *dlna_mimetype;
GPtrArray *keywords;
guint i;
GString *where = NULL;
@@ -322,9 +322,11 @@ extract_jpeg (const gchar *uri,
tracker_sparql_builder_predicate (metadata, "nfo:height");
tracker_sparql_builder_object_int64 (metadata, cinfo.image_height);
- if (guess_dlna_profile (cinfo.image_width, cinfo.image_height, &dlna_profile, NULL)) {
+ if (guess_dlna_profile (cinfo.image_width, cinfo.image_height, &dlna_profile, &dlna_mimetype)) {
tracker_sparql_builder_predicate (metadata, "nmm:dlnaProfile");
tracker_sparql_builder_object_string (metadata, dlna_profile);
+ tracker_sparql_builder_predicate (metadata, "nmm:dlnaMime");
+ tracker_sparql_builder_object_string (metadata, dlna_mimetype);
}
if (id->contact) {
diff --git a/src/tracker-extract/tracker-extract-mp3.c b/src/tracker-extract/tracker-extract-mp3.c
index fb27477..ccb73b3 100644
--- a/src/tracker-extract/tracker-extract-mp3.c
+++ b/src/tracker-extract/tracker-extract-mp3.c
@@ -997,6 +997,8 @@ mp3_parse_header (const gchar *data,
&dlna_profile, &dlna_mimetype)) {
tracker_sparql_builder_predicate (metadata, "nmm:dlnaProfile");
tracker_sparql_builder_object_string (metadata, dlna_profile);
+ tracker_sparql_builder_predicate (metadata, "nmm:dlnaMime");
+ tracker_sparql_builder_object_string (metadata, dlna_mimetype);
}
return TRUE;
diff --git a/src/tracker-extract/tracker-extract-png.c b/src/tracker-extract/tracker-extract-png.c
index 1f832d8..262fadf 100644
--- a/src/tracker-extract/tracker-extract-png.c
+++ b/src/tracker-extract/tracker-extract-png.c
@@ -758,7 +758,7 @@ extract_png (const gchar *uri,
png_uint_32 width, height;
gint bit_depth, color_type;
gint interlace_type, compression_type, filter_type;
- const gchar *dlna_profile;
+ const gchar *dlna_profile, *dlna_mimetype;
gchar *filename;
filename = g_filename_from_uri (uri, NULL, NULL);
@@ -853,9 +853,11 @@ extract_png (const gchar *uri,
tracker_sparql_builder_predicate (metadata, "nfo:height");
tracker_sparql_builder_object_int64 (metadata, height);
- if (guess_dlna_profile (bit_depth, width, height, &dlna_profile, NULL)) {
+ if (guess_dlna_profile (bit_depth, width, height, &dlna_profile, &dlna_mimetype)) {
tracker_sparql_builder_predicate (metadata, "nmm:dlnaProfile");
tracker_sparql_builder_object_string (metadata, dlna_profile);
+ tracker_sparql_builder_predicate (metadata, "nmm:dlnaMime");
+ tracker_sparql_builder_object_string (metadata, dlna_mimetype);
}
png_destroy_read_struct (&png_ptr, &info_ptr, &end_ptr);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]