GstSample

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

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.

Gst.Sample

The opaque structure of a Gst.Sample. A sample contains a typed memory block and the associated timing information. It is mainly used to exchange buffers with an application.

Gst.Sample

The opaque structure of a Gst.Sample. A sample contains a typed memory block and the associated timing information. It is mainly used to exchange buffers with an application.

Gst.Sample

The opaque structure of a Gst.Sample. A sample contains a typed memory block and the associated timing information. It is mainly used to exchange buffers with an application.

Constructors

gst_sample_new

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

Parameters:

buffer ( [transfer: none] [allow-none] ) –

a GstBuffer, or NULL

caps ( [transfer: none] [allow-none] ) –

a GstCaps, or NULL

segment ( [transfer: none] [allow-none] ) –

a GstSegment, or NULL

info ( [transfer: full] [allow-none] ) –

a GstStructure, or NULL

Returns ( [transfer: full] ) –

the new GstSample. gst_sample_unref after usage.

Gst.Sample.new

def Gst.Sample.new (buffer, caps, segment, info):
    #python wrapper for 'gst_sample_new'

Create a new Gst.Sample with the provided details.

Free-function: gst_sample_unref

Parameters:

buffer ( Gst.Buffer ) –

a Gst.Buffer, or None

caps ( Gst.Caps ) –

a Gst.Caps, or None

segment ( Gst.Segment ) –

a Gst.Segment, or None

info ( Gst.Structure ) –

a Gst.Structure, or None

Returns ( Gst.Sample ) –

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

Gst.Sample

Gst.Sample
Gst.Sample (Gst.Buffer,
            Gst.Caps,
            Gst.Segment,
            Gst.Structure)

Create a new Gst.Sample with the provided details.

Free-function: gst_sample_unref

Parameters:

buffer

a Gst.Buffer, or null

caps

a Gst.Caps, or null

segment

a Gst.Segment, or null

info

a Gst.Structure, or null

Returns

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

Gst.prototype.new

function Gst.prototype.new(buffer: Gst.Buffer, caps: Gst.Caps, segment: Gst.Segment, info: Gst.Structure): {
    // javascript wrapper for 'gst_sample_new'
}

Create a new Gst.Sample with the provided details.

Free-function: gst_sample_unref

Parameters:

buffer ( Gst.Buffer ) –

a Gst.Buffer, or null

caps ( Gst.Caps ) –

a Gst.Caps, or null

segment ( Gst.Segment ) –

a Gst.Segment, or null

info ( Gst.Structure ) –

a Gst.Structure, or null

Returns ( Gst.Sample ) –

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

Methods

gst_sample_get_buffer

GstBuffer *
gst_sample_get_buffer (GstSample * sample)

Get the buffer associated with sample

Parameters:

sample

a GstSample

Returns ( [transfer: none] [nullable] ) –

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.

Gst.Sample.get_buffer

def Gst.Sample.get_buffer (self):
    #python wrapper for 'gst_sample_get_buffer'

Get the buffer associated with sample

Parameters:

sample ( Gst.Sample ) –

a Gst.Sample

Returns ( Gst.Buffer ) –

the buffer of sample or None 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 (not introspectable).

Gst.prototype.get_buffer

function Gst.prototype.get_buffer(): {
    // javascript wrapper for 'gst_sample_get_buffer'
}

Get the buffer associated with sample

Parameters:

sample ( Gst.Sample ) –

a Gst.Sample

Returns ( Gst.Buffer ) –

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 (not introspectable).

gst_sample_get_buffer_list

GstBufferList *
gst_sample_get_buffer_list (GstSample * sample)

Get the buffer list associated with sample

Parameters:

sample

a GstSample

Returns ( [transfer: none] [nullable] ) –

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 ().

Since : 1.6

Gst.Sample.get_buffer_list

def Gst.Sample.get_buffer_list (self):
    #python wrapper for 'gst_sample_get_buffer_list'

Get the buffer list associated with sample

Parameters:

sample ( Gst.Sample ) –

a Gst.Sample

Returns ( Gst.BufferList ) –

the buffer list of sample or None 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 ().

Since : 1.6

Gst.prototype.get_buffer_list

function Gst.prototype.get_buffer_list(): {
    // javascript wrapper for 'gst_sample_get_buffer_list'
}

Get the buffer list associated with sample

Parameters:

sample ( Gst.Sample ) –

a Gst.Sample

Returns ( Gst.BufferList ) –

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 ().

Since : 1.6

gst_sample_get_caps

GstCaps *
gst_sample_get_caps (GstSample * sample)

Get the caps associated with sample

Parameters:

sample

a GstSample

Returns ( [transfer: none] [nullable] ) –

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.

