Hi Jens,

> Sorry, my bad. metadata.open_path(file.get_path()) of course

Thanks, that worked indeed. I attach a patch of what my diff against
master is now.

The first start took ages, with loads of warnings and critical messages.
Then the application window opened, and the thumbnailer run started in
the background, but that was fine and as usual.

I'll report in case I find some strange things.

Thanks a lot

Norbert

--
PREINING Norbert                               http://www.preining.info
Accelia Inc.     +    JAIST     +    TeX Live     +    Debian Developer
GPG: 0x860CDC13   fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13
diff --git a/flatpak/org.gnome.Shotwell.json b/flatpak/org.gnome.Shotwell.json
index 37624017..c59ad512 100644
--- a/flatpak/org.gnome.Shotwell.json
+++ b/flatpak/org.gnome.Shotwell.json
@@ -139,14 +139,13 @@
         },
         {
             "name" : "gexiv2",
-            "buildsystem" : "meson",
             "cleanup" : [
                 "/lib/girepository-1.0",
                 "/share/gir-1.0"
             ],
             "config-opts" : [
-                "-Dpython2_girdir=no",
-                "-Dpython3_girdir=no"
+                "--without-python2-girdir",
+                "--without-python3-girdir"
             ],
             "build-options" : {
                 "env" : {
diff --git a/meson.build b/meson.build
index fda28500..51c09aac 100644
--- a/meson.build
+++ b/meson.build
@@ -60,7 +60,7 @@ gstreamer = dependency('gstreamer-1.0', version : '>= 1.0')
 gstreamer_pbu = dependency('gstreamer-pbutils-1.0', version : '>= 1.0')
 gphoto2 = dependency('libgphoto2', version : '>= 2.5.0')
 gudev = dependency('gudev-1.0', version : '>= 145', required: false)
-gexiv2 = dependency('gexiv2', version: '>= 0.11.0')
+gexiv2 = dependency('gexiv2', version: '>= 0.10.4')
 libraw = dependency('libraw', version : '>= 0.13.2')
 libexif = dependency('libexif', version : '>= 0.6.16')
 unity = dependency('unity', required : false)
diff --git a/src/main.vala b/src/main.vala
index 4add1df6..3f6fb78f 100644
--- a/src/main.vala
+++ b/src/main.vala
@@ -271,7 +271,7 @@ void dump_metadata (string filename) {
     try {
         var metadata = new GExiv2.Metadata();
         var file = File.new_for_commandline_arg(filename);
-        metadata.from_stream (file.read());
+        metadata.open_path(file.get_path());
 
         dump_tags(metadata, metadata.get_exif_tags());
         dump_tags(metadata, metadata.get_iptc_tags());
diff --git a/src/photos/PhotoMetadata.vala b/src/photos/PhotoMetadata.vala
index 5a494835..80db3942 100644
--- a/src/photos/PhotoMetadata.vala
+++ b/src/photos/PhotoMetadata.vala
@@ -278,8 +278,8 @@ public class PhotoMetadata : MediaMetadata {
         exiv2 = new GExiv2.Metadata();
         exif = null;
         
-        exiv2.open_buf(buffer[0:length]);
-        exif = Exif.Data.new_from_data(buffer[0:length]);
+        exiv2.open_buf(buffer, length);
+        exif = Exif.Data.new_from_data(buffer, length);
         source_name = "<memory buffer %d bytes>".printf(length);
     }
     
@@ -287,8 +287,8 @@ public class PhotoMetadata : MediaMetadata {
         exiv2 = new GExiv2.Metadata();
         exif = null;
         
-        exiv2.from_app1_segment(buffer.get_data());
-        exif = Exif.Data.new_from_data(buffer.get_data());
+        exiv2.from_app1_segment(buffer.get_data(), (long) buffer.get_size());
+        exif = Exif.Data.new_from_data(buffer.get_data(), buffer.get_size());
         source_name = "<app1 segment %zu bytes>".printf(buffer.get_size());
     }
     
diff --git a/vapi/libexif.vapi b/vapi/libexif.vapi
index 5a02cfaf..61ab36eb 100644
--- a/vapi/libexif.vapi
+++ b/vapi/libexif.vapi
@@ -79,7 +79,7 @@ namespace Exif {
         [CCode (cname="exif_data_new")]
         public Data();
         public static Data? new_from_file(string path);
-        public static Data? new_from_data([CCode (array_length_pos=1)]uint8[] data);
+        public static Data? new_from_data(uint8 *data, size_t count);
         public void dump();
         public void fix();
         public void foreach_content(ForeachContentFunc cb, void *user = null);
_______________________________________________
shotwell-list mailing list
shotwell-list@gnome.org
https://mail.gnome.org/mailman/listinfo/shotwell-list

Reply via email to