GObject.Object
Gst.Object
Gst.Bus
Import line: | Gst = imports.gi.Gst; |
GIR File: | Gst-0.10.gir |
C documentation: | GstBus |
Class : | Bus |
Extends: | Gst.Object |
Show / Hide Inherited methods, properties and signals |
Properties | Defined By | |
---|---|---|
_gst_reserved : Array
read only
|
Gst.Bus | |
flags : Number
read only
|
Gst.Object | |
lock : GLib.Mutex
read only
|
Gst.Object | |
name : String
|
Gst.Object | |
name_prefix : String
read only
|
Gst.Object | |
num_signal_watchers : Number
read only
|
Gst.Bus | |
object : Gst.Object
read only
|
Gst.Bus | |
parent : Gst.Object
read only
|
Gst.Object | |
priv : Gst.BusPrivate
read only
|
Gst.Bus | |
queue : GLib.Queue
read only
|
Gst.Bus | |
queue_lock : GLib.Mutex
read only
|
Gst.Bus | |
refcount : Number
read only
|
Gst.Object | |
signal_watch_id : Number
read only
|
Gst.Bus | |
sync_handler : [object Object]
read only
|
Gst.Bus | |
sync_handler_data : void*
read only
|
Gst.Bus |
Method / Constructor | Defined By | |
---|---|---|
new Gst.Bus
(Object properties)
Create a new Gst.Bus
Create a new Gst.Bus
|
||
add_signal_watch
()
:
none
Adds a bus signal watch to the default main context with the default priority.
Adds a bus signal watch to the default main context with the default priority. After calling this statement, the bus will emit the "message" signal for each message posted on the bus. This function may be called multiple times. To clean up, the caller is responsible for calling gst_bus_remove_signal_watch() as many times as this function is called. MT safe.
|
Gst.Bus | |
add_signal_watch_full
(Number priority)
:
none
Adds a bus signal watch to the default main context with the given priority.
Adds a bus signal watch to the default main context with the given priority. After calling this statement, the bus will emit the "message" signal for each message posted on the bus when the main loop is running. This function may be called multiple times. To clean up, the caller is responsible for calling gst_bus_remove_signal_watch() as many times as this function is called. There can only be a single bus watch per bus, you most remove all signal watch before you can set another type of watch. MT safe.
|
Gst.Bus | |
Adds a bus watch to the default main context with the default priority.
Adds a bus watch to the default main context with the default priority. This function is used to receive asynchronous messages in the main loop. There can only be a single bus watch per bus, you must remove it before you can set a new one. The watch can be removed using g_source_remove() or by returning FALSE from func. MT safe.
|
Gst.Bus | |
Adds a bus watch to the default main context with the given priority.
Adds a bus watch to the default main context with the given priority. This function is used to receive asynchronous messages in the main loop. There can only be a single bus watch per bus, you must remove it before you can set a new one. When func is called, the message belongs to the caller; if you want to keep a copy of it, call gst_message_ref() before leaving func. The watch can be removed using g_source_remove() or by returning FALSE from func. MT safe.
|
Gst.Bus | |
A helper GstBusFunc that can be used to convert all asynchronous messages into signals.
A helper GstBusFunc that can be used to convert all asynchronous messages into signals.
|
Gst.Bus | |
create_watch
()
:
GLib.Source
Create watch for this bus.
Create watch for this bus. The GSource will be dispatched whenever a message is on the bus. After the GSource is dispatched, the message is popped off the bus and unreffed.
|
Gst.Bus | |
Gst.Object | ||
disable_sync_message_emission
()
:
none
gst_bus_enable_sync_message_emission() Instructs GStreamer to stop emitting the "sync-message" signal for this bus.
gst_bus_enable_sync_message_emission() Instructs GStreamer to stop emitting the "sync-message" signal for this bus. See gst_bus_enable_sync_message_emission() for more information. In the event that multiple pieces of code have called gst_bus_enable_sync_message_emission(), the sync-message emissions will only be stopped after all calls to gst_bus_enable_sync_message_emission() were "cancelled" by calling this function. In this way the semantics are exactly the same as gst_object_ref() that which calls enable should also call disable. MT safe.
|
Gst.Bus | |
enable_sync_message_emission
()
:
none
Instructs GStreamer to emit the "sync-message" signal after running the bus's sync handler.
Instructs GStreamer to emit the "sync-message" signal after running the bus's sync handler. This function is here so that code can ensure that they can synchronously receive messages without having to affect what the bin's sync handler is. This function may be called multiple times. To clean up, the caller is responsible for calling gst_bus_disable_sync_message_emission() as many times as this function is called. While this function looks similar to gst_bus_add_signal_watch(), it is not exactly the same -- this function enables
|
Gst.Bus | |
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 | |
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 | |
have_pending
()
:
Boolean
Check if there are pending messages on the bus that should be handled.
Check if there are pending messages on the bus that should be handled. otherwise. MT safe.
|
Gst.Bus | |
peek
()
:
Gst.Message
Peek the message on the top of the bus' queue.
Peek the message on the top of the bus' queue. The message will remain on the bus' message queue. A reference is returned, and needs to be unreffed by the caller. MT safe.
|
Gst.Bus | |
poll for.
poll for. indefinitely. Poll the bus for messages. Will block while waiting for messages to come. You can specify a maximum time to poll with the timeout parameter. If All messages not in events will be popped off the bus and will be ignored. Because poll is implemented using the "message" signal enabled by gst_bus_add_signal_watch(), calling gst_bus_poll() will cause the "message" signal to be emitted for every message that poll sees. Thus a "message" signal handler will see the same messages that this function sees -- neither will steal messages from the other. This function will run a main loop from the default main context when polling. You should never use this function, since it is pure evil. This is especially true for GUI applications based on Gtk+ or Qt, but also for any other non-trivial application that uses the GLib main loop. As this function runs a GLib main loop, any callback attached to the default GLib main context may be invoked. This could be timeouts, GUI events, I/O events etc.; even if gst_bus_poll() is called with a 0 timeout. Any of these callbacks may do things you do not expect, e.g. destroy the main application window or some other resource; change other application state; display a dialog and run another main loop until the user clicks it away. In short, using this function may add a lot of complexity to your code through unexpected re-entrancy and unexpected changes to your application's state. For 0 timeouts use gst_bus_pop_filtered() instead of this function; for other short timeouts use gst_bus_timed_pop_filtered(); everything else is better handled by setting up an asynchronous bus watch and doing things from there. The message is taken from the bus and needs to be unreffed with gst_message_unref() after usage.
|
Gst.Bus | |
pop
()
:
Gst.Message
Get a message from the bus.
Get a message from the bus. The message is taken from the bus and needs to be unreffed with gst_message_unref() after usage. MT safe.
|
Gst.Bus | |
pop_filtered
(MessageType types)
:
Gst.Message
Get a message matching type from the bus.
Get a message matching type from the bus. Will discard all messages on the bus that do not match type and that have been posted before the first message that does match type. If there is no message matching type on the bus, all messages will be discarded. The message is taken from the bus and needs to be unreffed with gst_message_unref() after usage. MT safe.
|
Gst.Bus | |
Post a message on the given bus.
Post a message on the given bus. Ownership of the message is taken by the bus. MT safe.
|
Gst.Bus | |
remove_signal_watch
()
:
none
Removes a signal watch previously added with gst_bus_add_signal_watch().
Removes a signal watch previously added with gst_bus_add_signal_watch(). MT safe.
|
Gst.Bus | |
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_flushing
(Boolean flushing)
:
none
If flushing, flush out and unref any messages queued in the bus.
If flushing, flush out and unref any messages queued in the bus. Releases references to the message origin objects. Will flush future messages until gst_bus_set_flushing() sets flushing to FALSE. MT safe.
|
Gst.Bus | |
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 | |
Sets the synchronous handler on the bus.
Sets the synchronous handler on the bus. The function will be called every time a new message is posted on the bus. Note that the function will be called in the same thread context as the posting object. This function is usually only called by the creator of the bus. Applications should handle messages asynchronously using the gst_bus watch and poll functions. You cannot replace an existing sync_handler. You can pass NULL to this function, which will clear the existing handler.
|
Gst.Bus | |
A helper GstBusSyncHandler that can be used to convert all synchronous messages into signals.
A helper GstBusSyncHandler that can be used to convert all synchronous messages into signals.
|
Gst.Bus | |
timed_pop
(Number timeout)
:
Gst.Message
Get a message from the bus, waiting up to the specified timeout.
Get a message from the bus, waiting up to the specified timeout. If timeout is 0, this function behaves like gst_bus_pop(). If timeout is GST_CLOCK_TIME_NONE, this function will block forever until a message was posted on the bus. or NULL if the bus is empty after the timeout expired. The message is taken from the bus and needs to be unreffed with gst_message_unref() after usage. MT safe.
|
Gst.Bus | |
Get a message from the bus whose type matches the message type mask types, waiting up to the specified timeout (and discarding any messages that do not match the mask provided).
Get a message from the bus whose type matches the message type mask types, waiting up to the specified timeout (and discarding any messages that do not match the mask provided). If timeout is 0, this function behaves like gst_bus_pop_filtered(). If matching message was posted on the bus. message was found on the bus until the timeout expired. The message is taken from the bus and needs to be unreffed with gst_message_unref() after usage. MT safe.
|
Gst.Bus | |
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 | |
A message has been posted on the bus.
A message has been posted on the bus. This signal is emitted from a GSource added to the mainloop. this signal will only be emitted when there is a mainloop running.
|
Gst.Bus | |
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 | |
A message has been posted on the bus.
A message has been posted on the bus. This signal is emitted from the thread that posted the message so one has to be careful with locking. This signal will not be emitted by default, you have to set up gst_bus_sync_signal_handler() as a sync handler if you want this signal to be emitted when a message is posted on the bus, like this:
|
Gst.Bus |
Class / Namespace | Method / Signal / Properties |
---|---|
Gst.Element
Method |
set_bus
(Bus bus)
:
none
Sets the bus of the element.
|
Gst.Element
Method |
get_bus
()
:
Gst.Bus
Returns the bus of the element.
|
Gst.Pipeline
Method |
get_bus
()
:
Gst.Bus
Gets the GstBus of pipeline.
|