![]() |
![]() |
![]() |
GStreamer 0.11 Core Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <gst/gst.h> GstSample; GstBuffer * gst_sample_get_buffer (GstSample *sample
); GstCaps * gst_sample_get_caps (GstSample *sample
); const GstStructure * gst_sample_get_info (GstSample *sample
); GstSegment * gst_sample_get_segment (GstSample *sample
); 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
); #define gst_value_get_sample (v) #define gst_value_set_sample (v, b) #define gst_value_take_sample (v, b)
A GstSample is a small object containing data, a type, timing and extra arbitrary information.
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. [transfer none]
|
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. [transfer none]
|
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]
|
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 |
|
a GstCaps |
|
a GstSegment |
|
a GstStructure |
Returns : |
the new GstSample. gst_sample_unref()
after usage. [transfer full]
|
Since 0.10.24
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] |
#define gst_value_get_sample(v) GST_SAMPLE_CAST (g_value_get_boxed(v))
Receives a GstSample as the value of v
. Does not return a reference to
the sample, so the pointer is only valid for as long as the caller owns
a reference to v
.
|
a GValue to query |
Returns : |
sample. [transfer none] |
#define gst_value_set_sample(v,b) g_value_set_boxed((v),(b))
Sets b
as the value of v
. Caller retains reference to sample.
|
a GValue to receive the data |
|
a GstSample to assign to the GstValue. [transfer none] |
#define gst_value_take_sample(v,b) g_value_take_boxed(v,(b))
Sets b
as the value of v
. Caller gives away reference to sample.
|
a GValue to receive the data |
|
a GstSample to assign to the GstValue. [transfer full] |