From: Niels De Graef Date: Mon, 5 Nov 2018 07:57:16 +0000 (+0100) Subject: message: add gst_message_take() X-Git-Tag: 1.16.2~215 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ef1438f847b1419c4a42c7e5e0df5d4ded4e44c0;p=platform%2Fupstream%2Fgstreamer.git message: add gst_message_take() This makes its API consistent with the other GstMiniObject subclasses --- diff --git a/gst/gstmessage.h b/gst/gstmessage.h index ba5e4e9..26a258d 100644 --- a/gst/gstmessage.h +++ b/gst/gstmessage.h @@ -457,6 +457,28 @@ gst_message_replace (GstMessage **old_message, GstMessage *new_message) return gst_mini_object_replace ((GstMiniObject **) old_message, (GstMiniObject *) new_message); } +/** + * gst_message_take: + * @old_message: (inout) (transfer full): pointer to a pointer to a #GstMessage + * to be replaced. + * @new_message: (transfer full) (allow-none): pointer to a #GstMessage that + * will replace the message pointed to by @old_message. + * + * Modifies a pointer to a #GstMessage to point to a different #GstMessage. This + * function is similar to gst_message_replace() except that it takes ownership + * of @new_message. + * + * Returns: %TRUE if @new_message was different from @old_message + * + * Since: 1.16 + */ +static inline gboolean +gst_message_take (GstMessage **old_message, GstMessage *new_message) +{ + return gst_mini_object_take ((GstMiniObject **) old_message, + (GstMiniObject *) new_message); +} + /* custom messages */