Add gst_event_replace() (#327001)

Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstevent.h:
Add gst_event_replace() (#327001)
This commit is contained in:
Tim-Philipp Müller 2006-01-20 11:46:03 +00:00
parent ae957681a7
commit d21b9afd54
3 changed files with 26 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2006-01-20 Tim-Philipp Müller <tim at centricular dot net>
* docs/gst/gstreamer-sections.txt:
* gst/gstevent.h:
Add gst_event_replace() (#327001)
2006-01-20 Wim Taymans <wim@fluendo.com> 2006-01-20 Wim Taymans <wim@fluendo.com>
* gst/gstpad.c: (gst_pad_link_check_compatible_unlocked): * gst/gstpad.c: (gst_pad_link_check_compatible_unlocked):

View file

@ -613,10 +613,11 @@ gst_event_parse_qos
gst_event_parse_seek gst_event_parse_seek
gst_event_parse_tag gst_event_parse_tag
gst_event_ref gst_event_ref
gst_event_unref
gst_event_replace
gst_event_type_get_flags gst_event_type_get_flags
gst_event_type_get_name gst_event_type_get_name
gst_event_type_to_quark gst_event_type_to_quark
gst_event_unref
<SUBSECTION Standard> <SUBSECTION Standard>
GstEventClass GstEventClass
GST_EVENT GST_EVENT

View file

@ -205,6 +205,24 @@ typedef struct _GstEventClass GstEventClass;
*/ */
#define GST_EVENT_IS_SERIALIZED(ev) !!(GST_EVENT_TYPE (ev) & GST_EVENT_TYPE_SERIALIZED) #define GST_EVENT_IS_SERIALIZED(ev) !!(GST_EVENT_TYPE (ev) & GST_EVENT_TYPE_SERIALIZED)
/**
* gst_event_replace:
* @old_event: pointer to a pointer to a #GstEvent to be replaced.
* @new_event: pointer to a #GstEvent that will replace the event pointed to
* by @old_event.
*
* Modifies a pointer to a #GstEvent to point to a different #GstEvent. The
* modification is done atomically (so this is useful for ensuring thread safety
* in some cases), and the reference counts are updated appropriately (the old
* event is unreffed, the new one is reffed).
*
* Either @new_event or the #GstEvent pointed to by @old_event may be NULL.
*
* Since: 0.10.3
*/
#define gst_event_replace(old_event,new_event) \
gst_mini_object_replace ((GstMiniObject **)(old_event), GST_MINI_OBJECT (new_event))
/** /**
* GstSeekType: * GstSeekType:
* @GST_SEEK_TYPE_NONE: no change in position is required * @GST_SEEK_TYPE_NONE: no change in position is required