GstTaskPool
This object provides an abstraction for creating threads. The default implementation uses a regular GThreadPool to start tasks.
Subclasses can be made to create custom threads.
Constructors
Methods
GstTaskPool
GObject ╰──GInitiallyUnowned ╰──GstObject ╰──GstTaskPool ╰──GstSharedTaskPool
The GstTaskPool object.
Members
object
(GstObject)
–
Class structure
GstTaskPoolClass
The GstTaskPoolClass object.
Fields
parent_class
(GstObjectClass)
–
the parent class structure
Gst.TaskPoolClass
The Gst.TaskPoolClass object.
Attributes
parent_class
(Gst.ObjectClass)
–
the parent class structure
Gst.TaskPoolClass
The Gst.TaskPoolClass object.
Attributes
parent_class
(Gst.ObjectClass)
–
the parent class structure
Gst.TaskPool
GObject.Object ╰──GObject.InitiallyUnowned ╰──Gst.Object ╰──Gst.TaskPool ╰──Gst.SharedTaskPool
The Gst.TaskPool object.
Members
object
(Gst.Object)
–
Gst.TaskPool
GObject.Object ╰──GObject.InitiallyUnowned ╰──Gst.Object ╰──Gst.TaskPool ╰──Gst.SharedTaskPool
The Gst.TaskPool object.
Members
object
(Gst.Object)
–
Constructors
gst_task_pool_new
GstTaskPool * gst_task_pool_new ()
Create a new default task pool. The default task pool will use a regular GThreadPool for threads.
a new GstTaskPool. gst_object_unref after usage.
Gst.TaskPool.prototype.new
function Gst.TaskPool.prototype.new(): {
// javascript wrapper for 'gst_task_pool_new'
}
Create a new default task pool. The default task pool will use a regular GThreadPool for threads.
a new Gst.TaskPool. Gst.Object.prototype.unref after usage.
Gst.TaskPool.new
def Gst.TaskPool.new ():
#python wrapper for 'gst_task_pool_new'
Create a new default task pool. The default task pool will use a regular GThreadPool for threads.
a new Gst.TaskPool. Gst.Object.unref after usage.
Methods
gst_task_pool_cleanup
gst_task_pool_cleanup (GstTaskPool * pool)
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.
Parameters:
pool
–
Gst.TaskPool.prototype.cleanup
function Gst.TaskPool.prototype.cleanup(): {
// javascript wrapper for 'gst_task_pool_cleanup'
}
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.
Parameters:
Gst.TaskPool.cleanup
def Gst.TaskPool.cleanup (self):
#python wrapper for 'gst_task_pool_cleanup'
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.
Parameters:
gst_task_pool_dispose_handle
gst_task_pool_dispose_handle (GstTaskPool * pool, gpointer id)
Dispose of the handle returned by gst_task_pool_push. This does not need to be called with the default implementation as the default push implementation always returns NULL. 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-%NULL value.
This method should only be called with the same pool instance that provided id.
Since : 1.20
Gst.TaskPool.prototype.dispose_handle
function Gst.TaskPool.prototype.dispose_handle(id: Object): {
// javascript wrapper for 'gst_task_pool_dispose_handle'
}
Dispose of the handle returned by Gst.TaskPool.prototype.push. This does not need to be called with the default implementation as the default vfunc_push implementation always returns null. This does not need to be called either when calling Gst.TaskPool.prototype.join, but should be called when joining is not necessary, but Gst.TaskPool.prototype.push returned a non-%NULL value.
This method should only be called with the same pool instance that provided id.
Since : 1.20
Gst.TaskPool.dispose_handle
def Gst.TaskPool.dispose_handle (self, id):
#python wrapper for 'gst_task_pool_dispose_handle'
Dispose of the handle returned by Gst.TaskPool.push. This does not need to be called with the default implementation as the default do_push implementation always returns None. This does not need to be called either when calling Gst.TaskPool.join, but should be called when joining is not necessary, but Gst.TaskPool.push returned a non-%NULL value.
This method should only be called with the same pool instance that provided id.
Since : 1.20
gst_task_pool_join
gst_task_pool_join (GstTaskPool * pool, gpointer id)
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 push implementation always returns NULL.
This method should only be called with the same pool instance that provided id.
Gst.TaskPool.prototype.join
function Gst.TaskPool.prototype.join(id: Object): {
// javascript wrapper for 'gst_task_pool_join'
}
Join a task and/or return it to the pool. id is the id obtained from Gst.TaskPool.prototype.push. The default implementation does nothing, as the default vfunc_push implementation always returns null.
This method should only be called with the same pool instance that provided id.
Gst.TaskPool.join
def Gst.TaskPool.join (self, id):
#python wrapper for 'gst_task_pool_join'
Join a task and/or return it to the pool. id is the id obtained from Gst.TaskPool.push. The default implementation does nothing, as the default do_push implementation always returns None.
This method should only be called with the same pool instance that provided id.
gst_task_pool_prepare
gst_task_pool_prepare (GstTaskPool * pool, GError ** error)
Prepare the taskpool for accepting gst_task_pool_push operations.
MT safe.
Gst.TaskPool.prototype.prepare
function Gst.TaskPool.prototype.prepare(): {
// javascript wrapper for 'gst_task_pool_prepare'
}
Prepare the taskpool for accepting Gst.TaskPool.prototype.push operations.
MT safe.
Parameters:
Gst.TaskPool.prepare
@raises(GLib.GError)
def Gst.TaskPool.prepare (self):
#python wrapper for 'gst_task_pool_prepare'
Prepare the taskpool for accepting Gst.TaskPool.push operations.
MT safe.
Parameters:
gst_task_pool_push
gpointer gst_task_pool_push (GstTaskPool * pool, GstTaskPoolFunction func, gpointer user_data, GError ** error)
Start the execution of a new thread from pool.
Parameters:
pool
–
func
(
[scope async][closure])
–
the function to call
user_data
–
data to pass to func
error
–
return location for an error
a pointer that should be used for the gst_task_pool_join function. This pointer can be NULL, you must check error to detect errors. If the pointer is not NULL and gst_task_pool_join is not used, call gst_task_pool_dispose_handle instead.
Gst.TaskPool.prototype.push
function Gst.TaskPool.prototype.push(func: Gst.TaskPoolFunction, user_data: Object): {
// javascript wrapper for 'gst_task_pool_push'
}
Start the execution of a new thread from pool.
Parameters:
the function to call
data to pass to func
a pointer that should be used for the gst_task_pool_join function. This pointer can be null, you must check error to detect errors. If the pointer is not null and Gst.TaskPool.prototype.join is not used, call Gst.TaskPool.prototype.dispose_handle instead.
Gst.TaskPool.push
@raises(GLib.GError)
def Gst.TaskPool.push (self, func, *user_data):
#python wrapper for 'gst_task_pool_push'
Start the execution of a new thread from pool.
Parameters:
the function to call
data to pass to func
a pointer that should be used for the gst_task_pool_join function. This pointer can be None, you must check error to detect errors. If the pointer is not None and Gst.TaskPool.join is not used, call Gst.TaskPool.dispose_handle instead.
Virtual Methods
cleanup
cleanup (GstTaskPool * pool)
make sure all threads are stopped
Parameters:
pool
–
vfunc_cleanup
function vfunc_cleanup(pool: Gst.TaskPool): {
// javascript implementation of the 'cleanup' virtual method
}
make sure all threads are stopped
Parameters:
do_cleanup
def do_cleanup (pool):
#python implementation of the 'cleanup' virtual method
make sure all threads are stopped
Parameters:
dispose_handle
dispose_handle (GstTaskPool * pool, gpointer id)
free / unref the handle returned in GstTaskPoolClass::push.
Since : 1.20
vfunc_dispose_handle
function vfunc_dispose_handle(pool: Gst.TaskPool, id: Object): {
// javascript implementation of the 'dispose_handle' virtual method
}
free / unref the handle returned in GstTaskPoolClass::push.
Since : 1.20
do_dispose_handle
def do_dispose_handle (pool, id):
#python implementation of the 'dispose_handle' virtual method
free / unref the handle returned in GstTaskPoolClass::push.
Since : 1.20
join
join (GstTaskPool * pool, gpointer id)
join a thread
Parameters:
pool
–
id
–
vfunc_join
function vfunc_join(pool: Gst.TaskPool, id: Object): {
// javascript implementation of the 'join' virtual method
}
join a thread
do_join
def do_join (pool, id):
#python implementation of the 'join' virtual method
join a thread
prepare
prepare (GstTaskPool * pool, GError ** error)
prepare the threadpool
Parameters:
pool
–
error
–
vfunc_prepare
function vfunc_prepare(pool: Gst.TaskPool): {
// javascript implementation of the 'prepare' virtual method
}
prepare the threadpool
Parameters:
do_prepare
def do_prepare (pool):
#python implementation of the 'prepare' virtual method
prepare the threadpool
Parameters:
push
gpointer push (GstTaskPool * pool, GstTaskPoolFunction func, gpointer user_data, GError ** error)
start a new thread
Parameters:
pool
–
func
–
user_data
–
error
–
vfunc_push
function vfunc_push(pool: Gst.TaskPool, func: Gst.TaskPoolFunction, user_data: Object): {
// javascript implementation of the 'push' virtual method
}
start a new thread
Parameters:
do_push
def do_push (pool, func, *user_data):
#python implementation of the 'push' virtual method
start a new thread
Parameters:
Function Macros
GST_TASK_POOL_CAST
#define GST_TASK_POOL_CAST(pool) ((GstTaskPool*)(pool))
Constants
GST_TASK_POOL_CONTEXT_TYPE
#define GST_TASK_POOL_CONTEXT_TYPE "gst.task.pool"
The well-known context type for sharing a GstTaskPool between elements in a pipeline.
Elements that support this context will post a GST_MESSAGE_NEED_CONTEXT message on the bus when they need a task pool. Applications can respond by setting the context on the element or the pipeline. Elements will not query neighbors for this context type as the task pool is optional and elements will fall back to their default behavior if no pool is provided.
Since : 1.28
Gst.TASK_POOL_CONTEXT_TYPE
The well-known context type for sharing a Gst.TaskPool between elements in a pipeline.
Elements that support this context will post a Gst.MessageType.NEED_CONTEXT message on the bus when they need a task pool. Applications can respond by setting the context on the element or the pipeline. Elements will not query neighbors for this context type as the task pool is optional and elements will fall back to their default behavior if no pool is provided.
Since : 1.28
Gst.TASK_POOL_CONTEXT_TYPE
The well-known context type for sharing a Gst.TaskPool between elements in a pipeline.
Elements that support this context will post a Gst.MessageType.NEED_CONTEXT message on the bus when they need a task pool. Applications can respond by setting the context on the element or the pipeline. Elements will not query neighbors for this context type as the task pool is optional and elements will fall back to their default behavior if no pool is provided.
Since : 1.28
Callbacks
GstTaskPoolFunction
(*GstTaskPoolFunction) (void* user_data)
Task function, see gst_task_pool_push.
Parameters:
user_data
–
user data for the task function
Gst.TaskPoolFunction
function Gst.TaskPoolFunction(user_data: Object): {
// javascript wrapper for 'GstTaskPoolFunction'
}
Task function, see Gst.TaskPool.prototype.push.
Parameters:
user data for the task function
Gst.TaskPoolFunction
def Gst.TaskPoolFunction (*user_data):
#python wrapper for 'GstTaskPoolFunction'
Task function, see Gst.TaskPool.push.
Parameters:
user data for the task function
The results of the search are