mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
libs/gst/controller/: Use gst_guint64_to_gdouble instead of gst_util_guint64_to_gdouble as it is mapped to a cast on ...
Original commit message from CVS: * libs/gst/controller/gstinterpolation.c: * libs/gst/controller/gstlfocontrolsource.c: Use gst_guint64_to_gdouble instead of gst_util_guint64_to_gdouble as it is mapped to a cast on non-win32 platforms.
This commit is contained in:
parent
627c40985b
commit
8e8a5cbf11
3 changed files with 24 additions and 17 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2008-11-17 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
||||||
|
|
||||||
|
* libs/gst/controller/gstinterpolation.c:
|
||||||
|
* libs/gst/controller/gstlfocontrolsource.c:
|
||||||
|
Use gst_guint64_to_gdouble instead of gst_util_guint64_to_gdouble
|
||||||
|
as it is mapped to a cast on non-win32 platforms.
|
||||||
|
|
||||||
2008-11-17 Stefan Kost <ensonic@users.sf.net>
|
2008-11-17 Stefan Kost <ensonic@users.sf.net>
|
||||||
|
|
||||||
* libs/gst/controller/gstcontroller.c:
|
* libs/gst/controller/gstcontroller.c:
|
||||||
|
|
|
@ -596,7 +596,7 @@ DEFINE_LINEAR_GET (long, TRUE, EMPTY);
|
||||||
|
|
||||||
DEFINE_LINEAR_GET (ulong, TRUE, EMPTY);
|
DEFINE_LINEAR_GET (ulong, TRUE, EMPTY);
|
||||||
DEFINE_LINEAR_GET (int64, TRUE, EMPTY);
|
DEFINE_LINEAR_GET (int64, TRUE, EMPTY);
|
||||||
DEFINE_LINEAR_GET (uint64, TRUE, gst_util_guint64_to_gdouble);
|
DEFINE_LINEAR_GET (uint64, TRUE, gst_guint64_to_gdouble);
|
||||||
DEFINE_LINEAR_GET (float, FALSE, EMPTY);
|
DEFINE_LINEAR_GET (float, FALSE, EMPTY);
|
||||||
DEFINE_LINEAR_GET (double, FALSE, EMPTY);
|
DEFINE_LINEAR_GET (double, FALSE, EMPTY);
|
||||||
|
|
||||||
|
@ -672,7 +672,7 @@ _interpolate_cubic_update_cache_##vtype (GstInterpolationControlSource *self) \
|
||||||
cp = node->data; \
|
cp = node->data; \
|
||||||
x_next = cp->timestamp; \
|
x_next = cp->timestamp; \
|
||||||
y_next = g_value_get_##vtype (&cp->value); \
|
y_next = g_value_get_##vtype (&cp->value); \
|
||||||
h[0] = gst_util_guint64_to_gdouble (x_next - x); \
|
h[0] = gst_guint64_to_gdouble (x_next - x); \
|
||||||
\
|
\
|
||||||
for (i = 1; i < n-1; i++) { \
|
for (i = 1; i < n-1; i++) { \
|
||||||
/* Shuffle x and y values */ \
|
/* Shuffle x and y values */ \
|
||||||
|
@ -685,7 +685,7 @@ _interpolate_cubic_update_cache_##vtype (GstInterpolationControlSource *self) \
|
||||||
x_next = cp->timestamp; \
|
x_next = cp->timestamp; \
|
||||||
y_next = g_value_get_##vtype (&cp->value); \
|
y_next = g_value_get_##vtype (&cp->value); \
|
||||||
\
|
\
|
||||||
h[i] = gst_util_guint64_to_gdouble (x_next - x); \
|
h[i] = gst_guint64_to_gdouble (x_next - x); \
|
||||||
o[i] = h[i-1]; \
|
o[i] = h[i-1]; \
|
||||||
p[i] = 2.0 * (h[i-1] + h[i]); \
|
p[i] = 2.0 * (h[i-1] + h[i]); \
|
||||||
q[i] = h[i]; \
|
q[i] = h[i]; \
|
||||||
|
@ -820,7 +820,7 @@ DEFINE_CUBIC_GET (long, TRUE, EMPTY);
|
||||||
|
|
||||||
DEFINE_CUBIC_GET (ulong, TRUE, EMPTY);
|
DEFINE_CUBIC_GET (ulong, TRUE, EMPTY);
|
||||||
DEFINE_CUBIC_GET (int64, TRUE, EMPTY);
|
DEFINE_CUBIC_GET (int64, TRUE, EMPTY);
|
||||||
DEFINE_CUBIC_GET (uint64, TRUE, gst_util_guint64_to_gdouble);
|
DEFINE_CUBIC_GET (uint64, TRUE, gst_guint64_to_gdouble);
|
||||||
DEFINE_CUBIC_GET (float, FALSE, EMPTY);
|
DEFINE_CUBIC_GET (float, FALSE, EMPTY);
|
||||||
DEFINE_CUBIC_GET (double, FALSE, EMPTY);
|
DEFINE_CUBIC_GET (double, FALSE, EMPTY);
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@ _sine_get_##type (GstLFOControlSource *self, GstClockTime timestamp) \
|
||||||
gdouble off = convert (g_value_get_##type (&self->priv->offset)); \
|
gdouble off = convert (g_value_get_##type (&self->priv->offset)); \
|
||||||
GstClockTime pos = _calculate_pos (timestamp, self->priv->timeshift, self->priv->period); \
|
GstClockTime pos = _calculate_pos (timestamp, self->priv->timeshift, self->priv->period); \
|
||||||
\
|
\
|
||||||
ret = sin (2.0 * M_PI * (self->priv->frequency / GST_SECOND) * gst_util_guint64_to_gdouble (pos)); \
|
ret = sin (2.0 * M_PI * (self->priv->frequency / GST_SECOND) * gst_guint64_to_gdouble (pos)); \
|
||||||
ret *= amp; \
|
ret *= amp; \
|
||||||
ret += off; \
|
ret += off; \
|
||||||
\
|
\
|
||||||
|
@ -119,7 +119,7 @@ DEFINE_SINE (long, TRUE, EMPTY);
|
||||||
|
|
||||||
DEFINE_SINE (ulong, TRUE, EMPTY);
|
DEFINE_SINE (ulong, TRUE, EMPTY);
|
||||||
DEFINE_SINE (int64, TRUE, EMPTY);
|
DEFINE_SINE (int64, TRUE, EMPTY);
|
||||||
DEFINE_SINE (uint64, TRUE, gst_util_guint64_to_gdouble);
|
DEFINE_SINE (uint64, TRUE, gst_guint64_to_gdouble);
|
||||||
DEFINE_SINE (float, FALSE, EMPTY);
|
DEFINE_SINE (float, FALSE, EMPTY);
|
||||||
DEFINE_SINE (double, FALSE, EMPTY);
|
DEFINE_SINE (double, FALSE, EMPTY);
|
||||||
|
|
||||||
|
@ -205,7 +205,7 @@ DEFINE_SQUARE (long, TRUE, EMPTY);
|
||||||
|
|
||||||
DEFINE_SQUARE (ulong, TRUE, EMPTY);
|
DEFINE_SQUARE (ulong, TRUE, EMPTY);
|
||||||
DEFINE_SQUARE (int64, TRUE, EMPTY);
|
DEFINE_SQUARE (int64, TRUE, EMPTY);
|
||||||
DEFINE_SQUARE (uint64, TRUE, gst_util_guint64_to_gdouble);
|
DEFINE_SQUARE (uint64, TRUE, gst_guint64_to_gdouble);
|
||||||
DEFINE_SQUARE (float, FALSE, EMPTY);
|
DEFINE_SQUARE (float, FALSE, EMPTY);
|
||||||
DEFINE_SQUARE (double, FALSE, EMPTY);
|
DEFINE_SQUARE (double, FALSE, EMPTY);
|
||||||
|
|
||||||
|
@ -241,7 +241,7 @@ _saw_get_##type (GstLFOControlSource *self, GstClockTime timestamp) \
|
||||||
GstClockTime pos = _calculate_pos (timestamp, self->priv->timeshift, period); \
|
GstClockTime pos = _calculate_pos (timestamp, self->priv->timeshift, period); \
|
||||||
gdouble ret; \
|
gdouble ret; \
|
||||||
\
|
\
|
||||||
ret = - ((gst_util_guint64_to_gdouble (pos) - gst_util_guint64_to_gdouble (period) / 2.0) * ((2.0 * amp) / gst_util_guint64_to_gdouble (period)));\
|
ret = - ((gst_guint64_to_gdouble (pos) - gst_guint64_to_gdouble (period) / 2.0) * ((2.0 * amp) / gst_guint64_to_gdouble (period)));\
|
||||||
\
|
\
|
||||||
ret += off; \
|
ret += off; \
|
||||||
\
|
\
|
||||||
|
@ -288,7 +288,7 @@ DEFINE_SAW (long, TRUE, EMPTY);
|
||||||
|
|
||||||
DEFINE_SAW (ulong, TRUE, EMPTY);
|
DEFINE_SAW (ulong, TRUE, EMPTY);
|
||||||
DEFINE_SAW (int64, TRUE, EMPTY);
|
DEFINE_SAW (int64, TRUE, EMPTY);
|
||||||
DEFINE_SAW (uint64, TRUE, gst_util_guint64_to_gdouble);
|
DEFINE_SAW (uint64, TRUE, gst_guint64_to_gdouble);
|
||||||
DEFINE_SAW (float, FALSE, EMPTY);
|
DEFINE_SAW (float, FALSE, EMPTY);
|
||||||
DEFINE_SAW (double, FALSE, EMPTY);
|
DEFINE_SAW (double, FALSE, EMPTY);
|
||||||
|
|
||||||
|
@ -324,7 +324,7 @@ _rsaw_get_##type (GstLFOControlSource *self, GstClockTime timestamp) \
|
||||||
GstClockTime pos = _calculate_pos (timestamp, self->priv->timeshift, period); \
|
GstClockTime pos = _calculate_pos (timestamp, self->priv->timeshift, period); \
|
||||||
gdouble ret; \
|
gdouble ret; \
|
||||||
\
|
\
|
||||||
ret = ((gst_util_guint64_to_gdouble (pos) - gst_util_guint64_to_gdouble (period) / 2.0) * ((2.0 * amp) / gst_util_guint64_to_gdouble (period)));\
|
ret = ((gst_guint64_to_gdouble (pos) - gst_guint64_to_gdouble (period) / 2.0) * ((2.0 * amp) / gst_guint64_to_gdouble (period)));\
|
||||||
\
|
\
|
||||||
ret += off; \
|
ret += off; \
|
||||||
\
|
\
|
||||||
|
@ -371,7 +371,7 @@ DEFINE_RSAW (long, TRUE, EMPTY);
|
||||||
|
|
||||||
DEFINE_RSAW (ulong, TRUE, EMPTY);
|
DEFINE_RSAW (ulong, TRUE, EMPTY);
|
||||||
DEFINE_RSAW (int64, TRUE, EMPTY);
|
DEFINE_RSAW (int64, TRUE, EMPTY);
|
||||||
DEFINE_RSAW (uint64, TRUE, gst_util_guint64_to_gdouble);
|
DEFINE_RSAW (uint64, TRUE, gst_guint64_to_gdouble);
|
||||||
DEFINE_RSAW (float, FALSE, EMPTY);
|
DEFINE_RSAW (float, FALSE, EMPTY);
|
||||||
DEFINE_RSAW (double, FALSE, EMPTY);
|
DEFINE_RSAW (double, FALSE, EMPTY);
|
||||||
|
|
||||||
|
@ -407,12 +407,12 @@ _triangle_get_##type (GstLFOControlSource *self, GstClockTime timestamp) \
|
||||||
GstClockTime pos = _calculate_pos (timestamp, self->priv->timeshift, period); \
|
GstClockTime pos = _calculate_pos (timestamp, self->priv->timeshift, period); \
|
||||||
gdouble ret; \
|
gdouble ret; \
|
||||||
\
|
\
|
||||||
if (gst_util_guint64_to_gdouble (pos) <= gst_util_guint64_to_gdouble (period) / 4.0) \
|
if (gst_guint64_to_gdouble (pos) <= gst_guint64_to_gdouble (period) / 4.0) \
|
||||||
ret = gst_util_guint64_to_gdouble (pos) * ((4.0 * amp) / gst_util_guint64_to_gdouble (period)); \
|
ret = gst_guint64_to_gdouble (pos) * ((4.0 * amp) / gst_guint64_to_gdouble (period)); \
|
||||||
else if (gst_util_guint64_to_gdouble (pos) <= (3.0 * gst_util_guint64_to_gdouble (period)) / 4.0) \
|
else if (gst_guint64_to_gdouble (pos) <= (3.0 * gst_guint64_to_gdouble (period)) / 4.0) \
|
||||||
ret = -(gst_util_guint64_to_gdouble (pos) - gst_util_guint64_to_gdouble (period) / 2.0) * ((4.0 * amp) / gst_util_guint64_to_gdouble (period)); \
|
ret = -(gst_guint64_to_gdouble (pos) - gst_guint64_to_gdouble (period) / 2.0) * ((4.0 * amp) / gst_guint64_to_gdouble (period)); \
|
||||||
else \
|
else \
|
||||||
ret = gst_util_guint64_to_gdouble (period) - gst_util_guint64_to_gdouble (pos) * ((4.0 * amp) / gst_util_guint64_to_gdouble (period)); \
|
ret = gst_guint64_to_gdouble (period) - gst_guint64_to_gdouble (pos) * ((4.0 * amp) / gst_guint64_to_gdouble (period)); \
|
||||||
\
|
\
|
||||||
ret += off; \
|
ret += off; \
|
||||||
\
|
\
|
||||||
|
@ -459,7 +459,7 @@ DEFINE_TRIANGLE (long, TRUE, EMPTY);
|
||||||
|
|
||||||
DEFINE_TRIANGLE (ulong, TRUE, EMPTY);
|
DEFINE_TRIANGLE (ulong, TRUE, EMPTY);
|
||||||
DEFINE_TRIANGLE (int64, TRUE, EMPTY);
|
DEFINE_TRIANGLE (int64, TRUE, EMPTY);
|
||||||
DEFINE_TRIANGLE (uint64, TRUE, gst_util_guint64_to_gdouble);
|
DEFINE_TRIANGLE (uint64, TRUE, gst_guint64_to_gdouble);
|
||||||
DEFINE_TRIANGLE (float, FALSE, EMPTY);
|
DEFINE_TRIANGLE (float, FALSE, EMPTY);
|
||||||
DEFINE_TRIANGLE (double, FALSE, EMPTY);
|
DEFINE_TRIANGLE (double, FALSE, EMPTY);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue