[gst-devel] totem and osssink? (long)
rbultje at ronald.bitfreak.net
Thu Mar 11 15:54:38 CET 2004
On Thu, 11 Mar 2004, Martin Soto wrote:
> On Thu, 2004-03-11 at 11:20, Thomas Vander Stichele wrote:
> > > For the examples, I will write times in seconds, which are easier to
> > > read and think off, instead of nanoseconds.
> > (Off-topic - I think our debugging is very hard to read in this regard;
> > I'm thinking of changing it all to report time in double seconds, any
> > opinions on that ? It's especially hard to read now that the clocks
> > internally use "real" time, not "time since start of program")
> In my own elements, I'm printing times in seconds with three decimal
> GST_LOG_OBJECT (sink, "new timestamp: %0.3fs",
> (double) timestamp / GST_SECOND);
> it makes a large difference in terms of legibility. It would be nice to
> have a macro or two in gstinfo for that purpose.
I have those locally:
#define GST_TIME_FORMAT "%u:%02u:%02u:%09u"
#define GST_TIME_ARGS(t) \
(guint) (t / (GST_SECOND * 60 * 60)), \
(guint) ((t / (GST_SECOND * 60)) % 60), \
(guint) ((t / GST_SECOND) % 60), \
(guint) (t % GST_SECOND)
Uncommitted, but I use them a lot for debugging stuff internally...
More information about the gstreamer-devel