From: <al...@ke...> - 2008-02-10 18:36:55
|
CVS Root: /cvs/gstreamer Module: gst-plugins-bad Changes by: alima Date: Sun Feb 10 2008 18:37:00 UTC Log message: Convert from EXIF to XMP DataTime as local time. Modified files: . : ChangeLog ext/metadata : TODO metadataexif.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-bad/ChangeLog.diff?r1=1.3134&r2=1.3135 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-bad/ext/metadata/TODO.diff?r1=1.13&r2=1.14 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-bad/ext/metadata/metadataexif.c.diff?r1=1.16&r2=1.17 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-plugins-bad/ChangeLog,v retrieving revision 1.3134 retrieving revision 1.3135 diff -u -d -r1.3134 -r1.3135 --- ChangeLog 10 Feb 2008 04:36:11 -0000 1.3134 +++ ChangeLog 10 Feb 2008 18:36:45 -0000 1.3135 @@ -1,6 +1,12 @@ 2008-02-10 Edgard Lima <edg...@in...> * ext/metadata/TODO: + * ext/metadata/metadataexif.c: + Convert from EXIF to XMP DataTime as local time. + +2008-02-10 Edgard Lima <edg...@in...> + * ext/metadata/TODO: * ext/metadata/metadata_mapping.htm: * ext/metadata/metadataexif.c: * ext/metadata/metadatatags.c: Index: TODO RCS file: /cvs/gstreamer/gst-plugins-bad/ext/metadata/TODO,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- TODO 10 Feb 2008 04:36:12 -0000 1.13 +++ TODO 10 Feb 2008 18:36:46 -0000 1.14 @@ -15,6 +15,7 @@ 5- Improve the test application (to save also in png and to make it possible to set the metadata elements properties) 6- Implement GDateTime support in GLib to be used by GStreamer (http://bugzilla.gnome.org/show_bug.cgi?id=50076) 7- Use a standard GStreamer Data-Time type to map our Data-time tags +8- Make the correct merge mode for multiple value tags (bag and seq) like dc:creator, ... OPEN ISSUES: Index: metadataexif.c RCS file: /cvs/gstreamer/gst-plugins-bad/ext/metadata/metadataexif.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- metadataexif.c 10 Feb 2008 04:36:12 -0000 1.16 +++ metadataexif.c 10 Feb 2008 18:36:46 -0000 1.17 @@ -613,8 +613,8 @@ if (entry->tag == EXIF_TAG_DATE_TIME_DIGITIZED || entry->tag == EXIF_TAG_DATE_TIME || entry->tag == EXIF_TAG_DATE_TIME_ORIGINAL) { - value = g_string_new_len (str, 21); - /* 21 is enough memory to hold "YYYY-MM-DDTHH:MM:SSZ" */ + value = g_string_new_len (str, 20); + /* 20 is enough memory to hold "YYYY-MM-DDTHH:MM:SS" */ if (metadataparse_exif_convert_to_datetime (value)) { str = value->str; @@ -1092,14 +1092,17 @@ /* "YYYY:MM:DD HH:MM:SS" */ /* 012345678901234567890 */ - if (dt->allocated_len < 21) + if (dt->allocated_len < 20) return FALSE; + /* Fix me: Ideally would be good to get the time zone from othe Exif tag + * for the time being, just use local time as explained in XMP specification + * (converting from EXIF to XMP date and time) */ dt->str[4] = '-'; dt->str[7] = '-'; dt->str[10] = 'T'; - dt->str[19] = 'Z'; - dt->str[20] = '\0'; + dt->str[19] = '\0'; return TRUE; @@ -1228,8 +1231,8 @@ if (*p == ':') { p++; } else if (*p == 'Z' || *p == '+' || *p == '-') { - /* FIXME: in case of '+' or '-', would it be better to calculate the - * UTC 'Z' date and time? */ + /* FIXME: in case of '+' or '-', it would be better to also fill another + * EXIF tag in order to save, somehow the time zone info */ sprintf (p, ":00"); goto done; } else |