mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
gst/elements/gstfdsrc.c: (gst_fdsrc_get): Use GST_TIME_TO_TIMEVAL()
Original commit message from CVS: * gst/elements/gstfdsrc.c: (gst_fdsrc_get): Use GST_TIME_TO_TIMEVAL() * gst/gstclock.h: Avoid using 64-bit % operator (slow!)
This commit is contained in:
parent
5432f712bb
commit
5e7335abe3
4 changed files with 8 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
|||
2004-02-13 David Schleef <ds@schleef.org>
|
||||
|
||||
* gst/elements/gstfdsrc.c: (gst_fdsrc_get): Use GST_TIME_TO_TIMEVAL()
|
||||
* gst/gstclock.h: Avoid using 64-bit % operator (slow!)
|
||||
|
||||
2004-02-13 Mattias Wadman <mattias@sudac.org>
|
||||
|
||||
reviewed by: David Schleef <ds@schleef.org>
|
||||
|
|
|
@ -193,8 +193,7 @@ gst_fdsrc_get(GstPad *pad)
|
|||
|
||||
if (src->timeout != 0)
|
||||
{
|
||||
tp->tv_sec = src->timeout / 1000000000;
|
||||
tp->tv_usec = src->timeout - t.tv_sec * 1000000000;
|
||||
GST_TIME_TO_TIMEVAL (src->timeout, t);
|
||||
}
|
||||
else
|
||||
tp = NULL;
|
||||
|
|
|
@ -52,7 +52,7 @@ typedef gpointer GstClockID;
|
|||
#define GST_TIME_TO_TIMEVAL(t,tv) \
|
||||
G_STMT_START { \
|
||||
(tv).tv_sec = (t) / GST_SECOND; \
|
||||
(tv).tv_usec = ((t) / GST_USECOND) % GST_MSECOND; \
|
||||
(tv).tv_usec = ((t) - (tv).tv_sec * GST_SECOND) / GST_USECOND; \
|
||||
} G_STMT_END
|
||||
|
||||
#define GST_CLOCK_ENTRY_TRACE_NAME "GstClockEntry"
|
||||
|
|
|
@ -193,8 +193,7 @@ gst_fdsrc_get(GstPad *pad)
|
|||
|
||||
if (src->timeout != 0)
|
||||
{
|
||||
tp->tv_sec = src->timeout / 1000000000;
|
||||
tp->tv_usec = src->timeout - t.tv_sec * 1000000000;
|
||||
GST_TIME_TO_TIMEVAL (src->timeout, t);
|
||||
}
|
||||
else
|
||||
tp = NULL;
|
||||
|
|
Loading…
Reference in a new issue