* from the bus to handle them.
* Alternatively the application can register an asynchronous bus function
* using gst_bus_add_watch_full() or gst_bus_add_watch(). This function will
- * install a #GSource in the default glib main loop and will deliver messages
- * a short while after they have been posted. Note that the main loop should
+ * install a #GSource in the default glib main loop and will deliver messages
+ * a short while after they have been posted. Note that the main loop should
* be running for the asynchronous callbacks.
*
* It is also possible to get messages from the bus without any thread
* Check if there are pending messages on the bus that
* should be handled.
*
- * Returns: TRUE if there are messages on the bus to be handled, FALSE
+ * Returns: TRUE if there are messages on the bus to be handled, FALSE
* otherwise.
*
* MT safe.
* 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.
+ * 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
*
* Returns: #GstBusSyncReply stating what to do with the message
*/
-typedef GstBusSyncReply (*GstBusSyncHandler) (GstBus * bus, GstMessage * message, gpointer data);
+typedef GstBusSyncReply (*GstBusSyncHandler) (GstBus * bus, GstMessage * message, gpointer data);
/**
* GstBusFunc:
*
* Returns: %FALSE if the event source should be removed.
*/
-typedef gboolean (*GstBusFunc) (GstBus * bus, GstMessage * message, gpointer data);
+typedef gboolean (*GstBusFunc) (GstBus * bus, GstMessage * message, gpointer data);
/**
* GstBus:
*/
struct _GstBus
{
- GstObject object;
+ GstObject object;
/*< private >*/
GQueue *queue;
GMutex *queue_lock;
GstBusSyncHandler sync_handler;
- gpointer sync_handler_data;
+ gpointer sync_handler_data;
guint signal_watch_id;
guint num_signal_watchers;
GstObjectClass parent_class;
/* signals */
- void (*message) (GstBus *bus, GstMessage *message);
+ void (*message) (GstBus *bus, GstMessage *message);
void (*sync_message) (GstBus *bus, GstMessage *message);
/*< private >*/
gpointer _gst_reserved[GST_PADDING];
};
-GType gst_bus_get_type (void);
+GType gst_bus_get_type (void);
-GstBus* gst_bus_new (void);
+GstBus* gst_bus_new (void);
-gboolean gst_bus_post (GstBus * bus, GstMessage * message);
+gboolean gst_bus_post (GstBus * bus, GstMessage * message);
-gboolean gst_bus_have_pending (GstBus * bus);
-GstMessage * gst_bus_peek (GstBus * bus);
-GstMessage * gst_bus_pop (GstBus * bus);
-GstMessage * gst_bus_pop_filtered (GstBus * bus, GstMessageType types);
-GstMessage * gst_bus_timed_pop (GstBus * bus, GstClockTime timeout);
-GstMessage * gst_bus_timed_pop_filtered (GstBus * bus, GstClockTime timeout, GstMessageType types);
-void gst_bus_set_flushing (GstBus * bus, gboolean flushing);
+gboolean gst_bus_have_pending (GstBus * bus);
+GstMessage * gst_bus_peek (GstBus * bus);
+GstMessage * gst_bus_pop (GstBus * bus);
+GstMessage * gst_bus_pop_filtered (GstBus * bus, GstMessageType types);
+GstMessage * gst_bus_timed_pop (GstBus * bus, GstClockTime timeout);
+GstMessage * gst_bus_timed_pop_filtered (GstBus * bus, GstClockTime timeout, GstMessageType types);
+void gst_bus_set_flushing (GstBus * bus, gboolean flushing);
/* synchronous dispatching */
-void gst_bus_set_sync_handler (GstBus * bus, GstBusSyncHandler func,
- gpointer data);
+void gst_bus_set_sync_handler (GstBus * bus, GstBusSyncHandler func,
+ gpointer data);
/* GSource based dispatching */
-GSource * gst_bus_create_watch (GstBus * bus);
-guint gst_bus_add_watch_full (GstBus * bus,
- gint priority,
- GstBusFunc func,
- gpointer user_data,
- GDestroyNotify notify);
-guint gst_bus_add_watch (GstBus * bus,
- GstBusFunc func,
- gpointer user_data);
+GSource * gst_bus_create_watch (GstBus * bus);
+guint gst_bus_add_watch_full (GstBus * bus,
+ gint priority,
+ GstBusFunc func,
+ gpointer user_data,
+ GDestroyNotify notify);
+guint gst_bus_add_watch (GstBus * bus,
+ GstBusFunc func,
+ gpointer user_data);
/* polling the bus */
-GstMessage* gst_bus_poll (GstBus *bus, GstMessageType events,
+GstMessage* gst_bus_poll (GstBus *bus, GstMessageType events,
GstClockTimeDiff timeout);
/* signal based dispatching helper functions. */
-gboolean gst_bus_async_signal_func (GstBus *bus, GstMessage *message,
- gpointer data);
-GstBusSyncReply gst_bus_sync_signal_handler (GstBus *bus, GstMessage *message,
- gpointer data);
+gboolean gst_bus_async_signal_func (GstBus *bus, GstMessage *message,
+ gpointer data);
+GstBusSyncReply gst_bus_sync_signal_handler (GstBus *bus, GstMessage *message,
+ gpointer data);
/* convenience api to add/remove a gsource that emits the async signals */
-void gst_bus_add_signal_watch (GstBus * bus);
-void gst_bus_add_signal_watch_full (GstBus * bus, gint priority);
-void gst_bus_remove_signal_watch (GstBus * bus);
+void gst_bus_add_signal_watch (GstBus * bus);
+void gst_bus_add_signal_watch_full (GstBus * bus, gint priority);
+void gst_bus_remove_signal_watch (GstBus * bus);
-void gst_bus_enable_sync_message_emission (GstBus * bus);
-void gst_bus_disable_sync_message_emission (GstBus * bus);
+void gst_bus_enable_sync_message_emission (GstBus * bus);
+void gst_bus_disable_sync_message_emission (GstBus * bus);
G_END_DECLS