[tracker] tracker-extract: Insert nmm:whiteBalance as a resource
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tracker-extract: Insert nmm:whiteBalance as a resource
- Date: Wed, 18 Jan 2017 11:10:44 +0000 (UTC)
commit 1be7060304e0f588c9fef77a57bcc51b1e67a8b4
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 453fda6..ee0fb7d 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 39843a4..f79efa5 100644
--- a/src/tracker-extract/tracker-extract-gif.c
+++ b/src/tracker-extract/tracker-extract-gif.c
@@ -311,7 +311,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 8120d61..a1850d3 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]