Class: Gst::TaskPool

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Overview

The Gst::TaskPoolClass object.

Direct Known Subclasses

SharedTaskPool

Instance Method Summary collapse

Methods inherited from 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

Constructor Details

#initializeGst::TaskPool

Create a new default task pool. The default task pool will use a regular GThreadPool for threads.

Instance Method Details

#cleanupnil

Wait for all tasks to be stopped. This is mainly used internally to ensure proper cleanup of internal data structures in test suites.

MT safe.

Returns:

  • (nil)

#dispose_handle(id) ⇒ nil

Dispose of the handle returned by gst_task_pool_push(). This does not need to be called with the default implementation as the default Gst::TaskPoolClass::push implementation always returns nil. This does not need to be called either when calling gst_task_pool_join(), but should be called when joining is not necessary, but gst_task_pool_push() returned a non-nil value.

This method should only be called with the same pool instance that provided id.

Parameters:

  • id (GObject)

    the id

Returns:

  • (nil)

#join(id) ⇒ nil

Join a task and/or return it to the pool. id is the id obtained from gst_task_pool_push(). The default implementation does nothing, as the default Gst::TaskPoolClass::push implementation always returns nil.

This method should only be called with the same pool instance that provided id.

Parameters:

  • id (GObject)

    the id

Returns:

  • (nil)

#preparenil

Prepare the taskpool for accepting gst_task_pool_push() operations.

MT safe.

Returns:

  • (nil)

#push(func, user_data) ⇒ GObject

Start the execution of a new thread from pool. for the gst_task_pool_join function. This pointer can be nil, you must check error to detect errors. If the pointer is not nil and gst_task_pool_join() is not used, call gst_task_pool_dispose_handle() instead.

Parameters:

  • func (Gst::TaskPoolFunction)

    the function to call

  • user_data (GObject)

    data to pass to func

Returns:

  • (GObject)

    a pointer that should be used