Refactored image timestamp checking.

Seperated getting image timestamp from picture_load_exif_data() and
ShiftImageTimesDialog::syncCameraClicked() into picture_get_timestamp()
and seperated checking timestamp from dive_create_picture() to
dive_check_picture_time().

Signed-off-by: Jan Darowski <jan.darowski@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Jan Darowski 2015-03-14 15:35:47 +01:00 committed by Dirk Hohndel
parent 838b450066
commit 7d37a3f5a6
4 changed files with 60 additions and 22 deletions

5
dive.h
View file

@ -381,11 +381,14 @@ struct picture {
for (struct picture *picture = (_divestruct).picture_list; picture; picture = picture->next)
extern struct picture *alloc_picture();
extern bool dive_check_picture_time(struct dive *d, char *filename, int shift_time);
extern void dive_create_picture(struct dive *d, char *filename, int shift_time);
extern void dive_add_picture(struct dive *d, struct picture *newpic);
extern void dive_remove_picture(char *filename);
extern unsigned int dive_get_picture_count(struct dive *d);
extern void picture_load_exif_data(struct picture *p, timestamp_t *timestamp);
extern bool picture_check_valid(char *filename, int shift_time);
extern void picture_load_exif_data(struct picture *p);
extern void picture_get_timestamp(char *filename, timestamp_t *t);
extern void dive_set_geodata_from_picture(struct dive *d, struct picture *pic);
extern int explicit_first_cylinder(struct dive *dive, struct divecomputer *dc);