[gst-devel] [gst-cvs] ensonic gstreamer: gstreamer/ gstreamer/docs/gst/ gstreamer/gst/

Stefan Kost ensonic at hora-obscura.de
Tue Dec 11 20:25:44 CET 2007


Hi Tim,

Tim Müller schrieb:
> On Wed, 2007-11-28 at 04:12 -0800, ensonic at kemper.freedesktop.org wrote:
> 
> Hi,
> 
>> Log message:
>> 	* docs/gst/gstreamer-sections.txt:
>> 	* gst/gstclock.h:
>> 	* gst/gstdebugutils.c:
>> 	* gst/gstinfo.c:
>> 	  Now hide the different clock stuff behind a macro.
>> 	  API: GST_GET_CURRENT_TIME
>> (...)
>> Links:
>> http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.3557&r2=1.3558
>> http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/docs/gst/gstreamer-sections.txt.diff?r1=1.317&r2=1.318
>> http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstclock.h.diff?r1=1.68&r2=1.69
>> http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstdebugutils.c.diff?r1=1.9&r2=1.10
>> http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstinfo.c.diff?r1=1.138&r2=1.139
> 
> You can't use HAVE_POSIX_TIMERS in gstclock.h here, since gstclock.h is
> a public header file and HAVE_POSIX_TIMERS is currently defined in the
> build-private config.h (well, you obviously can, but it's not really
> quite right IMO).
Agree. I overlooked that.
> 
> Also, I somewhat dislike the semantics of the new GST_GET_CURRENT_TIME
> macro (now renamed to GST_GET_TIMESTAMP), ie. that GET_FOO(bla) expands
> to bla=value, but maybe that's just me
No, but how else would you have solved that with a macro ?
> (if not, maybe this could be
> turned into a proper function or a static inline function?)
> 
I don't think it should be in gstcklock.c then. What about gstutils.c and the
code below?

GstClockTime
gst_util_get_timestamp (void)
{
#ifdef HAVE_POSIX_TIMERS
  struct timespec now;
  clock_gettime (CLOCK_MONOTONIC, &now);
  return GST_TIMESPEC_TO_TIME (now);
#else
  GTimeVal now;
  g_get_current_time (&now);
  return GST_TIMEVAL_TO_TIME (now);
#endif
}

> Cheers
>  -Tim
> 

Stefan




More information about the gstreamer-devel mailing list