GstAnalytics.TensorMeta

Fields

Name

Type

Access

Description

meta

Gst.Meta

r/w

parent

num_tensors

int

r/w

number of tensors

tensors

GstAnalytics.Tensor

r/w

Methods

get (index)

get_by_id (id)

get_index_from_id (id)

get_typed_tensor (tensor_id, data_type, order, dims)

set (tensors)

Details

class GstAnalytics.TensorMeta

New in version 1.26.

get(index)
Parameters:

index (int) – The number of the tensor to get

Returns:

a GstAnalytics.Tensor

Return type:

GstAnalytics.Tensor

Retrieves a tensor from the GstAnalytics.TensorMeta, the index must be smaller than GstAnalytics.TensorMeta.num_tensors

New in version 1.26.

get_by_id(id)
Parameters:

id (int) – A #GQuark identifying tensor-encoding

Returns:

a GstAnalytics.Tensor with id matching id. Otherwise None will be returned.

Return type:

GstAnalytics.Tensor or None

Get the first tensor from the GstAnalytics.TensorMeta identified by id.

New in version 1.28.

get_index_from_id(id)
Parameters:

id (int) – The tensor id to look for

Returns:

The index of the tensor inthe meta, or -1 if its not found.

Return type:

int

Finds the first tensor with the requsted ID in the meta

New in version 1.26.

get_typed_tensor(tensor_id, data_type, order, dims)
Parameters:
Returns:

a matching GstAnalytics.Tensor, otherwise None

Return type:

GstAnalytics.Tensor or None

Get the first tensor from the GstAnalytics.TensorMeta identified by tensor_id, matching the reading order, dimensions and the data type and optionally the dimensions. Validate whether the Gst.Buffer has enough size to hold the tensor data.

New in version 1.28.

set(tensors)
Parameters:

tensors ([GstAnalytics.Tensor]) – An array of poiners to GstAnalytics.Tensor

Sets tensors into the GstAnalytics.TensorMeta

New in version 1.26.