projects
/
platform
/
upstream
/
gstreamer.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gst: Don't pass miniobjects to GST_DEBUG_OBJECT() and similar macros
[platform/upstream/gstreamer.git]
/
gst
/
gstbus.h
diff --git
a/gst/gstbus.h
b/gst/gstbus.h
index
732591f
..
1f14246
100644
(file)
--- a/
gst/gstbus.h
+++ b/
gst/gstbus.h
@@
-15,8
+15,8
@@
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
- * Free Software Foundation, Inc., 5
9 Temple Place - Suite 330
,
- * Boston, MA 0211
1-1307
, USA.
+ * Free Software Foundation, Inc., 5
1 Franklin St, Fifth Floor
,
+ * Boston, MA 0211
0-1301
, USA.
*/
#ifndef __GST_BUS_H__
*/
#ifndef __GST_BUS_H__
@@
-28,7
+28,6
@@
typedef struct _GstBusClass GstBusClass;
#include <gst/gstmessage.h>
#include <gst/gstclock.h>
#include <gst/gstmessage.h>
#include <gst/gstclock.h>
-#include <gst/gstatomicqueue.h>
G_BEGIN_DECLS
G_BEGIN_DECLS
@@
-73,7
+72,7
@@
typedef enum
* GstBusSyncHandler:
* @bus: the #GstBus that sent the message
* @message: the #GstMessage
* GstBusSyncHandler:
* @bus: the #GstBus that sent the message
* @message: the #GstMessage
- * @data: user data that has been given, when registering the handler
+ * @
user_
data: user data that has been given, when registering the handler
*
* Handler will be invoked synchronously, when a new message has been injected
* into the bus. This function is mostly used internally. Only one sync handler
*
* Handler will be invoked synchronously, when a new message has been injected
* into the bus. This function is mostly used internally. Only one sync handler
@@
-84,13
+83,13
@@
typedef enum
*
* 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
user_
data);
/**
* GstBusFunc:
* @bus: the #GstBus that sent the message
* @message: the #GstMessage
/**
* GstBusFunc:
* @bus: the #GstBus that sent the message
* @message: the #GstMessage
- * @data: user data that has been given, when registering the handler
+ * @
user_
data: user data that has been given, when registering the handler
*
* 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 message
*
* 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 message
@@
-100,11
+99,11
@@
typedef GstBusSyncReply (*GstBusSyncHandler) (GstBus * bus, GstMessage * mess
* function so it should not be freed in the function.
*
* Note that this function is used as a GSourceFunc which means that returning
* function so it should not be freed in the function.
*
* Note that this function is used as a GSourceFunc which means that returning
- * 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
user_
data);
/**
* GstBus:
/**
* GstBus:
@@
-116,18
+115,9
@@
struct _GstBus
GstObject object;
/*< private >*/
GstObject object;
/*< private >*/
- GstAtomicQueue *queue;
- GMutex *queue_lock;
-
- GstBusSyncHandler sync_handler;
- gpointer sync_handler_data;
-
- guint signal_watch_id;
- guint num_signal_watchers;
-
- /*< private >*/
GstBusPrivate *priv;
GstBusPrivate *priv;
- gpointer _gst_reserved[GST_PADDING - 1];
+
+ gpointer _gst_reserved[GST_PADDING];
};
struct _GstBusClass
};
struct _GstBusClass
@@
-142,52
+132,101
@@
struct _GstBusClass
gpointer _gst_reserved[GST_PADDING];
};
gpointer _gst_reserved[GST_PADDING];
};
+GST_API
GType gst_bus_get_type (void);
GType gst_bus_get_type (void);
+GST_API
GstBus* gst_bus_new (void);
GstBus* gst_bus_new (void);
+GST_API
gboolean gst_bus_post (GstBus * bus, GstMessage * message);
gboolean gst_bus_post (GstBus * bus, GstMessage * message);
+GST_API
gboolean gst_bus_have_pending (GstBus * bus);
gboolean gst_bus_have_pending (GstBus * bus);
+
+GST_API
GstMessage * gst_bus_peek (GstBus * bus);
GstMessage * gst_bus_peek (GstBus * bus);
+
+GST_API
GstMessage * gst_bus_pop (GstBus * bus);
GstMessage * gst_bus_pop (GstBus * bus);
+
+GST_API
GstMessage * gst_bus_pop_filtered (GstBus * bus, GstMessageType types);
GstMessage * gst_bus_pop_filtered (GstBus * bus, GstMessageType types);
+
+GST_API
GstMessage * gst_bus_timed_pop (GstBus * bus, GstClockTime timeout);
GstMessage * gst_bus_timed_pop (GstBus * bus, GstClockTime timeout);
+
+GST_API
GstMessage * gst_bus_timed_pop_filtered (GstBus * bus, GstClockTime timeout, GstMessageType types);
GstMessage * gst_bus_timed_pop_filtered (GstBus * bus, GstClockTime timeout, GstMessageType types);
+
+GST_API
void gst_bus_set_flushing (GstBus * bus, gboolean flushing);
/* synchronous dispatching */
void gst_bus_set_flushing (GstBus * bus, gboolean flushing);
/* synchronous dispatching */
+
+GST_API
void gst_bus_set_sync_handler (GstBus * bus, GstBusSyncHandler func,
void gst_bus_set_sync_handler (GstBus * bus, GstBusSyncHandler func,
- gpointer data);
+ gpointer user_data, GDestroyNotify notify);
+
+/* asynchronous message notifications */
+
+GST_API
+void gst_bus_get_pollfd (GstBus * bus, GPollFD *fd);
+
/* GSource based dispatching */
/* GSource based dispatching */
+
+GST_API
GSource * gst_bus_create_watch (GstBus * bus);
GSource * gst_bus_create_watch (GstBus * bus);
+
+GST_API
guint gst_bus_add_watch_full (GstBus * bus,
gint priority,
GstBusFunc func,
gpointer user_data,
GDestroyNotify notify);
guint gst_bus_add_watch_full (GstBus * bus,
gint priority,
GstBusFunc func,
gpointer user_data,
GDestroyNotify notify);
+GST_API
guint gst_bus_add_watch (GstBus * bus,
GstBusFunc func,
gpointer user_data);
guint gst_bus_add_watch (GstBus * bus,
GstBusFunc func,
gpointer user_data);
+GST_API
+gboolean gst_bus_remove_watch (GstBus * bus);
/* polling the bus */
/* polling the bus */
+
+GST_API
GstMessage* gst_bus_poll (GstBus *bus, GstMessageType events,
GstMessage* gst_bus_poll (GstBus *bus, GstMessageType events,
- GstClockTime
Diff
timeout);
+ GstClockTime timeout);
/* signal based dispatching helper functions. */
/* signal based dispatching helper functions. */
+
+GST_API
gboolean gst_bus_async_signal_func (GstBus *bus, GstMessage *message,
gpointer data);
gboolean gst_bus_async_signal_func (GstBus *bus, GstMessage *message,
gpointer data);
+GST_API
GstBusSyncReply gst_bus_sync_signal_handler (GstBus *bus, GstMessage *message,
gpointer data);
/* convenience api to add/remove a gsource that emits the async signals */
GstBusSyncReply gst_bus_sync_signal_handler (GstBus *bus, GstMessage *message,
gpointer data);
/* convenience api to add/remove a gsource that emits the async signals */
+
+GST_API
void gst_bus_add_signal_watch (GstBus * bus);
void gst_bus_add_signal_watch (GstBus * bus);
+
+GST_API
void gst_bus_add_signal_watch_full (GstBus * bus, gint priority);
void gst_bus_add_signal_watch_full (GstBus * bus, gint priority);
+
+GST_API
void gst_bus_remove_signal_watch (GstBus * bus);
void gst_bus_remove_signal_watch (GstBus * bus);
+GST_API
void gst_bus_enable_sync_message_emission (GstBus * bus);
void gst_bus_enable_sync_message_emission (GstBus * bus);
+
+GST_API
void gst_bus_disable_sync_message_emission (GstBus * bus);
void gst_bus_disable_sync_message_emission (GstBus * bus);
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstBus, gst_object_unref)
+#endif
+
G_END_DECLS
#endif /* __GST_BUS_H__ */
G_END_DECLS
#endif /* __GST_BUS_H__ */