mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
gst/gstutils.c (gst_util_seqnum_next): Refactor for clarity.
Original commit message from CVS: 2008-11-04 Andy Wingo <wingo@pobox.com> * gst/gstutils.c (gst_util_seqnum_next): Refactor for clarity. Also add API: to previous changelog entry.
This commit is contained in:
parent
5f5fbbdd7d
commit
1f1d642981
2 changed files with 15 additions and 9 deletions
17
ChangeLog
17
ChangeLog
|
@ -1,15 +1,24 @@
|
|||
2008-11-04 Andy Wingo <wingo@pobox.com>
|
||||
|
||||
* gst/gstutils.c (gst_util_seqnum_next): Refactor for clarity.
|
||||
|
||||
2008-11-04 Andy Wingo <wingo@pobox.com>
|
||||
|
||||
Add sequence numbers to events and messages. See #559250.
|
||||
|
||||
* gst/gstutils.c (gst_util_seqnum_next, gst_util_seqnum_compare):
|
||||
API: New functions.
|
||||
|
||||
* gst/gstevent.h:
|
||||
* gst/gstevent.c (_gst_event_copy, gst_event_new): Initialize new
|
||||
events with a new sequence number, and copy it when copying.
|
||||
(gst_event_get_seqnum, gst_event_set_seqnum): Accessors for an
|
||||
event's sequence number.
|
||||
(gst_event_get_seqnum, gst_event_set_seqnum): API: Accessors for
|
||||
an event's sequence number.
|
||||
|
||||
* gst/gstmessage.h:
|
||||
* gst/gstmessage.c (_gst_message_copy, gst_message_new_custom):
|
||||
(gst_event_get_seqnum, gst_event_set_seqnum): As with events, so
|
||||
with messages.
|
||||
(gst_event_get_seqnum, gst_event_set_seqnum): API: As with events,
|
||||
so with messages.
|
||||
|
||||
* docs/gst/gstreamer-sections.txt: Add new functions to the docs.
|
||||
|
||||
|
|
|
@ -594,11 +594,8 @@ overflow:
|
|||
guint32
|
||||
gst_util_seqnum_next (void)
|
||||
{
|
||||
static gint counter = -1;
|
||||
gint ret;
|
||||
|
||||
ret = g_atomic_int_exchange_and_add (&counter, 1);
|
||||
return (guint32) (ret + 1);
|
||||
static gint counter = 0;
|
||||
return g_atomic_int_exchange_and_add (&counter, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue