GstBaseTransform

This base class is for filter elements that process data. Elements that are suitable for implementation using GstBaseTransform are ones where the size and caps of the output is known entirely from the input caps and buffer sizes. These include elements that directly transform one buffer into another, modify the contents of a buffer in-place, as well as elements that collate multiple input buffers into one output buffer, or that expand one input buffer into multiple output buffers. See below for more concrete use cases.

It provides for:

  • one sinkpad and one srcpad

  • Possible formats on sink and source pad implemented with custom transform_caps function. By default uses same format on sink and source.

  • Handles state changes

  • Does flushing

  • Push mode

  • Pull mode if the sub-class transform can operate on arbitrary data

Use Cases

Passthrough mode

  • Element has no interest in modifying the buffer. It may want to inspect it, in which case the element should have a transform_ip function. If there is no transform_ip function in passthrough mode, the buffer is pushed intact.

  • The passthrough_on_same_caps variable will automatically set/unset passthrough based on whether the element negotiates the same caps on both pads.

  • passthrough_on_same_caps on an element that doesn't implement a transform_caps function is useful for elements that only inspect data (such as level)

  • Example elements

    • Level
    • Videoscale, audioconvert, videoconvert, audioresample in certain modes.

Modifications in-place - input buffer and output buffer are the same thing.

  • The element must implement a transform_ip function.

  • Output buffer size must <= input buffer size

  • If the always_in_place flag is set, non-writable buffers will be copied and passed to the transform_ip function, otherwise a new buffer will be created and the transform function called.

  • Incoming writable buffers will be passed to the transform_ip function immediately.

  • only implementing transform_ip and not transform implies always_in_place = TRUE

    • Example elements:
      • Volume
      • Audioconvert in certain modes (signed/unsigned conversion)
      • videoconvert in certain modes (endianness swapping)

Modifications only to the caps/metadata of a buffer

  • The element does not require writable data, but non-writable buffers should be subbuffered so that the meta-information can be replaced.

  • Elements wishing to operate in this mode should replace the prepare_output_buffer method to create subbuffers of the input buffer and set always_in_place to TRUE

  • Example elements

    • Capsfilter when setting caps on outgoing buffers that have none.
    • identity when it is going to re-timestamp buffers by datarate.

Normal mode

  • always_in_place flag is not set, or there is no transform_ip function
  • Element will receive an input buffer and output buffer to operate on.
  • Output buffer is allocated by calling the prepare_output_buffer function.
  • Example elements:
    • Videoscale, videoconvert, audioconvert when doing scaling/conversions

Special output buffer allocations

  • Elements which need to do special allocation of their output buffers beyond allocating output buffers via the negotiated allocator or buffer pool should implement the prepare_output_buffer method.

  • Example elements:

    • efence

Sub-class settable flags on GstBaseTransform

  • passthrough

    • Implies that in the current configuration, the sub-class is not interested in modifying the buffers.
    • Elements which are always in passthrough mode whenever the same caps has been negotiated on both pads can set the class variable passthrough_on_same_caps to have this behaviour automatically.
  • always_in_place

    • Determines whether a non-writable buffer will be copied before passing to the transform_ip function.

    • Implied TRUE if no transform function is implemented.

    • Implied FALSE if ONLY transform function is implemented.

GstBaseTransform

GObject
    ╰──GInitiallyUnowned
        ╰──GstObject
            ╰──GstElement
                ╰──GstBaseTransform

The opaque GstBaseTransform data structure.

Members

element (GstElement) –
No description available
sinkpad (GstPad *) –
No description available
srcpad (GstPad *) –
No description available
have_segment (gboolean) –
No description available
segment (GstSegment) –
No description available
queued_buf (GstBuffer *) –
No description available

Class structure

GstBaseTransformClass

Subclasses can override any of the available virtual methods or not, as needed. At minimum either transform or transform_ip need to be overridden. If the element can overwrite the input data with the results (data is of the same type and quantity) it should provide transform_ip.

Fields
parent_class (GstElementClass) –

Element parent class

passthrough_on_same_caps (gboolean) –

If set to TRUE, passthrough mode will be automatically enabled if the caps are the same. Set to FALSE by default.

transform_ip_on_passthrough (gboolean) –

If set to TRUE, transform_ip will be called in passthrough mode. The passed buffer might not be writable. When FALSE, neither transform nor transform_ip will be called in passthrough mode. Set to TRUE by default.


GstBase.BaseTransformClass

Subclasses can override any of the available virtual methods or not, as needed. At minimum either transform or transform_ip need to be overridden. If the element can overwrite the input data with the results (data is of the same type and quantity) it should provide transform_ip.

Attributes
parent_class (Gst.ElementClass) –

Element parent class

passthrough_on_same_caps (Number) –

If set to true, passthrough mode will be automatically enabled if the caps are the same. Set to false by default.

transform_ip_on_passthrough (Number) –

If set to true, transform_ip will be called in passthrough mode. The passed buffer might not be writable. When false, neither transform nor transform_ip will be called in passthrough mode. Set to true by default.


GstBase.BaseTransformClass

Subclasses can override any of the available virtual methods or not, as needed. At minimum either transform or transform_ip need to be overridden. If the element can overwrite the input data with the results (data is of the same type and quantity) it should provide transform_ip.

Attributes
parent_class (Gst.ElementClass) –

Element parent class

passthrough_on_same_caps (bool) –

If set to True, passthrough mode will be automatically enabled if the caps are the same. Set to False by default.

transform_ip_on_passthrough (bool) –

If set to True, transform_ip will be called in passthrough mode. The passed buffer might not be writable. When False, neither transform nor transform_ip will be called in passthrough mode. Set to True by default.


GstBase.BaseTransform

GObject.Object
    ╰──GObject.InitiallyUnowned
        ╰──Gst.Object
            ╰──Gst.Element
                ╰──GstBase.BaseTransform

The opaque GstBase.BaseTransform data structure.

Members

element (Gst.Element) –
No description available
sinkpad (Gst.Pad) –
No description available
srcpad (Gst.Pad) –
No description available
have_segment (Number) –
No description available
segment (Gst.Segment) –
No description available
queued_buf (Gst.Buffer) –
No description available

GstBase.BaseTransform

GObject.Object
    ╰──GObject.InitiallyUnowned
        ╰──Gst.Object
            ╰──Gst.Element
                ╰──GstBase.BaseTransform

The opaque GstBase.BaseTransform data structure.

Members

element (Gst.Element) –
No description available
sinkpad (Gst.Pad) –
No description available
srcpad (Gst.Pad) –
No description available
have_segment (bool) –
No description available
segment (Gst.Segment) –
No description available
queued_buf (Gst.Buffer) –
No description available

Methods

gst_base_transform_get_allocator

gst_base_transform_get_allocator (GstBaseTransform * trans,
                                  GstAllocator ** allocator,
                                  GstAllocationParams * params)

Lets GstBaseTransform sub-classes know the memory allocator used by the base class and its params.

Unref the allocator after use.

Parameters:

trans

a GstBaseTransform

allocator ( [out][optional][nullable][transfer: full])

the GstAllocator used

params ( [out][optional])

the GstAllocationParams of allocator


GstBase.BaseTransform.prototype.get_allocator

