After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 677712 - gstvorbistag: store to DATETIME instead of DATE to vorbistag
gstvorbistag: store to DATETIME instead of DATE to vorbistag
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
unspecified
Other All
: Normal enhancement
: 0.11.x
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on: 677757
Blocks: 679380
 
 
Reported: 2012-06-08 13:57 UTC by Oleksij Rempel
Modified: 2012-07-04 08:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gstvorbistag: store to DATETIME instead of DATE to vorbistag (3.94 KB, patch)
2012-06-08 13:57 UTC, Oleksij Rempel
none Details | Review
gstvorbistag: store to DATETIME instead of DATE to vorbistag (3.89 KB, patch)
2012-06-08 14:30 UTC, Oleksij Rempel
none Details | Review
gstvorbistag: store to DATETIME instead of DATE to vorbistag (3.40 KB, patch)
2012-06-09 05:54 UTC, Oleksij Rempel
none Details | Review
gstvorbistag: store to DATETIME instead of DATE to vorbistag (4.00 KB, patch)
2012-06-27 14:29 UTC, Oleksij Rempel
committed Details | Review

Description Oleksij Rempel 2012-06-08 13:57:29 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.
Comment 1 Oleksij Rempel 2012-06-08 13:57:32 UTC
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>
Comment 2 Oleksij Rempel 2012-06-08 14:30:23 UTC
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>
Comment 3 Oleksij Rempel 2012-06-08 14:34:04 UTC
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.
Comment 4 Tim-Philipp Müller 2012-06-08 14:42:55 UTC
> 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?
Comment 5 Oleksij Rempel 2012-06-08 16:20:25 UTC
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.
Comment 6 Tim-Philipp Müller 2012-06-08 16:32:09 UTC
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).
Comment 7 Oleksij Rempel 2012-06-08 16:58:43 UTC
Ok, no problem i'll will separate DATE from DATE_TIME.
I'll also prepare the decoder patch too.
Comment 8 Oleksij Rempel 2012-06-09 05:54:02 UTC
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>
Comment 9 Oleksij Rempel 2012-06-10 05:58:34 UTC
Currently it can't be fixed until Bug 677757 is fixed.
Comment 10 Oleksij Rempel 2012-06-27 14:29:38 UTC
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
Comment 11 Tim-Philipp Müller 2012-06-28 13:22:12 UTC
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
Comment 12 Tim-Philipp Müller 2012-06-28 13:22:40 UTC
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 13 Tim-Philipp Müller 2012-06-28 13:22:59 UTC
Comment on attachment 217410 [details] [review]
gstvorbistag: store to DATETIME instead of DATE to vorbistag

Committed with minor changes only (IIRC).