gst/gstmessage.*: Add _new_custom, make _new_application a macro to _new_custom.
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>
Wed, 20 Jul 2005 11:35:18 +0000 (11:35 +0000)
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>
Wed, 20 Jul 2005 11:35:18 +0000 (11:35 +0000)
Original commit message from CVS:
* gst/gstmessage.c: (gst_message_new_custom):
* gst/gstmessage.h:
Add _new_custom, make _new_application a macro to _new_custom.

ChangeLog
gst/gstmessage.c
gst/gstmessage.h

index c296dd1..f8c0736 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-07-20  Ronald S. Bultje  <rbultje@ronald.bitfreak.net>
+
+       * gst/gstmessage.c: (gst_message_new_custom):
+       * gst/gstmessage.h:
+         Add _new_custom, make _new_application a macro to _new_custom.
+
 2005-07-20  Wim Taymans  <wim@fluendo.com>
 
        * gst/base/gstbasesrc.c: (gst_base_src_init),
index 5d4731e..c7cd465 100644 (file)
@@ -314,26 +314,28 @@ gst_message_new_state_changed (GstObject * src, GstElementState old,
 }
 
 /**
- * gst_message_new_application:
+ * gst_message_new_cistom:
  * @src: The object originating the message.
  * @structure: The structure for the message. The message will take ownership of
  * the structure.
  *
- * Create a new application-specific message. These messages can be used by
- * application-specific plugins to pass data to the app.
+ * Create a new custom-typed message. This can be used for anything not
+ * handled by other message-specific functions to pass a message to the
+ * app.
  *
  * Returns: The new message.
  *
  * MT safe.
  */
 GstMessage *
-gst_message_new_application (GstObject * src, GstStructure * structure)
+gst_message_new_custom (GstMessageType type, GstObject * src,
+    GstStructure * structure)
 {
   GstMessage *message;
 
   g_return_val_if_fail (GST_IS_STRUCTURE (structure), NULL);
 
-  message = gst_message_new (GST_MESSAGE_APPLICATION, src);
+  message = gst_message_new (type, src);
   gst_structure_set_parent_refcount (structure, &message->mini_object.refcount);
   message->structure = structure;
 
index 054e3c0..29c9e8b 100644 (file)
@@ -140,7 +140,11 @@ GstMessage *       gst_message_new_warning         (GstObject * src, GError * error, gchar *
 GstMessage *   gst_message_new_tag             (GstObject * src, GstTagList * tag_list);
 GstMessage *   gst_message_new_state_changed   (GstObject * src, GstElementState old_state,
                                                  GstElementState new_state);
-GstMessage *   gst_message_new_application     (GstObject * src, GstStructure *structure);
+GstMessage *   gst_message_new_custom          (GstMessageType type,
+                                                GstObject    * src,
+                                                GstStructure * structure);
+#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);