Global Namespace#

Overview#

// namespaces

namespace GVA;
namespace dlstreamer;
    namespace dlstreamer::detail;
    namespace dlstreamer::param;
    namespace dlstreamer::tensor;
        namespace dlstreamer::tensor::key;

// typedefs

typedef struct _cl_mem* cl_mem;
typedef typedefG_BEGIN_DECLS struct _GstAnalyticsMtd GstAnalyticsKeypointsMtd;
typedef typedefG_BEGIN_DECLS struct _GstGVAJSONMeta GstGVAJSONMeta;
typedef struct _GstGVATensorMeta GstGVATensorMeta;
typedef struct _GstAnalyticsMtd GstAnalyticsODExtMtd;
typedef struct _GstAnalyticsODExtMtdData GstAnalyticsODExtMtdData;

// enums

enum GVALayout;
enum GVAPrecision;
enum GstAnalyticsKeypointDimensions;

// structs

struct GstGVAAudioEventMeta;
struct GstKeypointPair;
struct _GstAnalyticsODExtMtdData;
struct _GstGVAJSONMeta;
struct _GstGVATensorMeta;

// global variables

const dlstreamer::ElementDesc* dlstreamer_elements[];
const bool NEW_METADATA = false;
const GstAnalyticsMtdImpl od_ext_impl = {"object-detection-extended", NULL, {NULL}};

// global functions

GST_ANALYTICS_META_API GstAnalyticsMtdType gst_analytics_keypoints_mtd_get_mtd_type(void);
GST_ANALYTICS_META_API gsize gst_analytics_keypoints_mtd_get_count(const GstAnalyticsKeypointsMtd* handle);
GST_ANALYTICS_META_API GstAnalyticsKeypointDimensions gst_analytics_keypoints_mtd_get_dimension(const GstAnalyticsKeypointsMtd* handle);
GST_ANALYTICS_META_API gsize gst_analytics_keypoints_mtd_get_confidence_count(const GstAnalyticsKeypointsMtd* handle);
GST_ANALYTICS_META_API gsize gst_analytics_keypoints_mtd_get_skeleton_count(const GstAnalyticsKeypointsMtd* handle);

GST_ANALYTICS_META_API gboolean gst_analytics_keypoints_mtd_get_position(
    const GstAnalyticsKeypointsMtd* handle,
    gfloat* position,
    gsize index
);

GST_ANALYTICS_META_API gboolean gst_analytics_keypoints_mtd_get_confidence(
    const GstAnalyticsKeypointsMtd* handle,
    gfloat* confidence,
    gsize index
);

GST_ANALYTICS_META_API gboolean gst_analytics_keypoints_mtd_get_skeleton(
    const GstAnalyticsKeypointsMtd* handle,
    GstKeypointPair* skeleton,
    gsize index
);

GST_ANALYTICS_META_API gboolean gst_analytics_relation_meta_add_keypoints_mtd(
    GstAnalyticsRelationMeta* instance,
    const gsize keypoint_count,
    const GstAnalyticsKeypointDimensions keypoint_dimensions,
    const gfloat* positions,
    const gfloat* confidences,
    const gsize skeleton_count,
    const GstKeypointPair* skeletons,
    GstAnalyticsKeypointsMtd* keypoint_mtd
);

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

GST_EXPORT gboolean register_element_gst_plugin(
    const dlstreamer::ElementDesc* element,
    GstPlugin* plugin
);

GST_EXPORT gboolean register_elements_gst_plugin(
    const dlstreamer::ElementDesc** elements,
    GstPlugin* plugin
);

GstAnalyticsMtdType gst_analytics_od_ext_mtd_get_mtd_type(void);

gboolean gst_analytics_od_ext_mtd_get_rotation(
    const GstAnalyticsODExtMtd* handle,
    gdouble* rotation
);

gboolean gst_analytics_od_ext_mtd_get_class_id(
    const GstAnalyticsODExtMtd* handle,
    gint* class_id
);

GList* gst_analytics_od_ext_mtd_get_params(const GstAnalyticsODExtMtd* handle);

gboolean gst_analytics_od_ext_mtd_add_param(
    const GstAnalyticsODExtMtd* handle,
    GstStructure* s
);

GstStructure* gst_analytics_od_ext_mtd_get_param(
    const GstAnalyticsODExtMtd* handle,
    const gchar* name
);

gboolean gst_analytics_relation_meta_add_od_ext_mtd(
    GstAnalyticsRelationMeta* instance,
    gdouble rotation,
    gint class_id,
    GstAnalyticsODExtMtd* od_ext_mtd
);

gboolean gst_analytics_relation_meta_get_od_ext_mtd(
    GstAnalyticsRelationMeta* meta,
    gint an_meta_id,
    GstAnalyticsODExtMtd* rlt
);

Detailed Documentation#

Typedefs#

typedef typedefG_BEGIN_DECLS struct _GstAnalyticsMtd GstAnalyticsKeypointsMtd

GstAnalyticsKeypointsMtd: @id: Instance identifier. @meta: Instance of #GstAnalyticsRelationMeta where the analysis-metadata identified by @id is stored.

Handle containing data required to use gst_analytics_keypoints_mtd APIs. This type is generally expected to be allocated on the stack.

Since: 1.26

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