GstBase.BaseSrcClass

Fields

Name

Type

Access

Description

alloc

object

r

Ask the subclass to allocate a buffer with for offset and size. The default implementation will create a new buffer from the negotiated allocator.

create

object

r

Ask the subclass to create a buffer with offset and size. When the subclass returns Gst.FlowReturn.OK, it MUST return a buffer of the requested size unless fewer bytes are available because an EOS condition is near. No buffer should be returned when the return value is different from Gst.FlowReturn.OK. A return value of Gst.FlowReturn.EOS signifies that the end of stream is reached. The default implementation will call #GstBaseSrcClass::alloc and then call #GstBaseSrcClass::fill.

decide_allocation

object

r

configure the allocation query

do_seek

object

r

Perform seeking on the resource to the indicated segment.

event

object

r

Override this to implement custom event handling.

fill

object

r

Ask the subclass to fill the buffer with data for offset and size. The passed buffer is guaranteed to hold the requested amount of bytes.

fixate

object

r

Called during negotiation if caps need fixating. Implement instead of setting a fixate function on the source pad.

get_caps

object

r

Called to get the caps to report

get_size

object

r

Return the total size of the resource, in the format set by GstBase.BaseSrc.set_format().

get_times

object

r

Given a buffer, return the start and stop time when it should be pushed out. The base class will sync on the clock using these times.

is_seekable

object

r

Check if the source can seek

negotiate

object

r

Negotiated the caps with the peer.

parent_class

Gst.ElementClass

r

Element parent class

prepare_seek_segment

object

r

Prepare the Gst.Segment that will be passed to the #GstBaseSrcClass::do_seek vmethod for executing a seek request. Sub-classes should override this if they support seeking in formats other than the configured native format. By default, it tries to convert the seek arguments to the configured native format and prepare a segment in that format.

query

object

r

Handle a requested query.

set_caps

object

r

Notify subclass of changed output caps

start

object

r

Start processing. Subclasses should open resources and prepare to produce data. Implementation should call GstBase.BaseSrc.start_complete() when the operation completes, either from the current thread or any other thread that finishes the start operation asynchronously.

stop

object

r

Stop processing. Subclasses should use this to close resources.

unlock

object

r

Unlock any pending access to the resource. Subclasses should unblock any blocked function ASAP. In particular, any create() function in progress should be unblocked and should return Gst.FlowReturn.FLUSHING. Any future #GstBaseSrcClass::create function call should also return Gst.FlowReturn.FLUSHING until the #GstBaseSrcClass::unlock_stop function has been called.

unlock_stop

object

r

Clear the previous unlock request. Subclasses should clear any state they set during #GstBaseSrcClass::unlock, such as clearing command queues.

Methods

None

Details

class GstBase.BaseSrcClass

Subclasses can override any of the available virtual methods or not, as needed. At the minimum, the create method should be overridden to produce buffers.