[tracker] Performance improvements to jpeg extraction
- From: Jürg Billeter <juergbi src gnome org>
- To: svn-commits-list gnome org
- Subject: [tracker] Performance improvements to jpeg extraction
- Date: Fri, 24 Apr 2009 08:24:30 -0400 (EDT)
commit d8382de6b7d0cb9fd82c2944728860e741fb1c6f
Author: Mikael Ottela <mikael ottela ixonos com>
Date: Tue Apr 21 01:00:10 2009 +0300
Performance improvements to jpeg extraction
We now do much less unnecessary formatting using libexif for better
performance.
---
src/tracker-extract/tracker-extract-jpeg.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/tracker-extract/tracker-extract-jpeg.c b/src/tracker-extract/tracker-extract-jpeg.c
index 9c2f87f..28bb764 100644
--- a/src/tracker-extract/tracker-extract-jpeg.c
+++ b/src/tracker-extract/tracker-extract-jpeg.c
@@ -365,7 +365,12 @@ read_exif (const unsigned char *buffer,
ExifData *exif;
TagType *p;
- exif = exif_data_new_from_data ((unsigned char *) buffer, len);
+ exif = exif_data_new();
+ exif_data_set_option (exif, EXIF_DATA_OPTION_IGNORE_UNKNOWN_TAGS);
+ exif_data_unset_option (exif, EXIF_DATA_OPTION_FOLLOW_SPECIFICATION);
+ exif_data_set_option (exif, EXIF_DATA_OPTION_DONT_CHANGE_MAKER_NOTE);
+
+ exif_data_load_data (exif, (unsigned char *) buffer, len);
for (p = tags; p->name; ++p) {
ExifEntry *entry = exif_data_get_entry (exif, p->tag);
@@ -431,7 +436,7 @@ extract_jpeg (const gchar *uri,
#ifdef HAVE_LIBIPTCDATA
gsize offset;
gsize sublen;
-#endif /* HAVE_LIBEXIF */
+#endif /* HAVE_LIBIPTCDATA */
tracker_statement_list_insert (metadata, uri,
RDF_TYPE,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]