GstVideoDecoderClass

Subclasses can override any of the available virtual methods or not, as needed. At minimum @handle_frame needs to be overridden, and @set_format and likely as well. If non-packetized input is supported or expected, @parse needs to be overridden as well.

struct GstVideoDecoderClass {}

Members

Variables

close
bool function(GstVideoDecoder* decoder) close;

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

decideAllocation
bool function(GstVideoDecoder* decoder, 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.

drain
GstFlowReturn function(GstVideoDecoder* decoder) drain;

Optional. Called to request subclass to decode any data it can at this point, but that more data may arrive after. (e.g. at segment end). Sub-classes should be prepared to handle new data afterward, or seamless segment processing will break. Since: 1.6

elementClass
GstElementClass elementClass;
finish
GstFlowReturn function(GstVideoDecoder* decoder) finish;

Optional. Called to request subclass to dispatch any pending remaining data at EOS. Sub-classes can refuse to decode new data after.

flush
bool function(GstVideoDecoder* decoder) flush;

Optional. Flush all remaining data from the decoder without pushing it downstream. Since: 1.2

getcaps
GstCaps* function(GstVideoDecoder* decoder, GstCaps* filter) getcaps;

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

handleFrame
GstFlowReturn function(GstVideoDecoder* decoder, GstVideoCodecFrame* frame) handleFrame;

Provides input data frame to subclass. In subframe mode, the subclass needs to take ownership of @GstVideoCodecFrame.input_buffer as it will be modified by the base class on the next subframe buffer receiving.

handleMissingData
bool function(GstVideoDecoder* decoder, GstClockTime timestamp, GstClockTime duration) handleMissingData;
negotiate
bool function(GstVideoDecoder* decoder) 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(GstVideoDecoder* decoder) open;

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

padding
void*[13] padding;
parse
GstFlowReturn function(GstVideoDecoder* decoder, GstVideoCodecFrame* frame, GstAdapter* adapter, bool atEos) parse;

Required for non-packetized input. Allows chopping incoming data into manageable units (frames) for subsequent decoding.

proposeAllocation
bool function(GstVideoDecoder* decoder, GstQuery* query) proposeAllocation;

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

reset
bool function(GstVideoDecoder* decoder, bool hard) reset;

Optional. Allows subclass (decoder) to perform post-seek semantics reset. Deprecated.

setFormat
bool function(GstVideoDecoder* decoder, GstVideoCodecState* state) setFormat;

Notifies subclass of incoming data format (caps).

sinkEvent
bool function(GstVideoDecoder* decoder, GstEvent* event) sinkEvent;

Optional. Event handler on the sink pad. This function should return TRUE if the event was handled and should be discarded (i.e. not unref'ed). Subclasses should chain up to the parent implementation to invoke the default handler.

sinkQuery
bool function(GstVideoDecoder* decoder, 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.4

srcEvent
bool function(GstVideoDecoder* decoder, GstEvent* event) srcEvent;

Optional. Event handler on the source pad. This function should return TRUE if the event was handled and should be discarded (i.e. not unref'ed). Subclasses should chain up to the parent implementation to invoke the default handler.

srcQuery
bool function(GstVideoDecoder* decoder, 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.4

start
bool function(GstVideoDecoder* decoder) start;

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

stop
bool function(GstVideoDecoder* decoder) stop;

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

transformMeta
bool function(GstVideoDecoder* decoder, GstVideoCodecFrame* frame, GstMeta* meta) transformMeta;

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