gstreamer/docs/design/part-gstbus.txt
Wim Taymans fc0bf09d96 Docs updates
Original commit message from CVS:
* docs/design/part-TODO.txt:
* docs/design/part-events.txt:
* docs/design/part-gstbin.txt:
* docs/design/part-gstbus.txt:
* docs/design/part-gstpipeline.txt:
* docs/design/part-messages.txt:
* gst/gstbus.c:
* gst/gstmessage.c:
Docs updates
2005-03-22 11:32:59 +00:00

28 lines
1.2 KiB
Text

GstBus
------
The GstBus is an object responsible for delivering GstMessages in
a first-in first-out way from the streaming threads to the application.
Since the application typically only wants to deal with delivery of these
messages from one thread, the GstBus will marshall the messages between
different threads.
The GstBus provides support for GSource based notifications. This makes it
possible to handle the delivery in the glib mainloop.
A message is posted on the bus with the gst_bus_post() method. With the
gst_bus_peek() and _pop() methods one can look at or retrieve a previously
posted message.
The bus can be polled with the gst_bus_poll() method. This methods blocks
up to the specified timeout value until one of the specified messages types
is posted on the bus. The application can then _pop() the messages from the
bus to handle them.
It is also possible to get messages from the bus without any thread
marshalling with the gst_bus_set_sync_handler() method. This makes it
possible to react to a message in the same thread that posted the
message on the bus. This should only be used if the application is able
to deal with messages from different threads.