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.

Members

Variables

GstReserved
void*[16] GstReserved;
close
bool function(GstAudioDecoder* dec) close;

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

decideAllocation
bool function(GstAudioDecoder* dec, GstQuery* query) decideAllocation;

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.

elementClass
GstElementClass elementClass;

The parent class structure

flush
void function(GstAudioDecoder* dec, bool hard) flush;

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).

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

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

handleFrame
GstFlowReturn function(GstAudioDecoder* dec, GstBuffer* buffer) handleFrame;

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.audio_decoder.AudioDecoder.finishFrame.

negotiate
bool function(GstAudioDecoder* dec) negotiate;

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

open
bool function(GstAudioDecoder* dec) open;

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

parse
GstFlowReturn function(GstAudioDecoder* dec, GstAdapter* adapter, int* offset, int* length) parse;

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.

prePush
GstFlowReturn function(GstAudioDecoder* dec, GstBuffer** buffer) prePush;

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.

proposeAllocation
bool function(GstAudioDecoder* dec, GstQuery* query) proposeAllocation;

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

setFormat
bool function(GstAudioDecoder* dec, GstCaps* caps) setFormat;

Notifies subclass of incoming data format (caps).

sinkEvent
bool function(GstAudioDecoder* dec, GstEvent* event) sinkEvent;

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

sinkQuery
bool function(GstAudioDecoder* dec, GstQuery* query) sinkQuery;

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

srcEvent
bool function(GstAudioDecoder* dec, GstEvent* event) srcEvent;

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

srcQuery
bool function(GstAudioDecoder* dec, GstQuery* query) srcQuery;

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

start
bool function(GstAudioDecoder* dec) start;

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

stop
bool function(GstAudioDecoder* dec) stop;

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

transformMeta
bool function(GstAudioDecoder* enc, GstBuffer* outbuf, GstMeta* meta, GstBuffer* inbuf) transformMeta;

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