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 |
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.
Synopsis
- newtype SystemClock = SystemClock (ManagedPtr SystemClock)
- class (GObject o, IsDescendantOf SystemClock o) => IsSystemClock o
- toSystemClock :: (MonadIO m, IsSystemClock o) => o -> m SystemClock
- systemClockObtain :: (HasCallStack, MonadIO m) => m Clock
- systemClockSetDefault :: (HasCallStack, MonadIO m, IsClock a) => Maybe a -> m ()
- constructSystemClockClockType :: (IsSystemClock o, MonadIO m) => ClockType -> m (GValueConstruct o)
- getSystemClockClockType :: (MonadIO m, IsSystemClock o) => o -> m ClockType
- setSystemClockClockType :: (MonadIO m, IsSystemClock o) => o -> ClockType -> m ()
Exported types
newtype SystemClock Source #
Memory-managed wrapper type.
SystemClock (ManagedPtr SystemClock) |
Instances
Eq SystemClock Source # | |
Defined in GI.Gst.Objects.SystemClock (==) :: SystemClock -> SystemClock -> Bool # (/=) :: SystemClock -> SystemClock -> Bool # | |
GObject SystemClock Source # | |
Defined in GI.Gst.Objects.SystemClock | |
ManagedPtrNewtype SystemClock Source # | |
Defined in GI.Gst.Objects.SystemClock toManagedPtr :: SystemClock -> ManagedPtr SystemClock | |
TypedObject SystemClock Source # | |
Defined in GI.Gst.Objects.SystemClock | |
HasParentTypes SystemClock Source # | |
Defined in GI.Gst.Objects.SystemClock | |
IsGValue (Maybe SystemClock) Source # | Convert |
Defined in GI.Gst.Objects.SystemClock gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe SystemClock -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe SystemClock) | |
type ParentTypes SystemClock Source # | |
Defined in GI.Gst.Objects.SystemClock |
class (GObject o, IsDescendantOf SystemClock o) => IsSystemClock o Source #
Type class for types which can be safely cast to SystemClock
, for instance with toSystemClock
.
Instances
(GObject o, IsDescendantOf SystemClock o) => IsSystemClock o Source # | |
Defined in GI.Gst.Objects.SystemClock |
toSystemClock :: (MonadIO m, IsSystemClock o) => o -> m SystemClock Source #
Cast to SystemClock
, for types for which this is known to be safe. For general casts, use castTo
.
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.
obtain
:: (HasCallStack, MonadIO m) | |
=> m Clock | Returns: the default clock. MT safe. |
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.
setDefault
systemClockSetDefault Source #
:: (HasCallStack, MonadIO m, IsClock a) | |
=> Maybe a |
|
-> m () |
Sets the default system clock that can be obtained with
systemClockObtain
.
This is mostly used for testing and debugging purposes when you want to have control over the time reported by the default system clock.
MT safe.
Since: 1.4
Properties
clockType
No description available in the introspection data.
constructSystemClockClockType :: (IsSystemClock o, MonadIO m) => ClockType -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “clock-type
” property. This is rarely needed directly, but it is used by new
.
getSystemClockClockType :: (MonadIO m, IsSystemClock o) => o -> m ClockType Source #
Get the value of the “clock-type
” property.
When overloading is enabled, this is equivalent to
get
systemClock #clockType
setSystemClockClockType :: (MonadIO m, IsSystemClock o) => o -> ClockType -> m () Source #
Set the value of the “clock-type
” property.
When overloading is enabled, this is equivalent to
set
systemClock [ #clockType:=
value ]