This file contains helper functions to control _GstGVATensorMeta instances.
More...
Go to the source code of this file.
|
struct | _GstGVATensorMeta |
| This struct represents raw tensor metadata and contains instance of parent GstMeta and fields describing inference result tensor. This metadata instances is attached to buffer by gvainference elements. More...
|
|
|
const void * | gva_get_tensor_data (GstStructure *s, gsize *nbytes) |
| This function returns a pointer to the fixed array of tensor bytes. More...
|
|
const GstMetaInfo * | gst_gva_tensor_meta_get_info (void) |
| This function registers, if needed, and returns GstMetaInfo for _GstGVATensorMeta. More...
|
|
GType | gst_gva_tensor_meta_api_get_type (void) |
| This function registers, if needed, and returns a GType for api "GstGVATensorMetaAPI" and associate it with GVA_TENSOR_META_TAG tag. More...
|
|
GstGVATensorMeta * | find_tensor_meta (GstBuffer *buffer, const char *model_name, const char *output_layer) |
| This function searches for first _GstGVATensorMeta instance that satisfies passed parameters. More...
|
|
GstGVATensorMeta * | find_tensor_meta_ext (GstBuffer *buffer, const char *model_name, const char *output_layer, const char *element_id) |
| This function searches for first _GstGVATensorMeta instance that satisfies passed parameters. More...
|
|
This file contains helper functions to control _GstGVATensorMeta instances.
◆ GVALayout
This enum describes model layer layout.
Enumerator |
---|
GVA_LAYOUT_ANY | unspecified layout
|
GVA_LAYOUT_NCHW | NCWH layout
|
GVA_LAYOUT_NHWC | NHWC layout
|
GVA_LAYOUT_NC | NC layout
|
◆ GVAPrecision
This enum describes model layer precision.
Enumerator |
---|
GVA_PRECISION_UNSPECIFIED | default value
|
GVA_PRECISION_FP32 | 32bit floating point value
|
GVA_PRECISION_U8 | unsignned 8bit integer value
|
◆ find_tensor_meta()
GstGVATensorMeta* find_tensor_meta |
( |
GstBuffer * |
buffer, |
|
|
const char * |
model_name, |
|
|
const char * |
output_layer |
|
) |
| |
This function searches for first _GstGVATensorMeta instance that satisfies passed parameters.
- Parameters
-
buffer | GstBuffer* that is searched for metadata |
model_name | substring that should be in _GstGVATensorMeta instance's model_name |
output_layer | substring that should be in _GstGVATensorMeta instance's layer_name |
- Returns
- GstGVATensorMeta* for found instance or NULL if none are found
◆ find_tensor_meta_ext()
GstGVATensorMeta* find_tensor_meta_ext |
( |
GstBuffer * |
buffer, |
|
|
const char * |
model_name, |
|
|
const char * |
output_layer, |
|
|
const char * |
element_id |
|
) |
| |
This function searches for first _GstGVATensorMeta instance that satisfies passed parameters.
- Parameters
-
buffer | GstBuffer* that is searched for metadata |
model_name | substring that should be in _GstGVATensorMeta instance's model_name |
output_layer | substring that should be in _GstGVATensorMeta instance's layer_name |
element_id | element_id substring that should be in _GstGVATensorMeta instance's element_id |
- Returns
- GstGVATensorMeta* for found instance or NULL if none are found
◆ gst_gva_tensor_meta_api_get_type()
GType gst_gva_tensor_meta_api_get_type |
( |
void |
| ) |
|
This function registers, if needed, and returns a GType for api "GstGVATensorMetaAPI" and associate it with GVA_TENSOR_META_TAG tag.
- Returns
- GType type
◆ gst_gva_tensor_meta_get_info()
const GstMetaInfo* gst_gva_tensor_meta_get_info |
( |
void |
| ) |
|
This function registers, if needed, and returns GstMetaInfo for _GstGVATensorMeta.
- Returns
- GstMetaInfo* for registered type
◆ gva_get_tensor_data()
const void* gva_get_tensor_data |
( |
GstStructure * |
s, |
|
|
gsize * |
nbytes |
|
) |
| |
|
inline |
This function returns a pointer to the fixed array of tensor bytes.
- Parameters
-
| s | GstStructure* to get tensor from. It's assumed that tensor data is stored in "data_buffer" field |
[out] | nbytes | pointer to the location to store the number of bytes in returned array |
- Returns
- void* to tensor data as bytes, NULL if s has no "data_buffer" field