Global Namespace#

Overview#

// namespaces

namespace gstgva;
    namespace gstgva::region_of_interest;
    namespace gstgva::tensor;
    namespace gstgva::video_frame;

// typedefs

typedef typedefG_BEGIN_DECLS struct _GstGVAJSONMeta GstGVAJSONMeta;
typedef struct _GstGVATensorMeta GstGVATensorMeta;

// enums

enum GVALayout;
enum GVAPrecision;

// structs

struct GstGVAAudioEventMeta;
struct _GstGVAJSONMeta;
struct _GstGVATensorMeta;

// global functions

GType gst_gva_audio_event_meta_api_get_type(void);
const GstMetaInfo* gst_gva_audio_event_meta_get_info(void);

GstGVAAudioEventMeta* gst_gva_buffer_get_audio_event_meta_id(
    GstBuffer* buffer,
    gint id
);

GstGVAAudioEventMeta* gst_gva_buffer_add_audio_event_meta(
    GstBuffer* buffer,
    const gchar* event_type,
    gulong start_timestamp,
    gulong end_timestamp
);

GstGVAAudioEventMeta* gst_gva_buffer_add_audio_event_meta_id(
    GstBuffer* buffer,
    GQuark event_type,
    gulong start_timestamp,
    gulong end_timestamp
);

void gst_gva_audio_event_meta_add_param(
    GstGVAAudioEventMeta* meta,
    GstStructure* s
);

GstStructure* gst_gva_audio_event_meta_get_param(
    GstGVAAudioEventMeta* meta,
    const gchar* name
);

const GstMetaInfo* gst_gva_json_meta_get_info(void);
GType gst_gva_json_meta_api_get_type(void);
gchar* get_json_message(GstGVAJSONMeta* meta);
void set_json_message(GstGVAJSONMeta* meta, const gchar* message);
const void* gva_get_tensor_data(GstStructure* s, gsize* nbytes);
const GstMetaInfo* gst_gva_tensor_meta_get_info(void);
GType gst_gva_tensor_meta_api_get_type(void);

GstGVATensorMeta* find_tensor_meta(
    GstBuffer* buffer,
    const char* model_name,
    const char* output_layer
);

GstGVATensorMeta* find_tensor_meta_ext(
    GstBuffer* buffer,
    const char* model_name,
    const char* output_layer,
    const char* element_id
);

Detailed Documentation#

Global Functions#

const GstMetaInfo* gst_gva_json_meta_get_info(void)

This function registers, if needed, and returns GstMetaInfo for _GstGVAJSONMeta.

Returns:

const GstMetaInfo* for registered type

GType gst_gva_json_meta_api_get_type(void)

This function registers, if needed, and returns a GType for api “GstGVAJSONMetaAPI” and associate it with GVA_JSON_META_TAG tag.

Returns:

GType type

gchar* get_json_message(GstGVAJSONMeta* meta)

This function returns message field of _GstGVAJSONMeta.

Parameters:

meta

_GstGVAJSONMeta* to retrieve message of

Returns:

C-style string with message

void set_json_message(GstGVAJSONMeta* meta, const gchar* message)

This function sets message field of _GstGVAJSONMeta.

Parameters:

meta

_GstGVAJSONMeta* to set message

message

message

Returns:

void

const void* gva_get_tensor_data(GstStructure* s, gsize* nbytes)

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

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

const GstMetaInfo* gst_gva_tensor_meta_get_info(void)

This function registers, if needed, and returns GstMetaInfo for _GstGVATensorMeta.

Returns:

GstMetaInfo* for registered 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

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

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