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 |
Subclasses must use (a subclass of) AudioAggregatorPad
for both
their source and sink pads,
elementClassAddStaticPadTemplateWithGtype
is a convenient
helper.
AudioAggregator
can perform conversion on the data arriving
on its sink pads, based on the format expected downstream: in order
to enable that behaviour, the GType of the sink pads must either be
a (subclass of) AudioAggregatorConvertPad
to use the default
AudioConverter
implementation, or a subclass of AudioAggregatorPad
implementing AudioAggregatorPadClass
.convert_buffer
.
To allow for the output caps to change, the mechanism is the same as above, with the GType of the source pad.
See GstAudioMixer
for an example.
When conversion is enabled, AudioAggregator
will accept
any type of raw audio caps and perform conversion
on the data arriving on its sink pads, with whatever downstream
expects as the target format.
In case downstream caps are not fully fixated, it will use the first configured sink pad to finish fixating its source pad caps.
A notable exception for now is the sample rate, sink pads must have the same sample rate as either the downstream requirement, or the first configured pad, or a combination of both (when downstream specifies a range or a set of acceptable rates).
The samplesSelected signal is provided with some additional information about the output buffer:
- "offset" G_TYPE_UINT64 Offset in samples since segment start for the position that is next to be filled in the output buffer.
- "frames" G_TYPE_UINT Number of frames per output buffer.
In addition the aggregatorPeekNextSample
function returns
additional information in the info Structure
of the returned sample:
- "output-offset" G_TYPE_UINT64 Sample offset in output segment relative to the output segment's start where the current position of this input buffer would be placed
- "position" G_TYPE_UINT current position in the input buffer in samples
- "size" G_TYPE_UINT size of the input buffer in samples
Since: 1.14
Synopsis
- newtype AudioAggregator = AudioAggregator (ManagedPtr AudioAggregator)
- class (GObject o, IsDescendantOf AudioAggregator o) => IsAudioAggregator o
- toAudioAggregator :: (MonadIO m, IsAudioAggregator o) => o -> m AudioAggregator
- audioAggregatorSetSinkCaps :: (HasCallStack, MonadIO m, IsAudioAggregator a, IsAudioAggregatorPad b) => a -> b -> Caps -> m ()
- constructAudioAggregatorAlignmentThreshold :: (IsAudioAggregator o, MonadIO m) => Word64 -> m (GValueConstruct o)
- getAudioAggregatorAlignmentThreshold :: (MonadIO m, IsAudioAggregator o) => o -> m Word64
- setAudioAggregatorAlignmentThreshold :: (MonadIO m, IsAudioAggregator o) => o -> Word64 -> m ()
- constructAudioAggregatorDiscontWait :: (IsAudioAggregator o, MonadIO m) => Word64 -> m (GValueConstruct o)
- getAudioAggregatorDiscontWait :: (MonadIO m, IsAudioAggregator o) => o -> m Word64
- setAudioAggregatorDiscontWait :: (MonadIO m, IsAudioAggregator o) => o -> Word64 -> m ()
- constructAudioAggregatorOutputBufferDuration :: (IsAudioAggregator o, MonadIO m) => Word64 -> m (GValueConstruct o)
- getAudioAggregatorOutputBufferDuration :: (MonadIO m, IsAudioAggregator o) => o -> m Word64
- setAudioAggregatorOutputBufferDuration :: (MonadIO m, IsAudioAggregator o) => o -> Word64 -> m ()
Exported types
newtype AudioAggregator Source #
Memory-managed wrapper type.
Instances
Eq AudioAggregator Source # | |
Defined in GI.GstAudio.Objects.AudioAggregator (==) :: AudioAggregator -> AudioAggregator -> Bool # (/=) :: AudioAggregator -> AudioAggregator -> Bool # | |
GObject AudioAggregator Source # | |
Defined in GI.GstAudio.Objects.AudioAggregator | |
ManagedPtrNewtype AudioAggregator Source # | |
Defined in GI.GstAudio.Objects.AudioAggregator | |
TypedObject AudioAggregator Source # | |
Defined in GI.GstAudio.Objects.AudioAggregator | |
HasParentTypes AudioAggregator Source # | |
Defined in GI.GstAudio.Objects.AudioAggregator | |
IsGValue (Maybe AudioAggregator) Source # | Convert |
Defined in GI.GstAudio.Objects.AudioAggregator gvalueGType_ :: IO GType # gvalueSet_ :: Ptr GValue -> Maybe AudioAggregator -> IO () # gvalueGet_ :: Ptr GValue -> IO (Maybe AudioAggregator) # | |
type ParentTypes AudioAggregator Source # | |
Defined in GI.GstAudio.Objects.AudioAggregator |
class (GObject o, IsDescendantOf AudioAggregator o) => IsAudioAggregator o Source #
Type class for types which can be safely cast to AudioAggregator
, for instance with toAudioAggregator
.
Instances
(GObject o, IsDescendantOf AudioAggregator o) => IsAudioAggregator o Source # | |
Defined in GI.GstAudio.Objects.AudioAggregator |
toAudioAggregator :: (MonadIO m, IsAudioAggregator o) => o -> m AudioAggregator Source #
Cast to AudioAggregator
, 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, defaultError, finishBuffer, finishBufferList, forceFloating, foreachPad, foreachSinkPad, foreachSrcPad, freezeNotify, getv, hasActiveControlBindings, hasAncestor, hasAsAncestor, hasAsParent, isFloating, isLockedState, iteratePads, iterateSinkPads, iterateSrcPads, link, linkFiltered, linkPads, linkPadsFiltered, linkPadsFull, lostState, messageFull, messageFullWithDetails, negotiate, noMorePads, notify, notifyByPspec, peekNextSample, postMessage, provideClock, query, queryConvert, queryDuration, queryPosition, ref, refSink, releaseRequestPad, removeControlBinding, removePad, removePropertyNotifyWatch, requestPad, requestPadSimple, runDispose, seek, seekSimple, selectedSamples, sendEvent, simpleGetNextTime, stealData, stealQdata, suggestNextSync, syncStateWithParent, syncValues, thawNotify, unlink, unlinkPads, unparent, unref, updateSegment, watchClosure.
Getters
getAllocator, getBaseTime, getBufferPool, getBus, getClock, getCompatiblePad, getCompatiblePadTemplate, getContext, getContextUnlocked, getContexts, getControlBinding, getControlRate, getCurrentClockTime, getCurrentRunningTime, getData, getFactory, getGValueArray, getLatency, getMetadata, getName, getPadTemplate, getPadTemplateList, getParent, getPathString, getProperty, getQdata, getRequestPad, getStartTime, getState, getStaticPad, getValue.
Setters
setBaseTime, setBus, setClock, setContext, setControlBindingDisabled, setControlBindingsDisabled, setControlRate, setData, setDataFull, setLatency, setLockedState, setName, setParent, setProperty, setSinkCaps, setSrcCaps, setStartTime, setState.
setSinkCaps
audioAggregatorSetSinkCaps :: (HasCallStack, MonadIO m, IsAudioAggregator a, IsAudioAggregatorPad b) => a -> b -> Caps -> m () Source #
No description available in the introspection data.
Properties
alignmentThreshold
No description available in the introspection data.
constructAudioAggregatorAlignmentThreshold :: (IsAudioAggregator 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
.
getAudioAggregatorAlignmentThreshold :: (MonadIO m, IsAudioAggregator o) => o -> m Word64 Source #
Get the value of the “alignment-threshold
” property.
When overloading is enabled, this is equivalent to
get
audioAggregator #alignmentThreshold
setAudioAggregatorAlignmentThreshold :: (MonadIO m, IsAudioAggregator o) => o -> Word64 -> m () Source #
Set the value of the “alignment-threshold
” property.
When overloading is enabled, this is equivalent to
set
audioAggregator [ #alignmentThreshold:=
value ]
discontWait
No description available in the introspection data.
constructAudioAggregatorDiscontWait :: (IsAudioAggregator 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
.
getAudioAggregatorDiscontWait :: (MonadIO m, IsAudioAggregator o) => o -> m Word64 Source #
Get the value of the “discont-wait
” property.
When overloading is enabled, this is equivalent to
get
audioAggregator #discontWait
setAudioAggregatorDiscontWait :: (MonadIO m, IsAudioAggregator o) => o -> Word64 -> m () Source #
Set the value of the “discont-wait
” property.
When overloading is enabled, this is equivalent to
set
audioAggregator [ #discontWait:=
value ]
outputBufferDuration
No description available in the introspection data.
constructAudioAggregatorOutputBufferDuration :: (IsAudioAggregator o, MonadIO m) => Word64 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “output-buffer-duration
” property. This is rarely needed directly, but it is used by new
.
getAudioAggregatorOutputBufferDuration :: (MonadIO m, IsAudioAggregator o) => o -> m Word64 Source #
Get the value of the “output-buffer-duration
” property.
When overloading is enabled, this is equivalent to
get
audioAggregator #outputBufferDuration
setAudioAggregatorOutputBufferDuration :: (MonadIO m, IsAudioAggregator o) => o -> Word64 -> m () Source #
Set the value of the “output-buffer-duration
” property.
When overloading is enabled, this is equivalent to
set
audioAggregator [ #outputBufferDuration:=
value ]