datetime: allow GstDateTime where not all fields are set
authorOleksij Rempel <bug-track@fisher-privat.net>
Tue, 12 Jun 2012 20:35:42 +0000 (22:35 +0200)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Tue, 12 Jun 2012 21:53:01 +0000 (22:53 +0100)
commit000ebef2f4d649015f6689a13e32d016d126e78f
tree5d591f4b94dfcaf254d7014885ff244bb1c3dbb0
parentd916018021c4181cd1e188e02684e1cf4389cfdd
datetime: allow GstDateTime where not all fields are set

In order to deserialise and re-serialise dates and date times
from tags properly, we need to be able to express partial
dates (e.g. YYYY or YYYY-MM) and date times.

We only support partial date times where all the more
significant fields above the first unset field are set
(e.g. YYYY-00-DD is not supported).

Calling _get_foo() when foo is not set is not allowed
any more, callers need to check which fields are set
first.

https://bugzilla.gnome.org/show_bug.cgi?id=677757
gst/gstdatetime.c
gst/gstdatetime.h