Class: GstBase::Aggregator
- Inherits:
-
Gst::Element
- Object
- GObject::InitiallyUnowned
- Gst::Object
- Gst::Element
- GstBase::Aggregator
- Defined in:
- (unknown)
Overview
The aggregator base class will handle in a thread-safe way all manners of concurrent flushes, seeks, pad additions and removals, leaving to the subclass the responsibility of clipping buffers, and aggregating buffers in the way the implementor sees fit.
It will also take care of event ordering (stream-start, segment, eos).
Basically, a simple implementation will override aggregate, and call _finish_buffer from inside that function.
Direct Known Subclasses
Instance Method Summary collapse
-
#buffer_pool ⇒ Gst::BufferPool
by trans; free it after use it.
-
#emit_signals=(emit_signals) ⇒ Boolean
Enables the emission of signals such as Gst::Aggregator::samples-selected.
-
#emit_signals? ⇒ Boolean
Enables the emission of signals such as Gst::Aggregator::samples-selected.
-
#finish_buffer(buffer) ⇒ Gst::FlowReturn
This method will push the provided output buffer downstream.
-
#finish_buffer_list(bufferlist) ⇒ Gst::FlowReturn
This method will push the provided output buffer list downstream.
-
#force_live ⇒ Boolean
Subclasses may use the return value to inform whether they should return %GST_FLOW_EOS from their aggregate implementation.
-
#force_live=(force_live) ⇒ nil
Subclasses should call this at construction time in order for self to aggregate on a timeout even when no live source is connected.
-
#get_allocator(allocator, params) ⇒ nil
Lets Gst::Aggregator sub-classes get the memory allocator acquired by the base class and its params.
-
#ignore_inactive_pads ⇒ Boolean
Whether inactive pads will not be waited on.
-
#ignore_inactive_pads=(ignore) ⇒ nil
Subclasses should call this when they don't want to time out waiting for a pad that hasn't yet received any buffers in live mode.
-
#latency ⇒ Integer
Latency.
- #latency=(latency) ⇒ Integer
-
#min_upstream_latency ⇒ Integer
Force minimum upstream latency (in nanoseconds).
-
#min_upstream_latency=(min_upstream_latency) ⇒ Integer
Force minimum upstream latency (in nanoseconds).
-
#negotiate ⇒ Boolean
Negotiates src pad caps with downstream elements.
-
#peek_next_sample(pad) ⇒ Gst::Sample
Use this function to determine what input buffers will be aggregated to produce the next output buffer.
-
#selected_samples(pts, dts, duration, info) ⇒ nil
Subclasses should call this when they have prepared the buffers they will aggregate for each of their sink pads, but before using any of the properties of the pads that govern how aggregation should be performed, for example z-index for video aggregators.
-
#set_latency(min_latency, max_latency) ⇒ nil
Lets Gst::Aggregator sub-classes tell the baseclass what their internal latency is.
-
#simple_get_next_time ⇒ Gst::ClockTime
This is a simple Gst::AggregatorClass::get_next_time implementation that just looks at the Gst::Segment on the srcpad of the aggregator and bases the next time on the running time there.
-
#src_caps=(caps) ⇒ nil
Sets the caps to be used on the src pad.
-
#start_time ⇒ Integer
Start-time.
- #start_time=(start_time) ⇒ Integer
-
#start_time_selection ⇒ GstBase::AggregatorStartTimeSelection
Start-time-selection.
- #start_time_selection=(start_time_selection) ⇒ GstBase::AggregatorStartTimeSelection
-
#update_segment(segment) ⇒ nil
Subclasses should use this to update the segment on their source pad, instead of directly pushing new segment events 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, #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 it
#emit_signals=(emit_signals) ⇒ Boolean
Enables the emission of signals such as Gst::Aggregator::samples-selected
#emit_signals? ⇒ Boolean
Enables the emission of signals such as Gst::Aggregator::samples-selected
#finish_buffer(buffer) ⇒ Gst::FlowReturn
This method will push the provided output buffer downstream. If needed, mandatory events such as stream-start, caps, and segment events will be sent before pushing the buffer.
#finish_buffer_list(bufferlist) ⇒ Gst::FlowReturn
This method will push the provided output buffer list downstream. If needed, mandatory events such as stream-start, caps, and segment events will be sent before pushing the buffer.
#force_live ⇒ Boolean
Subclasses may use the return value to inform whether they should return %GST_FLOW_EOS from their aggregate implementation.
#force_live=(force_live) ⇒ nil
Subclasses should call this at construction time in order for self to aggregate on a timeout even when no live source is connected.
#get_allocator(allocator, params) ⇒ nil
Lets Gst::Aggregator sub-classes get the memory allocator acquired by the base class and its params.
Unref the allocator after use it. used Gst::AllocationParams of allocator
#ignore_inactive_pads ⇒ Boolean
Returns whether inactive pads will not be waited on.
#ignore_inactive_pads=(ignore) ⇒ nil
Subclasses should call this when they don't want to time out waiting for a pad that hasn't yet received any buffers in live mode.
Gst::Aggregator will still wait once on each newly-added pad, making sure upstream has had a fair chance to start up.
#latency ⇒ Integer
Returns latency.
#latency=(latency) ⇒ Integer
#min_upstream_latency ⇒ Integer
Force minimum upstream latency (in nanoseconds). When sources with a higher latency are expected to be plugged in dynamically after the aggregator has started playing, this allows overriding the minimum latency reported by the initial source(s). This is only taken into account when larger than the actually reported minimum latency.
#min_upstream_latency=(min_upstream_latency) ⇒ Integer
Force minimum upstream latency (in nanoseconds). When sources with a higher latency are expected to be plugged in dynamically after the aggregator has started playing, this allows overriding the minimum latency reported by the initial source(s). This is only taken into account when larger than the actually reported minimum latency.
#negotiate ⇒ Boolean
Negotiates src pad caps with downstream elements. Unmarks GST_PAD_FLAG_NEED_RECONFIGURE in any case. But marks it again if Gst::AggregatorClass::negotiate fails.
#peek_next_sample(pad) ⇒ Gst::Sample
Use this function to determine what input buffers will be aggregated to produce the next output buffer. This should only be called from a Gst::Aggregator::samples-selected handler, and can be used to precisely control aggregating parameters for a given set of input samples.
#selected_samples(pts, dts, duration, info) ⇒ nil
Subclasses should call this when they have prepared the buffers they will aggregate for each of their sink pads, but before using any of the properties of the pads that govern how aggregation should be performed, for example z-index for video aggregators.
If gst_aggregator_update_segment() is used by the subclass, it MUST be called before gst_aggregator_selected_samples().
This function MUST only be called from the Gst::AggregatorClass::aggregate() function.
#set_latency(min_latency, max_latency) ⇒ nil
Lets Gst::Aggregator sub-classes tell the baseclass what their internal latency is. Will also post a LATENCY message on the bus so the pipeline can reconfigure its global latency if the values changed.
#simple_get_next_time ⇒ Gst::ClockTime
This is a simple Gst::AggregatorClass::get_next_time implementation that just looks at the Gst::Segment on the srcpad of the aggregator and bases the next time on the running time there.
This is the desired behaviour in most cases where you have a live source and you have a dead line based aggregator subclass.
#src_caps=(caps) ⇒ nil
Sets the caps to be used on the src pad.
#start_time ⇒ Integer
Returns start-time.
#start_time=(start_time) ⇒ Integer
#start_time_selection ⇒ GstBase::AggregatorStartTimeSelection
Returns start-time-selection.
#start_time_selection=(start_time_selection) ⇒ GstBase::AggregatorStartTimeSelection
#update_segment(segment) ⇒ nil
Subclasses should use this to update the segment on their source pad, instead of directly pushing new segment events downstream.
Subclasses MUST call this before gst_aggregator_selected_samples(), if it is used at all.