Gst.Sample.get_caps

def Gst.Sample.get_caps (self):
    #python wrapper for 'gst_sample_get_caps'

Get the caps associated with sample

Parameters:

sample ( Gst.Sample ) –

a Gst.Sample

Returns ( Gst.Caps ) –

the caps of sample or None 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 (not introspectable).

Gst.prototype.get_caps

function Gst.prototype.get_caps(): {
    // javascript wrapper for 'gst_sample_get_caps'
}

Get the caps associated with sample

Parameters:

sample ( Gst.Sample ) –

a Gst.Sample

Returns ( Gst.Caps ) –

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 (not introspectable).

gst_sample_get_info

const GstStructure *
gst_sample_get_info (GstSample * sample)

Get extra information associated with sample.

Parameters:

sample

a GstSample

Returns ( [transfer: none] ) –

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

Gst.Sample.get_info

def Gst.Sample.get_info (self):
    #python wrapper for 'gst_sample_get_info'

Get extra information associated with sample.

Parameters:

sample ( Gst.Sample ) –

a Gst.Sample

Returns ( Gst.Structure ) –

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

Gst.prototype.get_info

function Gst.prototype.get_info(): {
    // javascript wrapper for 'gst_sample_get_info'
}

Get extra information associated with sample.

Parameters:

sample ( Gst.Sample ) –

a Gst.Sample

Returns ( Gst.Structure ) –

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

gst_sample_get_segment

GstSegment *
gst_sample_get_segment (GstSample * sample)

Get the segment associated with sample

Parameters:

sample

a GstSample

Returns ( [transfer: none] ) –

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

Gst.Sample.get_segment

def Gst.Sample.get_segment (self):
    #python wrapper for 'gst_sample_get_segment'

Get the segment associated with sample

Parameters:

sample ( Gst.Sample ) –

a Gst.Sample

Returns ( Gst.Segment ) –

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

Gst.prototype.get_segment

function Gst.prototype.get_segment(): {
    // javascript wrapper for 'gst_sample_get_segment'
}

Get the segment associated with sample

Parameters:

sample ( Gst.Sample ) –

a Gst.Sample

Returns ( Gst.Segment ) –

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

gst_sample_set_buffer_list

gst_sample_set_buffer_list (GstSample * sample,
                            GstBufferList * buffer_list)

Set the buffer list associated with sample

Parameters:

sample

a GstSample

buffer_list

a GstBufferList

Since : 1.6

Gst.Sample.set_buffer_list

def Gst.Sample.set_buffer_list (self, buffer_list):
    #python wrapper for 'gst_sample_set_buffer_list'

Set the buffer list associated with sample

Parameters:

sample ( Gst.Sample ) –

a Gst.Sample

buffer_list ( Gst.BufferList ) –

a Gst.BufferList

Since : 1.6

Gst.prototype.set_buffer_list

function Gst.prototype.set_buffer_list(buffer_list: Gst.BufferList): {
    // javascript wrapper for 'gst_sample_set_buffer_list'
}

Set the buffer list associated with sample

Parameters:

sample ( Gst.Sample ) –

a Gst.Sample

buffer_list ( Gst.BufferList ) –

a Gst.BufferList

Since : 1.6

Properties

Buffer

Gst.Buffer Buffer { get;  }

Get the buffer associated with sample

Flags : Read

BufferList

Gst.BufferList BufferList { get; set;  }

Get the buffer list associated with sample

Flags : Read / Write

Caps

Gst.Caps Caps { get;  }

Get the caps associated with sample

Flags : Read

Info

Gst.Structure Info { get;  }

Get extra information associated with sample.

Flags : Read

Segment

Gst.Segment Segment { get;  }

Get the segment associated with sample

Flags : Read

Function Macros

GST_IS_SAMPLE

#define GST_IS_SAMPLE(obj)   (GST_IS_MINI_OBJECT_TYPE(obj, GST_TYPE_SAMPLE))

GST_SAMPLE_CAST

#define GST_SAMPLE_CAST(obj) ((GstSample *)obj)

GST_SAMPLE

#define GST_SAMPLE(obj)      (GST_SAMPLE_CAST(obj))

gst_value_set_sample

#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.

Parameters:

v

a GValue to receive the data

b ( [transfer: none] ) –

a GstSample to assign to the GstValue

gst_value_take_sample

#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.

Parameters:

v

a GValue to receive the data

b ( [transfer: full] ) –

a GstSample to assign to the GstValue

gst_value_get_sample

#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.

Parameters:

v

a GValue to query

Returns ( [transfer: none] ) –

sample

Constants

GST_TYPE_SAMPLE

#define GST_TYPE_SAMPLE      (_gst_sample_type)

The results of the search are