[tracker/tracker-1.10] tracker-extract: Insert nmm:whiteBalance as a resource
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-1.10] tracker-extract: Insert nmm:whiteBalance as a resource
- Date: Thu, 19 Jan 2017 10:58:00 +0000 (UTC)
commit c17d11ec0c42834851b99f695105d21d2133b8e6
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Jan 2 19:42:25 2017 +0100
tracker-extract: Insert nmm:whiteBalance as a resource
This is not an string, but a builtin class, so it must be dealt
with as a resource.
https://bugzilla.gnome.org/show_bug.cgi?id=776723
src/libtracker-extract/tracker-xmp.c | 6 +++++-
src/tracker-extract/tracker-extract-gif.c | 6 +++++-
src/tracker-extract/tracker-extract-jpeg.c | 6 +++++-
src/tracker-extract/tracker-extract-pdf.c | 6 +++++-
src/tracker-extract/tracker-extract-png.c | 6 +++++-
src/tracker-extract/tracker-extract-tiff.c | 6 +++++-
6 files changed, 30 insertions(+), 6 deletions(-)
---
diff --git a/src/libtracker-extract/tracker-xmp.c b/src/libtracker-extract/tracker-xmp.c
index bbe8e04..b329f37 100644
--- a/src/libtracker-extract/tracker-xmp.c
+++ b/src/libtracker-extract/tracker-xmp.c
@@ -987,7 +987,11 @@ tracker_xmp_apply_to_resource (TrackerResource *resource,
}
if (data->white_balance) {
- tracker_resource_set_string (resource, "nmm:whiteBalance", data->white_balance);
+ TrackerResource *white_balance;
+
+ white_balance = tracker_resource_new (data->white_balance);
+ tracker_resource_set_relation (resource, "nmm:meteringMode", white_balance);
+ g_object_unref (white_balance);
}
if (data->fnumber) {
diff --git a/src/tracker-extract/tracker-extract-gif.c b/src/tracker-extract/tracker-extract-gif.c
index 71b6ad9..84e25d8 100644
--- a/src/tracker-extract/tracker-extract-gif.c
+++ b/src/tracker-extract/tracker-extract-gif.c
@@ -310,7 +310,11 @@ read_metadata (GifFileType *gifFile,
}
if (xd->white_balance) {
- tracker_resource_set_string (metadata, "nmm:whiteBalance", xd->white_balance);
+ TrackerResource *white_balance;
+
+ white_balance = tracker_resource_new (xd->white_balance);
+ tracker_resource_set_relation (metadata, "nmm:meteringMode", white_balance);
+ g_object_unref (white_balance);
}
if (xd->fnumber) {
diff --git a/src/tracker-extract/tracker-extract-jpeg.c b/src/tracker-extract/tracker-extract-jpeg.c
index 8453d28..65e8766 100644
--- a/src/tracker-extract/tracker-extract-jpeg.c
+++ b/src/tracker-extract/tracker-extract-jpeg.c
@@ -410,7 +410,11 @@ tracker_extract_get_metadata (TrackerExtractInfo *info)
}
if (md.white_balance) {
- tracker_resource_set_string (metadata, "nmm:whiteBalance", md.white_balance);
+ TrackerResource *white_balance;
+
+ white_balance = tracker_resource_new (md.white_balance);
+ tracker_resource_set_relation (metadata, "nmm:meteringMode", white_balance);
+ g_object_unref (white_balance);
}
if (md.fnumber) {
diff --git a/src/tracker-extract/tracker-extract-pdf.c b/src/tracker-extract/tracker-extract-pdf.c
index b7b4df1..13dee8a 100644
--- a/src/tracker-extract/tracker-extract-pdf.c
+++ b/src/tracker-extract/tracker-extract-pdf.c
@@ -474,7 +474,11 @@ tracker_extract_get_metadata (TrackerExtractInfo *info)
}
if (xd->white_balance) {
- tracker_resource_set_string (metadata, "nmm:whiteBalance", xd->white_balance);
+ TrackerResource *white_balance;
+
+ white_balance = tracker_resource_new (xd->white_balance);
+ tracker_resource_set_relation (metadata, "nmm:meteringMode", white_balance);
+ g_object_unref (white_balance);
}
if (xd->fnumber) {
diff --git a/src/tracker-extract/tracker-extract-png.c b/src/tracker-extract/tracker-extract-png.c
index 2ce8ae5..5296683 100644
--- a/src/tracker-extract/tracker-extract-png.c
+++ b/src/tracker-extract/tracker-extract-png.c
@@ -426,7 +426,11 @@ read_metadata (TrackerResource *metadata,
}
if (md.white_balance) {
- tracker_resource_set_string (metadata, "nmm:whiteBalance", md.white_balance);
+ TrackerResource *white_balance;
+
+ white_balance = tracker_resource_new (md.white_balance);
+ tracker_resource_set_relation (metadata, "nmm:meteringMode", white_balance);
+ g_object_unref (white_balance);
}
if (md.fnumber) {
diff --git a/src/tracker-extract/tracker-extract-tiff.c b/src/tracker-extract/tracker-extract-tiff.c
index 1d55f74..0cb5a82 100644
--- a/src/tracker-extract/tracker-extract-tiff.c
+++ b/src/tracker-extract/tracker-extract-tiff.c
@@ -538,7 +538,11 @@ tracker_extract_get_metadata (TrackerExtractInfo *info)
}
if (md.white_balance) {
- tracker_resource_set_string (metadata, "nmm:whiteBalance", md.white_balance);
+ TrackerResource *white_balance;
+
+ white_balance = tracker_resource_new (md.white_balance);
+ tracker_resource_set_relation (metadata, "nmm:meteringMode", white_balance);
+ g_object_unref (white_balance);
}
if (md.fnumber) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]