[Bug 677757] datetime: allow GstDateTime where not all fields are set

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Tue Jun 12 10:41:06 PDT 2012


https://bugzilla.gnome.org/show_bug.cgi?id=677757
  GStreamer | gstreamer (core) | git

--- Comment #8 from Tim-Philipp Müller <t.i.m at zen.co.uk> 2012-06-12 17:41:04 UTC ---
Ok, so after discussion on IRC we want:

 - The generic constructor gst_date_time_new() should
    accept -1 for unset fields. Year is always assumed to
    be set, but should have g_return_val_if_fail() for >0.
    The gtk-doc markup and description for _new() needs
    to be updated and extended.

 - if month is unset, day and time must be unset too

 - if day is unset, time must be unset too

 - hour/minute are always either both set or both
   not set

 - seconds may not be set/known (so we can differentiate
   HH:MM and HH:MM:SS) (if this is too messy, we can
   as a first step just make seconds=0 if HH/MM are set
   and seconds are not, and fix it up later; up to you)

 - add constructors for y / ym / ymd (as done in
   patch, only with gtk-doc markup for each)

 - add new _has_month(), _has_day(), has_time() and
   _has_time_with_seconds() functions

 - protect gst_date_time_get_foo() with
    g_return_val_if_fail (gst_date_time_has_foo (datetime), -1)

 - fix up all users of GstDateTime :)

 - it would be ok to get rid of all GDate uses for tags afterwards
   and just use GstDateTime for that.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list