X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gst%2Fgstmessage.h;h=72b4260064694588706ed0b99b58433bc22d53cd;hb=e10266e3f3cf9b05b69198b1ac6faa9a62840e30;hp=fc73661c763402cf38f3df0a1d3091a322466140;hpb=53ae1b2c9c160a98a338adbb8a7ded0cad8eeebe;p=platform%2Fupstream%2Fgstreamer.git diff --git a/gst/gstmessage.h b/gst/gstmessage.h index fc73661..72b4260 100644 --- a/gst/gstmessage.h +++ b/gst/gstmessage.h @@ -99,6 +99,15 @@ typedef struct _GstMessage GstMessage; * 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. @@ -106,6 +115,7 @@ typedef struct _GstMessage GstMessage; /* 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, @@ -140,6 +150,9 @@ typedef enum 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; @@ -150,6 +163,7 @@ typedef enum #include #include #include +#include #define GST_TYPE_MESSAGE (gst_message_get_type()) #define GST_IS_MESSAGE(obj) (GST_IS_MINI_OBJECT_TYPE (obj, GST_TYPE_MESSAGE)) @@ -174,6 +188,15 @@ typedef enum */ #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 * @@ -389,9 +412,9 @@ gst_message_copy (const GstMessage * msg) * 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); @@ -572,6 +595,15 @@ gboolean gst_message_parse_context_type (GstMessage * message, const gch 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__ */