Class: GstBase::BaseTransform
- Inherits:
-
Gst::Element
- Object
- GObject::InitiallyUnowned
- Gst::Object
- Gst::Element
- GstBase::BaseTransform
- 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
Instance Method Summary collapse
-
#buffer_pool ⇒ Gst::BufferPool
by trans; free it after use.
-
#gap_aware=(gap_aware) ⇒ nil
If gap_aware is false (the default), output buffers will have the %GST_BUFFER_FLAG_GAP flag unset.
-
#get_allocator(allocator, params) ⇒ nil
Lets Gst::BaseTransform sub-classes know the memory allocator used by the base class and its params.
-
#in_place=(in_place) ⇒ nil
Determines whether a non-writable buffer will be copied before passing to the transform_ip function.
-
#is_in_place ⇒ Boolean
See if trans is configured as a in_place transform.
-
#is_passthrough ⇒ Boolean
See if trans is configured as a passthrough transform.
-
#is_qos_enabled ⇒ Boolean
Queries if the transform will handle QoS.
-
#passthrough=(passthrough) ⇒ nil
Set passthrough mode for this filter by default.
-
#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.
- #qos=(qos) ⇒ Boolean
-
#qos? ⇒ Boolean
Qos.
-
#qos_enabled=(enabled) ⇒ nil
Enable or disable QoS handling in the transform.
-
#reconfigure ⇒ Boolean
Negotiates src pad caps with downstream elements if the source pad is marked as needing reconfiguring.
-
#reconfigure_sink ⇒ nil
Instructs trans to request renegotiation upstream.
-
#reconfigure_src ⇒ nil
Instructs trans to renegotiate a new downstream transform on the next buffer.
-
#update_qos(proportion, diff, timestamp) ⇒ nil
Set the QoS parameters in the transform.
-
#update_src_caps(updated_caps) ⇒ Boolean
Updates the srcpad caps and sends the caps downstream.
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_pool ⇒ Gst::BufferPool
by trans; free it after use
#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.
#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
#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.
#is_in_place ⇒ Boolean
See if trans is configured as a in_place transform. MT safe.
#is_passthrough ⇒ Boolean
See if trans is configured as a passthrough transform. MT safe.
#is_qos_enabled ⇒ Boolean
Queries if the transform will handle QoS. MT safe.
#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.
#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.
#qos=(qos) ⇒ Boolean
#qos? ⇒ Boolean
Returns qos.
#qos_enabled=(enabled) ⇒ nil
Enable or disable QoS handling in the transform.
MT safe.
#reconfigure ⇒ Boolean
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.
#reconfigure_sink ⇒ nil
Instructs trans to request renegotiation upstream. This function is typically called after properties on the transform were set that influence the input format.
#reconfigure_src ⇒ nil
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.
#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.
#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