| Copyright | Will Thompson and Iñaki García Etxebarria |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
GI.Gst.Objects.Clock
Contents
- Exported types
- Methods
- addObservation
- addObservationUnapplied
- adjustUnlocked
- adjustWithCalibration
- getCalibration
- getInternalTime
- getMaster
- getResolution
- getTime
- getTimeout
- idCompareFunc
- idGetClock
- idGetTime
- idRef
- idUnref
- idUnschedule
- idUsesClock
- idWait
- idWaitAsync
- isSynced
- newPeriodicId
- newSingleShotId
- periodicIdReinit
- setCalibration
- setMaster
- setResolution
- setSynced
- setTimeout
- singleShotIdReinit
- unadjustUnlocked
- unadjustWithCalibration
- waitForSync
- Properties
- Signals
Description
GStreamer uses a global clock to synchronize the plugins in a pipeline.
Different clock implementations are possible by implementing this abstract
base class or, more conveniently, by subclassing SystemClock.
The Clock returns a monotonically increasing time with the method
clockGetTime. Its accuracy and base time depend on the specific
clock implementation but time is always expressed in nanoseconds. Since the
baseline of the clock is undefined, the clock time returned is not
meaningful in itself, what matters are the deltas between two clock times.
The time returned by a clock is called the absolute time.
The pipeline uses the clock to calculate the running time. Usually all
renderers synchronize to the global clock using the buffer timestamps, the
GST_EVENT_SEGMENT events and the element's base time, see Pipeline.
A clock implementation can support periodic and single shot clock notifications both synchronous and asynchronous.
One first needs to create a GstClockID for the periodic or single shot
notification using clockNewSingleShotId or
clockNewPeriodicId.
To perform a blocking wait for the specific time of the GstClockID use
clockIdWait. To receive a callback when the specific time is reached
in the clock use clockIdWaitAsync. Both these calls can be
interrupted with the clockIdUnschedule call. If the blocking wait is
unscheduled a return value of GST_CLOCK_UNSCHEDULED is returned.
Periodic callbacks scheduled async will be repeatedly called automatically
until they are unscheduled. To schedule a sync periodic callback,
clockIdWait should be called repeatedly.
The async callbacks can happen from any thread, either provided by the core or from a streaming thread. The application should be prepared for this.
A GstClockID that has been unscheduled cannot be used again for any wait
operation, a new GstClockID should be created and the old unscheduled one
should be destroyed with clockIdUnref.
It is possible to perform a blocking wait on the same GstClockID from
multiple threads. However, registering the same GstClockID for multiple
async notifications is not possible, the callback will only be called for
the thread registering the entry last.
None of the wait operations unref the GstClockID, the owner is responsible
for unreffing the ids itself. This holds for both periodic and single shot
notifications. The reason being that the owner of the GstClockID has to
keep a handle to the GstClockID to unblock the wait on FLUSHING events or
state changes and if the entry would be unreffed automatically, the handle
might become invalid without any notification.
These clock operations do not operate on the running time, so the callbacks will also occur when not in PLAYING state as if the clock just keeps on running. Some clocks however do not progress when the element that provided the clock is not PLAYING.
When a clock has the GST_CLOCK_FLAG_CAN_SET_MASTER flag set, it can be
slaved to another Clock with clockSetMaster. The clock will
then automatically be synchronized to this master clock by repeatedly
sampling the master clock and the slave clock and recalibrating the slave
clock with clockSetCalibration. This feature is mostly useful for
plugins that have an internal clock but must operate with another clock
selected by the Pipeline. They can track the offset and rate difference
of their internal clock relative to the master clock by using the
clockGetCalibration function.
The master/slave synchronisation can be tuned with the Clock:timeout, Clock:windowSize and Clock:windowThreshold properties. The Clock:timeout property defines the interval to sample the master clock and run the calibration functions. Clock:windowSize defines the number of samples to use when calibrating and Clock:windowThreshold defines the minimum number of samples before the calibration is performed.
Synopsis
- newtype Clock = Clock (ManagedPtr Clock)
- class (GObject o, IsDescendantOf Clock o) => IsClock o
- toClock :: (MonadIO m, IsClock o) => o -> m Clock
- clockAddObservation :: (HasCallStack, MonadIO m, IsClock a) => a -> Word64 -> Word64 -> m (Bool, Double)
- clockAddObservationUnapplied :: (HasCallStack, MonadIO m, IsClock a) => a -> Word64 -> Word64 -> m (Bool, Double, Word64, Word64, Word64, Word64)
- clockAdjustUnlocked :: (HasCallStack, MonadIO m, IsClock a) => a -> Word64 -> m Word64
- clockAdjustWithCalibration :: (HasCallStack, MonadIO m, IsClock a) => Maybe a -> Word64 -> Word64 -> Word64 -> Word64 -> Word64 -> m Word64
- clockGetCalibration :: (HasCallStack, MonadIO m, IsClock a) => a -> m (Word64, Word64, Word64, Word64)
- clockGetInternalTime :: (HasCallStack, MonadIO m, IsClock a) => a -> m Word64
- clockGetMaster :: (HasCallStack, MonadIO m, IsClock a) => a -> m (Maybe Clock)
- clockGetResolution :: (HasCallStack, MonadIO m, IsClock a) => a -> m Word64
- clockGetTime :: (HasCallStack, MonadIO m, IsClock a) => a -> m Word64
- clockGetTimeout :: (HasCallStack, MonadIO m, IsClock a) => a -> m Word64
- clockIdCompareFunc :: (HasCallStack, MonadIO m) => Ptr () -> Ptr () -> m Int32
- clockIdGetClock :: (HasCallStack, MonadIO m) => Ptr () -> m (Maybe Clock)
- clockIdGetTime :: (HasCallStack, MonadIO m) => Ptr () -> m Word64
- clockIdRef :: (HasCallStack, MonadIO m) => Ptr () -> m (Ptr ())
- clockIdUnref :: (HasCallStack, MonadIO m) => Ptr () -> m ()
- clockIdUnschedule :: (HasCallStack, MonadIO m) => Ptr () -> m ()
- clockIdUsesClock :: (HasCallStack, MonadIO m, IsClock a) => Ptr () -> a -> m Bool
- clockIdWait :: (HasCallStack, MonadIO m) => Ptr () -> m (ClockReturn, Int64)
- clockIdWaitAsync :: (HasCallStack, MonadIO m) => Ptr () -> ClockCallback -> m ClockReturn
- clockIsSynced :: (HasCallStack, MonadIO m, IsClock a) => a -> m Bool
- clockNewPeriodicId :: (HasCallStack, MonadIO m, IsClock a) => a -> Word64 -> Word64 -> m (Ptr ())
- clockNewSingleShotId :: (HasCallStack, MonadIO m, IsClock a) => a -> Word64 -> m (Ptr ())
- clockPeriodicIdReinit :: (HasCallStack, MonadIO m, IsClock a) => a -> Ptr () -> Word64 -> Word64 -> m Bool
- clockSetCalibration :: (HasCallStack, MonadIO m, IsClock a) => a -> Word64 -> Word64 -> Word64 -> Word64 -> m ()
- clockSetMaster :: (HasCallStack, MonadIO m, IsClock a, IsClock b) => a -> Maybe b -> m Bool
- clockSetResolution :: (HasCallStack, MonadIO m, IsClock a) => a -> Word64 -> m Word64
- clockSetSynced :: (HasCallStack, MonadIO m, IsClock a) => a -> Bool -> m ()
- clockSetTimeout :: (HasCallStack, MonadIO m, IsClock a) => a -> Word64 -> m ()
- clockSingleShotIdReinit :: (HasCallStack, MonadIO m, IsClock a) => a -> Ptr () -> Word64 -> m Bool
- clockUnadjustUnlocked :: (HasCallStack, MonadIO m, IsClock a) => a -> Word64 -> m Word64
- clockUnadjustWithCalibration :: (HasCallStack, MonadIO m, IsClock a) => Maybe a -> Word64 -> Word64 -> Word64 -> Word64 -> Word64 -> m Word64
- clockWaitForSync :: (HasCallStack, MonadIO m, IsClock a) => a -> Word64 -> m Bool
- constructClockTimeout :: (IsClock o, MonadIO m) => Word64 -> m (GValueConstruct o)
- getClockTimeout :: (MonadIO m, IsClock o) => o -> m Word64
- setClockTimeout :: (MonadIO m, IsClock o) => o -> Word64 -> m ()
- constructClockWindowSize :: (IsClock o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getClockWindowSize :: (MonadIO m, IsClock o) => o -> m Int32
- setClockWindowSize :: (MonadIO m, IsClock o) => o -> Int32 -> m ()
- constructClockWindowThreshold :: (IsClock o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getClockWindowThreshold :: (MonadIO m, IsClock o) => o -> m Int32
- setClockWindowThreshold :: (MonadIO m, IsClock o) => o -> Int32 -> m ()
- type ClockSyncedCallback = Bool -> IO ()
- afterClockSynced :: (IsClock a, MonadIO m) => a -> ((?self :: a) => ClockSyncedCallback) -> m SignalHandlerId
- onClockSynced :: (IsClock a, MonadIO m) => a -> ((?self :: a) => ClockSyncedCallback) -> m SignalHandlerId
Exported types
Memory-managed wrapper type.
Instances
| Eq Clock Source # | |
| GObject Clock Source # | |
Defined in GI.Gst.Objects.Clock | |
| ManagedPtrNewtype Clock Source # | |
Defined in GI.Gst.Objects.Clock Methods toManagedPtr :: Clock -> ManagedPtr Clock | |
| TypedObject Clock Source # | |
Defined in GI.Gst.Objects.Clock | |
| HasParentTypes Clock Source # | |
Defined in GI.Gst.Objects.Clock | |
| IsGValue (Maybe Clock) Source # | Convert |
Defined in GI.Gst.Objects.Clock Methods gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Clock -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Clock) | |
| type ParentTypes Clock Source # | |
Defined in GI.Gst.Objects.Clock | |
class (GObject o, IsDescendantOf Clock o) => IsClock o Source #
Instances
| (GObject o, IsDescendantOf Clock o) => IsClock o Source # | |
Defined in GI.Gst.Objects.Clock | |
Methods
Click to display all available methods, including inherited ones
Methods
addControlBinding, addObservation, addObservationUnapplied, adjustUnlocked, adjustWithCalibration, bindProperty, bindPropertyFull, defaultError, forceFloating, freezeNotify, getv, hasActiveControlBindings, hasAncestor, hasAsAncestor, hasAsParent, isFloating, isSynced, newPeriodicId, newSingleShotId, notify, notifyByPspec, periodicIdReinit, ref, refSink, removeControlBinding, runDispose, singleShotIdReinit, stealData, stealQdata, suggestNextSync, syncValues, thawNotify, unadjustUnlocked, unadjustWithCalibration, unparent, unref, waitForSync, watchClosure.
Getters
getCalibration, getControlBinding, getControlRate, getData, getGValueArray, getInternalTime, getMaster, getName, getParent, getPathString, getProperty, getQdata, getResolution, getTime, getTimeout, getValue.
Setters
setCalibration, setControlBindingDisabled, setControlBindingsDisabled, setControlRate, setData, setDataFull, setMaster, setName, setParent, setProperty, setResolution, setSynced, setTimeout.
addObservation
Arguments
| :: (HasCallStack, MonadIO m, IsClock a) | |
| => a |
|
| -> Word64 |
|
| -> Word64 |
|
| -> m (Bool, Double) | Returns: |
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, rSquared 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.
addObservationUnapplied
clockAddObservationUnapplied Source #
Arguments
| :: (HasCallStack, MonadIO m, IsClock a) | |
| => a |
|
| -> Word64 |
|
| -> Word64 |
|
| -> m (Bool, Double, Word64, Word64, Word64, Word64) | Returns: |
Add a clock observation to the internal slaving algorithm the same as
clockAddObservation, and return the result of the master clock
estimation, without updating the internal calibration.
The caller can then take the results and call clockSetCalibration
with the values, or some modified version of them.
Since: 1.6
adjustUnlocked
Arguments
| :: (HasCallStack, MonadIO m, IsClock a) | |
| => a |
|
| -> Word64 |
|
| -> m Word64 | Returns: the converted time of the clock. |
Converts the given internal clock time to the external time, adjusting for the
rate and reference time set with clockSetCalibration 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 clockUnadjustUnlocked.
adjustWithCalibration
clockAdjustWithCalibration Source #
Arguments
| :: (HasCallStack, MonadIO m, IsClock a) | |
| => Maybe a |
|
| -> Word64 |
|
| -> Word64 |
|
| -> Word64 |
|
| -> Word64 |
|
| -> Word64 |
|
| -> m Word64 | Returns: the converted time of the clock. |
Converts the given internalTarget clock time to the external time,
using the passed calibration parameters. This function performs the
same calculation as clockAdjustUnlocked when called using the
current calibration parameters, but doesn't ensure a monotonically
increasing result as clockAdjustUnlocked does.
Note: The clock parameter is unused and can be NULL
Since: 1.6
getCalibration
Arguments
| :: (HasCallStack, MonadIO m, IsClock a) | |
| => a |
|
| -> m (Word64, Word64, Word64, Word64) |
Gets the internal rate and reference time of clock. See
clockSetCalibration for more information.
internal, external, rateNum, and rateDenom can be left Nothing if the
caller is not interested in the values.
getInternalTime
Arguments
| :: (HasCallStack, MonadIO m, IsClock a) | |
| => a |
|
| -> m Word64 | Returns: the internal time of the clock. Or |
Gets the current internal time of the given clock. The time is returned unadjusted for the offset and the rate.
getMaster
Arguments
| :: (HasCallStack, MonadIO m, IsClock a) | |
| => a |
|
| -> m (Maybe Clock) | Returns: a master |
Gets the master clock that clock is slaved to or Nothing when the clock is
not slaved to any master clock.
getResolution
Arguments
| :: (HasCallStack, MonadIO m, IsClock a) | |
| => a |
|
| -> m Word64 | Returns: the resolution of the clock in units of |
Gets the accuracy of the clock. The accuracy of the clock is the granularity
of the values returned by clockGetTime.
getTime
Arguments
| :: (HasCallStack, MonadIO m, IsClock a) | |
| => a |
|
| -> m Word64 | Returns: the time of the clock. Or |
Gets the current time of the given clock. The time is always monotonically increasing and adjusted according to the current offset and rate.
getTimeout
Arguments
| :: (HasCallStack, MonadIO m, IsClock a) | |
| => a |
|
| -> m Word64 | Returns: the interval between samples. |
Gets the amount of time that master and slave clocks are sampled.
idCompareFunc
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Ptr () |
|
| -> Ptr () |
|
| -> m Int32 | Returns: negative value if |
Compares the two GstClockID instances. This function can be used
as a GCompareFunc when sorting ids.
idGetClock
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Ptr () |
|
| -> m (Maybe Clock) | Returns: a |
This function returns the underlying clock.
Since: 1.16
idGetTime
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Ptr () |
|
| -> m Word64 | Returns: the time of the given clock id. |
Gets the time of the clock ID
idRef
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Ptr () |
|
| -> m (Ptr ()) | Returns: The same |
Increases the refcount of given id.
idUnref
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Ptr () |
|
| -> m () |
Unrefs given id. When the refcount reaches 0 the
GstClockID will be freed.
idUnschedule
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Ptr () |
|
| -> m () |
Cancels 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.
idUsesClock
Arguments
| :: (HasCallStack, MonadIO m, IsClock a) | |
| => Ptr () |
|
| -> a |
|
| -> m Bool | Returns: whether the clock |
This function returns whether id uses clock as the underlying clock.
clock can be NULL, in which case the return value indicates whether
the underlying clock has been freed. If this is the case, the id is
no longer usable and should be freed.
Since: 1.16
idWait
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Ptr () |
|
| -> m (ClockReturn, Int64) | Returns: the result of the blocking wait. |
Performs a blocking wait on id.
id should have been created with clockNewSingleShotId
or clockNewPeriodicId and should not have been unscheduled
with a call to clockIdUnschedule.
If the jitter argument is not Nothing 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.
idWaitAsync
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Ptr () |
|
| -> ClockCallback |
|
| -> m ClockReturn | Returns: the result of the non blocking wait. |
Registers 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 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.
isSynced
Arguments
| :: (HasCallStack, MonadIO m, IsClock a) | |
| => a |
|
| -> m Bool | Returns: |
Checks if the clock is currently synced, by looking at whether
ClockFlagsNeedsStartupSync is set.
Since: 1.6
newPeriodicId
Arguments
| :: (HasCallStack, MonadIO m, IsClock a) | |
| => a |
|
| -> Word64 |
|
| -> Word64 |
|
| -> m (Ptr ()) | Returns: a |
Gets an ID from clock to trigger a periodic notification.
The periodic notifications will start at time startTime and
will then be fired with the given interval.
newSingleShotId
Arguments
| :: (HasCallStack, MonadIO m, IsClock a) | |
| => a |
|
| -> Word64 |
|
| -> m (Ptr ()) | Returns: a |
Gets a GstClockID from clock to trigger a single shot
notification at the requested time.
periodicIdReinit
clockPeriodicIdReinit Source #
Arguments
| :: (HasCallStack, MonadIO m, IsClock a) | |
| => a |
|
| -> Ptr () |
|
| -> Word64 |
|
| -> Word64 |
|
| -> m Bool | Returns: |
Reinitializes the provided periodic id to the provided start time and
interval. Does not modify the reference count.
setCalibration
Arguments
| :: (HasCallStack, MonadIO m, IsClock a) | |
| => a |
|
| -> Word64 |
|
| -> Word64 |
|
| -> Word64 |
|
| -> Word64 |
|
| -> m () |
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
clockGetTime 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 clockGetInternalTime when this function is called.
Subsequent calls to clockGetTime will return clock times computed as
follows:
C code
time = (internal_time - internal) * rate_num / rate_denom + external
This formula is implemented in clockAdjustUnlocked. Of course, it
tries to do the integer arithmetic as precisely as possible.
Note that clockGetTime always returns increasing values so when you
move the clock backwards, clockGetTime will report the previous value
until the clock catches up.
setMaster
Arguments
| :: (HasCallStack, MonadIO m, IsClock a, IsClock b) | |
| => a |
|
| -> Maybe b |
|
| -> m Bool | Returns: |
Sets master as the master clock for clock. clock will be automatically
calibrated so that clockGetTime 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 clockGetCalibration.
master can be Nothing 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.
setResolution
Arguments
| :: (HasCallStack, MonadIO m, IsClock a) | |
| => a |
|
| -> Word64 |
|
| -> m Word64 | Returns: the new resolution of the clock. |
Sets 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.
setSynced
Arguments
| :: (HasCallStack, MonadIO m, IsClock a) | |
| => a |
|
| -> Bool |
|
| -> m () |
Sets clock to synced and emits the Clock::synced signal, and wakes up any
thread waiting in clockWaitForSync.
This function must only be called if ClockFlagsNeedsStartupSync
is set on the clock, and is intended to be called by subclasses only.
Since: 1.6
setTimeout
Arguments
| :: (HasCallStack, MonadIO m, IsClock a) | |
| => a |
|
| -> Word64 |
|
| -> m () |
Sets the amount of time, in nanoseconds, to sample master and slave clocks
singleShotIdReinit
clockSingleShotIdReinit Source #
Arguments
| :: (HasCallStack, MonadIO m, IsClock a) | |
| => a |
|
| -> Ptr () |
|
| -> Word64 |
|
| -> m Bool | Returns: |
Reinitializes the provided single shot id to the provided time. Does not
modify the reference count.
unadjustUnlocked
clockUnadjustUnlocked Source #
Arguments
| :: (HasCallStack, MonadIO m, IsClock a) | |
| => a |
|
| -> Word64 |
|
| -> m Word64 | Returns: the internal time of the clock corresponding to |
Converts the given external clock time to the internal time of clock,
using the rate and reference time set with clockSetCalibration.
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 clockAdjustUnlocked.
unadjustWithCalibration
clockUnadjustWithCalibration Source #
Arguments
| :: (HasCallStack, MonadIO m, IsClock a) | |
| => Maybe a |
|
| -> Word64 |
|
| -> Word64 |
|
| -> Word64 |
|
| -> Word64 |
|
| -> Word64 |
|
| -> m Word64 | Returns: the converted time of the clock. |
Converts the given externalTarget clock time to the internal time,
using the passed calibration parameters. This function performs the
same calculation as clockUnadjustUnlocked when called using the
current calibration parameters.
Note: The clock parameter is unused and can be NULL
Since: 1.8
waitForSync
Arguments
| :: (HasCallStack, MonadIO m, IsClock a) | |
| => a |
|
| -> Word64 |
|
| -> m Bool | Returns: |
Waits until clock is synced for reporting the current time. If timeout
is CLOCK_TIME_NONE it will wait forever, otherwise it will time out
after timeout nanoseconds.
For asynchronous waiting, the Clock::synced signal can be used.
This returns immediately with True if ClockFlagsNeedsStartupSync
is not set on the clock, or if the clock is already synced.
Since: 1.6
Properties
timeout
No description available in the introspection data.
constructClockTimeout :: (IsClock o, MonadIO m) => Word64 -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “timeout” property. This is rarely needed directly, but it is used by new.
getClockTimeout :: (MonadIO m, IsClock o) => o -> m Word64 Source #
Get the value of the “timeout” property.
When overloading is enabled, this is equivalent to
get clock #timeout
setClockTimeout :: (MonadIO m, IsClock o) => o -> Word64 -> m () Source #
Set the value of the “timeout” property.
When overloading is enabled, this is equivalent to
setclock [ #timeout:=value ]
windowSize
No description available in the introspection data.
constructClockWindowSize :: (IsClock o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “window-size” property. This is rarely needed directly, but it is used by new.
getClockWindowSize :: (MonadIO m, IsClock o) => o -> m Int32 Source #
Get the value of the “window-size” property.
When overloading is enabled, this is equivalent to
get clock #windowSize
setClockWindowSize :: (MonadIO m, IsClock o) => o -> Int32 -> m () Source #
Set the value of the “window-size” property.
When overloading is enabled, this is equivalent to
setclock [ #windowSize:=value ]
windowThreshold
No description available in the introspection data.
constructClockWindowThreshold :: (IsClock o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “window-threshold” property. This is rarely needed directly, but it is used by new.
getClockWindowThreshold :: (MonadIO m, IsClock o) => o -> m Int32 Source #
Get the value of the “window-threshold” property.
When overloading is enabled, this is equivalent to
get clock #windowThreshold
setClockWindowThreshold :: (MonadIO m, IsClock o) => o -> Int32 -> m () Source #
Set the value of the “window-threshold” property.
When overloading is enabled, this is equivalent to
setclock [ #windowThreshold:=value ]
Signals
synced
type ClockSyncedCallback Source #
Signaled on clocks with ClockFlagsNeedsStartupSync set once
the clock is synchronized, or when it completely lost synchronization.
This signal will not be emitted on clocks without the flag.
This signal will be emitted from an arbitrary thread, most likely not the application's main thread.
Since: 1.6
afterClockSynced :: (IsClock a, MonadIO m) => a -> ((?self :: a) => ClockSyncedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the synced signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after clock #synced callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self parameter.
Note that this requires activating the ImplicitParams GHC extension.
onClockSynced :: (IsClock a, MonadIO m) => a -> ((?self :: a) => ClockSyncedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the synced signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on clock #synced callback