2005-10-07 Andy Wingo <wingo@pobox.com>
+ * docs/gst/gstreamer-sections.txt: Update.
+
+ * gst/gstmessage.c (gst_message_new_application): Made into a
+ function like honest API calls.
+ (gst_message_new_element): New message type.
+
+ * gst/gstmessage.h (enum): Add GST_MESSAGE_ELEMENT type.
+
* check/elements/fakesrc.c (test_no_preroll): New check, checks
that setting a live fakesrc to PAUSED returns NO_PREROLL both
times.
}
/**
+ * gst_message_new_application:
+ * @src: The object originating the message.
+ * @structure: The structure for the message. The message will take ownership of
+ * the structure.
+ *
+ * Create a new application-typed message. GStreamer will never create these
+ * messages; they are a gift from us to you. Enjoy.
+ *
+ * MT safe.
+ */
+GstMessage *
+gst_message_new_application (GstObject * src, GstStructure * structure)
+{
+ return gst_message_new_custom (GST_MESSAGE_APPLICATION, src, structure);
+}
+
+/**
+ * gst_message_new_element:
+ * @src: The object originating the message.
+ * @structure: The structure for the message. The message will take ownership of
+ * the structure.
+ *
+ * Create a new element-specific message. This is meant as a generic way of
+ * allowing one-way communication from an element to an application, for example
+ * "the firewire cable was unplugged". The format of the message should be
+ * documented in the element's documentation. The structure field can be NULL.
+ *
+ * MT safe.
+ */
+GstMessage *
+gst_message_new_element (GstObject * src, GstStructure * structure)
+{
+ return gst_message_new_custom (GST_MESSAGE_ELEMENT, src, structure);
+}
+
+/**
* gst_message_new_custom:
* @type: The #GstMessageType to distinguish messages
* @src: The object originating the message.
* stops, errors, etc..
* @GST_MESSAGE_APPLICATION: message posted by the application, possibly
* via an application-specific element.
+ * @GST_MESSAGE_ELEMENT: element-specific message, see the specific element's
+ * documentation
* @GST_MESSAGE_SEGMENT_START: pipeline started playback of a segment.
* @GST_MESSAGE_SEGMENT_DONE: pipeline completed playback of a segment.
* @GST_MESSAGE_ANY: mask for all of the above messages.
GST_MESSAGE_STRUCTURE_CHANGE = (1 << 9),
GST_MESSAGE_STREAM_STATUS = (1 << 10),
GST_MESSAGE_APPLICATION = (1 << 11),
- GST_MESSAGE_SEGMENT_START = (1 << 12),
- GST_MESSAGE_SEGMENT_DONE = (1 << 13),
+ GST_MESSAGE_ELEMENT = (1 << 12),
+ GST_MESSAGE_SEGMENT_START = (1 << 13),
+ GST_MESSAGE_SEGMENT_DONE = (1 << 14),
GST_MESSAGE_ANY = 0xffffffff
} GstMessageType;
GstState new_state);
GstMessage * gst_message_new_segment_start (GstObject * src, GstClockTime timestamp);
GstMessage * gst_message_new_segment_done (GstObject * src, GstClockTime timestamp);
+GstMessage * gst_message_new_application (GstObject * src, GstStructure * structure);
+GstMessage * gst_message_new_element (GstObject * src, GstStructure * structure);
GstMessage * gst_message_new_custom (GstMessageType type,
GstObject * src,
GstStructure * structure);
-/**
- * gst_message_new_application:
- * @src: The object originating the message.
- * @str: The structure for the message. The message will take ownership of
- * the structure.
- *
- * Create a new application-typed message. This can be used for anything not
- * handled by other message-specific functions to pass a message to the
- * app. The structure field can be NULL.
- *
- * MT safe.
- */
-#define gst_message_new_application(src, str) \
- gst_message_new_custom (GST_MESSAGE_APPLICATION, src, str)
-
void gst_message_parse_error (GstMessage *message, GError **gerror, gchar **debug);
void gst_message_parse_warning (GstMessage *message, GError **gerror, gchar **debug);
void gst_message_parse_tag (GstMessage *message, GstTagList **tag_list);