mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 11:32:38 +00:00
sample: Add gst_sample_copy()
https://bugzilla.gnome.org/show_bug.cgi?id=706454
This commit is contained in:
parent
f90f3cde5f
commit
facf73ad8d
1 changed files with 22 additions and 0 deletions
|
@ -96,6 +96,28 @@ gst_sample_unref (GstSample * sample)
|
|||
gst_mini_object_unref (GST_MINI_OBJECT_CAST (sample));
|
||||
}
|
||||
|
||||
/* copy sample */
|
||||
/**
|
||||
* gst_sample_copy:
|
||||
* @buf: a #GstSample.
|
||||
*
|
||||
* Create a copy of the given sample. This will also make a newly allocated
|
||||
* copy of the data the source sample contains.
|
||||
*
|
||||
* Returns: (transfer full): a new copy of @buf.
|
||||
*
|
||||
* Since: 1.2
|
||||
*/
|
||||
#ifdef _FOOL_GTK_DOC_
|
||||
G_INLINE_FUNC GstSample * gst_sample_copy (const GstSample * buf);
|
||||
#endif
|
||||
|
||||
static inline GstSample *
|
||||
gst_sample_copy (const GstSample * buf)
|
||||
{
|
||||
return GST_SAMPLE_CAST (gst_mini_object_copy (GST_MINI_OBJECT_CONST_CAST (buf)));
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_value_set_sample:
|
||||
* @v: a #GValue to receive the data
|
||||
|
|
Loading…
Reference in a new issue