function GstBase.BaseTransform.prototype.get_allocator(): {
    // javascript wrapper for 'gst_base_transform_get_allocator'
}

Lets GstBase.BaseTransform sub-classes know the memory allocator used by the base class and its params.

Unref the allocator after use.

Parameters:


GstBase.BaseTransform.get_allocator

def GstBase.BaseTransform.get_allocator (self):
    #python wrapper for 'gst_base_transform_get_allocator'

Lets GstBase.BaseTransform sub-classes know the memory allocator used by the base class and its params.

Unref the allocator after use.

Parameters:


gst_base_transform_get_buffer_pool

GstBufferPool *
gst_base_transform_get_buffer_pool (GstBaseTransform * trans)

Parameters:

trans

a GstBaseTransform

Returns ( [nullable][transfer: full])

the instance of the GstBufferPool used by trans; free it after use


GstBase.BaseTransform.prototype.get_buffer_pool

function GstBase.BaseTransform.prototype.get_buffer_pool(): {
    // javascript wrapper for 'gst_base_transform_get_buffer_pool'
}

Parameters:

Returns (Gst.BufferPool)

the instance of the Gst.BufferPool used by trans; free it after use


GstBase.BaseTransform.get_buffer_pool

def GstBase.BaseTransform.get_buffer_pool (self):
    #python wrapper for 'gst_base_transform_get_buffer_pool'

Parameters:

Returns (Gst.BufferPool)

the instance of the Gst.BufferPool used by trans; free it after use


gst_base_transform_is_in_place

gboolean
gst_base_transform_is_in_place (GstBaseTransform * trans)

See if trans is configured as a in_place transform.

Parameters:

trans

the GstBaseTransform to query

Returns

TRUE if the transform is configured in in_place mode.

MT safe.


GstBase.BaseTransform.prototype.is_in_place

function GstBase.BaseTransform.prototype.is_in_place(): {
    // javascript wrapper for 'gst_base_transform_is_in_place'
}

See if trans is configured as a in_place transform.

Parameters:

trans (GstBase.BaseTransform)

the GstBase.BaseTransform to query

Returns (Number)

true if the transform is configured in in_place mode.

MT safe.


GstBase.BaseTransform.is_in_place

def GstBase.BaseTransform.is_in_place (self):
    #python wrapper for 'gst_base_transform_is_in_place'

See if trans is configured as a in_place transform.

Parameters:

trans (GstBase.BaseTransform)

the GstBase.BaseTransform to query

Returns (bool)

True if the transform is configured in in_place mode.

MT safe.


gst_base_transform_is_passthrough

gboolean
gst_base_transform_is_passthrough (GstBaseTransform * trans)

See if trans is configured as a passthrough transform.

Parameters:

trans

the GstBaseTransform to query

Returns

TRUE if the transform is configured in passthrough mode.

MT safe.


GstBase.BaseTransform.prototype.is_passthrough

function GstBase.BaseTransform.prototype.is_passthrough(): {
    // javascript wrapper for 'gst_base_transform_is_passthrough'
}

See if trans is configured as a passthrough transform.

Parameters:

trans (GstBase.BaseTransform)

the GstBase.BaseTransform to query

Returns (Number)

true if the transform is configured in passthrough mode.

MT safe.


GstBase.BaseTransform.is_passthrough

def GstBase.BaseTransform.is_passthrough (self):
    #python wrapper for 'gst_base_transform_is_passthrough'

See if trans is configured as a passthrough transform.

Parameters:

trans (GstBase.BaseTransform)

the GstBase.BaseTransform to query

Returns (bool)

True if the transform is configured in passthrough mode.

MT safe.


gst_base_transform_is_qos_enabled

gboolean
gst_base_transform_is_qos_enabled (GstBaseTransform * trans)

Queries if the transform will handle QoS.

Parameters:

trans

a GstBaseTransform

Returns

TRUE if QoS is enabled.

MT safe.


GstBase.BaseTransform.prototype.is_qos_enabled

function GstBase.BaseTransform.prototype.is_qos_enabled(): {
    // javascript wrapper for 'gst_base_transform_is_qos_enabled'
}

Queries if the transform will handle QoS.

Parameters:

Returns (Number)

true if QoS is enabled.

MT safe.


GstBase.BaseTransform.is_qos_enabled

def GstBase.BaseTransform.is_qos_enabled (self):
    #python wrapper for 'gst_base_transform_is_qos_enabled'

Queries if the transform will handle QoS.

Parameters:

Returns (bool)

True if QoS is enabled.

MT safe.


gst_base_transform_reconfigure

gboolean
gst_base_transform_reconfigure (GstBaseTransform * trans)

Negotiates src pad caps with downstream elements if the source pad is marked as needing reconfiguring. Unmarks GST_PAD_FLAG_NEED_RECONFIGURE in any case. But marks it again if negotiation fails.

Do not call this in the transform or transform_ip vmethod. Call this in submit_input_buffer, prepare_output_buffer or in generate_output before any output buffer is allocated.

It will be default be called when handling an ALLOCATION query or at the very beginning of the default submit_input_buffer implementation.

Parameters:

trans

the GstBaseTransform to set

Returns

TRUE if the negotiation succeeded, else FALSE.

Since : 1.18


GstBase.BaseTransform.prototype.reconfigure

function GstBase.BaseTransform.prototype.reconfigure(): {
    // javascript wrapper for 'gst_base_transform_reconfigure'
}

Negotiates src pad caps with downstream elements if the source pad is marked as needing reconfiguring. Unmarks GST_PAD_FLAG_NEED_RECONFIGURE in any case. But marks it again if negotiation fails.

Do not call this in the vfunc_transform or vfunc_transform_ip vmethod. Call this in vfunc_submit_input_buffer, vfunc_prepare_output_buffer or in vfunc_generate_output before any output buffer is allocated.

It will be default be called when handling an ALLOCATION query or at the very beginning of the default vfunc_submit_input_buffer implementation.

Parameters:

Returns (Number)

true if the negotiation succeeded, else false.

Since : 1.18


GstBase.BaseTransform.reconfigure

def GstBase.BaseTransform.reconfigure (self):
    #python wrapper for 'gst_base_transform_reconfigure'

Negotiates src pad caps with downstream elements if the source pad is marked as needing reconfiguring. Unmarks GST_PAD_FLAG_NEED_RECONFIGURE in any case. But marks it again if negotiation fails.

Do not call this in the do_transform or do_transform_ip vmethod. Call this in do_submit_input_buffer, do_prepare_output_buffer or in do_generate_output before any output buffer is allocated.

It will be default be called when handling an ALLOCATION query or at the very beginning of the default do_submit_input_buffer implementation.

Parameters:

Returns (bool)

True if the negotiation succeeded, else False.

Since : 1.18


gst_base_transform_reconfigure_sink

gst_base_transform_reconfigure_sink (GstBaseTransform * trans)

Instructs trans to request renegotiation upstream. This function is typically called after properties on the transform were set that influence the input format.

Parameters:

trans

a GstBaseTransform


GstBase.BaseTransform.prototype.reconfigure_sink

function GstBase.BaseTransform.prototype.reconfigure_sink(): {
    // javascript wrapper for 'gst_base_transform_reconfigure_sink'
}

