![]() |
![]() |
![]() |
GStreamer 1.0 Core Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
#include <gst/gst.h> GstSample; GstBuffer * gst_sample_get_buffer (GstSample *sample
); GstBufferList * gst_sample_get_buffer_list (GstSample *sample
); GstCaps * gst_sample_get_caps (GstSample *sample
); const GstStructure * gst_sample_get_info (GstSample *sample
); GstSegment * gst_sample_get_segment (GstSample *sample
); void gst_sample_set_buffer_list (GstSample *sample
,GstBufferList *buffer_list
); GstSample * gst_sample_new (GstBuffer *buffer
,GstCaps *caps
,const GstSegment *segment
,GstStructure *info
); GstSample * gst_sample_ref (GstSample *sample
); void gst_sample_unref (GstSample *sample
); GstSample * gst_sample_copy (const GstSample *buf
);
A GstSample is a small object containing data, a type, timing and extra arbitrary information.
typedef struct _GstSample GstSample;
The opaque structure of a GstSample. A sample contains a typed memory block and the associated timing information. It is mainly used to exchange buffers with an application.
GstBuffer * gst_sample_get_buffer (GstSample *sample
);
Get the buffer associated with sample
|
a GstSample |
Returns : |
the buffer of sample or NULL
when there is no buffer. The buffer 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 with gst_buffer_ref() . [transfer none][nullable]
|
GstBufferList * gst_sample_get_buffer_list (GstSample *sample
);
Get the buffer list associated with sample
|
a GstSample |
Returns : |
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() . [transfer none][nullable]
|
Since 1.6
GstCaps * gst_sample_get_caps (GstSample *sample
);
Get the caps associated with sample
|
a GstSample |
Returns : |
the caps of sample or NULL
when there is no caps. The caps remain valid as long as sample is
valid. If you need to hold on to the caps for longer than that,
take a ref to the caps with gst_caps_ref() . [transfer none][nullable]
|
const GstStructure * gst_sample_get_info (GstSample *sample
);
Get extra information associated with sample
.
|
a GstSample |
Returns : |
the extra info of sample .
The info remains valid as long as sample is valid. [transfer none]
|
GstSegment * gst_sample_get_segment (GstSample *sample
);
Get the segment associated with sample
|
a GstSample |
Returns : |
the segment of sample .
The segment remains valid as long as sample is valid. [transfer none]
|
void gst_sample_set_buffer_list (GstSample *sample
,GstBufferList *buffer_list
);
Set the buffer list associated with sample
|
a GstSample |
|
a GstBufferList |
Since 1.6
GstSample * gst_sample_new (GstBuffer *buffer
,GstCaps *caps
,const GstSegment *segment
,GstStructure *info
);
Create a new GstSample with the provided details.
Free-function: gst_sample_unref
|
a GstBuffer, or NULL . [transfer none][allow-none]
|
|
a GstCaps, or NULL . [transfer none][allow-none]
|
|
a GstSegment, or NULL . [transfer none][allow-none]
|
|
a GstStructure, or NULL . [transfer full][allow-none]
|
Returns : |
the new GstSample. gst_sample_unref()
after usage. [transfer full]
|
GstSample * gst_sample_ref (GstSample *sample
);
Increases the refcount of the given sample by one.
|
a GstSample |
Returns : |
sample . [transfer full]
|
void gst_sample_unref (GstSample *sample
);
Decreases the refcount of the sample. If the refcount reaches 0, the sample will be freed.
|
a GstSample. [transfer full] |