Gst.Sample

Fields

None

Methods

class

new (buffer, caps, segment, info)

get_buffer ()

get_buffer_list ()

get_caps ()

get_info ()

get_segment ()

set_buffer (buffer)

set_buffer_list (buffer_list)

set_caps (caps)

set_info (info)

set_segment (segment)

Details

class Gst.Sample

A Gst.Sample is a small object containing data, a type, timing and extra arbitrary information.

classmethod new(buffer, caps, segment, info)[source]
Parameters:
Returns:

the new Gst.Sample. gst_sample_unref() after usage.

Return type:

Gst.Sample

Create a new Gst.Sample with the provided details.

Free-function: gst_sample_unref

get_buffer()[source]
Returns:

the buffer of self or None when there is no buffer. The buffer remains valid as long as self is valid. If you need to hold on to it for longer than that, take a ref to the buffer with gst_buffer_ref().

Return type:

Gst.Buffer or None

Get the buffer associated with self

get_buffer_list()[source]
Returns:

the buffer list of self or None when there is no buffer list. The buffer list remains valid as long as self 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 ().

Return type:

Gst.BufferList or None

Get the buffer list associated with self

New in version 1.6.

get_caps()[source]
Returns:

the caps of self or None when there is no caps. The caps remain valid as long as self 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().

Return type:

Gst.Caps or None

Get the caps associated with self

get_info()[source]
Returns:

the extra info of self. The info remains valid as long as self is valid.

Return type:

Gst.Structure or None

Get extra information associated with self.

get_segment()[source]
Returns:

the segment of self. The segment remains valid as long as self is valid.

Return type:

Gst.Segment

Get the segment associated with self

set_buffer(buffer)[source]
Parameters:

buffer (Gst.Buffer) – A Gst.Buffer

Set the buffer associated with self. self must be writable.

New in version 1.16.

set_buffer_list(buffer_list)[source]
Parameters:

buffer_list (Gst.BufferList) – a Gst.BufferList

Set the buffer list associated with self. self must be writable.

New in version 1.6.

set_caps(caps)[source]
Parameters:

caps (Gst.Caps) – A Gst.Caps

Set the caps associated with self. self must be writable.

New in version 1.16.

set_info(info)[source]
Parameters:

info (Gst.Structure) – A Gst.Structure

Return type:

bool

Set the info structure associated with self. self must be writable, and info must not have a parent set already.

New in version 1.16.

set_segment(segment)[source]
Parameters:

segment (Gst.Segment) – A Gst.Segment

Set the segment associated with self. self must be writable.

New in version 1.16.