Create a copy of the given sample. This will also make a newly allocated copy of the data the source sample contains.
a new copy of sample.
Get the buffer list associated with sample
the buffer list of sample or null when there is no buffer list. The buffer list remains valid as long as sample is valid. If you need to hold on to it for longer than that, take a ref to the buffer list with gst_mini_object_ref ().
Get extra information associated with sample.
the extra info of sample. The info remains valid as long as sample is valid.
Get the segment associated with sample
the segment of sample. The segment remains valid as long as sample is valid.
Tests if you can safely set the buffer and / or buffer list of sample.
Returns a writable copy of sample. If the source sample is
already writable, this will simply return the same sample.
Use this function to ensure that a sample can be safely modified before
making changes to it, for example before calling gst_sample_set_buffer()
If the reference count of the source sample sample is exactly one, the caller
is the sole owner and this function will return the sample object unchanged.
If there is more than one reference on the object, a copy will be made using
gst_sample_copy(). The passed-in sample will be unreffed in that case, and the
caller will now own a reference to the new returned sample object.
In short, this function unrefs the sample in the argument and refs the sample that it returns. Don't access the argument after calling this function unless you have an additional reference to it.
a writable sample which may or may not be the same as sample
Set the buffer list associated with sample. sample must be writable.
Set the info structure associated with sample. sample must be writable,
and info must not have a parent set already.
Set the segment associated with sample. sample must be writable.
Decreases the refcount of the sample. If the refcount reaches 0, the sample will be freed.
Staticnew
A Gst.Sample is a small object containing data, a type, timing and extra arbitrary information.