Instructs trans to request renegotiation upstream. This function is typically called after properties on the transform were set that influence the input format.

Parameters:


GstBase.BaseTransform.reconfigure_sink

def GstBase.BaseTransform.reconfigure_sink (self):
    #python wrapper for 'gst_base_transform_reconfigure_sink'

Instructs trans to request renegotiation upstream. This function is typically called after properties on the transform were set that influence the input format.

Parameters:


gst_base_transform_reconfigure_src

gst_base_transform_reconfigure_src (GstBaseTransform * trans)

Instructs trans to renegotiate a new downstream transform on the next buffer. This function is typically called after properties on the transform were set that influence the output format.

Parameters:

trans

a GstBaseTransform


GstBase.BaseTransform.prototype.reconfigure_src

function GstBase.BaseTransform.prototype.reconfigure_src(): {
    // javascript wrapper for 'gst_base_transform_reconfigure_src'
}

Instructs trans to renegotiate a new downstream transform on the next buffer. This function is typically called after properties on the transform were set that influence the output format.

Parameters:


GstBase.BaseTransform.reconfigure_src

def GstBase.BaseTransform.reconfigure_src (self):
    #python wrapper for 'gst_base_transform_reconfigure_src'

Instructs trans to renegotiate a new downstream transform on the next buffer. This function is typically called after properties on the transform were set that influence the output format.

Parameters:


gst_base_transform_set_gap_aware

gst_base_transform_set_gap_aware (GstBaseTransform * trans,
                                  gboolean gap_aware)

If gap_aware is FALSE (the default), output buffers will have the GST_BUFFER_FLAG_GAP flag unset.

If set to TRUE, the element must handle output buffers with this flag set correctly, i.e. it can assume that the buffer contains neutral data but must unset the flag if the output is no neutral data.

MT safe.

Parameters:

trans

a GstBaseTransform

gap_aware

New state


GstBase.BaseTransform.prototype.set_gap_aware

function GstBase.BaseTransform.prototype.set_gap_aware(gap_aware: Number): {
    // javascript wrapper for 'gst_base_transform_set_gap_aware'
}

If gap_aware is false (the default), output buffers will have the Gst.BufferFlags.GAP flag unset.

If set to true, the element must handle output buffers with this flag set correctly, i.e. it can assume that the buffer contains neutral data but must unset the flag if the output is no neutral data.

MT safe.

Parameters:

gap_aware (Number)

New state


GstBase.BaseTransform.set_gap_aware

def GstBase.BaseTransform.set_gap_aware (self, gap_aware):
    #python wrapper for 'gst_base_transform_set_gap_aware'

If gap_aware is False (the default), output buffers will have the Gst.BufferFlags.GAP flag unset.

If set to True, the element must handle output buffers with this flag set correctly, i.e. it can assume that the buffer contains neutral data but must unset the flag if the output is no neutral data.

MT safe.

Parameters:

gap_aware (bool)

New state


gst_base_transform_set_in_place

gst_base_transform_set_in_place (GstBaseTransform * trans,
                                 gboolean in_place)

Determines whether a non-writable buffer will be copied before passing to the transform_ip function.

  • Always TRUE if no transform function is implemented.
  • Always FALSE if ONLY transform function is implemented.

MT safe.

Parameters:

trans

the GstBaseTransform to modify

in_place

Boolean value indicating that we would like to operate on in_place buffers.


GstBase.BaseTransform.prototype.set_in_place

function GstBase.BaseTransform.prototype.set_in_place(in_place: Number): {
    // javascript wrapper for 'gst_base_transform_set_in_place'
}

Determines whether a non-writable buffer will be copied before passing to the transform_ip function.

  • Always true if no transform function is implemented.
  • Always false if ONLY transform function is implemented.

MT safe.

Parameters:

trans (GstBase.BaseTransform)

the GstBase.BaseTransform to modify

in_place (Number)

Boolean value indicating that we would like to operate on in_place buffers.


GstBase.BaseTransform.set_in_place

def GstBase.BaseTransform.set_in_place (self, in_place):
    #python wrapper for 'gst_base_transform_set_in_place'

Determines whether a non-writable buffer will be copied before passing to the transform_ip function.

  • Always True if no transform function is implemented.
  • Always False if ONLY transform function is implemented.

MT safe.

Parameters:

trans (GstBase.BaseTransform)

the GstBase.BaseTransform to modify

in_place (bool)

Boolean value indicating that we would like to operate on in_place buffers.


gst_base_transform_set_passthrough

gst_base_transform_set_passthrough (GstBaseTransform * trans,
                                    gboolean passthrough)

Set passthrough mode for this filter by default. This is mostly useful for filters that do not care about negotiation.

Always TRUE for filters which don't implement either a transform or transform_ip or generate_output method.

MT safe.

Parameters:

trans

the GstBaseTransform to set

passthrough

boolean indicating passthrough mode.


GstBase.BaseTransform.prototype.set_passthrough

function GstBase.BaseTransform.prototype.set_passthrough(passthrough: Number): {
    // javascript wrapper for 'gst_base_transform_set_passthrough'
}

Set passthrough mode for this filter by default. This is mostly useful for filters that do not care about negotiation.

Always true for filters which don't implement either a transform or transform_ip or generate_output method.

MT safe.

Parameters:

passthrough (Number)

boolean indicating passthrough mode.


GstBase.BaseTransform.set_passthrough

def GstBase.BaseTransform.set_passthrough (self, passthrough):
    #python wrapper for 'gst_base_transform_set_passthrough'

Set passthrough mode for this filter by default. This is mostly useful for filters that do not care about negotiation.

Always True for filters which don't implement either a transform or transform_ip or generate_output method.

MT safe.

Parameters:

passthrough (bool)

boolean indicating passthrough mode.


gst_base_transform_set_prefer_passthrough

gst_base_transform_set_prefer_passthrough (GstBaseTransform * trans,
                                           gboolean prefer_passthrough)

If prefer_passthrough is TRUE (the default), trans will check and prefer passthrough caps from the list of caps returned by the transform_caps vmethod.

If set to FALSE, the element must order the caps returned from the transform_caps function in such a way that the preferred format is first in the list. This can be interesting for transforms that can do passthrough transforms but prefer to do something else, like a capsfilter.

MT safe.

Parameters:

trans

a GstBaseTransform

prefer_passthrough

New state

Since : 1.0.1


GstBase.BaseTransform.prototype.set_prefer_passthrough

function GstBase.BaseTransform.prototype.set_prefer_passthrough(prefer_passthrough: Number): {
    // javascript wrapper for 'gst_base_transform_set_prefer_passthrough'
}

If prefer_passthrough is true (the default), trans will check and prefer passthrough caps from the list of caps returned by the transform_caps vmethod.

If set to false, the element must order the caps returned from the transform_caps function in such a way that the preferred format is first in the list. This can be interesting for transforms that can do passthrough transforms but prefer to do something else, like a capsfilter.

MT safe.

Parameters:

prefer_passthrough (Number)

New state

Since : 1.0.1


GstBase.BaseTransform.set_prefer_passthrough

def GstBase.BaseTransform.set_prefer_passthrough (self, prefer_passthrough):
    #python wrapper for 'gst_base_transform_set_prefer_passthrough'

If prefer_passthrough is True (the default), trans will check and prefer passthrough caps from the list of caps returned by the transform_caps vmethod.

If set to False, the element must order the caps returned from the transform_caps function in such a way that the preferred format is first in the list. This can be interesting for transforms that can do passthrough transforms but prefer to do something else, like a capsfilter.

MT safe.

Parameters:

prefer_passthrough (bool)

New state

Since : 1.0.1


gst_base_transform_set_qos_enabled

gst_base_transform_set_qos_enabled (GstBaseTransform * trans,
                                    gboolean enabled)

Enable or disable QoS handling in the transform.

MT safe.

Parameters:

trans

a GstBaseTransform

enabled

new state


GstBase.BaseTransform.prototype.set_qos_enabled

function GstBase.BaseTransform.prototype.set_qos_enabled(enabled: Number): {
    // javascript wrapper for 'gst_base_transform_set_qos_enabled'
}

Enable or disable QoS handling in the transform.

MT safe.

Parameters:

enabled (Number)

new state


GstBase.BaseTransform.set_qos_enabled

def GstBase.BaseTransform.set_qos_enabled (self, enabled):
    #python wrapper for 'gst_base_transform_set_qos_enabled'

Enable or disable QoS handling in the transform.

MT safe.

Parameters:

enabled (bool)

new state


gst_base_transform_update_qos

gst_base_transform_update_qos (GstBaseTransform * trans,
                               gdouble proportion,
                               GstClockTimeDiff diff,
                               GstClockTime timestamp)

Set the QoS parameters in the transform. This function is called internally when a QOS event is received but subclasses can provide custom information when needed.

MT safe.

Parameters:

trans

a GstBaseTransform

proportion

the proportion

diff

the diff against the clock

timestamp

the timestamp of the buffer generating the QoS expressed in running_time.


GstBase.BaseTransform.prototype.update_qos

function GstBase.BaseTransform.prototype.update_qos(proportion: Number, diff: Number, timestamp: Number): {
    // javascript wrapper for 'gst_base_transform_update_qos'
}

Set the QoS parameters in the transform. This function is called internally when a QOS event is received but subclasses can provide custom information when needed.

MT safe.

Parameters:

proportion (Number)

the proportion

diff (Number)

the diff against the clock

timestamp (Number)

the timestamp of the buffer generating the QoS expressed in running_time.


GstBase.BaseTransform.update_qos

def GstBase.BaseTransform.update_qos (self, proportion, diff, timestamp):
    #python wrapper for 'gst_base_transform_update_qos'

Set the QoS parameters in the transform. This function is called internally when a QOS event is received but subclasses can provide custom information when needed.

MT safe.

Parameters:

proportion (float)

the proportion

diff (int)

the diff against the clock

timestamp (int)

the timestamp of the buffer generating the QoS expressed in running_time.


gst_base_transform_update_src_caps

gboolean
gst_base_transform_update_src_caps (GstBaseTransform * trans,
                                    GstCaps * updated_caps)

Updates the srcpad caps and sends the caps downstream. This function can be used by subclasses when they have already negotiated their caps but found a change in them (or computed new information). This way, they can notify downstream about that change without losing any buffer.

Parameters:

trans

a GstBaseTransform

updated_caps

An updated version of the srcpad caps to be pushed downstream

Returns

TRUE if the caps could be sent downstream FALSE otherwise

Since : 1.6


GstBase.BaseTransform.prototype.update_src_caps

function GstBase.BaseTransform.prototype.update_src_caps(updated_caps: Gst.Caps): {
    // javascript wrapper for 'gst_base_transform_update_src_caps'
}

Updates the srcpad caps and sends the caps downstream. This function can be used by subclasses when they have already negotiated their caps but found a change in them (or computed new information). This way, they can notify downstream about that change without losing any buffer.

Parameters:

updated_caps (Gst.Caps)

An updated version of the srcpad caps to be pushed downstream

Returns (Number)

true if the caps could be sent downstream false otherwise

Since : 1.6


GstBase.BaseTransform.update_src_caps

def GstBase.BaseTransform.update_src_caps (self, updated_caps):
    #python wrapper for 'gst_base_transform_update_src_caps'

Updates the srcpad caps and sends the caps downstream. This function can be used by subclasses when they have already negotiated their caps but found a change in them (or computed new information). This way, they can notify downstream about that change without losing any buffer.

Parameters:

updated_caps (Gst.Caps)

An updated version of the srcpad caps to be pushed downstream

Returns (bool)

True if the caps could be sent downstream False otherwise

Since : 1.6


Properties

qos

“qos” gboolean

Flags : Read / Write


qos

“qos” Number

Flags : Read / Write


qos

“self.props.qos” bool

Flags : Read / Write


Virtual Methods

accept_caps

gboolean
accept_caps (GstBaseTransform * trans,
             GstPadDirection direction,
             GstCaps * caps)

Optional. Subclasses can override this method to check if caps can be handled by the element. The default implementation might not be the most optimal way to check this in all cases.

Parameters:

trans
No description available
direction
No description available
caps
No description available
Returns
No description available

vfunc_accept_caps

function vfunc_accept_caps(trans: GstBase.BaseTransform, direction: Gst.PadDirection, caps: Gst.Caps): {
    // javascript implementation of the 'accept_caps' virtual method
}

Optional. Subclasses can override this method to check if caps can be handled by the element. The default implementation might not be the most optimal way to check this in all cases.

Parameters:

trans (GstBase.BaseTransform)
No description available
direction (Gst.PadDirection)
No description available
caps (Gst.Caps)
No description available
Returns (Number)
No description available

do_accept_caps

def do_accept_caps (trans, direction, caps):
    #python implementation of the 'accept_caps' virtual method

Optional. Subclasses can override this method to check if caps can be handled by the element. The default implementation might not be the most optimal way to check this in all cases.

Parameters:

trans (GstBase.BaseTransform)
No description available
direction (Gst.PadDirection)
No description available
caps (Gst.Caps)
No description available
Returns (bool)
No description available

before_transform

before_transform (GstBaseTransform * trans,
                  GstBuffer * buffer)

Optional. This method is called right before the base class will start processing. Dynamic properties or other delayed configuration could be performed in this method.

Parameters:

trans
No description available
buffer
No description available

vfunc_before_transform

function vfunc_before_transform(trans: GstBase.BaseTransform, buffer: Gst.Buffer): {
    // javascript implementation of the 'before_transform' virtual method
}

Optional. This method is called right before the base class will start processing. Dynamic properties or other delayed configuration could be performed in this method.

Parameters:

trans (GstBase.BaseTransform)
No description available
buffer (Gst.Buffer)
No description available

do_before_transform

def do_before_transform (trans, buffer):
    #python implementation of the 'before_transform' virtual method

Optional. This method is called right before the base class will start processing. Dynamic properties or other delayed configuration could be performed in this method.

Parameters:

trans (GstBase.BaseTransform)
No description available
buffer (Gst.Buffer)
No description available

copy_metadata

gboolean
copy_metadata (GstBaseTransform * trans,
               GstBuffer * input,
               GstBuffer * outbuf)

Optional. Copy the metadata from the input buffer to the output buffer. The default implementation will copy the flags, timestamps and offsets of the buffer.

Parameters:

