* only receive this message in the PLAYING state and every time it sets a
* pipeline to PLAYING that is in the EOS state. The application can perform a
* flushing seek in the pipeline, which will undo the EOS state again.
- * @GST_MESSAGE_ERROR: an error occured. When the application receives an error
+ * @GST_MESSAGE_ERROR: an error occurred. When the application receives an error
* message it should stop playback of the pipeline and not assume that more
* data will be played.
- * @GST_MESSAGE_WARNING: a warning occured.
- * @GST_MESSAGE_INFO: an info message occured
+ * @GST_MESSAGE_WARNING: a warning occurred.
+ * @GST_MESSAGE_INFO: an info message occurred
* @GST_MESSAGE_TAG: a tag was found.
* @GST_MESSAGE_BUFFERING: the pipeline is buffering. When the application
* receives a buffering message in the PLAYING state for a non-live pipeline it
* the URI for the next title has been set).
* @GST_MESSAGE_NEED_CONTEXT: Message indicating that an element wants a specific context (Since 1.2)
* @GST_MESSAGE_HAVE_CONTEXT: Message indicating that an element created a context (Since 1.2)
+ * @GST_MESSAGE_EXTENDED: Message is an extended message type (see below).
+ * These extended message IDs can't be used directly with mask-based API
+ * like gst_bus_poll() or gst_bus_timed_pop_filtered(), but you can still
+ * filter for GST_MESSAGE_EXTENDED and then check the result for the
+ * specific type. (Since 1.4)
+ * @GST_MESSAGE_DEVICE_ADDED: Message indicating a #GstDevice was added to
+ * a #GstDeviceMonitor (Since 1.4)
+ * @GST_MESSAGE_DEVICE_REMOVED: Message indicating a #GstDevice was removed
+ * from a #GstDeviceMonitor (Since 1.4)
* @GST_MESSAGE_ANY: mask for all of the above messages.
*
* The different message types that are available.
/* NOTE: keep in sync with quark registration in gstmessage.c
* NOTE: keep GST_MESSAGE_ANY a valid gint to avoid compiler warnings.
*/
+/* FIXME: 2.0: Make it NOT flags, just a regular 1,2,3,4.. enumeration */
typedef enum
{
GST_MESSAGE_UNKNOWN = 0,
GST_MESSAGE_STREAM_START = (1 << 28),
GST_MESSAGE_NEED_CONTEXT = (1 << 29),
GST_MESSAGE_HAVE_CONTEXT = (1 << 30),
+ GST_MESSAGE_EXTENDED = (1 << 31),
+ GST_MESSAGE_DEVICE_ADDED = GST_MESSAGE_EXTENDED + 1,
+ GST_MESSAGE_DEVICE_REMOVED = GST_MESSAGE_EXTENDED + 2,
GST_MESSAGE_ANY = ~0
} GstMessageType;
#include <gst/gststructure.h>
#include <gst/gstquery.h>
#include <gst/gsttoc.h>
+#include <gst/gstdevice.h>
#define GST_TYPE_MESSAGE (gst_message_get_type())
#define GST_IS_MESSAGE(obj) (GST_IS_MINI_OBJECT_TYPE (obj, GST_TYPE_MESSAGE))
*/
#define GST_MESSAGE_TYPE(message) (GST_MESSAGE_CAST(message)->type)
/**
+ * GST_MESSAGE_TYPE_IS_EXTENDED:
+ * @message: a #GstMessage
+ *
+ * Check if the message is in the extended message group
+ * (Since 1.4)
+ */
+#define GST_MESSAGE_TYPE_IS_EXTENDED(message) (!!(GST_MESSAGE_CAST(message)->type & GST_MESSAGE_EXTENDED))
+
+/**
* GST_MESSAGE_TYPE_NAME:
* @message: a #GstMessage
*
* posted on the bus.
*
* The type of a %GST_MESSAGE_PROGRESS. The progress messages inform the
- * application of the status of assynchronous tasks.
+ * application of the status of asynchronous tasks.
*/
typedef enum {
GST_PROGRESS_TYPE_START = 0,
* in some cases), and the reference counts are updated appropriately (the old
* message is unreffed, the new one is reffed).
*
- * Either @new_message or the #GstMessage pointed to by @old_message may be NULL.
+ * Either @new_message or the #GstMessage pointed to by @old_message may be %NULL.
*
- * Returns: TRUE if @new_message was different from @old_message
+ * Returns: %TRUE if @new_message was different from @old_message
*/
#ifdef _FOOL_GTK_DOC_
G_INLINE_FUNC gboolean gst_message_replace (GstMessage **old_message, GstMessage *new_message);
GstMessage * gst_message_new_have_context (GstObject * src, GstContext *context) G_GNUC_MALLOC;
void gst_message_parse_have_context (GstMessage *message, GstContext **context);
+/* DEVICE_ADDED */
+GstMessage * gst_message_new_device_added (GstObject * src, GstDevice * device) G_GNUC_MALLOC;
+void gst_message_parse_device_added (GstMessage * message, GstDevice ** device);
+
+/* DEVICE_REMOVED */
+GstMessage * gst_message_new_device_removed (GstObject * src, GstDevice * device) G_GNUC_MALLOC;
+void gst_message_parse_device_removed (GstMessage * message, GstDevice ** device);
+
+
G_END_DECLS
#endif /* __GST_MESSAGE_H__ */