GstAudioDecoder

This base class is for audio decoders turning encoded data into raw audio samples.

GstAudioDecoder and subclass should cooperate as follows.

Configuration

  • 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 set_format).
  • GstAudioDecoder calls set_format 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.
  • GstAudioDecoder calls stop at end of all processing.

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.

Data processing

 * 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.
 * Input frame is provided to subclass' @handle_frame.
 * If codec processing results in decoded data, subclass should call
   @gst_audio_decoder_finish_frame to have decoded data pushed
   downstream.
 * Just prior to actually pushing a buffer downstream,
   it is passed to @pre_push.  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.
 * 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.

Shutdown phase

  • GstAudioDecoder class calls stop to inform the subclass that data parsing will be stopped.

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' set_format function, though it might be delayed until calling gst_audio_decoder_finish_frame.

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. pre_push), 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 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. Note that this feature is only available if the buffer layout is interleaved. For planar buffers, the decoder implementation is fully responsible for the output buffer size.

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:

  • Provide pad templates

  • Set source pad caps when appropriate

  • Set user-configurable properties to sane defaults for format and implementing codec at hand, and convey some subclass capabilities and expectations in context.

  • Accept data in handle_frame and provide encoded results to gst_audio_decoder_finish_frame. If it is prepared to perform PLC, it should also accept NULL data in handle_frame and provide for data for indicated duration.

GstAudioDecoder

GObject
    ╰──GInitiallyUnowned
        ╰──GstObject
            ╰──GstElement
                ╰──GstAudioDecoder

The opaque GstAudioDecoder data structure.

Members

element (GstElement) –
No description available
sinkpad (GstPad *) –
No description available
srcpad (GstPad *) –
No description available
stream_lock (GRecMutex) –
No description available
input_segment (GstSegment) –
No description available
output_segment (GstSegment) –
No description available

Class structure

GstAudioDecoderClass

Subclasses can override any of the available virtual methods or not, as needed. At minimum handle_frame (and likely set_format) needs to be overridden.

Fields
element_class (GstElementClass) –

The parent class structure


GstAudio.AudioDecoderClass

Subclasses can override any of the available virtual methods or not, as needed. At minimum handle_frame (and likely set_format) needs to be overridden.

Attributes
element_class (Gst.ElementClass) –

The parent class structure


GstAudio.AudioDecoderClass

Subclasses can override any of the available virtual methods or not, as needed. At minimum handle_frame (and likely set_format) needs to be overridden.

Attributes
element_class (Gst.ElementClass) –

The parent class structure


GstAudio.AudioDecoder

GObject.Object
    ╰──GObject.InitiallyUnowned
        ╰──Gst.Object
            ╰──Gst.Element
                ╰──GstAudio.AudioDecoder

The opaque GstAudio.AudioDecoder data structure.

Members

element (Gst.Element) –
No description available
sinkpad (Gst.Pad) –
No description available
srcpad (Gst.Pad) –
No description available
stream_lock (GLib.RecMutex) –
No description available
input_segment (Gst.Segment) –
No description available
output_segment (Gst.Segment) –
No description available

GstAudio.AudioDecoder

GObject.Object
    ╰──GObject.InitiallyUnowned
        ╰──Gst.Object
            ╰──Gst.Element
                ╰──GstAudio.AudioDecoder

The opaque GstAudio.AudioDecoder data structure.

Members

element (Gst.Element) –
No description available
sinkpad (Gst.Pad) –
No description available
srcpad (Gst.Pad) –
No description available
stream_lock (GLib.RecMutex) –
No description available
input_segment (Gst.Segment) –
No description available
output_segment (Gst.Segment) –
No description available

Methods

gst_audio_decoder_allocate_output_buffer

GstBuffer *
gst_audio_decoder_allocate_output_buffer (GstAudioDecoder * dec,
                                          gsize size)

Helper function that allocates a buffer to hold an audio frame for dec's current output format.

Parameters:

dec

a GstAudioDecoder

size

size of the buffer

Returns ( [transfer: full])

allocated buffer


GstAudio.AudioDecoder.prototype.allocate_output_buffer

function GstAudio.AudioDecoder.prototype.allocate_output_buffer(size: Number): {
    // javascript wrapper for 'gst_audio_decoder_allocate_output_buffer'
}

Helper function that allocates a buffer to hold an audio frame for dec's current output format.

Parameters:

size (Number)

size of the buffer

Returns (Gst.Buffer)

allocated buffer


GstAudio.AudioDecoder.allocate_output_buffer

def GstAudio.AudioDecoder.allocate_output_buffer (self, size):
    #python wrapper for 'gst_audio_decoder_allocate_output_buffer'

Helper function that allocates a buffer to hold an audio frame for dec's current output format.

Parameters:

size (int)

size of the buffer

Returns (Gst.Buffer)

allocated buffer


gst_audio_decoder_finish_frame

GstFlowReturn
gst_audio_decoder_finish_frame (GstAudioDecoder * dec,
                                GstBuffer * buf,
                                gint frames)

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 handle_frame() may be invalidated by a call to this function.

Parameters:

dec

a GstAudioDecoder

buf ( [transfer: full][nullable])

decoded data

frames

number of decoded frames represented by decoded data

Returns

a GstFlowReturn that should be escalated to caller (of caller)


GstAudio.AudioDecoder.prototype.finish_frame

function GstAudio.AudioDecoder.prototype.finish_frame(buf: Gst.Buffer, frames: Number): {
    // javascript wrapper for 'gst_audio_decoder_finish_frame'
}

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 vfunc_handle_frame() may be invalidated by a call to this function.

Parameters:

buf (Gst.Buffer)

decoded data

frames (Number)

number of decoded frames represented by decoded data

Returns (Gst.FlowReturn)

a Gst.FlowReturn that should be escalated to caller (of caller)


GstAudio.AudioDecoder.finish_frame

def GstAudio.AudioDecoder.finish_frame (self, buf, frames):
    #python wrapper for 'gst_audio_decoder_finish_frame'

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 do_handle_frame() may be invalidated by a call to this function.

Parameters:

buf (Gst.Buffer)

decoded data

frames (int)

number of decoded frames represented by decoded data

Returns (Gst.FlowReturn)

a Gst.FlowReturn that should be escalated to caller (of caller)


gst_audio_decoder_finish_subframe

GstFlowReturn
gst_audio_decoder_finish_subframe (GstAudioDecoder * dec,
                                   GstBuffer * buf)

Collects decoded data and pushes it downstream. This function may be called multiple times for a given input frame.

buf may be NULL in which case it is assumed that the current input frame is finished. This is equivalent to calling gst_audio_decoder_finish_subframe with a NULL buffer and frames=1 after having pushed out all decoded audio subframes using this function.

When called with valid data in buf the source pad caps must have been set already.

Note that a frame received in handle_frame() may be invalidated by a call to this function.

Parameters:

dec

a GstAudioDecoder

buf ( [transfer: full][nullable])

decoded data

Returns

a GstFlowReturn that should be escalated to caller (of caller)

Since : 1.16


GstAudio.AudioDecoder.prototype.finish_subframe

function GstAudio.AudioDecoder.prototype.finish_subframe(buf: Gst.Buffer): {
    // javascript wrapper for 'gst_audio_decoder_finish_subframe'
}

Collects decoded data and pushes it downstream. This function may be called multiple times for a given input frame.

buf may be NULL in which case it is assumed that the current input frame is finished. This is equivalent to calling GstAudio.AudioDecoder.prototype.finish_subframe with a NULL buffer and frames=1 after having pushed out all decoded audio subframes using this function.

When called with valid data in buf the source pad caps must have been set already.

Note that a frame received in vfunc_handle_frame() may be invalidated by a call to this function.

Parameters:

buf (Gst.Buffer)

decoded data

Returns (Gst.FlowReturn)

a Gst.FlowReturn that should be escalated to caller (of caller)

Since : 1.16


GstAudio.AudioDecoder.finish_subframe

def GstAudio.AudioDecoder.finish_subframe (self, buf):
    #python wrapper for 'gst_audio_decoder_finish_subframe'

Collects decoded data and pushes it downstream. This function may be called multiple times for a given input frame.

buf may be NULL in which case it is assumed that the current input frame is finished. This is equivalent to calling GstAudio.AudioDecoder.finish_subframe with a NULL buffer and frames=1 after having pushed out all decoded audio subframes using this function.

When called with valid data in buf the source pad caps must have been set already.

Note that a frame received in do_handle_frame() may be invalidated by a call to this function.

Parameters:

buf (Gst.Buffer)

decoded data

Returns (Gst.FlowReturn)

a Gst.FlowReturn that should be escalated to caller (of caller)

Since : 1.16


gst_audio_decoder_get_allocator

gst_audio_decoder_get_allocator (GstAudioDecoder * dec,
                                 GstAllocator ** allocator,
                                 GstAllocationParams * params)

Lets GstAudioDecoder sub-classes to know the memory allocator used by the base class and its params.

Unref the allocator after use it.

Parameters:

dec

a GstAudioDecoder

allocator ( [out][optional][nullable][transfer: full])

the GstAllocator used

params ( [out][optional][transfer: full])

the GstAllocationParams of allocator


GstAudio.AudioDecoder.prototype.get_allocator

function GstAudio.AudioDecoder.prototype.get_allocator(): {
    // javascript wrapper for 'gst_audio_decoder_get_allocator'
}

Lets GstAudio.AudioDecoder sub-classes to know the memory allocator used by the base class and its params.

Unref the allocator after use it.


GstAudio.AudioDecoder.get_allocator

def GstAudio.AudioDecoder.get_allocator (self):
    #python wrapper for 'gst_audio_decoder_get_allocator'

Lets GstAudio.AudioDecoder sub-classes to know the memory allocator used by the base class and its params.

Unref the allocator after use it.


gst_audio_decoder_get_audio_info

GstAudioInfo *
gst_audio_decoder_get_audio_info (GstAudioDecoder * dec)

Parameters:

dec

a GstAudioDecoder

Returns ( [transfer: none])

a GstAudioInfo describing the input audio format


GstAudio.AudioDecoder.prototype.get_audio_info

function GstAudio.AudioDecoder.prototype.get_audio_info(): {
    // javascript wrapper for 'gst_audio_decoder_get_audio_info'
}
Returns (GstAudio.AudioInfo)

a GstAudio.AudioInfo describing the input audio format


GstAudio.AudioDecoder.get_audio_info

def GstAudio.AudioDecoder.get_audio_info (self):
    #python wrapper for 'gst_audio_decoder_get_audio_info'
Returns (GstAudio.AudioInfo)

a GstAudio.AudioInfo describing the input audio format


gst_audio_decoder_get_delay

gint
gst_audio_decoder_get_delay (GstAudioDecoder * dec)

Parameters:

dec

a GstAudioDecoder

Returns

currently configured decoder delay


GstAudio.AudioDecoder.prototype.get_delay

function GstAudio.AudioDecoder.prototype.get_delay(): {
    // javascript wrapper for 'gst_audio_decoder_get_delay'
}
Returns (Number)

currently configured decoder delay


GstAudio.AudioDecoder.get_delay

def GstAudio.AudioDecoder.get_delay (self):
    #python wrapper for 'gst_audio_decoder_get_delay'
Returns (int)

currently configured decoder delay


gst_audio_decoder_get_drainable

gboolean
gst_audio_decoder_get_drainable (GstAudioDecoder * dec)

Queries decoder drain handling.

Parameters:

dec

a GstAudioDecoder

Returns

TRUE if drainable handling is enabled.

MT safe.


GstAudio.AudioDecoder.prototype.get_drainable

function GstAudio.AudioDecoder.prototype.get_drainable(): {
    // javascript wrapper for 'gst_audio_decoder_get_drainable'
}

Queries decoder drain handling.

Returns (Number)

TRUE if drainable handling is enabled.

MT safe.


GstAudio.AudioDecoder.get_drainable

def GstAudio.AudioDecoder.get_drainable (self):
    #python wrapper for 'gst_audio_decoder_get_drainable'

Queries decoder drain handling.

Returns (bool)

TRUE if drainable handling is enabled.

MT safe.


gst_audio_decoder_get_estimate_rate

gint
gst_audio_decoder_get_estimate_rate (GstAudioDecoder * dec)

Parameters:

dec

a GstAudioDecoder

Returns

currently configured byte to time conversion setting


GstAudio.AudioDecoder.prototype.get_estimate_rate

function GstAudio.AudioDecoder.prototype.get_estimate_rate(): {
    // javascript wrapper for 'gst_audio_decoder_get_estimate_rate'
}
Returns (Number)

currently configured byte to time conversion setting


GstAudio.AudioDecoder.get_estimate_rate

def GstAudio.AudioDecoder.get_estimate_rate (self):
    #python wrapper for 'gst_audio_decoder_get_estimate_rate'
Returns (int)

currently configured byte to time conversion setting


gst_audio_decoder_get_latency

gst_audio_decoder_get_latency (GstAudioDecoder * dec,
                               GstClockTime * min,
                               GstClockTime * max)

Sets the variables pointed to by min and max to the currently configured latency.

Parameters:

dec

a GstAudioDecoder

min ( [out][optional])

a pointer to storage to hold minimum latency

max ( [out][optional])

a pointer to storage to hold maximum latency


GstAudio.AudioDecoder.prototype.get_latency

function GstAudio.AudioDecoder.prototype.get_latency(): {
    // javascript wrapper for 'gst_audio_decoder_get_latency'
}

Sets the variables pointed to by min and max to the currently configured latency.


GstAudio.AudioDecoder.get_latency

def GstAudio.AudioDecoder.get_latency (self):
    #python wrapper for 'gst_audio_decoder_get_latency'

Sets the variables pointed to by min and max to the currently configured latency.


gst_audio_decoder_get_max_errors

gint
gst_audio_decoder_get_max_errors (GstAudioDecoder * dec)

Parameters:

dec

a GstAudioDecoder

Returns

currently configured decoder tolerated error count.


GstAudio.AudioDecoder.prototype.get_max_errors

function GstAudio.AudioDecoder.prototype.get_max_errors(): {
    // javascript wrapper for 'gst_audio_decoder_get_max_errors'
}
Returns (Number)

currently configured decoder tolerated error count.


GstAudio.AudioDecoder.get_max_errors

def GstAudio.AudioDecoder.get_max_errors (self):
    #python wrapper for 'gst_audio_decoder_get_max_errors'
Returns (int)

currently configured decoder tolerated error count.


gst_audio_decoder_get_min_latency

GstClockTime
gst_audio_decoder_get_min_latency (GstAudioDecoder * dec)

Queries decoder's latency aggregation.

Parameters:

dec

a GstAudioDecoder

Returns

aggregation latency.

MT safe.


GstAudio.AudioDecoder.prototype.get_min_latency

function GstAudio.AudioDecoder.prototype.get_min_latency(): {
    // javascript wrapper for 'gst_audio_decoder_get_min_latency'
}

Queries decoder's latency aggregation.

Returns (Number)

aggregation latency.

MT safe.


GstAudio.AudioDecoder.get_min_latency

def GstAudio.AudioDecoder.get_min_latency (self):
    #python wrapper for 'gst_audio_decoder_get_min_latency'

Queries decoder's latency aggregation.

Returns (int)

