Sets our main struct and passes it to the parent class
the main Gtk struct as a void*
Get the main Gtk struct
Get a handle to the default system clock. The refcount of the clock will be increased so you need to unref the clock after usage.
the main Gtk struct
the main Gtk struct
Get the main Gtk struct
the main Gtk struct as a void*
The time master of the master clock and the time slave of the slave clock are added to the list of observations. If enough observations are available, a linear regression algorithm is run on the observations and clock is recalibrated. If this functions returns TRUE, r_squared will contain the correlation coefficient of the interpolation. A value of 1.0 means a perfect regression was performed. This value can be used to control the sampling frequency of the master and slave clocks.
Set master as the master clock for clock. clock will be automatically calibrated so that gst_clock_get_time() reports the same time as the master clock. A clock provider that slaves its clock to a master can get the current calibration values with gst_clock_get_calibration(). master can be NULL in which case clock will not be slaved anymore. It will however keep reporting its time adjusted with the last configured rate and time offsets.
Get the master clock that clock is slaved to or NULL when the clock is not slaved to any master clock.
Set the accuracy of the clock. Some clocks have the possibility to operate with different accuracy at the expense of more resource usage. There is normally no need to change the default resolution of a clock. The resolution of a clock can only be changed if the clock has the GST_CLOCK_FLAG_CAN_SET_RESOLUTION flag set.
Get the accuracy of the clock. The accuracy of the clock is the granularity of the values returned by gst_clock_get_time().
Gets the current time of the given clock. The time is always monotonically increasing and adjusted according to the current offset and rate.
Get a GstClockID from clock to trigger a single shot notification at the requested time. The single shot id should be unreffed after usage. Free-function: gst_clock_id_unref
Get an ID from clock to trigger a periodic notification. The periodic notifications will start at time start_time and will then be fired with the given interval. id should be unreffed after usage. Free-function: gst_clock_id_unref
Reinitializes the provided single shot id to the provided time. Does not modify the reference count.
Reinitializes the provided periodic id to the provided start time and interval. Does not modify the reference count.
Gets the current internal time of the given clock. The time is returned unadjusted for the offset and the rate.
Converts the given internal clock time to the external time, adjusting for the rate and reference time set with gst_clock_set_calibration() and making sure that the returned time is increasing. This function should be called with the clock's OBJECT_LOCK held and is mainly used by clock subclasses. This function is the reverse of gst_clock_unadjust_unlocked().
Converts the given external clock time to the internal time of clock, using the rate and reference time set with gst_clock_set_calibration(). This function should be called with the clock's OBJECT_LOCK held and is mainly used by clock subclasses. This function is the reverse of gst_clock_adjust_unlocked().
Gets the internal rate and reference time of clock. See gst_clock_set_calibration() for more information. internal, external, rate_num, and rate_denom can be left NULL if the caller is not interested in the values. MT safe.
Adjusts the rate and time of clock. A rate of 1/1 is the normal speed of the clock. Values bigger than 1/1 make the clock go faster. internal and external are calibration parameters that arrange that gst_clock_get_time() should have been external at internal time internal. This internal time should not be in the future; that is, it should be less than the value of gst_clock_get_internal_time() when this function is called. Subsequent calls to gst_clock_get_time() will return clock times computed as
Get the amount of time that master and slave clocks are sampled.
Set the amount of time, in nanoseconds, to sample master and slave clocks
Get the time of the clock ID
Perform a blocking wait on id. id should have been created with gst_clock_new_single_shot_id() or gst_clock_new_periodic_id() and should not have been unscheduled with a call to gst_clock_id_unschedule(). If the jitter argument is not NULL and this function returns GST_CLOCK_OK or GST_CLOCK_EARLY, it will contain the difference against the clock and the time of id when this method was called. Positive values indicate how late id was relative to the clock (in which case this function will return GST_CLOCK_EARLY). Negative values indicate how much time was spent waiting on the clock before this function returned.
Register a callback on the given GstClockID id with the given function and user_data. When passing a GstClockID with an invalid time to this function, the callback will be called immediately with a time set to GST_CLOCK_TIME_NONE. The callback will be called when the time of id has been reached. The callback func can be invoked from any thread, either provided by the core or from a streaming thread. The application should be prepared for this.
Cancel an outstanding request with id. This can either be an outstanding async notification or a pending sync notification. After this call, id cannot be used anymore to receive sync or async notifications, you need to create a new GstClockID. MT safe.
Compares the two GstClockID instances. This function can be used as a GCompareFunc when sorting ids.
Increase the refcount of given id.
Unref given id. When the refcount reaches 0 the GstClockID will be freed. MT safe.
The GStreamer core provides a GstSystemClock based on the system time. Asynchronous callbacks are scheduled from an internal thread.
Clock implementors are encouraged to subclass this systemclock as it implements the async notification.
Subclasses can however override all of the important methods for sync and async notifications to implement their own callback methods or blocking wait operations.
Last reviewed on 2006-03-08 (0.10.4)