2002-01-15 00:41:22 +00:00
|
|
|
<!-- ##### SECTION Title ##### -->
|
|
|
|
GstClock
|
|
|
|
|
|
|
|
<!-- ##### SECTION Short_Description ##### -->
|
2002-03-31 14:00:33 +00:00
|
|
|
Abstract class for global clocks
|
2002-01-15 00:41:22 +00:00
|
|
|
|
|
|
|
<!-- ##### SECTION Long_Description ##### -->
|
|
|
|
<para>
|
2002-06-12 22:27:18 +00:00
|
|
|
GStreamer uses a global clock to synchronise the plugins in a pipeline.
|
|
|
|
Different clock implementations are possible by implementing this abstract
|
|
|
|
base class.
|
|
|
|
</para>
|
|
|
|
<para>
|
2005-06-29 14:52:44 +00:00
|
|
|
The clock time is always measured in nanoseconds and always increases. The
|
|
|
|
pipeline uses the clock to calculate the stream time.
|
|
|
|
Usually all renderers sync to the global clock so that the clock is always
|
|
|
|
a good measure of the current playback time in the pipeline.
|
2002-01-15 00:41:22 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- ##### SECTION See_Also ##### -->
|
|
|
|
<para>
|
2002-03-31 14:00:33 +00:00
|
|
|
#GstSystemClock
|
2002-01-15 00:41:22 +00:00
|
|
|
</para>
|
|
|
|
|
2005-07-12 17:04:41 +00:00
|
|
|
<!-- ##### SECTION Stability_Level ##### -->
|
|
|
|
|
|
|
|
|
2004-04-08 14:45:13 +00:00
|
|
|
<!-- ##### STRUCT GstClock ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
2005-03-29 10:55:39 +00:00
|
|
|
@flags:
|
2004-05-03 16:03:24 +00:00
|
|
|
|
|
|
|
<!-- ##### ARG GstClock:stats ##### -->
|
|
|
|
<para>
|
|
|
|
Boolean property to activate stat generation on the clock.
|
|
|
|
</para>
|
|
|
|
|
2002-01-15 00:41:22 +00:00
|
|
|
<!-- ##### TYPEDEF GstClockTime ##### -->
|
|
|
|
<para>
|
2002-06-12 22:27:18 +00:00
|
|
|
A datatype to hold a time, measured in nanoseconds.
|
2002-01-15 00:41:22 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### TYPEDEF GstClockTimeDiff ##### -->
|
|
|
|
<para>
|
2002-06-12 22:27:18 +00:00
|
|
|
A datatype to hold a timedifference, measured in nanoseconds.
|
2002-03-31 14:00:33 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### TYPEDEF GstClockID ##### -->
|
|
|
|
<para>
|
|
|
|
A detatype to hold the handle to an outstanding async clock callback
|
|
|
|
</para>
|
|
|
|
|
2002-01-15 00:41:22 +00:00
|
|
|
|
2002-06-12 22:27:18 +00:00
|
|
|
<!-- ##### MACRO GST_CLOCK_TIME_NONE ##### -->
|
|
|
|
<para>
|
|
|
|
Constant to define an undefined clock time
|
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
2004-03-25 04:20:33 +00:00
|
|
|
<!-- ##### MACRO GST_CLOCK_TIME_IS_VALID ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@time:
|
|
|
|
|
|
|
|
|
2002-06-12 22:27:18 +00:00
|
|
|
<!-- ##### MACRO GST_SECOND ##### -->
|
|
|
|
<para>
|
|
|
|
Constant that defines one GStreamer second
|
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO GST_MSECOND ##### -->
|
|
|
|
<para>
|
|
|
|
Constant that defines one GStreamer millisecond
|
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO GST_USECOND ##### -->
|
|
|
|
<para>
|
|
|
|
Constant that defines one GStreamer microsecond
|
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO GST_NSECOND ##### -->
|
|
|
|
<para>
|
|
|
|
Constant that defines one GStreamer nanosecond
|
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
2002-01-15 00:41:22 +00:00
|
|
|
<!-- ##### MACRO GST_CLOCK_DIFF ##### -->
|
|
|
|
<para>
|
2002-03-31 14:00:33 +00:00
|
|
|
Calculate a difference between to clock times.
|
2002-01-15 00:41:22 +00:00
|
|
|
</para>
|
|
|
|
|
2002-03-31 14:00:33 +00:00
|
|
|
@s: the first time
|
|
|
|
@e: the second time
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO GST_TIMEVAL_TO_TIME ##### -->
|
|
|
|
<para>
|
|
|
|
Convert a GTimeVal to a GstClockTime
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@tv: the timeval to convert
|
2002-01-15 00:41:22 +00:00
|
|
|
|
|
|
|
|
2002-06-12 22:27:18 +00:00
|
|
|
<!-- ##### MACRO GST_TIME_TO_TIMEVAL ##### -->
|
|
|
|
<para>
|
|
|
|
Convert a GstClockTime to a GTimeVal
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@t: The GstClockTime to convert
|
|
|
|
@tv: The target timeval
|
|
|
|
|
|
|
|
|
2004-03-25 04:20:33 +00:00
|
|
|
<!-- ##### MACRO GST_CLOCK_ENTRY_TRACE_NAME ##### -->
|
|
|
|
<para>
|
|
|
|
The name used for tracing clock entry allocations.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
|
2002-12-14 13:02:16 +00:00
|
|
|
<!-- ##### STRUCT GstClockEntry ##### -->
|
|
|
|
<para>
|
|
|
|
All pending timeouts or periodic notifies are converted into
|
|
|
|
an entry.
|
|
|
|
</para>
|
|
|
|
|
2005-03-29 10:55:39 +00:00
|
|
|
@refcount:
|
2002-12-14 13:02:16 +00:00
|
|
|
|
|
|
|
<!-- ##### USER_FUNCTION GstClockCallback ##### -->
|
|
|
|
<para>
|
|
|
|
The function prototype of the callback.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@clock: The clock that triggered the callback
|
|
|
|
@time: The time it was triggered
|
|
|
|
@id: The id that expired
|
|
|
|
@user_data: user data passed in the async_wait call
|
2005-01-24 17:04:08 +00:00
|
|
|
@Returns: %TRUE or %FALSE (currently unused)
|
2002-12-14 13:02:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### ENUM GstClockEntryType ##### -->
|
|
|
|
<para>
|
|
|
|
The type of the clock entry
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@GST_CLOCK_ENTRY_SINGLE: a single shot timeout
|
|
|
|
@GST_CLOCK_ENTRY_PERIODIC: a periodic timeout request
|
|
|
|
|
|
|
|
<!-- ##### MACRO GST_CLOCK_ENTRY ##### -->
|
|
|
|
<para>
|
|
|
|
Cast to a clock entry
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@entry: the entry to cast
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO GST_CLOCK_ENTRY_CLOCK ##### -->
|
|
|
|
<para>
|
|
|
|
Get the owner clock of the entry
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@entry: the entry to query
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO GST_CLOCK_ENTRY_TYPE ##### -->
|
|
|
|
<para>
|
|
|
|
Get the type of the clock entry
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@entry: the entry to query
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO GST_CLOCK_ENTRY_TIME ##### -->
|
|
|
|
<para>
|
|
|
|
Get the requested time of this entry
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@entry: the entry to query
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO GST_CLOCK_ENTRY_INTERVAL ##### -->
|
|
|
|
<para>
|
|
|
|
Get the interval of this periodic entry
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@entry: the entry to query
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### MACRO GST_CLOCK_ENTRY_STATUS ##### -->
|
|
|
|
<para>
|
|
|
|
The status of the entry
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@entry: the entry to query
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### ENUM GstClockReturn ##### -->
|
|
|
|
<para>
|
|
|
|
The return value of a clock operation.
|
|
|
|
</para>
|
|
|
|
|
2005-06-29 14:52:44 +00:00
|
|
|
@GST_CLOCK_OK: The operation succeded.
|
2002-12-14 13:02:16 +00:00
|
|
|
@GST_CLOCK_EARLY: The operation was scheduled too late.
|
2005-06-29 14:52:44 +00:00
|
|
|
@GST_CLOCK_UNSCHEDULED: The clockID was unscheduled
|
|
|
|
@GST_CLOCK_BUSY: The ClockID is busy
|
|
|
|
@GST_CLOCK_BADTIME: A bad time was provided to a function.
|
2002-12-14 13:02:16 +00:00
|
|
|
@GST_CLOCK_ERROR: An error occured
|
|
|
|
@GST_CLOCK_UNSUPPORTED: Operation is not supported
|
|
|
|
|
|
|
|
<!-- ##### ENUM GstClockFlags ##### -->
|
|
|
|
<para>
|
|
|
|
The capabilities of this clock
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@GST_CLOCK_FLAG_CAN_DO_SINGLE_SYNC: This clock can do a single sync timeut request
|
|
|
|
@GST_CLOCK_FLAG_CAN_DO_SINGLE_ASYNC: This clock can do a single async timeout request
|
|
|
|
@GST_CLOCK_FLAG_CAN_DO_PERIODIC_SYNC: This clock can do sync periodic timeout requests
|
|
|
|
@GST_CLOCK_FLAG_CAN_DO_PERIODIC_ASYNC: This clock can do async periodic timeout callbacks
|
|
|
|
@GST_CLOCK_FLAG_CAN_SET_RESOLUTION: The resolution of this clock can be changed
|
|
|
|
|
|
|
|
<!-- ##### MACRO GST_CLOCK_FLAGS ##### -->
|
|
|
|
<para>
|
|
|
|
Get the clock flags
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@clock: the clock to query
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gst_clock_set_resolution ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@clock:
|
|
|
|
@resolution:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gst_clock_get_resolution ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@clock:
|
|
|
|
@Returns:
|
2002-03-31 14:00:33 +00:00
|
|
|
|
2002-01-15 00:41:22 +00:00
|
|
|
|
2002-12-14 13:02:16 +00:00
|
|
|
<!-- ##### FUNCTION gst_clock_get_time ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@clock:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gst_clock_new_single_shot_id ##### -->
|
2002-03-31 14:00:33 +00:00
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@clock:
|
2002-12-14 13:02:16 +00:00
|
|
|
@time:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gst_clock_new_periodic_id ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@clock:
|
|
|
|
@start_time:
|
|
|
|
@interval:
|
2002-03-31 14:00:33 +00:00
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2002-06-12 22:27:18 +00:00
|
|
|
<!-- ##### FUNCTION gst_clock_id_get_time ##### -->
|
2002-03-31 14:00:33 +00:00
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
2002-01-15 00:41:22 +00:00
|
|
|
|
2002-06-12 22:27:18 +00:00
|
|
|
@id:
|
|
|
|
@Returns:
|
2002-03-31 14:00:33 +00:00
|
|
|
|
|
|
|
|
2002-12-14 13:02:16 +00:00
|
|
|
<!-- ##### FUNCTION gst_clock_id_wait ##### -->
|
2002-01-15 00:41:22 +00:00
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
2002-12-14 13:02:16 +00:00
|
|
|
@id:
|
|
|
|
@jitter:
|
2002-01-15 00:41:22 +00:00
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
2002-12-14 13:02:16 +00:00
|
|
|
<!-- ##### FUNCTION gst_clock_id_wait_async ##### -->
|
2002-06-12 22:27:18 +00:00
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
2002-12-14 13:02:16 +00:00
|
|
|
@id:
|
|
|
|
@func:
|
|
|
|
@user_data:
|
2002-12-08 14:39:38 +00:00
|
|
|
@Returns:
|
2002-06-12 22:27:18 +00:00
|
|
|
|
|
|
|
|
2002-12-14 13:02:16 +00:00
|
|
|
<!-- ##### FUNCTION gst_clock_id_unschedule ##### -->
|
2002-12-08 14:39:38 +00:00
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
2002-12-14 13:02:16 +00:00
|
|
|
@id:
|
|
|
|
|
|
|
|
|