From 3b19336fcc98a6462aef4a408d1b5b6c78136fdb Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Wed, 20 Jul 2005 11:35:18 +0000 Subject: [PATCH] gst/gstmessage.*: Add _new_custom, make _new_application a macro to _new_custom. 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 | 6 ++++++ gst/gstmessage.c | 12 +++++++----- gst/gstmessage.h | 6 +++++- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index c296dd1..f8c0736 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-07-20 Ronald S. Bultje + + * 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 * gst/base/gstbasesrc.c: (gst_base_src_init), diff --git a/gst/gstmessage.c b/gst/gstmessage.c index 5d4731e..c7cd465 100644 --- a/gst/gstmessage.c +++ b/gst/gstmessage.c @@ -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; diff --git a/gst/gstmessage.h b/gst/gstmessage.h index 054e3c0..29c9e8b 100644 --- a/gst/gstmessage.h +++ b/gst/gstmessage.h @@ -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); -- 2.7.4