mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 11:11:08 +00:00
message: add gst_message_take()
This makes its API consistent with the other GstMiniObject subclasses
This commit is contained in:
parent
00b358d461
commit
ef1438f847
1 changed files with 22 additions and 0 deletions
|
@ -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 */
|
||||
|
||||
|
|
Loading…
Reference in a new issue