GstAudioEncoderClass

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

Members

Variables

GstReserved
void*[17] GstReserved;
close
bool function(GstAudioEncoder* enc) close;

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

decideAllocation
bool function(GstAudioEncoder* enc, 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(GstAudioEncoder* enc) flush;

Optional. Instructs subclass to clear any codec caches and discard any pending samples and not yet returned encoded data.

getcaps
GstCaps* function(GstAudioEncoder* enc, GstCaps* filter) getcaps;

Optional. Allows for a custom sink getcaps implementation (e.g. for multichannel input specification). If not implemented, default returns gst_audio_encoder_proxy_getcaps applied to sink template caps.

handleFrame
GstFlowReturn function(GstAudioEncoder* enc, GstBuffer* buffer) handleFrame;

Provides input samples (or NULL to clear any remaining data) according to directions as configured by the subclass using the API. 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_encoder.AudioEncoder.finishFrame.

negotiate
bool function(GstAudioEncoder* enc) 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(GstAudioEncoder* enc) open;

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

prePush
GstFlowReturn function(GstAudioEncoder* enc, 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(GstAudioEncoder* enc, 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(GstAudioEncoder* enc, GstAudioInfo* info) setFormat;

Notifies subclass of incoming data format. GstAudioInfo contains the format according to provided caps.

sinkEvent
bool function(GstAudioEncoder* enc, 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(GstAudioEncoder* encoder, 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(GstAudioEncoder* enc, 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(GstAudioEncoder* encoder, 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(GstAudioEncoder* enc) start;

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

stop
bool function(GstAudioEncoder* enc) stop;

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

transformMeta
bool function(GstAudioEncoder* 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