Global Namespace#

Overview#

// namespaces

namespace GVA;
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

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

GType gst_gva_audio_event_meta_api_get_type(void);

gboolean gst_gva_audio_event_meta_init(
    GstMeta* meta,
    gpointer params,
    GstBuffer* buffer
);

void gst_gva_audio_event_meta_free(GstMeta* meta, GstBuffer* buffer);

gboolean gst_gva_audio_event_meta_transform(
    GstBuffer* dest_buf,
    GstMeta* src_meta,
    GstBuffer* src_buf,
    GQuark type,
    gpointer data
);

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* structure
);

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
);

GType gst_gva_json_meta_api_get_type(void);

gboolean gst_gva_json_meta_init(
    GstMeta* meta,
    gpointer params,
    GstBuffer* buffer
);

gboolean gst_gva_json_meta_transform(
    GstBuffer* dest_buf,
    GstMeta* src_meta,
    GstBuffer* src_buf,
    GQuark type,
    gpointer data
);

void gst_gva_json_meta_free(GstMeta* meta, GstBuffer* buffer);
const GstMetaInfo* gst_gva_json_meta_get_info(void);
gchar* get_json_message(GstGVAJSONMeta* meta);
void set_json_message(GstGVAJSONMeta* meta, const gchar* message);
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);
GType gst_gva_tensor_meta_api_get_type(void);

gboolean gst_gva_tensor_meta_init(
    GstMeta* meta,
    gpointer params,
    GstBuffer* buffer
);

void gst_gva_tensor_meta_free(GstMeta* meta, GstBuffer* buffer);

gboolean gst_gva_tensor_meta_transform(
    GstBuffer* dest_buf,
    GstMeta* src_meta,
    GstBuffer* src_buf,
    GQuark type,
    gpointer data
);

const GstMetaInfo* gst_gva_tensor_meta_get_info(void);

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

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

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#

GstGVAAudioEventMeta* gst_gva_buffer_get_audio_event_meta_id(
    GstBuffer* buffer,
    gint id
)

gst_gva_buffer_get_audio_event_meta_id: @buffer: a #GstBuffer @id: a metadata id

Find the GstGVAAudioEventMeta on @buffer with the given @id.

Buffers can contain multiple GstGVAAudioEventMeta metadata items if multiple events detected in frame.

Returns: (transfer none): the GstGVAAudioEventMeta with @id or NULL when there is no such metadata on @buffer.

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

gst_gva_buffer_add_audio_event_meta: @buffer: a #GstBuffer @event_type: GQuark describing the semantic of the AudioEvent (f.i. a Sound, a Speech, Silence) @start_timestamp: start time stamp of the segment @end_timestamp: end time stamp of the segment

Attaches GstGVAAudioEventMeta metadata to @buffer with the given parameters.

Returns: (transfer none): the GstGVAAudioEventMeta on @buffer.

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

gst_gva_buffer_add_audio_event_meta_id: @buffer: a #GstBuffer @event_type: GQuark describing the semantic of the AudioEvent (f.i. a Sound, a Speech, Silence) @start_timestamp: start time stamp of the segment @end_timestamp: end time stamp of the segment

Attaches GstGVAAudioEventMeta metadata to @buffer with the given parameters.

Returns: (transfer none): the GstGVAAudioEventMeta on @buffer.

void gst_gva_audio_event_meta_add_param(
    GstGVAAudioEventMeta* meta,
    GstStructure* structure
)

gst_gva_audio_event_meta_add_param: @meta: a GstGVAAudioEventMeta @structure: (transfer full): a #GstStructure

Attach element-specific parameters to @meta meant to be used by downstream elements which may handle this event. The name of @structure is used to identify the element these parameters are meant for.

GstGVAAudioEventMeta* gst_gva_buffer_get_audio_event_meta_id(
    GstBuffer* buffer,
    gint id
)

gst_gva_buffer_get_audio_event_meta_id: @buffer: a #GstBuffer @id: a metadata id

Find the GstGVAAudioEventMeta on @buffer with the given @id.

Buffers can contain multiple GstGVAAudioEventMeta metadata items if multiple events detected in frame.

Returns: (transfer none): the GstGVAAudioEventMeta with @id or NULL when there is no such metadata on @buffer.

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

gst_gva_buffer_add_audio_event_meta: @buffer: a #GstBuffer @event_type: GQuark describing the semantic of the AudioEvent (f.i. a Sound, a Speech, Silence) @start_timestamp: start time stamp of the segment @end_timestamp: end time stamp of the segment

Attaches GstGVAAudioEventMeta metadata to @buffer with the given parameters.

Returns: (transfer none): the GstGVAAudioEventMeta on @buffer.

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

gst_gva_buffer_add_audio_event_meta_id: @buffer: a #GstBuffer @event_type: GQuark describing the semantic of the AudioEvent (f.i. a Sound, a Speech, Silence) @start_timestamp: start time stamp of the segment @end_timestamp: end time stamp of the segment

Attaches GstGVAAudioEventMeta metadata to @buffer with the given parameters.

Returns: (transfer none): the GstGVAAudioEventMeta on @buffer.

void gst_gva_audio_event_meta_add_param(
    GstGVAAudioEventMeta* meta,
    GstStructure* s
)

gst_gva_audio_event_meta_add_param: @meta: a GstGVAAudioEventMeta @structure: (transfer full): a #GstStructure

Attach element-specific parameters to @meta meant to be used by downstream elements which may handle this event. The name of @structure is used to identify the element these parameters are meant for.

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

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

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

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

const GstMetaInfo* gst_gva_tensor_meta_get_info(void)

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

Returns:

GstMetaInfo* for registered type

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

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

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