[gstreamer-bugs] [Bug 628408] Use GDateTime that has been released

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Thu Oct 7 16:27:09 PDT 2010


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

Tim-Philipp Müller <t.i.m> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #171353|none                        |needs-work
             status|                            |

--- Comment #2 from Tim-Philipp Müller <t.i.m at zen.co.uk> 2010-10-07 23:27:06 UTC ---
(From update of attachment 171353)
>diff --git a/gst/gstdatetime.h b/gst/gstdatetime.h
>index 26b65d4..c3d9574 100644
>--- a/gst/gstdatetime.h
>+++ b/gst/gstdatetime.h
>@@ -22,19 +22,24 @@
> 
> #include <time.h>
> #include <glib.h>
>+#include "glib-compat-private.h"

This private header is not installed, so we can't include it in a public
header.


>+#ifndef GLIB_HAS_GDATETIME
> typedef struct _GstDateTime GstDateTime;
>+#else
>+typedef GDateTime GstDateTime;
>+#endif

IMHO GstDateTime should *always* be 100% opaque at the API level, even if
internally we just map it to GDateTime (more on that below though).

We should provide API (a function) to get a GDateTime from a GstDateTime
though. If libgstreamer was built against GLib < 2.26 that function would
return NULL. gstdatetime.h would define GDateTime to gpointer if we are
building against GLib headers < 2.26.

Part of the reason I'd like it 100% opaque is that I think we can't just do the
1:1 mapping, not even internally, with the current GDateTime functionality:
since the main use case for GstDateTime is to express dates and times from
tags, we need to be able to express/set/query the 'granularity' of the datetime
provided, so that we can express incomplete date/times properly (ie. "year
2010" or "2010-Aug-08, unknown time"). This is important for
transcoding/retagging, so we can, err, "transtag"/rewrite such incomplete tags
correctly, without adding bogus information (like making 'year 2010' into
2010-Jan-01, 00:00.000h UTC).

-- 
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