X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gst%2Fgstbuffer.h;h=c0491fb95b3e89fa2c79f69395b961c837a9ad11;hb=cc6342d853f4252c5d5cf09fff9d3379ad467fbc;hp=2804b520f8b55448d33f8f9e3a33d5a4bdb731fc;hpb=8983cce9f61e54fec05ce09718d06061642635d8;p=platform%2Fupstream%2Fgstreamer.git diff --git a/gst/gstbuffer.h b/gst/gstbuffer.h index 2804b52..c0491fb 100644 --- a/gst/gstbuffer.h +++ b/gst/gstbuffer.h @@ -209,12 +209,12 @@ typedef struct _GstBufferPool GstBufferPool; * is added/removed * @GST_BUFFER_FLAG_SYNC_AFTER: Elements which write to disk or permanent * storage should ensure the data is synced after - * writing the contents of this buffer. (Since 1.6) + * writing the contents of this buffer. (Since: 1.6) * @GST_BUFFER_FLAG_NON_DROPPABLE: This buffer is important and should not be dropped. * This can be used to mark important buffers, e.g. to flag * RTP packets carrying keyframes or codec setup data for RTP * Forward Error Correction purposes, or to prevent still video - * frames from being dropped by elements due to QoS. (Since 1.14) + * frames from being dropped by elements due to QoS. (Since: 1.14) * @GST_BUFFER_FLAG_LAST: additional media specific flags can be added starting from * this flag. * @@ -297,6 +297,8 @@ GstBuffer * gst_buffer_new_wrapped_full (GstMemoryFlags flags, gpointer data, GDestroyNotify notify); GST_API GstBuffer * gst_buffer_new_wrapped (gpointer data, gsize size); +GST_API +GstBuffer * gst_buffer_new_wrapped_bytes (GBytes * bytes); /* memory blocks */ @@ -442,6 +444,25 @@ gst_buffer_unref (GstBuffer * buf) gst_mini_object_unref (GST_MINI_OBJECT_CAST (buf)); } +/** + * gst_clear_buffer: (skip) + * @buf_ptr: a pointer to a #GstBuffer reference + * + * Clears a reference to a #GstBuffer. + * + * @buf_ptr must not be %NULL. + * + * If the reference is %NULL then this function does nothing. Otherwise, the + * reference count of the buffer is decreased and the pointer is set to %NULL. + * + * Since: 1.16 + */ +static inline void +gst_clear_buffer (GstBuffer ** buf_ptr) +{ + gst_clear_mini_object ((GstMiniObject **) buf_ptr); +} + /* copy buffer */ /** * gst_buffer_copy: @@ -479,7 +500,7 @@ GstBuffer * gst_buffer_copy_deep (const GstBuffer * buf); * @GST_BUFFER_COPY_META: flag indicating that buffer meta should be * copied * @GST_BUFFER_COPY_DEEP: flag indicating that memory should always be - * copied instead of reffed (Since 1.2) + * copied instead of reffed (Since: 1.2) * * A set of flags that can be provided to the gst_buffer_copy_into() * function to specify which items should be copied.