aggregation latency.

MT safe.


gst_audio_decoder_get_needs_format

gboolean
gst_audio_decoder_get_needs_format (GstAudioDecoder * dec)

Queries decoder required format handling.

Parameters:

dec

a GstAudioDecoder

Returns

TRUE if required format handling is enabled.

MT safe.


GstAudio.AudioDecoder.prototype.get_needs_format

function GstAudio.AudioDecoder.prototype.get_needs_format(): {
    // javascript wrapper for 'gst_audio_decoder_get_needs_format'
}

Queries decoder required format handling.

Returns (Number)

TRUE if required format handling is enabled.

MT safe.


GstAudio.AudioDecoder.get_needs_format

def GstAudio.AudioDecoder.get_needs_format (self):
    #python wrapper for 'gst_audio_decoder_get_needs_format'

Queries decoder required format handling.

Returns (bool)

TRUE if required format handling is enabled.

MT safe.


gst_audio_decoder_get_parse_state

gst_audio_decoder_get_parse_state (GstAudioDecoder * dec,
                                   gboolean * sync,
                                   gboolean * eos)

Return current parsing (sync and eos) state.

Parameters:

dec

a GstAudioDecoder

sync ( [out][optional])

a pointer to a variable to hold the current sync state

eos ( [out][optional])

a pointer to a variable to hold the current eos state


GstAudio.AudioDecoder.prototype.get_parse_state

function GstAudio.AudioDecoder.prototype.get_parse_state(): {
    // javascript wrapper for 'gst_audio_decoder_get_parse_state'
}

Return current parsing (sync and eos) state.


GstAudio.AudioDecoder.get_parse_state

def GstAudio.AudioDecoder.get_parse_state (self):
    #python wrapper for 'gst_audio_decoder_get_parse_state'

Return current parsing (sync and eos) state.


gst_audio_decoder_get_plc

gboolean
gst_audio_decoder_get_plc (GstAudioDecoder * dec)

Queries decoder packet loss concealment handling.

Parameters:

dec

a GstAudioDecoder

Returns

TRUE if packet loss concealment is enabled.

MT safe.


GstAudio.AudioDecoder.prototype.get_plc

function GstAudio.AudioDecoder.prototype.get_plc(): {
    // javascript wrapper for 'gst_audio_decoder_get_plc'
}

Queries decoder packet loss concealment handling.

Returns (Number)

TRUE if packet loss concealment is enabled.

MT safe.


GstAudio.AudioDecoder.get_plc

def GstAudio.AudioDecoder.get_plc (self):
    #python wrapper for 'gst_audio_decoder_get_plc'

Queries decoder packet loss concealment handling.

Returns (bool)

TRUE if packet loss concealment is enabled.

MT safe.


gst_audio_decoder_get_plc_aware

gint
gst_audio_decoder_get_plc_aware (GstAudioDecoder * dec)

Parameters:

dec

a GstAudioDecoder

Returns

currently configured plc handling


GstAudio.AudioDecoder.prototype.get_plc_aware

function GstAudio.AudioDecoder.prototype.get_plc_aware(): {
    // javascript wrapper for 'gst_audio_decoder_get_plc_aware'
}
Returns (Number)

currently configured plc handling


GstAudio.AudioDecoder.get_plc_aware

def GstAudio.AudioDecoder.get_plc_aware (self):
    #python wrapper for 'gst_audio_decoder_get_plc_aware'
Returns (int)

currently configured plc handling


gst_audio_decoder_get_tolerance

GstClockTime
gst_audio_decoder_get_tolerance (GstAudioDecoder * dec)

Queries current audio jitter tolerance threshold.

Parameters:

dec

a GstAudioDecoder

Returns

decoder audio jitter tolerance threshold.

MT safe.


GstAudio.AudioDecoder.prototype.get_tolerance

function GstAudio.AudioDecoder.prototype.get_tolerance(): {
    // javascript wrapper for 'gst_audio_decoder_get_tolerance'
}

Queries current audio jitter tolerance threshold.

Returns (Number)

decoder audio jitter tolerance threshold.

MT safe.


GstAudio.AudioDecoder.get_tolerance

def GstAudio.AudioDecoder.get_tolerance (self):
    #python wrapper for 'gst_audio_decoder_get_tolerance'

Queries current audio jitter tolerance threshold.

Returns (int)

decoder audio jitter tolerance threshold.

MT safe.


gst_audio_decoder_merge_tags

gst_audio_decoder_merge_tags (GstAudioDecoder * dec,
                              const GstTagList * tags,
                              GstTagMergeMode mode)

Sets the audio decoder tags and how they should be merged with any upstream stream tags. This will override any tags previously-set with gst_audio_decoder_merge_tags.

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.

Parameters:

dec

a GstAudioDecoder

tags ( [nullable])

a GstTagList to merge, or NULL

mode

the GstTagMergeMode to use, usually GST_TAG_MERGE_REPLACE


GstAudio.AudioDecoder.prototype.merge_tags

function GstAudio.AudioDecoder.prototype.merge_tags(tags: Gst.TagList, mode: Gst.TagMergeMode): {
    // javascript wrapper for 'gst_audio_decoder_merge_tags'
}

Sets the audio decoder tags and how they should be merged with any upstream stream tags. This will override any tags previously-set with GstAudio.AudioDecoder.prototype.merge_tags.

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.

Parameters:

tags (Gst.TagList)

a Gst.TagList to merge, or NULL


GstAudio.AudioDecoder.merge_tags

def GstAudio.AudioDecoder.merge_tags (self, tags, mode):
    #python wrapper for 'gst_audio_decoder_merge_tags'

Sets the audio decoder tags and how they should be merged with any upstream stream tags. This will override any tags previously-set with GstAudio.AudioDecoder.merge_tags.

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.

Parameters:

tags (Gst.TagList)

a Gst.TagList to merge, or NULL


gst_audio_decoder_negotiate

gboolean
gst_audio_decoder_negotiate (GstAudioDecoder * dec)

Negotiate with downstream elements to currently configured GstAudioInfo. Unmark GST_PAD_FLAG_NEED_RECONFIGURE in any case. But mark it again if negotiate fails.

Parameters:

dec

a GstAudioDecoder

Returns

TRUE if the negotiation succeeded, else FALSE.


GstAudio.AudioDecoder.prototype.negotiate

function GstAudio.AudioDecoder.prototype.negotiate(): {
    // javascript wrapper for 'gst_audio_decoder_negotiate'
}

Negotiate with downstream elements to currently configured GstAudio.AudioInfo. Unmark GST_PAD_FLAG_NEED_RECONFIGURE in any case. But mark it again if negotiate fails.

Returns (Number)

true if the negotiation succeeded, else false.


GstAudio.AudioDecoder.negotiate

def GstAudio.AudioDecoder.negotiate (self):
    #python wrapper for 'gst_audio_decoder_negotiate'

Negotiate with downstream elements to currently configured GstAudio.AudioInfo. Unmark GST_PAD_FLAG_NEED_RECONFIGURE in any case. But mark it again if negotiate fails.

Returns (bool)

True if the negotiation succeeded, else False.


gst_audio_decoder_proxy_getcaps

GstCaps *
gst_audio_decoder_proxy_getcaps (GstAudioDecoder * decoder,
                                 GstCaps * caps,
                                 GstCaps * filter)

Returns caps that express caps (or sink template caps if caps == NULL) restricted to rate/channels/... combinations supported by downstream elements.

Parameters:

decoder

a GstAudioDecoder

caps ( [nullable])

initial caps

filter ( [nullable])

filter caps

Returns ( [transfer: full])

a GstCaps owned by caller

Since : 1.6


GstAudio.AudioDecoder.prototype.proxy_getcaps

function GstAudio.AudioDecoder.prototype.proxy_getcaps(caps: Gst.Caps, filter: Gst.Caps): {
    // javascript wrapper for 'gst_audio_decoder_proxy_getcaps'
}

Returns caps that express caps (or sink template caps if caps == NULL) restricted to rate/channels/... combinations supported by downstream elements.

Parameters:

caps (Gst.Caps)

initial caps

filter (Gst.Caps)

filter caps

Returns (Gst.Caps)

a Gst.Caps owned by caller

Since : 1.6


GstAudio.AudioDecoder.proxy_getcaps

def GstAudio.AudioDecoder.proxy_getcaps (self, caps, filter):
    #python wrapper for 'gst_audio_decoder_proxy_getcaps'

Returns caps that express caps (or sink template caps if caps == NULL) restricted to rate/channels/... combinations supported by downstream elements.

Parameters:

caps (Gst.Caps)

initial caps

filter (Gst.Caps)

filter caps

Returns (Gst.Caps)

a Gst.Caps owned by caller

Since : 1.6


gst_audio_decoder_set_allocation_caps

gst_audio_decoder_set_allocation_caps (GstAudioDecoder * dec,
                                       GstCaps * allocation_caps)

Sets a caps in allocation query which are different from the set pad's caps. Use this function before calling gst_audio_decoder_negotiate. Setting to NULL the allocation query will use the caps from the pad.

Parameters:

dec

a GstAudioDecoder

allocation_caps ( [nullable])

a GstCaps or NULL

Since : 1.10


GstAudio.AudioDecoder.prototype.set_allocation_caps

function GstAudio.AudioDecoder.prototype.set_allocation_caps(allocation_caps: Gst.Caps): {
    // javascript wrapper for 'gst_audio_decoder_set_allocation_caps'
}

Sets a caps in allocation query which are different from the set pad's caps. Use this function before calling GstAudio.AudioDecoder.prototype.negotiate. Setting to null the allocation query will use the caps from the pad.

Parameters:

allocation_caps (Gst.Caps)

a Gst.Caps or null

Since : 1.10


GstAudio.AudioDecoder.set_allocation_caps

def GstAudio.AudioDecoder.set_allocation_caps (self, allocation_caps):
    #python wrapper for 'gst_audio_decoder_set_allocation_caps'

Sets a caps in allocation query which are different from the set pad's caps. Use this function before calling GstAudio.AudioDecoder.negotiate. Setting to None the allocation query will use the caps from the pad.

Parameters:

allocation_caps (Gst.Caps)

a Gst.Caps or None

Since : 1.10


gst_audio_decoder_set_drainable

gst_audio_decoder_set_drainable (GstAudioDecoder * dec,
                                 gboolean enabled)

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.

Parameters:

dec

a GstAudioDecoder

enabled

new state


GstAudio.AudioDecoder.prototype.set_drainable

function GstAudio.AudioDecoder.prototype.set_drainable(enabled: Number): {
    // javascript wrapper for 'gst_audio_decoder_set_drainable'
}

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.

Parameters:

enabled (Number)

new state


GstAudio.AudioDecoder.set_drainable

def GstAudio.AudioDecoder.set_drainable (self, enabled):
    #python wrapper for 'gst_audio_decoder_set_drainable'

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.

Parameters:

enabled (bool)

new state


gst_audio_decoder_set_estimate_rate

gst_audio_decoder_set_estimate_rate (GstAudioDecoder * dec,
                                     gboolean enabled)

Allows baseclass to perform byte to time estimated conversion.

Parameters:

dec

a GstAudioDecoder

enabled

whether to enable byte to time conversion


GstAudio.AudioDecoder.prototype.set_estimate_rate

function GstAudio.AudioDecoder.prototype.set_estimate_rate(enabled: Number): {
    // javascript wrapper for 'gst_audio_decoder_set_estimate_rate'
}

Allows baseclass to perform byte to time estimated conversion.

Parameters:

enabled (Number)

whether to enable byte to time conversion


GstAudio.AudioDecoder.set_estimate_rate

def GstAudio.AudioDecoder.set_estimate_rate (self, enabled):
    #python wrapper for 'gst_audio_decoder_set_estimate_rate'

Allows baseclass to perform byte to time estimated conversion.

Parameters:

enabled (bool)

whether to enable byte to time conversion


gst_audio_decoder_set_latency

gst_audio_decoder_set_latency (GstAudioDecoder * dec,
                               GstClockTime min,
                               GstClockTime max)

Sets decoder latency. If the provided values changed from previously provided ones, this will also post a LATENCY message on the bus so the pipeline can reconfigure its global latency.

Parameters:

dec

a GstAudioDecoder

min

minimum latency

max

maximum latency


GstAudio.AudioDecoder.prototype.set_latency

function GstAudio.AudioDecoder.prototype.set_latency(min: Number, max: Number): {
    // javascript wrapper for 'gst_audio_decoder_set_latency'
}

Sets decoder latency. If the provided values changed from previously provided ones, this will also post a LATENCY message on the bus so the pipeline can reconfigure its global latency.

Parameters:

min (Number)

minimum latency

max (Number)

maximum latency


GstAudio.AudioDecoder.set_latency

def GstAudio.AudioDecoder.set_latency (self, min, max):
    #python wrapper for 'gst_audio_decoder_set_latency'

Sets decoder latency. If the provided values changed from previously provided ones, this will also post a LATENCY message on the bus so the pipeline can reconfigure its global latency.

Parameters:

min (int)

minimum latency

max (int)

maximum latency


gst_audio_decoder_set_max_errors

gst_audio_decoder_set_max_errors (GstAudioDecoder * dec,
                                  gint num)

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.

Parameters:

dec

a GstAudioDecoder

num

max tolerated errors


GstAudio.AudioDecoder.prototype.set_max_errors

function GstAudio.AudioDecoder.prototype.set_max_errors(num: Number): {
    // javascript wrapper for 'gst_audio_decoder_set_max_errors'
}

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.

Parameters:

num (Number)

max tolerated errors


GstAudio.AudioDecoder.set_max_errors

def GstAudio.AudioDecoder.set_max_errors (self, num):
    #python wrapper for 'gst_audio_decoder_set_max_errors'

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.

Parameters:

num (int)

max tolerated errors


gst_audio_decoder_set_min_latency

gst_audio_decoder_set_min_latency (GstAudioDecoder * dec,
                                   GstClockTime num)

Sets decoder minimum aggregation latency.

MT safe.

Parameters:

dec

a GstAudioDecoder

num

new minimum latency


GstAudio.AudioDecoder.prototype.set_min_latency

function GstAudio.AudioDecoder.prototype.set_min_latency(num: Number): {
    // javascript wrapper for 'gst_audio_decoder_set_min_latency'
}

Sets decoder minimum aggregation latency.

MT safe.

Parameters:

num (Number)

new minimum latency


GstAudio.AudioDecoder.set_min_latency

def GstAudio.AudioDecoder.set_min_latency (self, num):
    #python wrapper for 'gst_audio_decoder_set_min_latency'

Sets decoder minimum aggregation latency.

MT safe.

Parameters:

num (int)

new minimum latency


gst_audio_decoder_set_needs_format

gst_audio_decoder_set_needs_format (GstAudioDecoder * dec,
                                    gboolean enabled)

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.

Parameters:

dec

a GstAudioDecoder

enabled

new state


GstAudio.AudioDecoder.prototype.set_needs_format

function GstAudio.AudioDecoder.prototype.set_needs_format(enabled: Number): {
    // javascript wrapper for 'gst_audio_decoder_set_needs_format'
}

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.

Parameters:

enabled (Number)

new state


GstAudio.AudioDecoder.set_needs_format

def GstAudio.AudioDecoder.set_needs_format (self, enabled):
    #python wrapper for 'gst_audio_decoder_set_needs_format'

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.

Parameters:

enabled (bool)

new state


gst_audio_decoder_set_output_caps

gboolean
gst_audio_decoder_set_output_caps (GstAudioDecoder * dec,
                                   GstCaps * caps)

Configure output caps on the srcpad of dec. Similar to gst_audio_decoder_set_output_format, but allows subclasses to specify output caps that can't be expressed via GstAudioInfo e.g. caps that have caps features.

Parameters:

dec

a GstAudioDecoder

caps ( [transfer: none])

(fixed) GstCaps

Returns

TRUE on success.

Since : 1.16


GstAudio.AudioDecoder.prototype.set_output_caps

function GstAudio.AudioDecoder.prototype.set_output_caps(caps: Gst.Caps): {
    // javascript wrapper for 'gst_audio_decoder_set_output_caps'
}

Configure output caps on the srcpad of dec. Similar to GstAudio.AudioDecoder.prototype.set_output_format, but allows subclasses to specify output caps that can't be expressed via GstAudio.AudioInfo e.g. caps that have caps features.

Parameters:

caps (Gst.Caps)

(fixed) Gst.Caps

Returns (Number)

true on success.

Since : 1.16


GstAudio.AudioDecoder.set_output_caps

def GstAudio.AudioDecoder.set_output_caps (self, caps):
    #python wrapper for 'gst_audio_decoder_set_output_caps'

Configure output caps on the srcpad of dec. Similar to GstAudio.AudioDecoder.set_output_format, but allows subclasses to specify output caps that can't be expressed via GstAudio.AudioInfo e.g. caps that have caps features.

Parameters:

caps (Gst.Caps)

(fixed) Gst.Caps

Returns (bool)

True on success.

Since : 1.16


gst_audio_decoder_set_output_format

gboolean
gst_audio_decoder_set_output_format (GstAudioDecoder * dec,
                                     const GstAudioInfo * info)

Configure output info on the srcpad of dec.

Parameters:

dec

a GstAudioDecoder

info

GstAudioInfo

Returns

TRUE on success.


GstAudio.AudioDecoder.prototype.set_output_format

function GstAudio.AudioDecoder.prototype.set_output_format(info: GstAudio.AudioInfo): {
    // javascript wrapper for 'gst_audio_decoder_set_output_format'
}

Configure output info on the srcpad of dec.

Returns (Number)

true on success.


GstAudio.AudioDecoder.set_output_format

def GstAudio.AudioDecoder.set_output_format (self, info):
    #python wrapper for 'gst_audio_decoder_set_output_format'

Configure output info on the srcpad of dec.

Returns (bool)

True on success.


gst_audio_decoder_set_plc

gst_audio_decoder_set_plc (GstAudioDecoder * dec,
                           gboolean enabled)

Enable or disable decoder packet loss concealment, provided subclass and codec are capable and allow handling plc.

MT safe.

Parameters:

dec

a GstAudioDecoder

enabled

new state


GstAudio.AudioDecoder.prototype.set_plc

function GstAudio.AudioDecoder.prototype.set_plc(enabled: Number): {
    // javascript wrapper for 'gst_audio_decoder_set_plc'
}

Enable or disable decoder packet loss concealment, provided subclass and codec are capable and allow handling plc.

MT safe.

Parameters:

enabled (Number)

new state


GstAudio.AudioDecoder.set_plc

def GstAudio.AudioDecoder.set_plc (self, enabled):
    #python wrapper for 'gst_audio_decoder_set_plc'

Enable or disable decoder packet loss concealment, provided subclass and codec are capable and allow handling plc.

MT safe.

Parameters:

enabled (bool)

new state


gst_audio_decoder_set_plc_aware

gst_audio_decoder_set_plc_aware (GstAudioDecoder * dec,
                                 gboolean plc)

Indicates whether or not subclass handles packet loss concealment (plc).

Parameters:

dec

a GstAudioDecoder

plc

new plc state


GstAudio.AudioDecoder.prototype.set_plc_aware

function GstAudio.AudioDecoder.prototype.set_plc_aware(plc: Number): {
    // javascript wrapper for 'gst_audio_decoder_set_plc_aware'
}

Indicates whether or not subclass handles packet loss concealment (plc).

Parameters:

plc (Number)

new plc state


GstAudio.AudioDecoder.set_plc_aware

def GstAudio.AudioDecoder.set_plc_aware (self, plc):
    #python wrapper for 'gst_audio_decoder_set_plc_aware'

Indicates whether or not subclass handles packet loss concealment (plc).

Parameters:

plc (bool)

new plc state


gst_audio_decoder_set_tolerance

gst_audio_decoder_set_tolerance (GstAudioDecoder * dec,
                                 GstClockTime tolerance)

Configures decoder audio jitter tolerance threshold.

MT safe.

Parameters:

dec

a GstAudioDecoder

tolerance

new tolerance


GstAudio.AudioDecoder.prototype.set_tolerance

function GstAudio.AudioDecoder.prototype.set_tolerance(tolerance: Number): {
    // javascript wrapper for 'gst_audio_decoder_set_tolerance'
}

Configures decoder audio jitter tolerance threshold.

MT safe.

Parameters:

tolerance (Number)

new tolerance


GstAudio.AudioDecoder.set_tolerance

def GstAudio.AudioDecoder.set_tolerance (self, tolerance):
    #python wrapper for 'gst_audio_decoder_set_tolerance'

Configures decoder audio jitter tolerance threshold.

MT safe.

Parameters:

tolerance (int)

new tolerance


gst_audio_decoder_set_use_default_pad_acceptcaps

gst_audio_decoder_set_use_default_pad_acceptcaps (GstAudioDecoder * decoder,
                                                  gboolean use)

Lets GstAudioDecoder 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

Parameters:

decoder

a GstAudioDecoder

use

if the default pad accept-caps query handling should be used

Since : 1.6


GstAudio.AudioDecoder.prototype.set_use_default_pad_acceptcaps

function GstAudio.AudioDecoder.prototype.set_use_default_pad_acceptcaps(use: Number): {
    // javascript wrapper for 'gst_audio_decoder_set_use_default_pad_acceptcaps'
}

Lets GstAudio.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 (not introspectable) and GST_PAD_SET_ACCEPT_TEMPLATE (not introspectable)

Parameters:

use (Number)

if the default pad accept-caps query handling should be used

Since : 1.6


GstAudio.AudioDecoder.set_use_default_pad_acceptcaps

def GstAudio.AudioDecoder.set_use_default_pad_acceptcaps (self, use):
    #python wrapper for 'gst_audio_decoder_set_use_default_pad_acceptcaps'

Lets GstAudio.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 (not introspectable) and GST_PAD_SET_ACCEPT_TEMPLATE (not introspectable)

Parameters:

use (bool)

if the default pad accept-caps query handling should be used

Since : 1.6


Properties

max-errors

“max-errors” gint

Maximum number of tolerated consecutive decode errors. See gst_audio_decoder_set_max_errors for more details.

Flags : Read / Write

Since : 1.18


max-errors

“max-errors” Number

Maximum number of tolerated consecutive decode errors. See GstAudio.AudioDecoder.prototype.set_max_errors for more details.

Flags : Read / Write

Since : 1.18


max_errors

“self.props.max_errors” int

Maximum number of tolerated consecutive decode errors. See GstAudio.AudioDecoder.set_max_errors for more details.

Flags : Read / Write

Since : 1.18


min-latency

“min-latency” gint64

Flags : Read / Write


min-latency

“min-latency” Number

Flags : Read / Write


min_latency

“self.props.min_latency” int

Flags : Read / Write


plc

“plc” gboolean

