Commit 3eb5b03d authored by Wim Taymans's avatar Wim Taymans

gst/gstclock.c: Doc and API fixes.

Original commit message from CVS:
* 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.
parent 8e3ad009
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:
......
......@@ -699,6 +699,8 @@ gst_clock_get_time (GstClock * clock)
*
* Adjusts the time of @clock. This function is buggy and is scheduled to die.
*
* Obsolete, do not use.
*
* MT safe.
*/
void
......@@ -719,6 +721,8 @@ gst_clock_set_time_adjust (GstClock * clock, GstClockTime adjust)
*
* Adjusts the internal rate and offset of @clock. Obsolete, do not use.
*
* Obsolete, do not use.
*
* MT safe.
*/
void
......@@ -793,7 +797,7 @@ gst_clock_set_calibration (GstClock * clock, GstClockTime internal, GstClockTime
{
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
......@@ -805,14 +809,18 @@ gst_clock_set_calibration (GstClock * clock, GstClockTime internal, GstClockTime
}
/**
* 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
......@@ -820,14 +828,14 @@ gst_clock_get_calibration (GstClock * clock, GstClockTime * internal,
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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment