GObject.Object
Gst.Object
Gst.Task
Import line: | Gst = imports.gi.Gst; |
GIR File: | Gst-0.10.gir |
C documentation: | GstTask |
Class : | Task |
Extends: | Gst.Object |
Show / Hide Inherited methods, properties and signals |
Properties | Defined By | |
---|---|---|
_gst_reserved : void*
read only
|
Gst.Object | |
cond : GLib.Cond
read only
|
Gst.Task | |
data : void*
read only
|
Gst.Task | |
flags : Number
read only
|
Gst.Object | |
func : [object Object]
read only
|
Gst.Task | |
lock : GLib.StaticRecMutex
read only
|
Gst.Task | |
name : String
|
Gst.Object | |
name_prefix : String
read only
|
Gst.Object | |
object : Gst.Object
read only
|
Gst.Task | |
parent : Gst.Object
read only
|
Gst.Object | |
priv : Gst.TaskPrivate
read only
|
Gst.Task | |
refcount : Number
read only
|
Gst.Object | |
running : Boolean
read only
|
Gst.Task | |
state : Gst.TaskState
read only
|
Gst.Task |
Method / Constructor | Defined By | |
---|---|---|
new Gst.Task
(Object properties)
Create a new Gst.Task
Create a new Gst.Task
|
||
Gst.Task.cleanup_all
()
:
none
Wait for all tasks to be stopped.
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.
|
Gst.Task | |
Create a new Task that will repeatedly call the provided func with data as a parameter.
Create a new Task that will repeatedly call the provided func with data as a parameter. Typically the task will run in a new thread. The function cannot be changed after the task has been created. You must create a new GstTask to change the function. This function will not yet create and start a thread. Use gst_task_start() or gst_task_pause() to create and start the GThread. Before the task can be used, a GStaticRecMutex must be configured using the gst_task_set_lock() function. This lock will always be acquired while MT safe.
|
Gst.Task | |
Gst.Object | ||
get_name
()
:
String
Returns a copy of the name of object.
Returns a copy of the name of object. Caller should g_free() the return value after usage. For a nameless object, this returns NULL, which you can safely g_free() as well. MT safe. This function grabs and releases object's LOCK.
|
Gst.Object | |
get_name_prefix
()
:
String
Returns a copy of the name prefix of object.
Returns a copy of the name prefix of object. Caller should g_free() the return value after usage. For a prefixless object, this returns NULL, which you can safely g_free() as well. MT safe. This function grabs and releases object's LOCK.
|
Gst.Object | |
get_parent
()
:
Gst.Object
Returns the parent of object.
Returns the parent of object. This function increases the refcount of the parent object so you should gst_object_unref() it after usage. MT safe. Grabs and releases object's LOCK.
|
Gst.Object | |
get_path_string
()
:
String
Generates a string describing the path of object in the object hierarchy.
Generates a string describing the path of object in the object hierarchy. Only useful (or used) for debugging. MT safe. Grabs and releases the GstObject's LOCK for all objects in the hierarchy.
|
Gst.Object | |
get_pool
()
:
Gst.TaskPool
Get the GstTaskPool that this task will use for its streaming threads.
Get the GstTaskPool that this task will use for its streaming threads. MT safe. after usage.
|
Gst.Task | |
get_state
()
:
Gst.TaskState
Get the current state of the task.
Get the current state of the task. MT safe.
|
Gst.Task | |
Check if object has an ancestor ancestor somewhere up in the hierarchy.
Check if object has an ancestor ancestor somewhere up in the hierarchy. MT safe. Grabs and releases object's locks.
|
Gst.Object | |
join
()
:
Boolean
Joins task.
Joins task. After this call, it is safe to unref the task and clean up the lock set with gst_task_set_lock(). The task will automatically be stopped with this call. This function cannot be called from within a task function as this would cause a deadlock. The function will detect this and print a g_warning. MT safe.
|
Gst.Task | |
pause
()
:
Boolean
Pauses task.
Pauses task. This method can also be called on a task in the stopped state, in which case a thread will be started and will remain in the paused state. This function does not wait for the task to complete the paused state. MT safe.
|
Gst.Task | |
replace
(Object newobj)
:
none
Unrefs the GstObject pointed to by oldobj, refs newobj and puts newobj in *oldobj.
Unrefs the GstObject pointed to by oldobj, refs newobj and puts newobj in *oldobj. Be carefull when calling this function, it does not take any locks. You might want to lock the object owning oldobj pointer before calling this function. Make sure not to LOCK oldobj because it might be unreffed which could cause a deadlock when it is disposed.
|
Gst.Object | |
restore_thyself
(Node self)
:
none
Restores object with the data from the parent XML node.
Restores object with the data from the parent XML node.
|
Gst.Object | |
save_thyself
(Node parent)
:
libxml2.Node
Saves object into the parent XML node.
Saves object into the parent XML node.
|
Gst.Object | |
set_lock
(StaticRecMutex mutex)
:
none
Set the mutex used by the task.
Set the mutex used by the task. The mutex will be acquired before calling the GstTaskFunction. This function has to be called before calling gst_task_pause() or gst_task_start(). MT safe.
|
Gst.Task | |
Sets the name of object, or gives object a guaranteed unique name (if name is NULL).
Sets the name of object, or gives object a guaranteed unique name (if name is NULL). This function makes a copy of the provided name, so the caller retains ownership of the name it sent. a parent cannot be renamed, this function returns FALSE in those cases. MT safe. This function grabs and releases object's LOCK.
|
Gst.Object | |
set_name_prefix
(String name_prefix)
:
none
Sets the name prefix of object to name_prefix.
Sets the name prefix of object to name_prefix. This function makes a copy of the provided name prefix, so the caller retains ownership of the name prefix it sent. MT safe. This function grabs and releases object's LOCK.
|
Gst.Object | |
Sets the parent of object to parent.
Sets the parent of object to parent. The object's reference count will be incremented, and any floating reference will be removed (see gst_object_sink()). This function causes the parent-set signal to be emitted when the parent was successfully set. already had a parent or object and parent are the same. MT safe. Grabs and releases object's LOCK.
|
Gst.Object | |
set_pool
(TaskPool pool)
:
none
Set pool as the new GstTaskPool for task.
Set pool as the new GstTaskPool for task. Any new streaming threads that will be created by task will now use pool. MT safe.
|
Gst.Task | |
set_priority
(ThreadPriority priority)
:
none
Changes the priority of task to priority.
Changes the priority of task to priority. MT safe.
|
Gst.Task | |
Sets the state of task to state.
Sets the state of task to state. The task must have a lock associated with it using gst_task_set_lock() when going to GST_TASK_STARTED or GST_TASK_PAUSED or this function will return FALSE. MT safe.
|
Gst.Task | |
Set callbacks which will be executed when a new thread is needed, the thread function is entered and left and when the thread is joined.
Set callbacks which will be executed when a new thread is needed, the thread function is entered and left and when the thread is joined. By default a thread for task will be created from a default thread pool. Objects can use custom GThreads or can perform additional configuration of the threads (such as changing the thread priority) by installing callbacks. MT safe.
|
Gst.Task | |
start
()
:
Boolean
Starts task.
Starts task. The task must have a lock associated with it using gst_task_set_lock() or this function will return FALSE. MT safe.
|
Gst.Task | |
stop
()
:
Boolean
Stops task.
Stops task. This method merely schedules the task to stop and will not wait for the task to have completely stopped. Use gst_task_join() to stop and wait for completion. MT safe.
|
Gst.Task | |
unparent
()
:
none
Clear the parent of object, removing the associated reference.
Clear the parent of object, removing the associated reference. This function decreases the refcount of object. MT safe. Grabs and releases object's lock.
|
Gst.Object |
Event | Defined By | |
---|---|---|
The deep notify signal is used to be notified of property changes.
The deep notify signal is used to be notified of property changes. It is typically attached to the toplevel bin to receive notifications from all the elements contained in that bin.
|
Gst.Object | |
Trigered whenever a new object is saved to XML.
Trigered whenever a new object is saved to XML. You can connect to this signal to insert custom XML tags into the core XML.
|
Gst.Object | |
Emitted when the parent of an object is set.
Emitted when the parent of an object is set.
|
Gst.Object | |
Emitted when the parent of an object is unset.
Emitted when the parent of an object is unset.
|
Gst.Object |