Flags : Read / Write


plc

“plc” Number

Flags : Read / Write


plc

“self.props.plc” bool

Flags : Read / Write


tolerance

“tolerance” gint64

Flags : Read / Write


tolerance

“tolerance” Number

Flags : Read / Write


tolerance

“self.props.tolerance” int

Flags : Read / Write


Virtual Methods

close

gboolean
close (GstAudioDecoder * dec)

Optional. Called when the element changes to GST_STATE_NULL. Allows closing external resources.

Parameters:

dec
No description available
Returns
No description available

vfunc_close

function vfunc_close(dec: GstAudio.AudioDecoder): {
    // javascript implementation of the 'close' virtual method
}

Optional. Called when the element changes to GST_STATE_NULL. Allows closing external resources.

Parameters:

No description available
Returns (Number)
No description available

do_close

def do_close (dec):
    #python implementation of the 'close' virtual method

Optional. Called when the element changes to GST_STATE_NULL. Allows closing external resources.

Parameters:

No description available
Returns (bool)
No description available

decide_allocation

gboolean
decide_allocation (GstAudioDecoder * dec,
                   GstQuery * query)

Optional. Setup the allocation parameters for allocating output buffers. The passed in query contains the result of the downstream allocation query. Subclasses should chain up to the parent implementation to invoke the default handler.

Parameters:

dec
No description available
query
No description available
Returns
No description available

vfunc_decide_allocation

function vfunc_decide_allocation(dec: GstAudio.AudioDecoder, query: Gst.Query): {
    // javascript implementation of the 'decide_allocation' virtual method
}

Optional. Setup the allocation parameters for allocating output buffers. The passed in query contains the result of the downstream allocation query. Subclasses should chain up to the parent implementation to invoke the default handler.

Parameters:

No description available
query (Gst.Query)
No description available
Returns (Number)
No description available

do_decide_allocation

def do_decide_allocation (dec, query):
    #python implementation of the 'decide_allocation' virtual method

Optional. Setup the allocation parameters for allocating output buffers. The passed in query contains the result of the downstream allocation query. Subclasses should chain up to the parent implementation to invoke the default handler.

Parameters:

No description available
query (Gst.Query)
No description available
Returns (bool)
No description available

flush

flush (GstAudioDecoder * dec,
       gboolean hard)

Optional. Instructs subclass to clear any codec caches and discard any pending samples and not yet returned decoded data. hard indicates whether a FLUSH is being processed, or otherwise a DISCONT (or conceptually similar).

Parameters:

dec
No description available
hard
No description available

vfunc_flush

function vfunc_flush(dec: GstAudio.AudioDecoder, hard: Number): {
    // javascript implementation of the 'flush' virtual method
}

Optional. Instructs subclass to clear any codec caches and discard any pending samples and not yet returned decoded data. hard indicates whether a FLUSH is being processed, or otherwise a DISCONT (or conceptually similar).

Parameters:

No description available
hard (Number)
No description available

do_flush

def do_flush (dec, hard):
    #python implementation of the 'flush' virtual method

Optional. Instructs subclass to clear any codec caches and discard any pending samples and not yet returned decoded data. hard indicates whether a FLUSH is being processed, or otherwise a DISCONT (or conceptually similar).

Parameters:

No description available
hard (bool)
No description available

getcaps

GstCaps *
getcaps (GstAudioDecoder * dec,
         GstCaps * filter)

Optional. Allows for a custom sink getcaps implementation. If not implemented, default returns gst_audio_decoder_proxy_getcaps applied to sink template caps.

Parameters:

dec
No description available
filter
No description available
Returns
No description available

vfunc_getcaps

function vfunc_getcaps(dec: GstAudio.AudioDecoder, filter: Gst.Caps): {
    // javascript implementation of the 'getcaps' virtual method
}

Optional. Allows for a custom sink getcaps implementation. If not implemented, default returns gst_audio_decoder_proxy_getcaps applied to sink template caps.

Parameters:

No description available
filter (Gst.Caps)
No description available
Returns (Gst.Caps)
No description available

do_getcaps

def do_getcaps (dec, filter):
    #python implementation of the 'getcaps' virtual method

Optional. Allows for a custom sink getcaps implementation. If not implemented, default returns gst_audio_decoder_proxy_getcaps applied to sink template caps.

Parameters:

No description available
filter (Gst.Caps)
No description available
Returns (Gst.Caps)
No description available

handle_frame

GstFlowReturn
handle_frame (GstAudioDecoder * dec,
              GstBuffer * buffer)

Provides input data (or NULL to clear any remaining data) to subclass. Input data ref management is performed by base class, subclass should not care or intervene, and input data is only valid until next call to base class, most notably a call to gst_audio_decoder_finish_frame.

Parameters:

dec
No description available
buffer
No description available
Returns
No description available

vfunc_handle_frame

function vfunc_handle_frame(dec: GstAudio.AudioDecoder, buffer: Gst.Buffer): {
    // javascript implementation of the 'handle_frame' virtual method
}

Provides input data (or NULL to clear any remaining data) to subclass. Input data ref management is performed by base class, subclass should not care or intervene, and input data is only valid until next call to base class, most notably a call to GstAudio.AudioDecoder.prototype.finish_frame.

Parameters:

No description available
buffer (Gst.Buffer)
No description available
Returns (Gst.FlowReturn)
No description available

do_handle_frame

def do_handle_frame (dec, buffer):
    #python implementation of the 'handle_frame' virtual method

Provides input data (or NULL to clear any remaining data) to subclass. Input data ref management is performed by base class, subclass should not care or intervene, and input data is only valid until next call to base class, most notably a call to GstAudio.AudioDecoder.finish_frame.

Parameters:

No description available
buffer (Gst.Buffer)
No description available
Returns (Gst.FlowReturn)
No description available

negotiate

gboolean
negotiate (GstAudioDecoder * dec)

Optional. Negotiate with downstream and configure buffer pools, etc. Subclasses should chain up to the parent implementation to invoke the default handler.

Parameters:

dec
No description available
Returns
No description available

vfunc_negotiate

function vfunc_negotiate(dec: GstAudio.AudioDecoder): {
    // javascript implementation of the 'negotiate' virtual method
}

Optional. Negotiate with downstream and configure buffer pools, etc. Subclasses should chain up to the parent implementation to invoke the default handler.

Parameters:

No description available
Returns (Number)
No description available

do_negotiate

def do_negotiate (dec):
    #python implementation of the 'negotiate' virtual method

Optional. Negotiate with downstream and configure buffer pools, etc. Subclasses should chain up to the parent implementation to invoke the default handler.

Parameters:

No description available
Returns (bool)
No description available

open

gboolean
open (GstAudioDecoder * dec)

Optional. Called when the element changes to GST_STATE_READY. Allows opening external resources.

Parameters:

dec
No description available
Returns
No description available

vfunc_open

function vfunc_open(dec: GstAudio.AudioDecoder): {
    // javascript implementation of the 'open' virtual method
}

Optional. Called when the element changes to GST_STATE_READY. Allows opening external resources.

Parameters:

No description available
Returns (Number)
No description available

do_open

def do_open (dec):
    #python implementation of the 'open' virtual method

Optional. Called when the element changes to GST_STATE_READY. Allows opening external resources.

Parameters:

No description available
Returns (bool)
No description available

parse

GstFlowReturn
parse (GstAudioDecoder * dec,
       GstAdapter * adapter,
       gint * offset,
       gint * length)

Optional. Allows chopping incoming data into manageable units (frames) for subsequent decoding. This division is at subclass discretion and may or may not correspond to 1 (or more) frames as defined by audio format.

Parameters:

dec
No description available
adapter
No description available
offset
No description available
length
No description available
Returns
No description available

vfunc_parse

function vfunc_parse(dec: GstAudio.AudioDecoder, adapter: GstBase.Adapter): {
    // javascript implementation of the 'parse' virtual method
}

Optional. Allows chopping incoming data into manageable units (frames) for subsequent decoding. This division is at subclass discretion and may or may not correspond to 1 (or more) frames as defined by audio format.

Parameters:

No description available
adapter (GstBase.Adapter)
No description available

Returns a tuple made of:

No description available
offset (Number )
No description available
length (Number )
No description available

do_parse

def do_parse (dec, adapter):
    #python implementation of the 'parse' virtual method

Optional. Allows chopping incoming data into manageable units (frames) for subsequent decoding. This division is at subclass discretion and may or may not correspond to 1 (or more) frames as defined by audio format.

Parameters:

No description available
adapter (GstBase.Adapter)
No description available

Returns a tuple made of:

No description available
offset (int )
No description available
length (int )
No description available

pre_push

GstFlowReturn
pre_push (GstAudioDecoder * dec,
          GstBuffer ** buffer)

Optional. Called just prior to pushing (encoded data) buffer downstream. Subclass has full discretionary access to buffer, and a not OK flow return will abort downstream pushing.

Parameters:

dec
No description available
buffer
No description available
Returns
No description available

vfunc_pre_push

function vfunc_pre_push(dec: GstAudio.AudioDecoder, buffer: Gst.Buffer): {
    // javascript implementation of the 'pre_push' virtual method
}

Optional. Called just prior to pushing (encoded data) buffer downstream. Subclass has full discretionary access to buffer, and a not OK flow return will abort downstream pushing.

Parameters:

No description available
buffer (Gst.Buffer)
No description available
Returns (Gst.FlowReturn)
No description available

do_pre_push

def do_pre_push (dec, buffer):
    #python implementation of the 'pre_push' virtual method

Optional. Called just prior to pushing (encoded data) buffer downstream. Subclass has full discretionary access to buffer, and a not OK flow return will abort downstream pushing.

Parameters:

No description available
buffer (Gst.Buffer)
No description available
Returns (Gst.FlowReturn)
No description available

propose_allocation

gboolean
propose_allocation (GstAudioDecoder * dec,
                    GstQuery * query)

Optional. Propose buffer allocation parameters for upstream elements. Subclasses should chain up to the parent implementation to invoke the default handler.

Parameters:

dec
No description available
query
No description available
Returns
No description available

vfunc_propose_allocation

function vfunc_propose_allocation(dec: GstAudio.AudioDecoder, query: Gst.Query): {
    // javascript implementation of the 'propose_allocation' virtual method
}

Optional. Propose buffer allocation parameters for upstream elements. Subclasses should chain up to the parent implementation to invoke the default handler.

Parameters:

No description available
query (Gst.Query)
No description available
Returns (Number)
No description available

do_propose_allocation

def do_propose_allocation (dec, query):
    #python implementation of the 'propose_allocation' virtual method

Optional. Propose buffer allocation parameters for upstream elements. Subclasses should chain up to the parent implementation to invoke the default handler.

Parameters:

No description available
query (Gst.Query)
No description available
Returns (bool)
No description available

set_format

gboolean
set_format (GstAudioDecoder * dec,
            GstCaps * caps)

Notifies subclass of incoming data format (caps).

Parameters:

dec
No description available
caps
No description available
Returns
No description available

vfunc_set_format

function vfunc_set_format(dec: GstAudio.AudioDecoder, caps: Gst.Caps): {
    // javascript implementation of the 'set_format' virtual method
}

Notifies subclass of incoming data format (caps).

Parameters:

No description available
caps (Gst.Caps)
No description available
Returns (Number)
No description available

do_set_format

def do_set_format (dec, caps):
    #python implementation of the 'set_format' virtual method

Notifies subclass of incoming data format (caps).

Parameters:

No description available
caps (Gst.Caps)
No description available
Returns (bool)
No description available

sink_event

gboolean
sink_event (GstAudioDecoder * dec,
            GstEvent * event)

Optional. Event handler on the sink pad. Subclasses should chain up to the parent implementation to invoke the default handler.

Parameters:

dec
No description available
event
No description available
Returns
No description available

vfunc_sink_event

function vfunc_sink_event(dec: GstAudio.AudioDecoder, event: Gst.Event): {
    // javascript implementation of the 'sink_event' virtual method
}

Optional. Event handler on the sink pad. Subclasses should chain up to the parent implementation to invoke the default handler.

Parameters:

No description available
event (Gst.Event)
No description available
Returns (Number)
No description available

do_sink_event

def do_sink_event (dec, event):
    #python implementation of the 'sink_event' virtual method

Optional. Event handler on the sink pad. Subclasses should chain up to the parent implementation to invoke the default handler.

Parameters:

No description available
event (Gst.Event)
No description available
Returns (bool)
No description available

sink_query

gboolean
sink_query (GstAudioDecoder * dec,
            GstQuery * query)

Optional. Query handler on the sink pad. This function should return TRUE if the query could be performed. Subclasses should chain up to the parent implementation to invoke the default handler. Since: 1.6

Parameters:

dec
No description available
query
No description available
Returns
No description available

vfunc_sink_query

function vfunc_sink_query(dec: GstAudio.AudioDecoder, query: Gst.Query): {
    // javascript implementation of the 'sink_query' virtual method
}

Optional. Query handler on the sink pad. This function should return TRUE if the query could be performed. Subclasses should chain up to the parent implementation to invoke the default handler. Since: 1.6

Parameters:

No description available
query (Gst.Query)
No description available
Returns (Number)
No description available

do_sink_query

def do_sink_query (dec, query):
    #python implementation of the 'sink_query' virtual method

Optional. Query handler on the sink pad. This function should return TRUE if the query could be performed. Subclasses should chain up to the parent implementation to invoke the default handler. Since: 1.6

Parameters:

No description available
query (Gst.Query)
No description available
Returns (bool)
No description available

src_event

gboolean
src_event (GstAudioDecoder * dec,
           GstEvent * event)

Optional. Event handler on the src pad. Subclasses should chain up to the parent implementation to invoke the default handler.

Parameters:

dec
No description available
event
No description available
Returns
No description available

vfunc_src_event

function vfunc_src_event(dec: GstAudio.AudioDecoder, event: Gst.Event): {
    // javascript implementation of the 'src_event' virtual method
}

Optional. Event handler on the src pad. Subclasses should chain up to the parent implementation to invoke the default handler.

Parameters:

No description available
event (Gst.Event)
No description available
Returns (Number)
No description available

do_src_event

def do_src_event (dec, event):
    #python implementation of the 'src_event' virtual method

Optional. Event handler on the src pad. Subclasses should chain up to the parent implementation to invoke the default handler.

Parameters:

No description available
event (Gst.Event)
No description available
Returns (bool)
No description available

src_query

gboolean
src_query (GstAudioDecoder * dec,
           GstQuery * query)

Optional. Query handler on the source pad. This function should return TRUE if the query could be performed. Subclasses should chain up to the parent implementation to invoke the default handler. Since: 1.6

Parameters:

dec
No description available
query
No description available
Returns
No description available

vfunc_src_query

function vfunc_src_query(dec: GstAudio.AudioDecoder, query: Gst.Query): {
    // javascript implementation of the 'src_query' virtual method
}

Optional. Query handler on the source pad. This function should return TRUE if the query could be performed. Subclasses should chain up to the parent implementation to invoke the default handler. Since: 1.6

Parameters:

No description available
query (Gst.Query)
No description available
Returns (Number)
No description available

do_src_query

def do_src_query (dec, query):
    #python implementation of the 'src_query' virtual method

