GNOME Bugzilla – Bug 677712
gstvorbistag: store to DATETIME instead of DATE to vorbistag
Last modified: 2012-07-04 08:41:32 UTC
I need for my work to use complete date_time in ogg files. Current gstreamer stores only date. This patch makes sure gst uses one format for DATA and DATE_TIME tags and keeps it compatible with programs wich send only DATE tag.
Created attachment 215958 [details] [review] gstvorbistag: store to DATETIME instead of DATE to vorbistag Instead of using short YYYY-MM-DD form we will store long YYYY-MM-DDTHH:MM:SS+TS date and time. According to this documentation we can do it: http://wiki.xiph.org/VorbisComment#Date_and_time This datetime format is needed by apps where more information is needed. For example voice, meeting recording, etc. Signed-off-by: Oleksij Rempel <bug-track@fisher-privat.net>
Created attachment 215966 [details] [review] gstvorbistag: store to DATETIME instead of DATE to vorbistag Instead of using short YYYY-MM-DD form we will store long YYYY-MM-DDTHH:MM:SS+TS date and time. According to this documentation we can do it: http://wiki.xiph.org/VorbisComment#Date_and_time This datetime format is needed by apps where more information is needed. For example voice, meeting recording, etc. v2: re add removed {GST_TAG_DATE, "DATE"} Signed-off-by: Oleksij Rempel <bug-track@fisher-privat.net>
result will looks like this: For GST_TAG_DATE: 2012-06-08T00:00:00Z For GST_TAG_DATE_TIME: DATE: 2012-06-08T16:33:15+02:00 i use "oggz-comment -l test.ogg" for testing.
> result will looks like this: > > For GST_TAG_DATE: > 2012-06-08T00:00:00Z I don't think this is right. Why write a time if there is no time?
I was thinking about this too, but my argumentation is: this should reduce count of different time formats, at least produced by gstreamer. And guarantee adoption by other players.
I doubt what GStreamer does here has any effect on other players at all. Even if it did, it would probably take years to filter into actual releases or products. We should not output nonsense. Writing a time where there is none doesn't make sense, so we shouldn't do it, more so given that YYYY-MM-DD is more likely to be handled by tag parsers than YYYY-MM-DDT...Z (IMHO, of course).
Ok, no problem i'll will separate DATE from DATE_TIME. I'll also prepare the decoder patch too.
Created attachment 216026 [details] [review] gstvorbistag: store to DATETIME instead of DATE to vorbistag Instead of using short YYYY-MM-DD form we will store long YYYY-MM-DDTHH:MM:SS+TS date and time. According to this documentation we can do it: http://wiki.xiph.org/VorbisComment#Date_and_time This datetime format is needed by apps where more information is needed. For example voice, meeting recording, etc. changes: v3 - separate DATE and DATE_TIME tags. Signed-off-by: Oleksij Rempel <bug-track@fisher-privat.net>
Currently it can't be fixed until Bug 677757 is fixed.
Created attachment 217410 [details] [review] gstvorbistag: store to DATETIME instead of DATE to vorbistag Instead of using short YYYY-MM-DD form we will store long YYYY-MM-DDTHH:MM:SS+TS date and time. According to this documentation we can do it: http://wiki.xiph.org/VorbisComment#Date_and_time This datetime format is needed by apps where more information is needed. For example voice, meeting recording, etc. Signed-off-by: Oleksij Rempel <bug-track@fisher-privat.net> changes: - use new gst_date_time_to_iso8601_string interface
commit 3a1b53c117c99832fa41ad5ddb73a36815da896e Author: Tim-Philipp Müller <tim@centricular.net> Date: Wed Jun 27 23:50:07 2012 +0100 tests: update unit test for vorbistag change to GST_TAG_DATE_TIME https://bugzilla.gnome.org/show_bug.cgi?id=677712 commit bc94374a8f28e3386161c401a25a88d818a70bb9 Author: Oleksij Rempel <bug-track@fisher-privat.net> Date: Wed Jun 27 16:25:06 2012 +0200 vorbistag: store DATE tag in GST_TAG_DATE_TIME instead of GST_TAG_DATE The DATE field may contain dates, partial dates, or dates with time. Store the result in GST_TAG_DATE_TIME, so we can express properly which fields are present or not, and can store the time if there is one, and can serialise and deserialise the tag without loss of information and without making up information that's not there. Instead of using short YYYY-MM-DD form we will store long YYYY-MM-DDTHH:MM:SS+TS date and time. According to this documentation we can do it: http://wiki.xiph.org/VorbisComment#Date_and_time This datetime format is needed by apps where more information is needed. For example voice, meeting recording, etc. https://bugzilla.gnome.org/show_bug.cgi?id=677712
Needed some changes in core too: commit f738dbe86a2c3afe65096855055f2d7500d17d29 Author: Tim-Philipp Müller <tim@centricular.net> Date: Wed Jun 27 23:00:08 2012 +0100 datetime: ignore 0 days or months in dates Handle 0 months or days correctly in date strings, so that 2012-06-00 is parsed the same as 2012-06, for example.
Comment on attachment 217410 [details] [review] gstvorbistag: store to DATETIME instead of DATE to vorbistag Committed with minor changes only (IIRC).