Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
- Exported types
- Methods
- allocateOutputBuffer
- finishFrame
- getAllocator
- getAudioInfo
- getDelay
- getDrainable
- getEstimateRate
- getLatency
- getMaxErrors
- getMinLatency
- getNeedsFormat
- getParseState
- getPlc
- getPlcAware
- getTolerance
- mergeTags
- negotiate
- proxyGetcaps
- setAllocationCaps
- setDrainable
- setEstimateRate
- setLatency
- setMaxErrors
- setMinLatency
- setNeedsFormat
- setOutputFormat
- setPlc
- setPlcAware
- setTolerance
- setUseDefaultPadAcceptcaps
- Properties
This base class is for audio decoders turning encoded data into raw audio samples.
GstAudioDecoder and subclass should cooperate as follows.
<orderedlist>
<listitem>
<itemizedlist><title>Configuration</title>
<listitem><para>
Initially, GstAudioDecoder calls start
when the decoder element
is activated, which allows subclass to perform any global setup.
Base class (context) parameters can already be set according to subclass
capabilities (or possibly upon receive more information in subsequent
setFormat
).
</para></listitem>
<listitem><para>
GstAudioDecoder calls setFormat
to inform subclass of the format
of input audio data that it is about to receive.
While unlikely, it might be called more than once, if changing input
parameters require reconfiguration.
</para></listitem>
<listitem><para>
GstAudioDecoder calls stop
at end of all processing.
</para></listitem>
</itemizedlist>
</listitem>
As of configuration stage, and throughout processing, GstAudioDecoder
provides various (context) parameters, e.g. describing the format of
output audio data (valid when output caps have been set) or current parsing state.
Conversely, subclass can and should configure context to inform
base class of its expectation w.r.t. buffer handling.
<listitem>
<itemizedlist>
<title>Data processing</title>
<listitem><para>
Base class gathers input data, and optionally allows subclass
to parse this into subsequently manageable (as defined by subclass)
chunks. Such chunks are subsequently referred to as 'frames',
though they may or may not correspond to 1 (or more) audio format frame.
</para></listitem>
<listitem><para>
Input frame is provided to subclass' handleFrame
.
</para></listitem>
<listitem><para>
If codec processing results in decoded data, subclass should call
gstAudioDecoderFinishFrame
to have decoded data pushed
downstream.
</para></listitem>
<listitem><para>
Just prior to actually pushing a buffer downstream,
it is passed to prePush
. Subclass should either use this callback
to arrange for additional downstream pushing or otherwise ensure such
custom pushing occurs after at least a method call has finished since
setting src pad caps.
</para></listitem>
<listitem><para>
During the parsing process GstAudioDecoderClass will handle both
srcpad and sinkpad events. Sink events will be passed to subclass
if event
callback has been provided.
</para></listitem>
</itemizedlist>
</listitem>
<listitem>
<itemizedlist><title>Shutdown phase</title>
<listitem><para>
GstAudioDecoder class calls stop
to inform the subclass that data
parsing will be stopped.
</para></listitem>
</itemizedlist>
</listitem>
</orderedlist>
Subclass is responsible for providing pad template caps for
source and sink pads. The pads need to be named "sink" and "src". It also
needs to set the fixed caps on srcpad, when the format is ensured. This
is typically when base class calls subclass' setFormat
function, though
it might be delayed until calling gstAudioDecoderFinishFrame
.
In summary, above process should have subclass concentrating on
codec data processing while leaving other matters to base class,
such as most notably timestamp handling. While it may exert more control
in this area (see e.g. prePush
), it is very much not recommended.
In particular, base class will try to arrange for perfect output timestamps
as much as possible while tracking upstream timestamps.
To this end, if deviation between the next ideal expected perfect timestamp
and upstream exceeds AudioDecoder
:tolerance
, then resync to upstream
occurs (which would happen always if the tolerance mechanism is disabled).
In non-live pipelines, baseclass can also (configurably) arrange for output buffer aggregation which may help to redue large(r) numbers of small(er) buffers being pushed and processed downstream.
On the other hand, it should be noted that baseclass only provides limited seeking support (upon explicit subclass request), as full-fledged support should rather be left to upstream demuxer, parser or alike. This simple approach caters for seeking and duration reporting using estimated input bitrates.
Things that subclass need to take care of:
<itemizedlist>
<listitem><para>Provide pad templates</para></listitem>
<listitem><para>
Set source pad caps when appropriate
</para></listitem>
<listitem><para>
Set user-configurable properties to sane defaults for format and
implementing codec at hand, and convey some subclass capabilities and
expectations in context.
</para></listitem>
<listitem><para>
Accept data in handleFrame
and provide encoded results to
gstAudioDecoderFinishFrame
. If it is prepared to perform
PLC, it should also accept NULL data in handleFrame
and provide for
data for indicated duration.
</para></listitem>
</itemizedlist>
- newtype AudioDecoder = AudioDecoder (ManagedPtr AudioDecoder)
- class GObject o => IsAudioDecoder o
- toAudioDecoder :: IsAudioDecoder o => o -> IO AudioDecoder
- noAudioDecoder :: Maybe AudioDecoder
- data AudioDecoderAllocateOutputBufferMethodInfo
- audioDecoderAllocateOutputBuffer :: (HasCallStack, MonadIO m, IsAudioDecoder a) => a -> Word64 -> m Buffer
- data AudioDecoderFinishFrameMethodInfo
- audioDecoderFinishFrame :: (HasCallStack, MonadIO m, IsAudioDecoder a) => a -> Buffer -> Int32 -> m FlowReturn
- data AudioDecoderGetAllocatorMethodInfo
- audioDecoderGetAllocator :: (HasCallStack, MonadIO m, IsAudioDecoder a) => a -> m (Allocator, AllocationParams)
- data AudioDecoderGetAudioInfoMethodInfo
- audioDecoderGetAudioInfo :: (HasCallStack, MonadIO m, IsAudioDecoder a) => a -> m AudioInfo
- data AudioDecoderGetDelayMethodInfo
- audioDecoderGetDelay :: (HasCallStack, MonadIO m, IsAudioDecoder a) => a -> m Int32
- data AudioDecoderGetDrainableMethodInfo
- audioDecoderGetDrainable :: (HasCallStack, MonadIO m, IsAudioDecoder a) => a -> m Bool
- data AudioDecoderGetEstimateRateMethodInfo
- audioDecoderGetEstimateRate :: (HasCallStack, MonadIO m, IsAudioDecoder a) => a -> m Int32
- data AudioDecoderGetLatencyMethodInfo
- audioDecoderGetLatency :: (HasCallStack, MonadIO m, IsAudioDecoder a) => a -> m (Word64, Word64)
- data AudioDecoderGetMaxErrorsMethodInfo
- audioDecoderGetMaxErrors :: (HasCallStack, MonadIO m, IsAudioDecoder a) => a -> m Int32
- data AudioDecoderGetMinLatencyMethodInfo
- audioDecoderGetMinLatency :: (HasCallStack, MonadIO m, IsAudioDecoder a) => a -> m Word64
- data AudioDecoderGetNeedsFormatMethodInfo
- audioDecoderGetNeedsFormat :: (HasCallStack, MonadIO m, IsAudioDecoder a) => a -> m Bool
- data AudioDecoderGetParseStateMethodInfo
- audioDecoderGetParseState :: (HasCallStack, MonadIO m, IsAudioDecoder a) => a -> Bool -> Bool -> m ()
- data AudioDecoderGetPlcMethodInfo
- audioDecoderGetPlc :: (HasCallStack, MonadIO m, IsAudioDecoder a) => a -> m Bool
- data AudioDecoderGetPlcAwareMethodInfo
- audioDecoderGetPlcAware :: (HasCallStack, MonadIO m, IsAudioDecoder a) => a -> m Int32
- data AudioDecoderGetToleranceMethodInfo
- audioDecoderGetTolerance :: (HasCallStack, MonadIO m, IsAudioDecoder a) => a -> m Word64
- data AudioDecoderMergeTagsMethodInfo
- audioDecoderMergeTags :: (HasCallStack, MonadIO m, IsAudioDecoder a) => a -> Maybe TagList -> TagMergeMode -> m ()
- data AudioDecoderNegotiateMethodInfo
- audioDecoderNegotiate :: (HasCallStack, MonadIO m, IsAudioDecoder a) => a -> m Bool
- data AudioDecoderProxyGetcapsMethodInfo
- audioDecoderProxyGetcaps :: (HasCallStack, MonadIO m, IsAudioDecoder a) => a -> Maybe Caps -> Maybe Caps -> m Caps
- data AudioDecoderSetAllocationCapsMethodInfo
- audioDecoderSetAllocationCaps :: (HasCallStack, MonadIO m, IsAudioDecoder a) => a -> Maybe Caps -> m ()
- data AudioDecoderSetDrainableMethodInfo
- audioDecoderSetDrainable :: (HasCallStack, MonadIO m, IsAudioDecoder a) => a -> Bool -> m ()
- data AudioDecoderSetEstimateRateMethodInfo
- audioDecoderSetEstimateRate :: (HasCallStack, MonadIO m, IsAudioDecoder a) => a -> Bool -> m ()
- data AudioDecoderSetLatencyMethodInfo
- audioDecoderSetLatency :: (HasCallStack, MonadIO m, IsAudioDecoder a) => a -> Word64 -> Word64 -> m ()
- data AudioDecoderSetMaxErrorsMethodInfo
- audioDecoderSetMaxErrors :: (HasCallStack, MonadIO m, IsAudioDecoder a) => a -> Int32 -> m ()
- data AudioDecoderSetMinLatencyMethodInfo
- audioDecoderSetMinLatency :: (HasCallStack, MonadIO m, IsAudioDecoder a) => a -> Word64 -> m ()
- data AudioDecoderSetNeedsFormatMethodInfo
- audioDecoderSetNeedsFormat :: (HasCallStack, MonadIO m, IsAudioDecoder a) => a -> Bool -> m ()
- data AudioDecoderSetOutputFormatMethodInfo
- audioDecoderSetOutputFormat :: (HasCallStack, MonadIO m, IsAudioDecoder a) => a -> AudioInfo -> m Bool
- data AudioDecoderSetPlcMethodInfo
- audioDecoderSetPlc :: (HasCallStack, MonadIO m, IsAudioDecoder a) => a -> Bool -> m ()
- data AudioDecoderSetPlcAwareMethodInfo
- audioDecoderSetPlcAware :: (HasCallStack, MonadIO m, IsAudioDecoder a) => a -> Bool -> m ()
- data AudioDecoderSetToleranceMethodInfo
- audioDecoderSetTolerance :: (HasCallStack, MonadIO m, IsAudioDecoder a) => a -> Word64 -> m ()
- data AudioDecoderSetUseDefaultPadAcceptcapsMethodInfo
- audioDecoderSetUseDefaultPadAcceptcaps :: (HasCallStack, MonadIO m, IsAudioDecoder a) => a -> Bool -> m ()
- data AudioDecoderMinLatencyPropertyInfo
- audioDecoderMinLatency :: AttrLabelProxy "minLatency"
- constructAudioDecoderMinLatency :: IsAudioDecoder o => Int64 -> IO (GValueConstruct o)
- getAudioDecoderMinLatency :: (MonadIO m, IsAudioDecoder o) => o -> m Int64
- setAudioDecoderMinLatency :: (MonadIO m, IsAudioDecoder o) => o -> Int64 -> m ()
- data AudioDecoderPlcPropertyInfo
- audioDecoderPlc :: AttrLabelProxy "plc"
- constructAudioDecoderPlc :: IsAudioDecoder o => Bool -> IO (GValueConstruct o)
- getAudioDecoderPlc :: (MonadIO m, IsAudioDecoder o) => o -> m Bool
- setAudioDecoderPlc :: (MonadIO m, IsAudioDecoder o) => o -> Bool -> m ()
- data AudioDecoderTolerancePropertyInfo
- audioDecoderTolerance :: AttrLabelProxy "tolerance"
- constructAudioDecoderTolerance :: IsAudioDecoder o => Int64 -> IO (GValueConstruct o)
- getAudioDecoderTolerance :: (MonadIO m, IsAudioDecoder o) => o -> m Int64
- setAudioDecoderTolerance :: (MonadIO m, IsAudioDecoder o) => o -> Int64 -> m ()
Exported types
newtype AudioDecoder Source #
GObject AudioDecoder Source # | |
IsObject AudioDecoder Source # | |
IsElement AudioDecoder Source # | |
IsObject AudioDecoder Source # | |
IsAudioDecoder AudioDecoder Source # | |
((~) * info (ResolveAudioDecoderMethod t AudioDecoder), MethodInfo * info AudioDecoder p) => IsLabel t (AudioDecoder -> p) Source # | |
((~) * info (ResolveAudioDecoderMethod t AudioDecoder), MethodInfo * info AudioDecoder p) => IsLabelProxy t (AudioDecoder -> p) Source # | |
HasAttributeList * AudioDecoder Source # | |
type AttributeList AudioDecoder Source # | |
type SignalList AudioDecoder Source # | |
class GObject o => IsAudioDecoder o Source #
toAudioDecoder :: IsAudioDecoder o => o -> IO AudioDecoder Source #
Methods
allocateOutputBuffer
data AudioDecoderAllocateOutputBufferMethodInfo Source #
((~) * signature (Word64 -> m Buffer), MonadIO m, IsAudioDecoder a) => MethodInfo * AudioDecoderAllocateOutputBufferMethodInfo a signature Source # | |
audioDecoderAllocateOutputBuffer Source #
:: (HasCallStack, MonadIO m, IsAudioDecoder a) | |
=> a |
|
-> Word64 |
|
-> m Buffer | Returns: allocated buffer |
Helper function that allocates a buffer to hold an audio frame
for dec
's current output format.
finishFrame
data AudioDecoderFinishFrameMethodInfo Source #
((~) * signature (Buffer -> Int32 -> m FlowReturn), MonadIO m, IsAudioDecoder a) => MethodInfo * AudioDecoderFinishFrameMethodInfo a signature Source # | |
audioDecoderFinishFrame Source #
:: (HasCallStack, MonadIO m, IsAudioDecoder a) | |
=> a |
|
-> Buffer |
|
-> Int32 |
|
-> m FlowReturn | Returns: a |
Collects decoded data and pushes it downstream.
buf
may be NULL in which case the indicated number of frames
are discarded and considered to have produced no output
(e.g. lead-in or setup frames).
Otherwise, source pad caps must be set when it is called with valid
data in buf
.
Note that a frame received in gst_audio_decoder_handle_frame()
may be
invalidated by a call to this function.
getAllocator
data AudioDecoderGetAllocatorMethodInfo Source #
((~) * signature (m (Allocator, AllocationParams)), MonadIO m, IsAudioDecoder a) => MethodInfo * AudioDecoderGetAllocatorMethodInfo a signature Source # | |
audioDecoderGetAllocator Source #
:: (HasCallStack, MonadIO m, IsAudioDecoder a) | |
=> a |
|
-> m (Allocator, AllocationParams) |
Lets AudioDecoder
sub-classes to know the memory allocator
used by the base class and its params
.
Unref the allocator
after use it.
getAudioInfo
data AudioDecoderGetAudioInfoMethodInfo Source #
((~) * signature (m AudioInfo), MonadIO m, IsAudioDecoder a) => MethodInfo * AudioDecoderGetAudioInfoMethodInfo a signature Source # | |
audioDecoderGetAudioInfo Source #
:: (HasCallStack, MonadIO m, IsAudioDecoder a) | |
=> a |
|
-> m AudioInfo | Returns: a |
No description available in the introspection data.
getDelay
data AudioDecoderGetDelayMethodInfo Source #
((~) * signature (m Int32), MonadIO m, IsAudioDecoder a) => MethodInfo * AudioDecoderGetDelayMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAudioDecoder a) | |
=> a |
|
-> m Int32 | Returns: currently configured decoder delay |
No description available in the introspection data.
getDrainable
data AudioDecoderGetDrainableMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsAudioDecoder a) => MethodInfo * AudioDecoderGetDrainableMethodInfo a signature Source # | |
audioDecoderGetDrainable Source #
:: (HasCallStack, MonadIO m, IsAudioDecoder a) | |
=> a |
|
-> m Bool | Returns: TRUE if drainable handling is enabled. MT safe. |
Queries decoder drain handling.
getEstimateRate
data AudioDecoderGetEstimateRateMethodInfo Source #
((~) * signature (m Int32), MonadIO m, IsAudioDecoder a) => MethodInfo * AudioDecoderGetEstimateRateMethodInfo a signature Source # | |
audioDecoderGetEstimateRate Source #
:: (HasCallStack, MonadIO m, IsAudioDecoder a) | |
=> a |
|
-> m Int32 | Returns: currently configured byte to time conversion setting |
No description available in the introspection data.
getLatency
data AudioDecoderGetLatencyMethodInfo Source #
((~) * signature (m (Word64, Word64)), MonadIO m, IsAudioDecoder a) => MethodInfo * AudioDecoderGetLatencyMethodInfo a signature Source # | |
audioDecoderGetLatency Source #
:: (HasCallStack, MonadIO m, IsAudioDecoder a) | |
=> a |
|
-> m (Word64, Word64) |
Sets the variables pointed to by min
and max
to the currently configured
latency.
getMaxErrors
data AudioDecoderGetMaxErrorsMethodInfo Source #
((~) * signature (m Int32), MonadIO m, IsAudioDecoder a) => MethodInfo * AudioDecoderGetMaxErrorsMethodInfo a signature Source # | |
audioDecoderGetMaxErrors Source #
:: (HasCallStack, MonadIO m, IsAudioDecoder a) | |
=> a |
|
-> m Int32 | Returns: currently configured decoder tolerated error count. |
No description available in the introspection data.
getMinLatency
data AudioDecoderGetMinLatencyMethodInfo Source #
((~) * signature (m Word64), MonadIO m, IsAudioDecoder a) => MethodInfo * AudioDecoderGetMinLatencyMethodInfo a signature Source # | |
audioDecoderGetMinLatency Source #
:: (HasCallStack, MonadIO m, IsAudioDecoder a) | |
=> a |
|
-> m Word64 | Returns: aggregation latency. MT safe. |
Queries decoder's latency aggregation.
getNeedsFormat
data AudioDecoderGetNeedsFormatMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsAudioDecoder a) => MethodInfo * AudioDecoderGetNeedsFormatMethodInfo a signature Source # | |
audioDecoderGetNeedsFormat Source #
:: (HasCallStack, MonadIO m, IsAudioDecoder a) | |
=> a |
|
-> m Bool | Returns: TRUE if required format handling is enabled. MT safe. |
Queries decoder required format handling.
getParseState
data AudioDecoderGetParseStateMethodInfo Source #
((~) * signature (Bool -> Bool -> m ()), MonadIO m, IsAudioDecoder a) => MethodInfo * AudioDecoderGetParseStateMethodInfo a signature Source # | |
audioDecoderGetParseState Source #
:: (HasCallStack, MonadIO m, IsAudioDecoder a) | |
=> a |
|
-> Bool |
|
-> Bool |
|
-> m () |
Return current parsing (sync and eos) state.
getPlc
data AudioDecoderGetPlcMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsAudioDecoder a) => MethodInfo * AudioDecoderGetPlcMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAudioDecoder a) | |
=> a |
|
-> m Bool | Returns: TRUE if packet loss concealment is enabled. MT safe. |
Queries decoder packet loss concealment handling.
getPlcAware
data AudioDecoderGetPlcAwareMethodInfo Source #
((~) * signature (m Int32), MonadIO m, IsAudioDecoder a) => MethodInfo * AudioDecoderGetPlcAwareMethodInfo a signature Source # | |
audioDecoderGetPlcAware Source #
:: (HasCallStack, MonadIO m, IsAudioDecoder a) | |
=> a |
|
-> m Int32 | Returns: currently configured plc handling |
No description available in the introspection data.
getTolerance
data AudioDecoderGetToleranceMethodInfo Source #
((~) * signature (m Word64), MonadIO m, IsAudioDecoder a) => MethodInfo * AudioDecoderGetToleranceMethodInfo a signature Source # | |
audioDecoderGetTolerance Source #
:: (HasCallStack, MonadIO m, IsAudioDecoder a) | |
=> a |
|
-> m Word64 | Returns: decoder audio jitter tolerance threshold. MT safe. |
Queries current audio jitter tolerance threshold.
mergeTags
data AudioDecoderMergeTagsMethodInfo Source #
((~) * signature (Maybe TagList -> TagMergeMode -> m ()), MonadIO m, IsAudioDecoder a) => MethodInfo * AudioDecoderMergeTagsMethodInfo a signature Source # | |
audioDecoderMergeTags Source #
:: (HasCallStack, MonadIO m, IsAudioDecoder a) | |
=> a |
|
-> Maybe TagList |
|
-> TagMergeMode |
|
-> m () |
Sets the audio decoder tags and how they should be merged with any
upstream stream tags. This will override any tags previously-set
with audioDecoderMergeTags
.
Note that this is provided for convenience, and the subclass is not required to use this and can still do tag handling on its own.
negotiate
data AudioDecoderNegotiateMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsAudioDecoder a) => MethodInfo * AudioDecoderNegotiateMethodInfo a signature Source # | |
audioDecoderNegotiate Source #
:: (HasCallStack, MonadIO m, IsAudioDecoder a) | |
=> a |
|
-> m Bool | Returns: |
Negotiate with downstream elements to currently configured AudioInfo
.
Unmark GST_PAD_FLAG_NEED_RECONFIGURE in any case. But mark it again if
negotiate fails.
proxyGetcaps
data AudioDecoderProxyGetcapsMethodInfo Source #
((~) * signature (Maybe Caps -> Maybe Caps -> m Caps), MonadIO m, IsAudioDecoder a) => MethodInfo * AudioDecoderProxyGetcapsMethodInfo a signature Source # | |
audioDecoderProxyGetcaps Source #
:: (HasCallStack, MonadIO m, IsAudioDecoder a) | |
=> a |
|
-> Maybe Caps |
|
-> Maybe Caps |
|
-> m Caps | Returns: a |
Returns caps that express caps
(or sink template caps if caps
== NULL)
restricted to rate/channels/... combinations supported by downstream
elements.
Since: 1.6
setAllocationCaps
data AudioDecoderSetAllocationCapsMethodInfo Source #
((~) * signature (Maybe Caps -> m ()), MonadIO m, IsAudioDecoder a) => MethodInfo * AudioDecoderSetAllocationCapsMethodInfo a signature Source # | |
audioDecoderSetAllocationCaps Source #
:: (HasCallStack, MonadIO m, IsAudioDecoder a) | |
=> a |
|
-> Maybe Caps | |
-> m () |
Sets a caps in allocation query which are different from the set
pad's caps. Use this function before calling
audioDecoderNegotiate
. Setting to Nothing
the allocation
query will use the caps from the pad.
Since: 1.10
setDrainable
data AudioDecoderSetDrainableMethodInfo Source #
((~) * signature (Bool -> m ()), MonadIO m, IsAudioDecoder a) => MethodInfo * AudioDecoderSetDrainableMethodInfo a signature Source # | |
audioDecoderSetDrainable Source #
:: (HasCallStack, MonadIO m, IsAudioDecoder a) | |
=> a |
|
-> Bool |
|
-> m () |
Configures decoder drain handling. If drainable, subclass might be handed a NULL buffer to have it return any leftover decoded data. Otherwise, it is not considered so capable and will only ever be passed real data.
MT safe.
setEstimateRate
data AudioDecoderSetEstimateRateMethodInfo Source #
((~) * signature (Bool -> m ()), MonadIO m, IsAudioDecoder a) => MethodInfo * AudioDecoderSetEstimateRateMethodInfo a signature Source # | |
audioDecoderSetEstimateRate Source #
:: (HasCallStack, MonadIO m, IsAudioDecoder a) | |
=> a |
|
-> Bool |
|
-> m () |
Allows baseclass to perform byte to time estimated conversion.
setLatency
data AudioDecoderSetLatencyMethodInfo Source #
((~) * signature (Word64 -> Word64 -> m ()), MonadIO m, IsAudioDecoder a) => MethodInfo * AudioDecoderSetLatencyMethodInfo a signature Source # | |
audioDecoderSetLatency Source #
:: (HasCallStack, MonadIO m, IsAudioDecoder a) | |
=> a |
|
-> Word64 |
|
-> Word64 |
|
-> m () |
Sets decoder latency.
setMaxErrors
data AudioDecoderSetMaxErrorsMethodInfo Source #
((~) * signature (Int32 -> m ()), MonadIO m, IsAudioDecoder a) => MethodInfo * AudioDecoderSetMaxErrorsMethodInfo a signature Source # | |
audioDecoderSetMaxErrors Source #
:: (HasCallStack, MonadIO m, IsAudioDecoder a) | |
=> a |
|
-> Int32 |
|
-> m () |
Sets numbers of tolerated decoder errors, where a tolerated one is then only warned about, but more than tolerated will lead to fatal error. You can set -1 for never returning fatal errors. Default is set to GST_AUDIO_DECODER_MAX_ERRORS.
setMinLatency
data AudioDecoderSetMinLatencyMethodInfo Source #
((~) * signature (Word64 -> m ()), MonadIO m, IsAudioDecoder a) => MethodInfo * AudioDecoderSetMinLatencyMethodInfo a signature Source # | |
audioDecoderSetMinLatency Source #
:: (HasCallStack, MonadIO m, IsAudioDecoder a) | |
=> a |
|
-> Word64 |
|
-> m () |
Sets decoder minimum aggregation latency.
MT safe.
setNeedsFormat
data AudioDecoderSetNeedsFormatMethodInfo Source #
((~) * signature (Bool -> m ()), MonadIO m, IsAudioDecoder a) => MethodInfo * AudioDecoderSetNeedsFormatMethodInfo a signature Source # | |
audioDecoderSetNeedsFormat Source #
:: (HasCallStack, MonadIO m, IsAudioDecoder a) | |
=> a |
|
-> Bool |
|
-> m () |
Configures decoder format needs. If enabled, subclass needs to be negotiated with format caps before it can process any data. It will then never be handed any data before it has been configured. Otherwise, it might be handed data without having been configured and is then expected being able to do so either by default or based on the input data.
MT safe.
setOutputFormat
data AudioDecoderSetOutputFormatMethodInfo Source #
((~) * signature (AudioInfo -> m Bool), MonadIO m, IsAudioDecoder a) => MethodInfo * AudioDecoderSetOutputFormatMethodInfo a signature Source # | |
audioDecoderSetOutputFormat Source #
:: (HasCallStack, MonadIO m, IsAudioDecoder a) | |
=> a |
|
-> AudioInfo |
|
-> m Bool | Returns: |
Configure output info on the srcpad of dec
.
setPlc
data AudioDecoderSetPlcMethodInfo Source #
((~) * signature (Bool -> m ()), MonadIO m, IsAudioDecoder a) => MethodInfo * AudioDecoderSetPlcMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAudioDecoder a) | |
=> a |
|
-> Bool |
|
-> m () |
Enable or disable decoder packet loss concealment, provided subclass and codec are capable and allow handling plc.
MT safe.
setPlcAware
data AudioDecoderSetPlcAwareMethodInfo Source #
((~) * signature (Bool -> m ()), MonadIO m, IsAudioDecoder a) => MethodInfo * AudioDecoderSetPlcAwareMethodInfo a signature Source # | |
audioDecoderSetPlcAware Source #
:: (HasCallStack, MonadIO m, IsAudioDecoder a) | |
=> a |
|
-> Bool |
|
-> m () |
Indicates whether or not subclass handles packet loss concealment (plc).
setTolerance
data AudioDecoderSetToleranceMethodInfo Source #
((~) * signature (Word64 -> m ()), MonadIO m, IsAudioDecoder a) => MethodInfo * AudioDecoderSetToleranceMethodInfo a signature Source # | |
audioDecoderSetTolerance Source #
:: (HasCallStack, MonadIO m, IsAudioDecoder a) | |
=> a |
|
-> Word64 |
|
-> m () |
Configures decoder audio jitter tolerance threshold.
MT safe.
setUseDefaultPadAcceptcaps
data AudioDecoderSetUseDefaultPadAcceptcapsMethodInfo Source #
((~) * signature (Bool -> m ()), MonadIO m, IsAudioDecoder a) => MethodInfo * AudioDecoderSetUseDefaultPadAcceptcapsMethodInfo a signature Source # | |
audioDecoderSetUseDefaultPadAcceptcaps Source #
:: (HasCallStack, MonadIO m, IsAudioDecoder a) | |
=> a |
|
-> Bool |
|
-> m () |
Lets AudioDecoder
sub-classes decide if they want the sink pad
to use the default pad query handler to reply to accept-caps queries.
By setting this to true it is possible to further customize the default
handler with GST_PAD_SET_ACCEPT_INTERSECT
and
GST_PAD_SET_ACCEPT_TEMPLATE
Since: 1.6
Properties
minLatency
data AudioDecoderMinLatencyPropertyInfo Source #
audioDecoderMinLatency :: AttrLabelProxy "minLatency" Source #
constructAudioDecoderMinLatency :: IsAudioDecoder o => Int64 -> IO (GValueConstruct o) Source #
getAudioDecoderMinLatency :: (MonadIO m, IsAudioDecoder o) => o -> m Int64 Source #
setAudioDecoderMinLatency :: (MonadIO m, IsAudioDecoder o) => o -> Int64 -> m () Source #
plc
data AudioDecoderPlcPropertyInfo Source #
audioDecoderPlc :: AttrLabelProxy "plc" Source #
constructAudioDecoderPlc :: IsAudioDecoder o => Bool -> IO (GValueConstruct o) Source #
getAudioDecoderPlc :: (MonadIO m, IsAudioDecoder o) => o -> m Bool Source #
setAudioDecoderPlc :: (MonadIO m, IsAudioDecoder o) => o -> Bool -> m () Source #
tolerance
data AudioDecoderTolerancePropertyInfo Source #
audioDecoderTolerance :: AttrLabelProxy "tolerance" Source #
constructAudioDecoderTolerance :: IsAudioDecoder o => Int64 -> IO (GValueConstruct o) Source #
getAudioDecoderTolerance :: (MonadIO m, IsAudioDecoder o) => o -> m Int64 Source #
setAudioDecoderTolerance :: (MonadIO m, IsAudioDecoder o) => o -> Int64 -> m () Source #