trans
No description available
input
No description available
outbuf
No description available
Returns
No description available

vfunc_copy_metadata

function vfunc_copy_metadata(trans: GstBase.BaseTransform, input: Gst.Buffer, outbuf: Gst.Buffer): {
    // javascript implementation of the 'copy_metadata' virtual method
}

Optional. Copy the metadata from the input buffer to the output buffer. The default implementation will copy the flags, timestamps and offsets of the buffer.

Parameters:

trans (GstBase.BaseTransform)
No description available
input (Gst.Buffer)
No description available
outbuf (Gst.Buffer)
No description available
Returns (Number)
No description available

do_copy_metadata

def do_copy_metadata (trans, input, outbuf):
    #python implementation of the 'copy_metadata' virtual method

Optional. Copy the metadata from the input buffer to the output buffer. The default implementation will copy the flags, timestamps and offsets of the buffer.

Parameters:

trans (GstBase.BaseTransform)
No description available
input (Gst.Buffer)
No description available
outbuf (Gst.Buffer)
No description available
Returns (bool)
No description available

decide_allocation

gboolean
decide_allocation (GstBaseTransform * trans,
                   GstQuery * query)

Setup the allocation parameters for allocating output buffers. The passed in query contains the result of the downstream allocation query. This function is only called when not operating in passthrough mode. The default implementation will remove all memory dependent metadata. If there is a filter_meta method implementation, it will be called for all metadata API in the downstream query, otherwise the metadata API is removed.

Parameters:

trans
No description available
query
No description available
Returns
No description available

vfunc_decide_allocation

function vfunc_decide_allocation(trans: GstBase.BaseTransform, query: Gst.Query): {
    // javascript implementation of the 'decide_allocation' virtual method
}

Setup the allocation parameters for allocating output buffers. The passed in query contains the result of the downstream allocation query. This function is only called when not operating in passthrough mode. The default implementation will remove all memory dependent metadata. If there is a filter_meta method implementation, it will be called for all metadata API in the downstream query, otherwise the metadata API is removed.

Parameters:

trans (GstBase.BaseTransform)
No description available
query (Gst.Query)
No description available
Returns (Number)
No description available

do_decide_allocation

def do_decide_allocation (trans, query):
    #python implementation of the 'decide_allocation' virtual method

Setup the allocation parameters for allocating output buffers. The passed in query contains the result of the downstream allocation query. This function is only called when not operating in passthrough mode. The default implementation will remove all memory dependent metadata. If there is a filter_meta method implementation, it will be called for all metadata API in the downstream query, otherwise the metadata API is removed.

Parameters:

trans (GstBase.BaseTransform)
No description available
query (Gst.Query)
No description available
Returns (bool)
No description available

filter_meta

gboolean
filter_meta (GstBaseTransform * trans,
             GstQuery * query,
             GType api,
             const GstStructure * params)

Return TRUE if the metadata API should be proposed in the upstream allocation query. The default implementation is NULL and will cause all metadata to be removed.

Parameters:

trans
No description available
query
No description available
api
No description available
params
No description available
Returns
No description available

vfunc_filter_meta

function vfunc_filter_meta(trans: GstBase.BaseTransform, query: Gst.Query, api: GObject.Type, params: Gst.Structure): {
    // javascript implementation of the 'filter_meta' virtual method
}

Return true if the metadata API should be proposed in the upstream allocation query. The default implementation is null and will cause all metadata to be removed.

Parameters:

trans (GstBase.BaseTransform)
No description available
query (Gst.Query)
No description available
api (GObject.Type)
No description available
params (Gst.Structure)
No description available
Returns (Number)
No description available

do_filter_meta

def do_filter_meta (trans, query, api, params):
    #python implementation of the 'filter_meta' virtual method

Return True if the metadata API should be proposed in the upstream allocation query. The default implementation is None and will cause all metadata to be removed.

Parameters:

trans (GstBase.BaseTransform)
No description available
query (Gst.Query)
No description available
api (GObject.Type)
No description available
params (Gst.Structure)
No description available
Returns (bool)
No description available

fixate_caps

GstCaps *
fixate_caps (GstBaseTransform * trans,
             GstPadDirection direction,
             GstCaps * caps,
             GstCaps * othercaps)

Optional. Given the pad in this direction and the given caps, fixate the caps on the other pad. The function takes ownership of othercaps and returns a fixated version of othercaps. othercaps is not guaranteed to be writable.

Parameters:

trans
No description available
direction
No description available
caps
No description available
othercaps
No description available
Returns
No description available

vfunc_fixate_caps

function vfunc_fixate_caps(trans: GstBase.BaseTransform, direction: Gst.PadDirection, caps: Gst.Caps, othercaps: Gst.Caps): {
    // javascript implementation of the 'fixate_caps' virtual method
}

Optional. Given the pad in this direction and the given caps, fixate the caps on the other pad. The function takes ownership of othercaps and returns a fixated version of othercaps. othercaps is not guaranteed to be writable.

Parameters:

trans (GstBase.BaseTransform)
No description available
direction (Gst.PadDirection)
No description available
caps (Gst.Caps)
No description available
othercaps (Gst.Caps)
No description available
Returns (Gst.Caps)
No description available

do_fixate_caps

def do_fixate_caps (trans, direction, caps, othercaps):
    #python implementation of the 'fixate_caps' virtual method

Optional. Given the pad in this direction and the given caps, fixate the caps on the other pad. The function takes ownership of othercaps and returns a fixated version of othercaps. othercaps is not guaranteed to be writable.

Parameters:

trans (GstBase.BaseTransform)
No description available
direction (Gst.PadDirection)
No description available
caps (Gst.Caps)
No description available
othercaps (Gst.Caps)
No description available
Returns (Gst.Caps)
No description available

generate_output

GstFlowReturn
generate_output (GstBaseTransform * trans,
                 GstBuffer ** outbuf)

Called after each new input buffer is submitted repeatedly until it either generates an error or fails to generate an output buffer. The default implementation takes the contents of the queued_buf variable, generates an output buffer if needed by calling the class prepare_output_buffer, and then calls either transform or transform_ip. Elements that don't do 1-to-1 transformations of input to output buffers can either return GST_BASE_TRANSFORM_FLOW_DROPPED or simply not generate an output buffer until they are ready to do so. (Since: 1.6)

Parameters:

trans
No description available
outbuf
No description available
Returns
No description available

vfunc_generate_output

function vfunc_generate_output(trans: GstBase.BaseTransform): {
    // javascript implementation of the 'generate_output' virtual method
}

Called after each new input buffer is submitted repeatedly until it either generates an error or fails to generate an output buffer. The default implementation takes the contents of the queued_buf variable, generates an output buffer if needed by calling the class prepare_output_buffer, and then calls either transform or transform_ip. Elements that don't do 1-to-1 transformations of input to output buffers can either return GST_BASE_TRANSFORM_FLOW_DROPPED or simply not generate an output buffer until they are ready to do so. (Since: 1.6)

Parameters:

trans (GstBase.BaseTransform)
No description available

Returns a tuple made of:

No description available
outbuf (Gst.Buffer )
No description available

do_generate_output

def do_generate_output (trans):
    #python implementation of the 'generate_output' virtual method

