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 |
This is the base class for audio sinks. Subclasses need to implement the create_ringbuffer vmethod. This base class will then take care of writing samples to the ringbuffer, synchronisation, clipping and flushing.
Synopsis
- newtype AudioBaseSink = AudioBaseSink (ManagedPtr AudioBaseSink)
- class (GObject o, IsDescendantOf AudioBaseSink o) => IsAudioBaseSink o
- toAudioBaseSink :: (MonadIO m, IsAudioBaseSink o) => o -> m AudioBaseSink
- audioBaseSinkCreateRingbuffer :: (HasCallStack, MonadIO m, IsAudioBaseSink a) => a -> m (Maybe AudioRingBuffer)
- audioBaseSinkGetAlignmentThreshold :: (HasCallStack, MonadIO m, IsAudioBaseSink a) => a -> m Word64
- audioBaseSinkGetDiscontWait :: (HasCallStack, MonadIO m, IsAudioBaseSink a) => a -> m Word64
- audioBaseSinkGetDriftTolerance :: (HasCallStack, MonadIO m, IsAudioBaseSink a) => a -> m Int64
- audioBaseSinkGetProvideClock :: (HasCallStack, MonadIO m, IsAudioBaseSink a) => a -> m Bool
- audioBaseSinkGetSlaveMethod :: (HasCallStack, MonadIO m, IsAudioBaseSink a) => a -> m AudioBaseSinkSlaveMethod
- audioBaseSinkReportDeviceFailure :: (HasCallStack, MonadIO m, IsAudioBaseSink a) => a -> m ()
- audioBaseSinkSetAlignmentThreshold :: (HasCallStack, MonadIO m, IsAudioBaseSink a) => a -> Word64 -> m ()
- audioBaseSinkSetCustomSlavingCallback :: (HasCallStack, MonadIO m, IsAudioBaseSink a) => a -> AudioBaseSinkCustomSlavingCallback -> m ()
- audioBaseSinkSetDiscontWait :: (HasCallStack, MonadIO m, IsAudioBaseSink a) => a -> Word64 -> m ()
- audioBaseSinkSetDriftTolerance :: (HasCallStack, MonadIO m, IsAudioBaseSink a) => a -> Int64 -> m ()
- audioBaseSinkSetProvideClock :: (HasCallStack, MonadIO m, IsAudioBaseSink a) => a -> Bool -> m ()
- audioBaseSinkSetSlaveMethod :: (HasCallStack, MonadIO m, IsAudioBaseSink a) => a -> AudioBaseSinkSlaveMethod -> m ()
- constructAudioBaseSinkAlignmentThreshold :: (IsAudioBaseSink o, MonadIO m) => Word64 -> m (GValueConstruct o)
- getAudioBaseSinkAlignmentThreshold :: (MonadIO m, IsAudioBaseSink o) => o -> m Word64
- setAudioBaseSinkAlignmentThreshold :: (MonadIO m, IsAudioBaseSink o) => o -> Word64 -> m ()
- constructAudioBaseSinkBufferTime :: (IsAudioBaseSink o, MonadIO m) => Int64 -> m (GValueConstruct o)
- getAudioBaseSinkBufferTime :: (MonadIO m, IsAudioBaseSink o) => o -> m Int64
- setAudioBaseSinkBufferTime :: (MonadIO m, IsAudioBaseSink o) => o -> Int64 -> m ()
- constructAudioBaseSinkCanActivatePull :: (IsAudioBaseSink o, MonadIO m) => Bool -> m (GValueConstruct o)
- getAudioBaseSinkCanActivatePull :: (MonadIO m, IsAudioBaseSink o) => o -> m Bool
- setAudioBaseSinkCanActivatePull :: (MonadIO m, IsAudioBaseSink o) => o -> Bool -> m ()
- constructAudioBaseSinkDiscontWait :: (IsAudioBaseSink o, MonadIO m) => Word64 -> m (GValueConstruct o)
- getAudioBaseSinkDiscontWait :: (MonadIO m, IsAudioBaseSink o) => o -> m Word64
- setAudioBaseSinkDiscontWait :: (MonadIO m, IsAudioBaseSink o) => o -> Word64 -> m ()
- constructAudioBaseSinkDriftTolerance :: (IsAudioBaseSink o, MonadIO m) => Int64 -> m (GValueConstruct o)
- getAudioBaseSinkDriftTolerance :: (MonadIO m, IsAudioBaseSink o) => o -> m Int64
- setAudioBaseSinkDriftTolerance :: (MonadIO m, IsAudioBaseSink o) => o -> Int64 -> m ()
- constructAudioBaseSinkLatencyTime :: (IsAudioBaseSink o, MonadIO m) => Int64 -> m (GValueConstruct o)
- getAudioBaseSinkLatencyTime :: (MonadIO m, IsAudioBaseSink o) => o -> m Int64
- setAudioBaseSinkLatencyTime :: (MonadIO m, IsAudioBaseSink o) => o -> Int64 -> m ()
- constructAudioBaseSinkProvideClock :: (IsAudioBaseSink o, MonadIO m) => Bool -> m (GValueConstruct o)
- getAudioBaseSinkProvideClock :: (MonadIO m, IsAudioBaseSink o) => o -> m Bool
- setAudioBaseSinkProvideClock :: (MonadIO m, IsAudioBaseSink o) => o -> Bool -> m ()
- constructAudioBaseSinkSlaveMethod :: (IsAudioBaseSink o, MonadIO m) => AudioBaseSinkSlaveMethod -> m (GValueConstruct o)
- getAudioBaseSinkSlaveMethod :: (MonadIO m, IsAudioBaseSink o) => o -> m AudioBaseSinkSlaveMethod
- setAudioBaseSinkSlaveMethod :: (MonadIO m, IsAudioBaseSink o) => o -> AudioBaseSinkSlaveMethod -> m ()
Exported types
newtype AudioBaseSink Source #
Memory-managed wrapper type.
AudioBaseSink (ManagedPtr AudioBaseSink) |
Instances
Eq AudioBaseSink Source # | |
Defined in GI.GstAudio.Objects.AudioBaseSink (==) :: AudioBaseSink -> AudioBaseSink -> Bool # (/=) :: AudioBaseSink -> AudioBaseSink -> Bool # | |
GObject AudioBaseSink Source # | |
Defined in GI.GstAudio.Objects.AudioBaseSink | |
ManagedPtrNewtype AudioBaseSink Source # | |
Defined in GI.GstAudio.Objects.AudioBaseSink toManagedPtr :: AudioBaseSink -> ManagedPtr AudioBaseSink | |
TypedObject AudioBaseSink Source # | |
Defined in GI.GstAudio.Objects.AudioBaseSink | |
HasParentTypes AudioBaseSink Source # | |
Defined in GI.GstAudio.Objects.AudioBaseSink | |
IsGValue (Maybe AudioBaseSink) Source # | Convert |
Defined in GI.GstAudio.Objects.AudioBaseSink gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe AudioBaseSink -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe AudioBaseSink) | |
type ParentTypes AudioBaseSink Source # | |
Defined in GI.GstAudio.Objects.AudioBaseSink type ParentTypes AudioBaseSink = '[BaseSink, Element, Object, Object] |
class (GObject o, IsDescendantOf AudioBaseSink o) => IsAudioBaseSink o Source #
Type class for types which can be safely cast to AudioBaseSink
, for instance with toAudioBaseSink
.
Instances
(GObject o, IsDescendantOf AudioBaseSink o) => IsAudioBaseSink o Source # | |
Defined in GI.GstAudio.Objects.AudioBaseSink |
toAudioBaseSink :: (MonadIO m, IsAudioBaseSink o) => o -> m AudioBaseSink Source #
Cast to AudioBaseSink
, 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
abortState, addControlBinding, addPad, addPropertyDeepNotifyWatch, addPropertyNotifyWatch, bindProperty, bindPropertyFull, callAsync, changeState, continueState, createAllPads, createRingbuffer, defaultError, doPreroll, forceFloating, foreachPad, foreachSinkPad, foreachSrcPad, freezeNotify, getv, hasActiveControlBindings, hasAncestor, hasAsAncestor, hasAsParent, isAsyncEnabled, isFloating, isLastSampleEnabled, isLockedState, isQosEnabled, iteratePads, iterateSinkPads, iterateSrcPads, link, linkFiltered, linkPads, linkPadsFiltered, linkPadsFull, lostState, messageFull, messageFullWithDetails, noMorePads, notify, notifyByPspec, postMessage, provideClock, query, queryConvert, queryDuration, queryLatency, queryPosition, ref, refSink, releaseRequestPad, removeControlBinding, removePad, removePropertyNotifyWatch, reportDeviceFailure, requestPad, requestPadSimple, runDispose, seek, seekSimple, sendEvent, stealData, stealQdata, suggestNextSync, syncStateWithParent, syncValues, thawNotify, unlink, unlinkPads, unparent, unref, wait, waitClock, waitPreroll, watchClosure.
Getters
getAlignmentThreshold, getBaseTime, getBlocksize, getBus, getClock, getCompatiblePad, getCompatiblePadTemplate, getContext, getContextUnlocked, getContexts, getControlBinding, getControlRate, getCurrentClockTime, getCurrentRunningTime, getData, getDiscontWait, getDriftTolerance, getDropOutOfSegment, getFactory, getGValueArray, getLastSample, getLatency, getMaxBitrate, getMaxLateness, getMetadata, getName, getPadTemplate, getPadTemplateList, getParent, getPathString, getProcessingDeadline, getProperty, getProvideClock, getQdata, getRenderDelay, getRequestPad, getSlaveMethod, getStartTime, getState, getStaticPad, getStats, getSync, getThrottleTime, getTsOffset, getValue.
Setters
setAlignmentThreshold, setAsyncEnabled, setBaseTime, setBlocksize, setBus, setClock, setContext, setControlBindingDisabled, setControlBindingsDisabled, setControlRate, setCustomSlavingCallback, setData, setDataFull, setDiscontWait, setDriftTolerance, setDropOutOfSegment, setLastSampleEnabled, setLockedState, setMaxBitrate, setMaxLateness, setName, setParent, setProcessingDeadline, setProperty, setProvideClock, setQosEnabled, setRenderDelay, setSlaveMethod, setStartTime, setState, setSync, setThrottleTime, setTsOffset.
createRingbuffer
audioBaseSinkCreateRingbuffer Source #
:: (HasCallStack, MonadIO m, IsAudioBaseSink a) | |
=> a |
|
-> m (Maybe AudioRingBuffer) | Returns: The new ringbuffer of |
Create and return the AudioRingBuffer
for sink
. This function will
call the create_ringbuffer vmethod and will set sink
as the parent of
the returned buffer (see objectSetParent
).
getAlignmentThreshold
audioBaseSinkGetAlignmentThreshold Source #
:: (HasCallStack, MonadIO m, IsAudioBaseSink a) | |
=> a |
|
-> m Word64 | Returns: The current alignment threshold used by |
Get the current alignment threshold, in nanoseconds, used by sink
.
getDiscontWait
audioBaseSinkGetDiscontWait Source #
:: (HasCallStack, MonadIO m, IsAudioBaseSink a) | |
=> a |
|
-> m Word64 | Returns: The current discont wait used by |
Get the current discont wait, in nanoseconds, used by sink
.
getDriftTolerance
audioBaseSinkGetDriftTolerance Source #
:: (HasCallStack, MonadIO m, IsAudioBaseSink a) | |
=> a |
|
-> m Int64 | Returns: The current drift tolerance used by |
Get the current drift tolerance, in microseconds, used by sink
.
getProvideClock
audioBaseSinkGetProvideClock Source #
:: (HasCallStack, MonadIO m, IsAudioBaseSink a) | |
=> a |
|
-> m Bool | Returns: |
Queries whether sink
will provide a clock or not. See also
gst_audio_base_sink_set_provide_clock.
getSlaveMethod
audioBaseSinkGetSlaveMethod Source #
:: (HasCallStack, MonadIO m, IsAudioBaseSink a) | |
=> a |
|
-> m AudioBaseSinkSlaveMethod | Returns: The current slave method used by |
Get the current slave method used by sink
.
reportDeviceFailure
audioBaseSinkReportDeviceFailure Source #
:: (HasCallStack, MonadIO m, IsAudioBaseSink a) | |
=> a |
|
-> m () |
Informs this base class that the audio output device has failed for some reason, causing a discontinuity (for example, because the device recovered from the error, but lost all contents of its ring buffer). This function is typically called by derived classes, and is useful for the custom slave method.
Since: 1.6
setAlignmentThreshold
audioBaseSinkSetAlignmentThreshold Source #
:: (HasCallStack, MonadIO m, IsAudioBaseSink a) | |
=> a |
|
-> Word64 |
|
-> m () |
Controls the sink's alignment threshold.
setCustomSlavingCallback
audioBaseSinkSetCustomSlavingCallback Source #
:: (HasCallStack, MonadIO m, IsAudioBaseSink a) | |
=> a |
|
-> AudioBaseSinkCustomSlavingCallback |
|
-> m () |
Sets the custom slaving callback. This callback will be invoked if the slave-method property is set to GST_AUDIO_BASE_SINK_SLAVE_CUSTOM and the audio sink receives and plays samples.
Setting the callback to NULL causes the sink to behave as if the GST_AUDIO_BASE_SINK_SLAVE_NONE method were used.
Since: 1.6
setDiscontWait
audioBaseSinkSetDiscontWait Source #
:: (HasCallStack, MonadIO m, IsAudioBaseSink a) | |
=> a |
|
-> Word64 |
|
-> m () |
Controls how long the sink will wait before creating a discontinuity.
setDriftTolerance
audioBaseSinkSetDriftTolerance Source #
:: (HasCallStack, MonadIO m, IsAudioBaseSink a) | |
=> a |
|
-> Int64 |
|
-> m () |
Controls the sink's drift tolerance.
setProvideClock
audioBaseSinkSetProvideClock Source #
:: (HasCallStack, MonadIO m, IsAudioBaseSink a) | |
=> a |
|
-> Bool |
|
-> m () |
Controls whether sink
will provide a clock or not. If provide
is True
,
elementProvideClock
will return a clock that reflects the datarate
of sink
. If provide
is False
, elementProvideClock
will return
NULL.
setSlaveMethod
audioBaseSinkSetSlaveMethod Source #
:: (HasCallStack, MonadIO m, IsAudioBaseSink a) | |
=> a |
|
-> AudioBaseSinkSlaveMethod |
|
-> m () |
Controls how clock slaving will be performed in sink
.
Properties
alignmentThreshold
No description available in the introspection data.
constructAudioBaseSinkAlignmentThreshold :: (IsAudioBaseSink o, MonadIO m) => Word64 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “alignment-threshold
” property. This is rarely needed directly, but it is used by new
.
getAudioBaseSinkAlignmentThreshold :: (MonadIO m, IsAudioBaseSink o) => o -> m Word64 Source #
Get the value of the “alignment-threshold
” property.
When overloading is enabled, this is equivalent to
get
audioBaseSink #alignmentThreshold
setAudioBaseSinkAlignmentThreshold :: (MonadIO m, IsAudioBaseSink o) => o -> Word64 -> m () Source #
Set the value of the “alignment-threshold
” property.
When overloading is enabled, this is equivalent to
set
audioBaseSink [ #alignmentThreshold:=
value ]
bufferTime
No description available in the introspection data.
constructAudioBaseSinkBufferTime :: (IsAudioBaseSink o, MonadIO m) => Int64 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “buffer-time
” property. This is rarely needed directly, but it is used by new
.
getAudioBaseSinkBufferTime :: (MonadIO m, IsAudioBaseSink o) => o -> m Int64 Source #
Get the value of the “buffer-time
” property.
When overloading is enabled, this is equivalent to
get
audioBaseSink #bufferTime
setAudioBaseSinkBufferTime :: (MonadIO m, IsAudioBaseSink o) => o -> Int64 -> m () Source #
Set the value of the “buffer-time
” property.
When overloading is enabled, this is equivalent to
set
audioBaseSink [ #bufferTime:=
value ]
canActivatePull
No description available in the introspection data.
constructAudioBaseSinkCanActivatePull :: (IsAudioBaseSink o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “can-activate-pull
” property. This is rarely needed directly, but it is used by new
.
getAudioBaseSinkCanActivatePull :: (MonadIO m, IsAudioBaseSink o) => o -> m Bool Source #
Get the value of the “can-activate-pull
” property.
When overloading is enabled, this is equivalent to
get
audioBaseSink #canActivatePull
setAudioBaseSinkCanActivatePull :: (MonadIO m, IsAudioBaseSink o) => o -> Bool -> m () Source #
Set the value of the “can-activate-pull
” property.
When overloading is enabled, this is equivalent to
set
audioBaseSink [ #canActivatePull:=
value ]
discontWait
A window of time in nanoseconds to wait before creating a discontinuity as a result of breaching the drift-tolerance.
constructAudioBaseSinkDiscontWait :: (IsAudioBaseSink o, MonadIO m) => Word64 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “discont-wait
” property. This is rarely needed directly, but it is used by new
.
getAudioBaseSinkDiscontWait :: (MonadIO m, IsAudioBaseSink o) => o -> m Word64 Source #
Get the value of the “discont-wait
” property.
When overloading is enabled, this is equivalent to
get
audioBaseSink #discontWait
setAudioBaseSinkDiscontWait :: (MonadIO m, IsAudioBaseSink o) => o -> Word64 -> m () Source #
Set the value of the “discont-wait
” property.
When overloading is enabled, this is equivalent to
set
audioBaseSink [ #discontWait:=
value ]
driftTolerance
Controls the amount of time in microseconds that clocks are allowed to drift before resynchronisation happens.
constructAudioBaseSinkDriftTolerance :: (IsAudioBaseSink o, MonadIO m) => Int64 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “drift-tolerance
” property. This is rarely needed directly, but it is used by new
.
getAudioBaseSinkDriftTolerance :: (MonadIO m, IsAudioBaseSink o) => o -> m Int64 Source #
Get the value of the “drift-tolerance
” property.
When overloading is enabled, this is equivalent to
get
audioBaseSink #driftTolerance
setAudioBaseSinkDriftTolerance :: (MonadIO m, IsAudioBaseSink o) => o -> Int64 -> m () Source #
Set the value of the “drift-tolerance
” property.
When overloading is enabled, this is equivalent to
set
audioBaseSink [ #driftTolerance:=
value ]
latencyTime
No description available in the introspection data.
constructAudioBaseSinkLatencyTime :: (IsAudioBaseSink o, MonadIO m) => Int64 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “latency-time
” property. This is rarely needed directly, but it is used by new
.
getAudioBaseSinkLatencyTime :: (MonadIO m, IsAudioBaseSink o) => o -> m Int64 Source #
Get the value of the “latency-time
” property.
When overloading is enabled, this is equivalent to
get
audioBaseSink #latencyTime
setAudioBaseSinkLatencyTime :: (MonadIO m, IsAudioBaseSink o) => o -> Int64 -> m () Source #
Set the value of the “latency-time
” property.
When overloading is enabled, this is equivalent to
set
audioBaseSink [ #latencyTime:=
value ]
provideClock
No description available in the introspection data.
constructAudioBaseSinkProvideClock :: (IsAudioBaseSink o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “provide-clock
” property. This is rarely needed directly, but it is used by new
.
getAudioBaseSinkProvideClock :: (MonadIO m, IsAudioBaseSink o) => o -> m Bool Source #
Get the value of the “provide-clock
” property.
When overloading is enabled, this is equivalent to
get
audioBaseSink #provideClock
setAudioBaseSinkProvideClock :: (MonadIO m, IsAudioBaseSink o) => o -> Bool -> m () Source #
Set the value of the “provide-clock
” property.
When overloading is enabled, this is equivalent to
set
audioBaseSink [ #provideClock:=
value ]
slaveMethod
No description available in the introspection data.
constructAudioBaseSinkSlaveMethod :: (IsAudioBaseSink o, MonadIO m) => AudioBaseSinkSlaveMethod -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “slave-method
” property. This is rarely needed directly, but it is used by new
.
getAudioBaseSinkSlaveMethod :: (MonadIO m, IsAudioBaseSink o) => o -> m AudioBaseSinkSlaveMethod Source #
Get the value of the “slave-method
” property.
When overloading is enabled, this is equivalent to
get
audioBaseSink #slaveMethod
setAudioBaseSinkSlaveMethod :: (MonadIO m, IsAudioBaseSink o) => o -> AudioBaseSinkSlaveMethod -> m () Source #
Set the value of the “slave-method
” property.
When overloading is enabled, this is equivalent to
set
audioBaseSink [ #slaveMethod:=
value ]