+2005-11-18 Wim Taymans <wim@fluendo.com>
+
+ * gst/gstclock.c: (gst_clock_set_calibration),
+ (gst_clock_get_calibration):
+ Doc and API fixes.
+ Callibration can be set with internal time equal to current
+ internal time too.
+
2005-11-18 Thomas Vander Stichele <thomas at apestaart dot org>
* gst/gsterror.c:
*
* Adjusts the time of @clock. This function is buggy and is scheduled to die.
*
+ * Obsolete, do not use.
+ *
* MT safe.
*/
void
*
* Adjusts the internal rate and offset of @clock. Obsolete, do not use.
*
+ * Obsolete, do not use.
+ *
* MT safe.
*/
void
{
g_return_if_fail (GST_IS_CLOCK (clock));
g_return_if_fail (rate > 0.0);
- g_return_if_fail (internal < gst_clock_get_internal_time (clock));
+ g_return_if_fail (internal <= gst_clock_get_internal_time (clock));
GST_LOCK (clock);
/* these need to be reworked for the api freeze break, we're really abusing
}
/**
- * gst_clock_get_rate_offset
- * @clock: a #GstClock to adjust
+ * gst_clock_get_calibration
+ * @clock: a #GstClock
+ * @internal: a location to store the internal time
+ * @external: a location to store the external time
* @rate: a location to store the rate
- * @offset: a location to store the offset
*
* Gets the internal rate and reference time of @clock. See
* gst_clock_set_calibration() for more information.
*
+ * @internal, @external and @rate can be left NULL if the caller
+ * is not interested in the values.
+ *
* MT safe.
*/
void
GstClockTime * external, gdouble * rate)
{
g_return_if_fail (GST_IS_CLOCK (clock));
- g_return_if_fail (rate != NULL);
- g_return_if_fail (internal != NULL);
- g_return_if_fail (external != NULL);
GST_LOCK (clock);
- *rate = clock->A.rate;
- *external = clock->A.offset;
- *internal = clock->adjust;
+ if (rate)
+ *rate = clock->A.rate;
+ if (external)
+ *external = clock->A.offset;
+ if (internal)
+ *internal = clock->adjust;
GST_UNLOCK (clock);
}