Called after each new input buffer is submitted repeatedly until it either generates an error or fails to generate an output buffer. The default implementation takes the contents of the queued_buf variable, generates an output buffer if needed by calling the class prepare_output_buffer, and then calls either transform or transform_ip. Elements that don't do 1-to-1 transformations of input to output buffers can either return GST_BASE_TRANSFORM_FLOW_DROPPED or simply not generate an output buffer until they are ready to do so. (Since: 1.6)

Parameters:

trans (GstBase.BaseTransform)
No description available

Returns a tuple made of:

No description available
outbuf (Gst.Buffer )
No description available

get_unit_size

gboolean
get_unit_size (GstBaseTransform * trans,
               GstCaps * caps,
               gsize * size)

Required if the transform is not in-place. Get the size in bytes of one unit for the given caps.

Parameters:

trans
No description available
caps
No description available
size
No description available
Returns
No description available

vfunc_get_unit_size

function vfunc_get_unit_size(trans: GstBase.BaseTransform, caps: Gst.Caps): {
    // javascript implementation of the 'get_unit_size' virtual method
}

Required if the transform is not in-place. Get the size in bytes of one unit for the given caps.

Parameters:

trans (GstBase.BaseTransform)
No description available
caps (Gst.Caps)
No description available

Returns a tuple made of:

(Number )
No description available
size (Number )
No description available

do_get_unit_size

def do_get_unit_size (trans, caps):
    #python implementation of the 'get_unit_size' virtual method

Required if the transform is not in-place. Get the size in bytes of one unit for the given caps.

Parameters:

trans (GstBase.BaseTransform)
No description available
caps (Gst.Caps)
No description available

Returns a tuple made of:

(bool )
No description available
size (int )
No description available

prepare_output_buffer

GstFlowReturn
prepare_output_buffer (GstBaseTransform * trans,
                       GstBuffer * input,
                       GstBuffer ** outbuf)

Optional. Subclasses can override this to do their own allocation of output buffers. Elements that only do analysis can return a subbuffer or even just return a reference to the input buffer (if in passthrough mode). The default implementation will use the negotiated allocator or bufferpool and transform_size to allocate an output buffer or it will return the input buffer in passthrough mode.

Parameters:

trans
No description available
input
No description available
outbuf
No description available
Returns
No description available

vfunc_prepare_output_buffer

function vfunc_prepare_output_buffer(trans: GstBase.BaseTransform, input: Gst.Buffer): {
    // javascript implementation of the 'prepare_output_buffer' virtual method
}

Optional. Subclasses can override this to do their own allocation of output buffers. Elements that only do analysis can return a subbuffer or even just return a reference to the input buffer (if in passthrough mode). The default implementation will use the negotiated allocator or bufferpool and transform_size to allocate an output buffer or it will return the input buffer in passthrough mode.

Parameters:

trans (GstBase.BaseTransform)
No description available
input (Gst.Buffer)
No description available

Returns a tuple made of:

No description available
outbuf (Gst.Buffer )
No description available

do_prepare_output_buffer

def do_prepare_output_buffer (trans, input):
    #python implementation of the 'prepare_output_buffer' virtual method

Optional. Subclasses can override this to do their own allocation of output buffers. Elements that only do analysis can return a subbuffer or even just return a reference to the input buffer (if in passthrough mode). The default implementation will use the negotiated allocator or bufferpool and transform_size to allocate an output buffer or it will return the input buffer in passthrough mode.

Parameters:

trans (GstBase.BaseTransform)
No description available
input (Gst.Buffer)
No description available

Returns a tuple made of:

No description available
outbuf (Gst.Buffer )
No description available

propose_allocation

gboolean
propose_allocation (GstBaseTransform * trans,
                    GstQuery * decide_query,
                    GstQuery * query)

Propose buffer allocation parameters for upstream elements. This function must be implemented if the element reads or writes the buffer content. The query that was passed to the decide_allocation is passed in this method (or NULL when the element is in passthrough mode). The default implementation will pass the query downstream when in passthrough mode and will copy all the filtered metadata API in non-passthrough mode.

Parameters:

trans
No description available
decide_query
No description available
query
No description available
Returns
No description available

vfunc_propose_allocation

function vfunc_propose_allocation(trans: GstBase.BaseTransform, decide_query: Gst.Query, query: Gst.Query): {
    // javascript implementation of the 'propose_allocation' virtual method
}

Propose buffer allocation parameters for upstream elements. This function must be implemented if the element reads or writes the buffer content. The query that was passed to the decide_allocation is passed in this method (or null when the element is in passthrough mode). The default implementation will pass the query downstream when in passthrough mode and will copy all the filtered metadata API in non-passthrough mode.

Parameters:

trans (GstBase.BaseTransform)
No description available
decide_query (Gst.Query)
No description available
query (Gst.Query)
No description available
Returns (Number)
No description available

do_propose_allocation

def do_propose_allocation (trans, decide_query, query):
    #python implementation of the 'propose_allocation' virtual method

Propose buffer allocation parameters for upstream elements. This function must be implemented if the element reads or writes the buffer content. The query that was passed to the decide_allocation is passed in this method (or None when the element is in passthrough mode). The default implementation will pass the query downstream when in passthrough mode and will copy all the filtered metadata API in non-passthrough mode.

Parameters:

trans (GstBase.BaseTransform)
No description available
decide_query (Gst.Query)
No description available
query (Gst.Query)
No description available
Returns (bool)
No description available

query

gboolean
query (GstBaseTransform * trans,
       GstPadDirection direction,
       GstQuery * query)

Optional. Handle a requested query. Subclasses that implement this must chain up to the parent if they didn't handle the query

Parameters:

trans
No description available
direction
No description available
query
No description available
Returns
No description available

vfunc_query

function vfunc_query(trans: GstBase.BaseTransform, direction: Gst.PadDirection, query: Gst.Query): {
    // javascript implementation of the 'query' virtual method
}

Optional. Handle a requested query. Subclasses that implement this must chain up to the parent if they didn't handle the query

Parameters:

trans (GstBase.BaseTransform)
No description available
direction (Gst.PadDirection)
No description available
query (Gst.Query)
No description available
Returns (Number)
No description available

do_query

def do_query (trans, direction, query):
    #python implementation of the 'query' virtual method

Optional. Handle a requested query. Subclasses that implement this must chain up to the parent if they didn't handle the query

Parameters:

trans (GstBase.BaseTransform)
No description available
direction (Gst.PadDirection)
No description available
query (Gst.Query)
No description available
Returns (bool)
No description available

set_caps

gboolean
set_caps (GstBaseTransform * trans,
          GstCaps * incaps,
          GstCaps * outcaps)

Allows the subclass to be notified of the actual caps set.

Parameters:

trans
No description available
incaps
No description available
outcaps
No description available
Returns
No description available

vfunc_set_caps

function vfunc_set_caps(trans: GstBase.BaseTransform, incaps: Gst.Caps, outcaps: Gst.Caps): {
    // javascript implementation of the 'set_caps' virtual method
}

Allows the subclass to be notified of the actual caps set.

Parameters:

trans (GstBase.BaseTransform)
No description available
incaps (Gst.Caps)
No description available
outcaps (Gst.Caps)
No description available
Returns (Number)
No description available

do_set_caps