Optional. Query handler on the source pad. This function should return TRUE if the query could be performed. Subclasses should chain up to the parent implementation to invoke the default handler. Since: 1.6

Parameters:

No description available
query (Gst.Query)
No description available
Returns (bool)
No description available

start

gboolean
start (GstAudioDecoder * dec)

Optional. Called when the element starts processing. Allows opening external resources.

Parameters:

dec
No description available
Returns
No description available

vfunc_start

function vfunc_start(dec: GstAudio.AudioDecoder): {
    // javascript implementation of the 'start' virtual method
}

Optional. Called when the element starts processing. Allows opening external resources.

Parameters:

No description available
Returns (Number)
No description available

do_start

def do_start (dec):
    #python implementation of the 'start' virtual method

Optional. Called when the element starts processing. Allows opening external resources.

Parameters:

No description available
Returns (bool)
No description available

stop

gboolean
stop (GstAudioDecoder * dec)

Optional. Called when the element stops processing. Allows closing external resources.

Parameters:

dec
No description available
Returns
No description available

vfunc_stop

function vfunc_stop(dec: GstAudio.AudioDecoder): {
    // javascript implementation of the 'stop' virtual method
}

Optional. Called when the element stops processing. Allows closing external resources.

Parameters:

No description available
Returns (Number)
No description available

do_stop

def do_stop (dec):
    #python implementation of the 'stop' virtual method

Optional. Called when the element stops processing. Allows closing external resources.

Parameters:

No description available
Returns (bool)
No description available

transform_meta

gboolean
transform_meta (GstAudioDecoder * enc,
                GstBuffer * outbuf,
                GstMeta * meta,
                GstBuffer * inbuf)

Optional. Transform the metadata on the input buffer to the output buffer. By default this method copies all meta without tags and meta with only the "audio" tag. subclasses can implement this method and return TRUE if the metadata is to be copied. Since: 1.6

Parameters:

enc
No description available
outbuf
No description available
meta
No description available
inbuf
No description available
Returns
No description available

vfunc_transform_meta

function vfunc_transform_meta(enc: GstAudio.AudioDecoder, outbuf: Gst.Buffer, meta: Gst.Meta, inbuf: Gst.Buffer): {
    // javascript implementation of the 'transform_meta' virtual method
}

Optional. Transform the metadata on the input buffer to the output buffer. By default this method copies all meta without tags and meta with only the "audio" tag. subclasses can implement this method and return true if the metadata is to be copied. Since: 1.6

Parameters:

No description available
outbuf (Gst.Buffer)
No description available
meta (Gst.Meta)
No description available
inbuf (Gst.Buffer)
No description available
Returns (Number)
No description available

do_transform_meta

def do_transform_meta (enc, outbuf, meta, inbuf):
    #python implementation of the 'transform_meta' virtual method

Optional. Transform the metadata on the input buffer to the output buffer. By default this method copies all meta without tags and meta with only the "audio" tag. subclasses can implement this method and return True if the metadata is to be copied. Since: 1.6

Parameters:

No description available
outbuf (Gst.Buffer)
No description available
meta (Gst.Meta)
No description available
inbuf (Gst.Buffer)
No description available
Returns (bool)
No description available

Function Macros

GST_AUDIO_DECODER_CAST

#define GST_AUDIO_DECODER_CAST(obj) \
  ((GstAudioDecoder *)(obj))

GST_AUDIO_DECODER_ERROR

#define GST_AUDIO_DECODER_ERROR(el, weight, domain, code, text, debug, ret) \
G_STMT_START {                                                              \
  gchar *__txt = _gst_element_error_printf text;                            \
  gchar *__dbg = _gst_element_error_printf debug;                           \
  GstAudioDecoder *__dec = GST_AUDIO_DECODER (el);                   \
  ret = _gst_audio_decoder_error (__dec, weight, GST_ ## domain ## _ERROR,    \
      GST_ ## domain ## _ERROR_ ## code, __txt, __dbg, __FILE__,            \
      GST_FUNCTION, __LINE__);                                              \
} G_STMT_END

Utility function that audio decoder elements can use in case they encountered a data processing error that may be fatal for the current "data unit" but need not prevent subsequent decoding. Such errors are counted and if there are too many, as configured in the context's max_errors, the pipeline will post an error message and the application will be requested to stop further media processing. Otherwise, it is considered a "glitch" and only a warning is logged. In either case, ret is set to the proper value to return to upstream/caller (indicating either GST_FLOW_ERROR or GST_FLOW_OK).

Parameters:

el

the base audio decoder element that generates the error

weight

element defined weight of the error, added to error count

domain

like CORE, LIBRARY, RESOURCE or STREAM (see Core Library-GstGError)

code

error code defined for that domain (see Core Library-GstGError)

text

the message to display (format string and args enclosed in parentheses)

debug

debugging information for the message (format string and args enclosed in parentheses)

ret

variable to receive return value


GST_AUDIO_DECODER_INPUT_SEGMENT

#define GST_AUDIO_DECODER_INPUT_SEGMENT(obj)   (GST_AUDIO_DECODER_CAST (obj)->input_segment)

Gives the input segment of the element.

Parameters:

obj

audio decoder instance


GST_AUDIO_DECODER_OUTPUT_SEGMENT

#define GST_AUDIO_DECODER_OUTPUT_SEGMENT(obj)   (GST_AUDIO_DECODER_CAST (obj)->output_segment)

Gives the output segment of the element.

Parameters:

obj

audio decoder instance


GST_AUDIO_DECODER_SINK_PAD

#define GST_AUDIO_DECODER_SINK_PAD(obj)        (((GstAudioDecoder *) (obj))->sinkpad)

Gives the pointer to the sink GstPad object of the element.

Parameters:

obj

base audio codec instance


GST_AUDIO_DECODER_SRC_PAD

#define GST_AUDIO_DECODER_SRC_PAD(obj)         (((GstAudioDecoder *) (obj))->srcpad)

Gives the pointer to the source GstPad object of the element.

Parameters:

obj

base audio codec instance


GST_AUDIO_DECODER_STREAM_LOCK

#define GST_AUDIO_DECODER_STREAM_LOCK(dec)   g_rec_mutex_lock (&GST_AUDIO_DECODER (dec)->stream_lock)

GST_AUDIO_DECODER_STREAM_UNLOCK

#define GST_AUDIO_DECODER_STREAM_UNLOCK(dec) g_rec_mutex_unlock (&GST_AUDIO_DECODER (dec)->stream_lock)

Constants

GST_AUDIO_DECODER_MAX_ERRORS

#define GST_AUDIO_DECODER_MAX_ERRORS     -1

Default maximum number of errors tolerated before signaling error.


GstAudio.AUDIO_DECODER_MAX_ERRORS

Default maximum number of errors tolerated before signaling error.


GstAudio.AUDIO_DECODER_MAX_ERRORS

Default maximum number of errors tolerated before signaling error.


GST_AUDIO_DECODER_SINK_NAME

#define GST_AUDIO_DECODER_SINK_NAME    "sink"

The name of the templates for the sink pad.


GstAudio.AUDIO_DECODER_SINK_NAME

The name of the templates for the sink pad.


GstAudio.AUDIO_DECODER_SINK_NAME

The name of the templates for the sink pad.


GST_AUDIO_DECODER_SRC_NAME

#define GST_AUDIO_DECODER_SRC_NAME     "src"

The name of the templates for the source pad.


GstAudio.AUDIO_DECODER_SRC_NAME

The name of the templates for the source pad.


GstAudio.AUDIO_DECODER_SRC_NAME

The name of the templates for the source pad.


GST_TYPE_AUDIO_DECODER

#define GST_TYPE_AUDIO_DECODER \
  (gst_audio_decoder_get_type())

The results of the search are