GstPushSrc

This class is mostly useful for elements that cannot do random access, or at least very slowly. The source usually prefers to push out a fixed size buffer.

Subclasses usually operate in a format that is different from the default GST_FORMAT_BYTES format of GstBaseSrc.

Classes extending this base class will usually be scheduled in a push based mode. If the peer accepts to operate without offsets and within the limits of the allowed block size, this class can operate in getrange based mode automatically. To make this possible, the subclass should implement and override the SCHEDULING query.

The subclass should extend the methods from the baseclass in addition to the ::create method.

Seeking, flushing, scheduling and sync is all handled by this base class.

GstPushSrc

GObject
    ╰──GInitiallyUnowned
        ╰──GstObject
            ╰──GstElement
                ╰──GstBaseSrc
                    ╰──GstPushSrc

The opaque GstPushSrc data structure.

Members

parent (GstBaseSrc) –
No description available

Class structure

GstPushSrcClass

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

Fields
parent_class (GstBaseSrcClass) –

Element parent class


GstBase.PushSrcClass

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

Attributes
parent_class (GstBase.BaseSrcClass) –

Element parent class


GstBase.PushSrcClass

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

Attributes
parent_class (GstBase.BaseSrcClass) –

Element parent class


GstPushSrc

GObject
    ╰──GInitiallyUnowned
        ╰──GstObject
            ╰──GstElement
                ╰──GstBaseSrc
                    ╰──GstPushSrc

The opaque GstPushSrc data structure.

Members

parent (GstBaseSrc) –
No description available

GstPushSrc

GObject
    ╰──GInitiallyUnowned
        ╰──GstObject
            ╰──GstElement
                ╰──GstBaseSrc
                    ╰──GstPushSrc

The opaque GstPushSrc data structure.

Members

parent (GstBaseSrc) –
No description available

Virtual Methods

alloc

GstFlowReturn
alloc (GstPushSrc * src,
       GstBuffer ** buf)

Ask the subclass to allocate a buffer. The subclass decides which size this buffer should be. The default implementation will create a new buffer from the negotiated allocator.

Parameters:

src
No description available
buf
No description available
Returns
No description available

do_alloc

def do_alloc (src, buf):
    #python implementation of the 'alloc' virtual method

Ask the subclass to allocate a buffer. The subclass decides which size this buffer should be. The default implementation will create a new buffer from the negotiated allocator.

Parameters:

src ( GstBase.PushSrc ) –
No description available
buf ( Gst.Buffer ) –
No description available
Returns ( Gst.FlowReturn ) –
No description available

vfunc_alloc

function vfunc_alloc(src: GstBase.PushSrc, buf: Gst.Buffer): {
    // javascript implementation of the 'alloc' virtual method
}

Ask the subclass to allocate a buffer. The subclass decides which size this buffer should be. The default implementation will create a new buffer from the negotiated allocator.

Parameters:

src ( GstBase.PushSrc ) –
No description available
buf ( Gst.Buffer ) –
No description available
Returns ( Gst.FlowReturn ) –
No description available

create

GstFlowReturn
create (GstPushSrc * src,
        GstBuffer ** buf)

Ask the subclass to create a buffer. The subclass decides which size this buffer should be. Other then that, refer to GstBaseSrc.create for more details. If this method is not implemented, alloc followed by fill will be called.

Parameters:

src
No description available
buf
No description available
Returns
No description available

do_create

def do_create (src, buf):
    #python implementation of the 'create' virtual method

Ask the subclass to create a buffer. The subclass decides which size this buffer should be. Other then that, refer to GstBase.BaseSrc.create for more details. If this method is not implemented, alloc followed by fill will be called.

Parameters:

src ( GstBase.PushSrc ) –
No description available
buf ( Gst.Buffer ) –
No description available
Returns ( Gst.FlowReturn ) –
No description available

vfunc_create

function vfunc_create(src: GstBase.PushSrc, buf: Gst.Buffer): {
    // javascript implementation of the 'create' virtual method
}

Ask the subclass to create a buffer. The subclass decides which size this buffer should be. Other then that, refer to GstBase.BaseSrc.create for more details. If this method is not implemented, alloc followed by fill will be called.

Parameters:

src ( GstBase.PushSrc ) –
No description available
buf ( Gst.Buffer ) –
No description available
Returns ( Gst.FlowReturn ) –
No description available

fill

GstFlowReturn
fill (GstPushSrc * src,
      GstBuffer * buf)

Ask the subclass to fill the buffer with data.

Parameters:

src
No description available
buf
No description available
Returns
No description available

do_fill

def do_fill (src, buf):
    #python implementation of the 'fill' virtual method

Ask the subclass to fill the buffer with data.

Parameters:

src ( GstBase.PushSrc ) –
No description available
buf ( Gst.Buffer ) –
No description available
Returns ( Gst.FlowReturn ) –
No description available

vfunc_fill

function vfunc_fill(src: GstBase.PushSrc, buf: Gst.Buffer): {
    // javascript implementation of the 'fill' virtual method
}

Ask the subclass to fill the buffer with data.

Parameters:

src ( GstBase.PushSrc ) –
No description available
buf ( Gst.Buffer ) –
No description available
Returns ( Gst.FlowReturn ) –
No description available

The results of the search are