def do_set_caps (trans, incaps, outcaps):
    #python implementation of the 'set_caps' virtual method

Allows the subclass to be notified of the actual caps set.

Parameters:

trans (GstBase.BaseTransform)
No description available
incaps (Gst.Caps)
No description available
outcaps (Gst.Caps)
No description available
Returns (bool)
No description available

sink_event

gboolean
sink_event (GstBaseTransform * trans,
            GstEvent * event)

Optional. Event handler on the sink pad. The default implementation handles the event and forwards it downstream.

Parameters:

trans
No description available
event
No description available
Returns
No description available

vfunc_sink_event

function vfunc_sink_event(trans: GstBase.BaseTransform, event: Gst.Event): {
    // javascript implementation of the 'sink_event' virtual method
}

Optional. Event handler on the sink pad. The default implementation handles the event and forwards it downstream.

Parameters:

trans (GstBase.BaseTransform)
No description available
event (Gst.Event)
No description available
Returns (Number)
No description available

do_sink_event

def do_sink_event (trans, event):
    #python implementation of the 'sink_event' virtual method

Optional. Event handler on the sink pad. The default implementation handles the event and forwards it downstream.

Parameters:

trans (GstBase.BaseTransform)
No description available
event (Gst.Event)
No description available
Returns (bool)
No description available

src_event

gboolean
src_event (GstBaseTransform * trans,
           GstEvent * event)

Optional. Event handler on the source pad. The default implementation handles the event and forwards it upstream.

Parameters:

trans
No description available
event
No description available
Returns
No description available

vfunc_src_event

function vfunc_src_event(trans: GstBase.BaseTransform, event: Gst.Event): {
    // javascript implementation of the 'src_event' virtual method
}

Optional. Event handler on the source pad. The default implementation handles the event and forwards it upstream.

Parameters:

trans (GstBase.BaseTransform)
No description available
event (Gst.Event)
No description available
Returns (Number)
No description available

do_src_event

def do_src_event (trans, event):
    #python implementation of the 'src_event' virtual method

Optional. Event handler on the source pad. The default implementation handles the event and forwards it upstream.

Parameters:

trans (GstBase.BaseTransform)
No description available
event (Gst.Event)
No description available
Returns (bool)
No description available

start

gboolean
start (GstBaseTransform * trans)

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

Parameters:

trans
No description available
Returns
No description available

vfunc_start

function vfunc_start(trans: GstBase.BaseTransform): {
    // javascript implementation of the 'start' virtual method
}

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

Parameters:

trans (GstBase.BaseTransform)
No description available
Returns (Number)
No description available

do_start

def do_start (trans):
    #python implementation of the 'start' virtual method

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

Parameters:

trans (GstBase.BaseTransform)
No description available
Returns (bool)
No description available

stop

gboolean
stop (GstBaseTransform * trans)

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

Parameters:

trans
No description available
Returns
No description available

vfunc_stop

function vfunc_stop(trans: GstBase.BaseTransform): {
    // javascript implementation of the 'stop' virtual method
}

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

Parameters:

trans (GstBase.BaseTransform)
No description available
Returns (Number)
No description available

do_stop

def do_stop (trans):
    #python implementation of the 'stop' virtual method

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

Parameters:

trans (GstBase.BaseTransform)
No description available
Returns (bool)
No description available

submit_input_buffer

GstFlowReturn
submit_input_buffer (GstBaseTransform * trans,
                     gboolean is_discont,
                     GstBuffer * input)

Function which accepts a new input buffer and pre-processes it. The default implementation performs caps (re)negotiation, then QoS if needed, and places the input buffer into the queued_buf member variable. If the buffer is dropped due to QoS, it returns GST_BASE_TRANSFORM_FLOW_DROPPED. If this input buffer is not contiguous with any previous input buffer, then is_discont is set to TRUE. (Since: 1.6)

Parameters:

trans
No description available
is_discont
No description available
input
No description available
Returns
No description available

vfunc_submit_input_buffer

function vfunc_submit_input_buffer(trans: GstBase.BaseTransform, is_discont: Number, input: Gst.Buffer): {
    // javascript implementation of the 'submit_input_buffer' virtual method
}

Function which accepts a new input buffer and pre-processes it. The default implementation performs caps (re)negotiation, then QoS if needed, and places the input buffer into the queued_buf member variable. If the buffer is dropped due to QoS, it returns GST_BASE_TRANSFORM_FLOW_DROPPED. If this input buffer is not contiguous with any previous input buffer, then is_discont is set to true. (Since: 1.6)

Parameters:

trans (GstBase.BaseTransform)
No description available
is_discont (Number)
No description available
input (Gst.Buffer)
No description available
Returns (Gst.FlowReturn)
No description available

do_submit_input_buffer

def do_submit_input_buffer (trans, is_discont, input):
    #python implementation of the 'submit_input_buffer' virtual method

Function which accepts a new input buffer and pre-processes it. The default implementation performs caps (re)negotiation, then QoS if needed, and places the input buffer into the queued_buf member variable. If the buffer is dropped due to QoS, it returns GST_BASE_TRANSFORM_FLOW_DROPPED. If this input buffer is not contiguous with any previous input buffer, then is_discont is set to True. (Since: 1.6)

Parameters:

trans (GstBase.BaseTransform)
No description available
is_discont (bool)
No description available
input (Gst.Buffer)
No description available
Returns (Gst.FlowReturn)
No description available

transform

GstFlowReturn
transform (GstBaseTransform * trans,
           GstBuffer * inbuf,
           GstBuffer * outbuf)

Required if the element does not operate in-place. Transforms one incoming buffer to one outgoing buffer. The function is allowed to change size/timestamp/duration of the outgoing buffer.

Parameters:

trans
No description available
inbuf
No description available
outbuf
No description available
Returns
No description available

vfunc_transform

function vfunc_transform(trans: GstBase.BaseTransform, inbuf: Gst.Buffer, outbuf: Gst.Buffer): {
    // javascript implementation of the 'transform' virtual method
}

Required if the element does not operate in-place. Transforms one incoming buffer to one outgoing buffer. The function is allowed to change size/timestamp/duration of the outgoing buffer.

Parameters:

trans (GstBase.BaseTransform)
No description available
inbuf (Gst.Buffer)
No description available
outbuf (Gst.Buffer)
No description available
Returns (Gst.FlowReturn)
No description available

do_transform

def do_transform (trans, inbuf, outbuf):
    #python implementation of the 'transform' virtual method

Required if the element does not operate in-place. Transforms one incoming buffer to one outgoing buffer. The function is allowed to change size/timestamp/duration of the outgoing buffer.

Parameters:

trans (GstBase.BaseTransform)
No description available
inbuf (Gst.Buffer)
No description available
outbuf (Gst.Buffer)
No description available
Returns (Gst.FlowReturn)
No description available

transform_caps

GstCaps *
transform_caps (GstBaseTransform * trans,
                GstPadDirection direction,
                GstCaps * caps,
                GstCaps * filter)

Optional. Given the pad in this direction and the given caps, what caps are allowed on the other pad in this element ?

Parameters:

trans
No description available
direction
No description available
caps
No description available
filter
No description available
Returns
No description available

vfunc_transform_caps

