gstbus.h | gstbus.h | |||
---|---|---|---|---|
skipping to change at line 86 | skipping to change at line 86 | |||
* | * | |||
* Handler will be invoked synchronously, when a new message has been injec ted | * Handler will be invoked synchronously, when a new message has been injec ted | |||
* into the bus. This function is mostly used internally. Only one sync han dler | * into the bus. This function is mostly used internally. Only one sync han dler | |||
* can be attached to a given bus. | * can be attached to a given bus. | |||
* | * | |||
* If the handler returns GST_BUS_DROP, it should unref the message, else t he | * If the handler returns GST_BUS_DROP, it should unref the message, else t he | |||
* message should not be unreffed by the sync handler. | * message should not be unreffed by the sync handler. | |||
* | * | |||
* Returns: #GstBusSyncReply stating what to do with the message | * 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: | * GstBusFunc: | |||
* @bus: the #GstBus that sent the message | * @bus: the #GstBus that sent the message | |||
* @message: the #GstMessage | * @message: the #GstMessage | |||
* @data: user data that has been given, when registering the handler | * @data: user data that has been given, when registering the handler | |||
* | * | |||
* Specifies the type of function passed to gst_bus_add_watch() or | * Specifies the type of function passed to gst_bus_add_watch() or | |||
* gst_bus_add_watch_full(), which is called from the mainloop when a messa ge | * gst_bus_add_watch_full(), which is called from the mainloop when a messa ge | |||
* is available on the bus. | * is available on the bus. | |||
* | * | |||
* The message passed to the function will be unreffed after execution of t his | * The message passed to the function will be unreffed after execution of t his | |||
* function so it should not be freed in the function. | * function so it should not be freed in the function. | |||
* | * | |||
* Note that this function is used as a GSourceFunc which means that return ing | * Note that this function is used as a GSourceFunc which means that return ing | |||
* FALSE will remove the GSource from the mainloop. | * FALSE will remove the GSource from the mainloop. | |||
* | * | |||
* Returns: %FALSE if the event source should be removed. | * 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: | * GstBus: | |||
* | * | |||
* The opaque #GstBus data structure. | * The opaque #GstBus data structure. | |||
*/ | */ | |||
struct _GstBus | struct _GstBus | |||
{ | { | |||
GstObject object; | GstObject object; | |||
/*< private > */ | /*< private >*/ | |||
GQueue *queue; | GQueue *queue; | |||
GMutex *queue_lock; | GMutex *queue_lock; | |||
GstBusSyncHandler sync_handler; | GstBusSyncHandler sync_handler; | |||
gpointer sync_handler_data; | gpointer sync_handler_data; | |||
guint signal_watch_id; | guint signal_watch_id; | |||
guint num_signal_watchers; | guint num_signal_watchers; | |||
/*< private > */ | /*< private >*/ | |||
GstBusPrivate *priv; | GstBusPrivate *priv; | |||
gpointer _gst_reserved[GST_PADDING - 1]; | gpointer _gst_reserved[GST_PADDING - 1]; | |||
}; | }; | |||
struct _GstBusClass | struct _GstBusClass | |||
{ | { | |||
GstObjectClass parent_class; | GstObjectClass parent_class; | |||
/* signals */ | /* signals */ | |||
void (*message) (GstBus *bus, GstMessage *message); | void (*message) (GstBus *bus, GstMessage *message); | |||
void (*sync_message) (GstBus *bus, GstMessage *message); | void (*sync_message) (GstBus *bus, GstMessage *message); | |||
/*< private > */ | /*< private >*/ | |||
gpointer _gst_reserved[GST_PADDING]; | 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, GstMe ssage * message); | gboolean gst_bus_post (GstBus * bus, GstM essage * message); | |||
gboolean gst_bus_have_pending (GstBus * bus); | gboolean gst_bus_have_pending (GstBus * bus); | |||
GstMessage * gst_bus_peek (GstBus * bus); | GstMessage * gst_bus_peek (GstBus * bus); | |||
GstMessage * gst_bus_pop (GstBus * bus); | GstMessage * gst_bus_pop (GstBus * bus); | |||
GstMessage * gst_bus_pop_filtered (GstBus * bus, GstMe | GstMessage * gst_bus_pop_filtered (GstBus * bus, GstM | |||
ssageType types); | essageType types); | |||
GstMessage * gst_bus_timed_pop (GstBus * bus, GstCl | GstMessage * gst_bus_timed_pop (GstBus * bus, GstC | |||
ockTime timeout); | lockTime timeout); | |||
GstMessage * gst_bus_timed_pop_filtered (GstBus * bus, GstCl | GstMessage * gst_bus_timed_pop_filtered (GstBus * bus, GstC | |||
ockTime timeout, GstMessageType types); | lockTime timeout, GstMessageType types); | |||
void gst_bus_set_flushing (GstBus * bus, gbool | void gst_bus_set_flushing (GstBus * bus, gboo | |||
ean flushing); | lean flushing); | |||
/* synchronous dispatching */ | /* synchronous dispatching */ | |||
void gst_bus_set_sync_handler (GstBus * bus, GstBu | void gst_bus_set_sync_handler (GstBus * bus, GstB | |||
sSyncHandler func, | usSyncHandler func, | |||
gpointer data); | gpointer data); | |||
/* GSource based dispatching */ | /* GSource based dispatching */ | |||
GSource * gst_bus_create_watch (GstBus * bus); | GSource * gst_bus_create_watch (GstBus * bus); | |||
guint gst_bus_add_watch_full (GstBus * bus, | guint gst_bus_add_watch_full (GstBus * bus, | |||
gint priority, | gint priority, | |||
GstBusFunc func, | GstBusFunc func, | |||
gpointer user_data, | gpointer user_data | |||
GDestroyNotify noti | , | |||
fy); | GDestroyNotify not | |||
guint gst_bus_add_watch (GstBus * bus, | ify); | |||
GstBusFunc func, | guint gst_bus_add_watch (GstBus * bus, | |||
gpointer user_data) | GstBusFunc func, | |||
; | gpointer user_data | |||
); | ||||
/* polling the bus */ | /* polling the bus */ | |||
GstMessage* gst_bus_poll (GstBus *bus, GstMes sageType events, | GstMessage* gst_bus_poll (GstBus *bus, GstMe ssageType events, | |||
GstClockTimeDiff t imeout); | GstClockTimeDiff t imeout); | |||
/* signal based dispatching helper functions. */ | /* signal based dispatching helper functions. */ | |||
gboolean gst_bus_async_signal_func (GstBus *bus, GstMes | gboolean gst_bus_async_signal_func (GstBus *bus, GstMe | |||
sage *message, | ssage *message, | |||
gpointer data); | gpointer data); | |||
GstBusSyncReply gst_bus_sync_signal_handler (GstBus *bus | GstBusSyncReply gst_bus_sync_signal_handler (GstBus *bus, GstMe | |||
, GstMessage *message, | ssage *message, | |||
gpointer data); | gpointer data); | |||
/* convenience api to add/remove a gsource that emits the async signals */ | /* 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 (GstBus * bus); | |||
void gst_bus_add_signal_watch_full (GstBus * bus, gint | void gst_bus_add_signal_watch_full (GstBus * bus, gint | |||
priority); | priority); | |||
void gst_bus_remove_signal_watch (GstBus * bus); | void gst_bus_remove_signal_watch (GstBus * bus); | |||
void gst_bus_enable_sync_message_emission (GstBus * bus); | void gst_bus_enable_sync_message_emission (GstBus * bus) | |||
void gst_bus_disable_sync_message_emission (GstBus * bus) | ; | |||
; | void gst_bus_disable_sync_message_emission (GstBus * bus | |||
); | ||||
G_END_DECLS | G_END_DECLS | |||
#endif /* __GST_BUS_H__ */ | #endif /* __GST_BUS_H__ */ | |||
End of changes. 18 change blocks. | ||||
50 lines changed or deleted | 52 lines changed or added | |||
This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |