Class: GstBase::BaseTransform

Inherits:
Gst::Element show all
Defined in:
(unknown)

Overview

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.

Direct Known Subclasses

GstAudio::AudioFilter

Instance Method Summary collapse

Methods inherited from Gst::Element

#>>, [], #abort_state, #add_metadata, #add_pad, #add_pad_template, #add_property_deep_notify_watch, #add_property_notify_watch, #add_static_metadata, #add_static_pad_template, #add_static_pad_template_with_gtype, #base_time, #base_time=, #bus, #bus=, #call_async, #change_state, #clock, #clock=, #context=, #contexts, #continue_state, #create_all_pads, #current_clock_time, #current_running_time, #decorate_stream_id, #decorate_stream_id_printf, #decorate_stream_id_printf_valist, #factory, #flags, #flags_raw, #foreach_pad, #foreach_sink_pad, #foreach_src_pad, #get_compatible_pad, #get_compatible_pad_template, #get_context, #get_context_unlocked, #get_metadata, #get_pad_template, #get_request_pad, #get_state, #get_static_pad, #is_locked_state, #iterate_pads, #iterate_sink_pads, #iterate_src_pads, #link_elements, #link_filtered, #link_many, #link_pads, #link_pads_filtered, #link_pads_full, #locked_state=, #lost_state, make_from_uri, #message_full, #message_full_with_details, #no_more_pads, #pad_template_list, #pause, #play, #post_message, #provide_clock, #query, #query_convert, #query_duration, #query_position, #ready, register, #release_request_pad, #remove_pad, #remove_property_notify_watch, #request_pad, #request_pad_simple, #seek, #seek_simple, #send_event, #set_metadata, #set_static_metadata, #start_time, #start_time=, #state=, state_change_return_get_name, state_get_name, #stop, #sync_state_with_parent, type_set_skip_documentation, #unlink, #unlink_many, #unlink_pads

Methods inherited from Gst::Object

#add_control_binding, check_uniqueness, #control_bindings_disabled=, #control_rate, #control_rate=, default_deep_notify, #default_error, #get_control_binding, #get_g_value_array, #get_value, #get_value_array, #has_active_control_bindings, #has_ancestor, #has_as_ancestor, #has_as_parent, #name, #name=, #parent, #parent=, #path_string, #ref, ref_sink, #remove_control_binding, replace, #set_control_binding_disabled, #suggest_next_sync, #sync_values, #unparent, #unref

Instance Method Details

#buffer_poolGst::BufferPool

by trans; free it after use

Returns:

#gap_aware=(gap_aware) ⇒ nil

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:

  • gap_aware (Boolean)

    New state

Returns:

  • (nil)

#get_allocator(allocator, params) ⇒ nil

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

Unref the allocator after use. used

Parameters:

  • allocator (Gst::Allocator)

    the Gst::Allocator

  • params (Gst::AllocationParams)

    the Gst::AllocationParams of allocator

Returns:

  • (nil)

#in_place=(in_place) ⇒ nil

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. on in_place buffers.

Parameters:

  • in_place (Boolean)

    Boolean value indicating that we would like to operate

Returns:

  • (nil)

#is_in_placeBoolean

See if trans is configured as a in_place transform. MT safe.

Returns:

  • (Boolean)

    true if the transform is configured in in_place mode.

#is_passthroughBoolean

See if trans is configured as a passthrough transform. MT safe.

Returns:

  • (Boolean)

    true if the transform is configured in passthrough mode.

#is_qos_enabledBoolean

Queries if the transform will handle QoS. MT safe.

Returns:

  • (Boolean)

    true if QoS is enabled.

#passthrough=(passthrough) ⇒ nil

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 (Boolean)

    boolean indicating passthrough mode.

Returns:

  • (nil)

#prefer_passthrough=(prefer_passthrough) ⇒ nil

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 (Boolean)

    New state

Returns:

  • (nil)

#qos=(qos) ⇒ Boolean

Parameters:

  • qos (Boolean)

Returns:

  • (Boolean)

    qos

  • (Boolean)

    qos

#qos?Boolean

Returns qos.

Returns:

  • (Boolean)

    qos

#qos_enabled=(enabled) ⇒ nil

Enable or disable QoS handling in the transform.

MT safe.

Parameters:

  • enabled (Boolean)

    new state

Returns:

  • (nil)

#reconfigureBoolean

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 Gst::BaseTransformClass::transform or Gst::BaseTransformClass::transform_ip vmethod. Call this in Gst::BaseTransformClass::submit_input_buffer, Gst::BaseTransformClass::prepare_output_buffer or in Gst::BaseTransformClass::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 Gst::BaseTransformClass::submit_input_buffer implementation.

Returns:

  • (Boolean)

    true if the negotiation succeeded, else false.

#reconfigure_sinknil

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

Returns:

  • (nil)

#reconfigure_srcnil

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.

Returns:

  • (nil)

#update_qos(proportion, diff, timestamp) ⇒ nil

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. running_time.

Parameters:

  • proportion (Float)

    the proportion

  • diff (Gst::ClockTimeDiff)

    the diff against the clock

  • timestamp (Gst::ClockTime)

    the timestamp of the buffer generating the QoS expressed in

Returns:

  • (nil)

#update_src_caps(updated_caps) ⇒ Boolean

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. downstream

Parameters:

  • updated_caps (Gst::Caps)

    An updated version of the srcpad caps to be pushed

Returns:

  • (Boolean)

    true if the caps could be sent downstream false otherwise