function vfunc_transform_caps(trans: GstBase.BaseTransform, direction: Gst.PadDirection, caps: Gst.Caps, filter: Gst.Caps): {
    // javascript implementation of the 'transform_caps' virtual method
}

Optional. Given the pad in this direction and the given caps, what caps are allowed on the other pad in this element ?

Parameters:

trans (GstBase.BaseTransform)
No description available
direction (Gst.PadDirection)
No description available
caps (Gst.Caps)
No description available
filter (Gst.Caps)
No description available
Returns (Gst.Caps)
No description available

do_transform_caps

def do_transform_caps (trans, direction, caps, filter):
    #python implementation of the 'transform_caps' virtual method

Optional. Given the pad in this direction and the given caps, what caps are allowed on the other pad in this element ?

Parameters:

trans (GstBase.BaseTransform)
No description available
direction (Gst.PadDirection)
No description available
caps (Gst.Caps)
No description available
filter (Gst.Caps)
No description available
Returns (Gst.Caps)
No description available

transform_ip

GstFlowReturn
transform_ip (GstBaseTransform * trans,
              GstBuffer * buf)

Required if the element operates in-place. Transform the incoming buffer in-place.

Parameters:

trans
No description available
buf
No description available
Returns
No description available

vfunc_transform_ip

function vfunc_transform_ip(trans: GstBase.BaseTransform, buf: Gst.Buffer): {
    // javascript implementation of the 'transform_ip' virtual method
}

Required if the element operates in-place. Transform the incoming buffer in-place.

Parameters:

trans (GstBase.BaseTransform)
No description available
buf (Gst.Buffer)
No description available
Returns (Gst.FlowReturn)
No description available

do_transform_ip

def do_transform_ip (trans, buf):
    #python implementation of the 'transform_ip' virtual method

Required if the element operates in-place. Transform the incoming buffer in-place.

Parameters:

trans (GstBase.BaseTransform)
No description available
buf (Gst.Buffer)
No description available
Returns (Gst.FlowReturn)
No description available

transform_meta

gboolean
transform_meta (GstBaseTransform * trans,
                GstBuffer * outbuf,
                GstMeta * meta,
                GstBuffer * inbuf)

Optional. Transform the metadata on the input buffer to the output buffer. By default this method copies all meta without tags. Subclasses can implement this method and return TRUE if the metadata is to be copied.

Parameters:

trans
No description available
outbuf
No description available
meta
No description available
inbuf
No description available
Returns
No description available

vfunc_transform_meta

function vfunc_transform_meta(trans: GstBase.BaseTransform, outbuf: Gst.Buffer, meta: Gst.Meta, inbuf: Gst.Buffer): {
    // javascript implementation of the 'transform_meta' virtual method
}

Optional. Transform the metadata on the input buffer to the output buffer. By default this method copies all meta without tags. Subclasses can implement this method and return true if the metadata is to be copied.

Parameters:

trans (GstBase.BaseTransform)
No description available
outbuf (Gst.Buffer)
No description available
meta (Gst.Meta)
No description available
inbuf (Gst.Buffer)
No description available
Returns (Number)
No description available

do_transform_meta

def do_transform_meta (trans, outbuf, meta, inbuf):
    #python implementation of the 'transform_meta' virtual method

Optional. Transform the metadata on the input buffer to the output buffer. By default this method copies all meta without tags. Subclasses can implement this method and return True if the metadata is to be copied.

Parameters:

trans (GstBase.BaseTransform)
No description available
outbuf (Gst.Buffer)
No description available
meta (Gst.Meta)
No description available
inbuf (Gst.Buffer)
No description available
Returns (bool)
No description available

transform_size

gboolean
transform_size (GstBaseTransform * trans,
                GstPadDirection direction,
                GstCaps * caps,
                gsize size,
                GstCaps * othercaps,
                gsize * othersize)

Optional. Given the size of a buffer in the given direction with the given caps, calculate the size in bytes of a buffer on the other pad with the given other caps. The default implementation uses get_unit_size and keeps the number of units the same.

Parameters:

trans
No description available
direction
No description available
caps
No description available
size
No description available
othercaps
No description available
othersize
No description available
Returns
No description available

vfunc_transform_size

function vfunc_transform_size(trans: GstBase.BaseTransform, direction: Gst.PadDirection, caps: Gst.Caps, size: Number, othercaps: Gst.Caps): {
    // javascript implementation of the 'transform_size' virtual method
}

Optional. Given the size of a buffer in the given direction with the given caps, calculate the size in bytes of a buffer on the other pad with the given other caps. The default implementation uses get_unit_size and keeps the number of units the same.

Parameters:

trans (GstBase.BaseTransform)
No description available
direction (Gst.PadDirection)
No description available
caps (Gst.Caps)
No description available
size (Number)
No description available
othercaps (Gst.Caps)
No description available

Returns a tuple made of:

(Number )
No description available
othersize (Number )
No description available

do_transform_size

def do_transform_size (trans, direction, caps, size, othercaps):
    #python implementation of the 'transform_size' virtual method

Optional. Given the size of a buffer in the given direction with the given caps, calculate the size in bytes of a buffer on the other pad with the given other caps. The default implementation uses get_unit_size and keeps the number of units the same.

Parameters:

trans (GstBase.BaseTransform)
No description available
direction (Gst.PadDirection)
No description available
caps (Gst.Caps)
No description available
size (int)
No description available
othercaps (Gst.Caps)
No description available

Returns a tuple made of:

(bool )
No description available
othersize (int )
No description available

Function Macros

GST_BASE_TRANSFORM_CAST

#define GST_BASE_TRANSFORM_CAST(obj)	((GstBaseTransform *)(obj))

GST_BASE_TRANSFORM_SINK_PAD

#define GST_BASE_TRANSFORM_SINK_PAD(obj)	(GST_BASE_TRANSFORM_CAST (obj)->sinkpad)

Gives the pointer to the sink GstPad object of the element.

Parameters:

obj

base transform instance


GST_BASE_TRANSFORM_SRC_PAD

#define GST_BASE_TRANSFORM_SRC_PAD(obj)		(GST_BASE_TRANSFORM_CAST (obj)->srcpad)

Gives the pointer to the source GstPad object of the element.

Parameters:

obj

base transform instance


Constants

GST_BASE_TRANSFORM_FLOW_DROPPED

#define GST_BASE_TRANSFORM_FLOW_DROPPED   GST_FLOW_CUSTOM_SUCCESS

A GstFlowReturn that can be returned from transform and transform_ip to indicate that no output buffer was generated.


GST_BASE_TRANSFORM_SINK_NAME

#define GST_BASE_TRANSFORM_SINK_NAME	"sink"

The name of the templates for the sink pad.


GstBase.BASE_TRANSFORM_SINK_NAME

The name of the templates for the sink pad.


GstBase.BASE_TRANSFORM_SINK_NAME

The name of the templates for the sink pad.


GST_BASE_TRANSFORM_SRC_NAME

#define GST_BASE_TRANSFORM_SRC_NAME	"src"

The name of the templates for the source pad.


GstBase.BASE_TRANSFORM_SRC_NAME

The name of the templates for the source pad.


GstBase.BASE_TRANSFORM_SRC_NAME

The name of the templates for the source pad.


The results of the search are