mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
gst/: gst_[buffer|event|message]_ref() macros are replaced by a static inline functions because gcc-4.1 will about if...
Original commit message from CVS: * gst/gstbuffer.h: * gst/gstevent.h: * gst/gstmessage.h: gst_[buffer|event|message]_ref() macros are replaced by a static inline functions because gcc-4.1 will about if the return value isn't used. * tests/check/gst/gstevent.c: (event_probe): gst_event_ref now has to be given a GstEvent* , fix check accordingly.
This commit is contained in:
parent
9384cd9051
commit
067db77499
5 changed files with 37 additions and 5 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2006-03-21 Edward Hervey <edward@fluendo.com>
|
||||
|
||||
* gst/gstbuffer.h:
|
||||
* gst/gstevent.h:
|
||||
* gst/gstmessage.h:
|
||||
gst_[buffer|event|message]_ref() macros are replaced by a static
|
||||
inline functions because gcc-4.1 will about if the return value
|
||||
isn't used.
|
||||
* tests/check/gst/gstevent.c: (event_probe):
|
||||
gst_event_ref now has to be given a GstEvent* , fix check accordingly.
|
||||
|
||||
2006-03-20 Jan Schmidt <thaytan@mad.scientist.com>
|
||||
|
||||
* gst/gstutils.h:
|
||||
|
|
|
@ -287,7 +287,14 @@ G_STMT_START { \
|
|||
*
|
||||
* Increases the refcount of the given buffer by one.
|
||||
*/
|
||||
#define gst_buffer_ref(buf) GST_BUFFER_CAST (gst_mini_object_ref (GST_MINI_OBJECT (buf)))
|
||||
static inline GstBuffer *
|
||||
gst_buffer_ref (GstBuffer * buf)
|
||||
{
|
||||
/* not using a macro here because gcc-4.1 will complain
|
||||
* if the return value isn't used (because of the cast) */
|
||||
return (GstBuffer *) gst_mini_object_ref (GST_MINI_OBJECT (buf));
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_buffer_unref:
|
||||
* @buf: a #GstBuffer.
|
||||
|
|
|
@ -325,7 +325,14 @@ GType gst_event_get_type (void);
|
|||
*
|
||||
* Increase the refcount of this event.
|
||||
*/
|
||||
#define gst_event_ref(ev) GST_EVENT (gst_mini_object_ref (GST_MINI_OBJECT (ev)))
|
||||
static inline GstEvent *
|
||||
gst_event_ref (GstEvent * ev)
|
||||
{
|
||||
/* not using a macro here because gcc-4.1 will complain
|
||||
* if the return value isn't used (because of the cast) */
|
||||
return (GstEvent *) gst_mini_object_ref (GST_MINI_OBJECT (ev));
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_event_unref:
|
||||
* @ev: The event to refcount
|
||||
|
|
|
@ -199,7 +199,14 @@ GQuark gst_message_type_to_quark (GstMessageType type);
|
|||
* Convenience macro to increase the reference count of the message. Returns the
|
||||
* reffed message.
|
||||
*/
|
||||
#define gst_message_ref(msg) GST_MESSAGE (gst_mini_object_ref (GST_MINI_OBJECT (msg)))
|
||||
static inline GstMessage *
|
||||
gst_message_ref (GstMessage * msg)
|
||||
{
|
||||
/* not using a macro here because gcc-4.1 will complain
|
||||
* if the return value isn't used (because of the cast) */
|
||||
return (GstMessage *) gst_mini_object_ref (GST_MINI_OBJECT (msg));
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_message_unref:
|
||||
* @msg: the message to unref
|
||||
|
|
|
@ -208,7 +208,7 @@ event_probe (GstPad * pad, GstMiniObject ** data, gpointer user_data)
|
|||
case GST_EVENT_CUSTOM_BOTH_OOB:
|
||||
if (got_event_before_q != NULL)
|
||||
break;
|
||||
gst_event_ref (data);
|
||||
gst_event_ref ((GstEvent *) data);
|
||||
g_get_current_time (&got_event_time);
|
||||
got_event_before_q = GST_EVENT (data);
|
||||
break;
|
||||
|
@ -223,7 +223,7 @@ event_probe (GstPad * pad, GstMiniObject ** data, gpointer user_data)
|
|||
case GST_EVENT_CUSTOM_BOTH_OOB:
|
||||
if (got_event_after_q != NULL)
|
||||
break;
|
||||
gst_event_ref (data);
|
||||
gst_event_ref ((GstEvent *) data);
|
||||
g_get_current_time (&got_event_time);
|
||||
got_event_after_q = GST_EVENT (data);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue