GstBaseSinkClass

Subclasses can override any of the available virtual methods or not, as needed. At the minimum, the @render method should be overridden to output/present buffers.

Members

Variables

GstReserved
void*[20] GstReserved;
activatePull
bool function(GstBaseSink* sink, bool active) activatePull;

Subclasses should override this when they can provide an alternate method of spawning a thread to drive the pipeline in pull mode. Should start or stop the pulling thread, depending on the value of the "active" argument. Called after actually activating the sink pad in pull mode. The default implementation starts a task on the sink pad.

event
bool function(GstBaseSink* sink, GstEvent* event) event;

Override this to handle events arriving on the sink pad

fixate
GstCaps* function(GstBaseSink* sink, GstCaps* caps) fixate;

Only useful in pull mode. Implement if you have ideas about what should be the default values for the caps you support.

getCaps
GstCaps* function(GstBaseSink* sink, GstCaps* filter) getCaps;

Called to get sink pad caps from the subclass

getTimes
void function(GstBaseSink* sink, GstBuffer* buffer, GstClockTime* start, GstClockTime* end) getTimes;

Called to get the start and end times for synchronising the passed buffer to the clock

parentClass
GstElementClass parentClass;

Element parent class

prepare
GstFlowReturn function(GstBaseSink* sink, GstBuffer* buffer) prepare;

Called to prepare the buffer for @render and @preroll. This function is called before synchronisation is performed.

prepareList
GstFlowReturn function(GstBaseSink* sink, GstBufferList* bufferList) prepareList;

Called to prepare the buffer list for @render_list. This function is called before synchronisation is performed.

preroll
GstFlowReturn function(GstBaseSink* sink, GstBuffer* buffer) preroll;

Called to present the preroll buffer if desired.

proposeAllocation
bool function(GstBaseSink* sink, GstQuery* query) proposeAllocation;

configure the allocation query

query
bool function(GstBaseSink* sink, GstQuery* query) query;

perform a #GstQuery on the element.

render
GstFlowReturn function(GstBaseSink* sink, GstBuffer* buffer) render;

Called when a buffer should be presented or output, at the correct moment if the #GstBaseSink has been set to sync to the clock.

renderList
GstFlowReturn function(GstBaseSink* sink, GstBufferList* bufferList) renderList;

Same as @render but used with buffer lists instead of buffers.

setCaps
bool function(GstBaseSink* sink, GstCaps* caps) setCaps;

Notify subclass of changed caps

start
bool function(GstBaseSink* sink) start;

Start processing. Ideal for opening resources in the subclass

stop
bool function(GstBaseSink* sink) stop;

Stop processing. Subclasses should use this to close resources.

unlock
bool function(GstBaseSink* sink) unlock;

Unlock any pending access to the resource. Subclasses should unblock any blocked function ASAP and call gstbase.base_sink.BaseSink.waitPreroll

unlockStop
bool function(GstBaseSink* sink) unlockStop;

Clear the previous unlock request. Subclasses should clear any state they set during #GstBaseSinkClass::unlock, and be ready to continue where they left off after gstbase.base_sink.BaseSink.waitPreroll, gstbase.base_sink.BaseSink.wait or gst_wait_sink_wait_clock() return or #GstBaseSinkClass::render is called again.

waitEvent
GstFlowReturn function(GstBaseSink* sink, GstEvent* event) waitEvent;

Override this to implement custom logic to wait for the event time (for events like EOS and GAP). Subclasses should always first chain up to the default implementation.