mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
docs: specify possibility of a NULL return
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3546>
This commit is contained in:
parent
5e3967fbff
commit
4aeb3def20
5 changed files with 17 additions and 7 deletions
|
@ -746,7 +746,7 @@ _gst_buffer_copy (const GstBuffer * buffer)
|
||||||
* Creates a copy of the given buffer. This will make a newly allocated
|
* Creates a copy of the given buffer. This will make a newly allocated
|
||||||
* copy of the data the source buffer contains.
|
* copy of the data the source buffer contains.
|
||||||
*
|
*
|
||||||
* Returns: (transfer full): a new copy of @buf.
|
* Returns: (transfer full) (nullable): a new copy of @buf if the copy succeeded, %NULL otherwise.
|
||||||
*
|
*
|
||||||
* Since: 1.6
|
* Since: 1.6
|
||||||
*/
|
*/
|
||||||
|
@ -3009,7 +3009,7 @@ gst_clear_buffer (GstBuffer ** buf_ptr)
|
||||||
* Check gst_buffer_copy_deep() if you want to force the data
|
* Check gst_buffer_copy_deep() if you want to force the data
|
||||||
* to be copied to newly allocated memory.
|
* to be copied to newly allocated memory.
|
||||||
*
|
*
|
||||||
* Returns: (transfer full): a new copy of @buf.
|
* Returns: (transfer full) (nullable): a new copy of @buf if the copy succeeded, %NULL otherwise.
|
||||||
*/
|
*/
|
||||||
GstBuffer *
|
GstBuffer *
|
||||||
gst_buffer_copy (const GstBuffer * buf)
|
gst_buffer_copy (const GstBuffer * buf)
|
||||||
|
|
|
@ -567,8 +567,8 @@ gboolean gst_buffer_copy_into (GstBuffer *dest, GstBuffer *src
|
||||||
* that it returns. Don't access the argument after calling this function unless
|
* that it returns. Don't access the argument after calling this function unless
|
||||||
* you have an additional reference to it.
|
* you have an additional reference to it.
|
||||||
*
|
*
|
||||||
* Returns: (transfer full): a writable buffer which may or may not be the
|
* Returns: (transfer full) (nullable): a writable buffer (which may or may not be the
|
||||||
* same as @buf
|
* same as @buf) or %NULL if copying is required but not possible.
|
||||||
*/
|
*/
|
||||||
#define gst_buffer_make_writable(buf) GST_BUFFER_CAST (gst_mini_object_make_writable (GST_MINI_OBJECT_CAST (buf)))
|
#define gst_buffer_make_writable(buf) GST_BUFFER_CAST (gst_mini_object_make_writable (GST_MINI_OBJECT_CAST (buf)))
|
||||||
|
|
||||||
|
|
|
@ -363,7 +363,7 @@ gst_memory_unmap (GstMemory * mem, GstMapInfo * info)
|
||||||
* guaranteed to be writable. @size can be set to -1 to return a copy
|
* guaranteed to be writable. @size can be set to -1 to return a copy
|
||||||
* from @offset to the end of the memory region.
|
* from @offset to the end of the memory region.
|
||||||
*
|
*
|
||||||
* Returns: a new #GstMemory.
|
* Returns: (transfer full) (nullable): a new copy of @mem if the copy succeeded, %NULL otherwise.
|
||||||
*/
|
*/
|
||||||
GstMemory *
|
GstMemory *
|
||||||
gst_memory_copy (GstMemory * mem, gssize offset, gssize size)
|
gst_memory_copy (GstMemory * mem, gssize offset, gssize size)
|
||||||
|
|
|
@ -359,6 +359,16 @@ void gst_memory_resize (GstMemory *mem, gssize offset, gsize siz
|
||||||
#define gst_memory_lock(m,f) gst_mini_object_lock (GST_MINI_OBJECT_CAST (m), (f))
|
#define gst_memory_lock(m,f) gst_mini_object_lock (GST_MINI_OBJECT_CAST (m), (f))
|
||||||
#define gst_memory_unlock(m,f) gst_mini_object_unlock (GST_MINI_OBJECT_CAST (m), (f))
|
#define gst_memory_unlock(m,f) gst_mini_object_unlock (GST_MINI_OBJECT_CAST (m), (f))
|
||||||
#define gst_memory_is_writable(m) gst_mini_object_is_writable (GST_MINI_OBJECT_CAST (m))
|
#define gst_memory_is_writable(m) gst_mini_object_is_writable (GST_MINI_OBJECT_CAST (m))
|
||||||
|
/**
|
||||||
|
* gst_memory_make_writable:
|
||||||
|
* @m: (transfer full): a #GstMemory
|
||||||
|
*
|
||||||
|
* Returns a writable copy of @m. If the source memory is
|
||||||
|
* already writable, this will simply return the same memory.
|
||||||
|
*
|
||||||
|
* Returns: (transfer full) (nullable): a writable memory (which may or may not be the
|
||||||
|
* same as @m) or %NULL if copying is required but not possible.
|
||||||
|
*/
|
||||||
#define gst_memory_make_writable(m) GST_MEMORY_CAST (gst_mini_object_make_writable (GST_MINI_OBJECT_CAST (m)))
|
#define gst_memory_make_writable(m) GST_MEMORY_CAST (gst_mini_object_make_writable (GST_MINI_OBJECT_CAST (m)))
|
||||||
|
|
||||||
/* retrieving data */
|
/* retrieving data */
|
||||||
|
|
|
@ -423,8 +423,8 @@ gst_mini_object_is_writable (const GstMiniObject * mini_object)
|
||||||
*
|
*
|
||||||
* MT safe
|
* MT safe
|
||||||
*
|
*
|
||||||
* Returns: (transfer full): a mini-object (possibly the same pointer) that
|
* Returns: (transfer full) (nullable): a writable mini-object (which may or may not be
|
||||||
* is writable.
|
* the same as @mini_object) or %NULL if copying is required but not possible.
|
||||||
*/
|
*/
|
||||||
GstMiniObject *
|
GstMiniObject *
|
||||||
gst_mini_object_make_writable (GstMiniObject * mini_object)
|
gst_mini_object_make_writable (GstMiniObject * mini_object)
|
||||||
|
|
Loading…
Reference in a new issue