GstAnalytics.TensorMeta¶
Fields¶
Name |
Type |
Access |
Description |
|---|---|---|---|
meta |
r/w |
parent |
|
num_tensors |
r/w |
number of tensors |
|
tensors |
r/w |
Methods¶
|
|
|
|
|
|
|
|
|
Details¶
- class GstAnalytics.TensorMeta¶
New in version 1.26.
- get(index)¶
- Parameters:
index (
int) – The number of the tensor to get- Returns:
- Return type:
Retrieves a tensor from the
GstAnalytics.TensorMeta, the index must be smaller than GstAnalytics.TensorMeta.num_tensorsNew in version 1.26.
- get_by_id(id)¶
- Parameters:
id (
int) – A #GQuark identifying tensor-encoding- Returns:
a
GstAnalytics.Tensorwith id matching id. OtherwiseNonewill be returned.- Return type:
Get the first tensor from the
GstAnalytics.TensorMetaidentified 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:
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:
tensor_id (
int) – A #GQuark identifying the tensor-encodingdata_type (
GstAnalytics.TensorDataType) – The data type of the tensororder (
GstAnalytics.TensorDimOrder) – The order of the tensor to read from the memorydims ([
int] orNone) – An optional array of dimensions, whereGObject.G_MAXSIZEmeans ANY.
- Returns:
a matching
GstAnalytics.Tensor, otherwiseNone- Return type:
Get the first tensor from the
GstAnalytics.TensorMetaidentified by tensor_id, matching the reading order, dimensions and the data type and optionally the dimensions. Validate whether theGst.Bufferhas enough size to hold the tensor data.New in version 1.28.
- set(tensors)¶
- Parameters:
tensors ([
GstAnalytics.Tensor]) – An array of poiners toGstAnalytics.Tensor
Sets tensors into the
GstAnalytics.TensorMetaNew in version 1.26.