diff options
Diffstat (limited to 'src/camera/GPhoto.vala')
-rw-r--r-- | src/camera/GPhoto.vala | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/camera/GPhoto.vala b/src/camera/GPhoto.vala index 39b2109..9bcb151 100644 --- a/src/camera/GPhoto.vala +++ b/src/camera/GPhoto.vala @@ -119,15 +119,11 @@ namespace GPhoto { // if buffer can be loaded into memory, return a Bytes class with // CameraFile being the owner of the data. This way, the CameraFile is freed // when the Bytes are freed - unowned uint8 *data; - ulong data_len; - var res = file.get_data_and_size(out data, out data_len); + unowned uint8[] buffer = null; + var res = file.get_data(out buffer); if (res != Result.OK) return null; - unowned uint8[] buffer = (uint8[]) data; - buffer.length = (int) data_len; - return Bytes.new_with_owner<GPhoto.CameraFile>(buffer, file); } @@ -135,9 +131,10 @@ namespace GPhoto { // filesystem. In these cases shotwell can access the file directly. See: // http://redmine.yorba.org/issues/2959 public PhotoMetadata? get_fallback_metadata(Camera camera, Context context, string folder, string filename) { - GPhoto.CameraStorageInformation *sifs = null; + // Fixme: Why do we need to query get_storageinfo here first? + GPhoto.CameraStorageInformation[] sifs = null; int count = 0; - camera.get_storageinfo(&sifs, out count, context); + camera.get_storageinfo(out sifs, context); GPhoto.PortInfo port_info; camera.get_port_info(out port_info); |