mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-21 15:56:42 +00:00
buffer: Use an inline function instead of a macro for gst_buffer_replace()
This gives us type checks by the compiler and more useful compiler errors.
This commit is contained in:
parent
ef32fd0d15
commit
e8d3870214
1 changed files with 9 additions and 6 deletions
|
@ -460,12 +460,15 @@ GstBuffer* gst_buffer_make_metadata_writable (GstBuffer *buf);
|
||||||
*
|
*
|
||||||
* Either @nbuf or the #GstBuffer pointed to by @obuf may be NULL.
|
* Either @nbuf or the #GstBuffer pointed to by @obuf may be NULL.
|
||||||
*/
|
*/
|
||||||
#define gst_buffer_replace(obuf,nbuf) \
|
#ifdef _FOOL_GTK_DOC_
|
||||||
G_STMT_START { \
|
G_INLINE_FUNC void gst_buffer_replace (GstBuffer **obuf, GstBuffer *nbuf);
|
||||||
GstBuffer **___obufaddr = (GstBuffer **)(obuf); \
|
#endif
|
||||||
gst_mini_object_replace ((GstMiniObject **)___obufaddr, \
|
|
||||||
GST_MINI_OBJECT_CAST (nbuf)); \
|
static inline void
|
||||||
} G_STMT_END
|
gst_buffer_replace (GstBuffer **obuf, GstBuffer *nbuf)
|
||||||
|
{
|
||||||
|
gst_mini_object_replace ((GstMiniObject **) obuf, (GstMiniObject *) nbuf);
|
||||||
|
}
|
||||||
|
|
||||||
GstCaps* gst_buffer_get_caps (GstBuffer *buffer);
|
GstCaps* gst_buffer_get_caps (GstBuffer *buffer);
|
||||||
void gst_buffer_set_caps (GstBuffer *buffer, GstCaps *caps);
|
void gst_buffer_set_caps (GstBuffer *buffer, GstCaps *caps);
|
||||||
|
|
Loading…
Reference in a new issue