mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 04:36:20 +00:00
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.
This commit is contained in:
parent
8e3ad00950
commit
3eb5b03dfd
2 changed files with 26 additions and 10 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
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>
|
2005-11-18 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
* gst/gsterror.c:
|
* 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.
|
* Adjusts the time of @clock. This function is buggy and is scheduled to die.
|
||||||
*
|
*
|
||||||
|
* Obsolete, do not use.
|
||||||
|
*
|
||||||
* MT safe.
|
* MT safe.
|
||||||
*/
|
*/
|
||||||
void
|
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.
|
* Adjusts the internal rate and offset of @clock. Obsolete, do not use.
|
||||||
*
|
*
|
||||||
|
* Obsolete, do not use.
|
||||||
|
*
|
||||||
* MT safe.
|
* MT safe.
|
||||||
*/
|
*/
|
||||||
void
|
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 (GST_IS_CLOCK (clock));
|
||||||
g_return_if_fail (rate > 0.0);
|
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);
|
GST_LOCK (clock);
|
||||||
/* these need to be reworked for the api freeze break, we're really abusing
|
/* 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
|
* gst_clock_get_calibration
|
||||||
* @clock: a #GstClock to adjust
|
* @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
|
* @rate: a location to store the rate
|
||||||
* @offset: a location to store the offset
|
|
||||||
*
|
*
|
||||||
* Gets the internal rate and reference time of @clock. See
|
* Gets the internal rate and reference time of @clock. See
|
||||||
* gst_clock_set_calibration() for more information.
|
* 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.
|
* MT safe.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
|
@ -820,14 +828,14 @@ gst_clock_get_calibration (GstClock * clock, GstClockTime * internal,
|
||||||
GstClockTime * external, gdouble * rate)
|
GstClockTime * external, gdouble * rate)
|
||||||
{
|
{
|
||||||
g_return_if_fail (GST_IS_CLOCK (clock));
|
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);
|
GST_LOCK (clock);
|
||||||
*rate = clock->A.rate;
|
if (rate)
|
||||||
*external = clock->A.offset;
|
*rate = clock->A.rate;
|
||||||
*internal = clock->adjust;
|
if (external)
|
||||||
|
*external = clock->A.offset;
|
||||||
|
if (internal)
|
||||||
|
*internal = clock->adjust;
|
||||||
GST_UNLOCK (clock);
|
GST_UNLOCK (clock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue