NVIDIA DeepStream SDK API Reference

6.4 Release
nvmsgconv/nvmsgconv.h File Reference

Detailed Description

NVIDIA DeepStream: Message Schema Generation Library Interface

Description: This file specifies the NVIDIA DeepStream message schema generation library interface.

Definition in file nvmsgconv/nvmsgconv.h.

Go to the source code of this file.

Data Structures

struct  NvDsMsg2pCtx
 NvDsMsg2pCtx is structure for library context. More...
 
struct  NvDsMsg2pMetaInfo
 NvDsMsg2pMetaInfo is structure to hold the NvDs metadata related information to be processed to generate payloads More...
 

Typedefs

typedef struct NvDsMsg2pCtx NvDsMsg2pCtx
 NvDsMsg2pCtx is structure for library context. More...
 

Functions

NvDsMsg2pCtxnvds_msg2p_ctx_create (const gchar *file, NvDsPayloadType type)
 This function initializes the library with user defined options mentioned in the file and returns the handle to the context. More...
 
void nvds_msg2p_ctx_destroy (NvDsMsg2pCtx *ctx)
 Release the resources allocated during context creation. More...
 
NvDsPayloadnvds_msg2p_generate (NvDsMsg2pCtx *ctx, NvDsEvent *events, guint size)
 This function will parse the NvDsEventMsgMeta and will generate message payload. More...
 
NvDsPayload ** nvds_msg2p_generate_multiple (NvDsMsg2pCtx *ctx, NvDsEvent *events, guint size, guint *payloadCount)
 This function will parse the NvDsEventMsgMeta and will generate multiple message payloads. More...
 
NvDsPayloadnvds_msg2p_generate_new (NvDsMsg2pCtx *ctx, void *metadataInfo)
 This function will parse the NvDsMsg2pMetaInfo and will generate message payloads. More...
 
NvDsPayload ** nvds_msg2p_generate_multiple_new (NvDsMsg2pCtx *ctx, void *metadataInfo, guint *payloadCount)
 This function will parse the NvDsMsg2pMetaInfo and will generate multiple message payloads. More...
 
void nvds_msg2p_release (NvDsMsg2pCtx *ctx, NvDsPayload *payload)
 This function should be called to release memory allocated for payload. More...
 

Typedef Documentation

◆ NvDsMsg2pCtx

typedef struct NvDsMsg2pCtx NvDsMsg2pCtx

NvDsMsg2pCtx is structure for library context.

Function Documentation

◆ nvds_msg2p_ctx_create()

NvDsMsg2pCtx* nvds_msg2p_ctx_create ( const gchar *  file,
NvDsPayloadType  type 
)

This function initializes the library with user defined options mentioned in the file and returns the handle to the context.

Static fields which should be part of message payload can be added to file instead of frame metadata.

Parameters
[in]filename of file to read static properties from.
[in]typetype of payload to be generated.
Returns
pointer to library context created. This context should be used in other functions of library and should be freed with nvds_msg2p_ctx_destroy

◆ nvds_msg2p_ctx_destroy()

void nvds_msg2p_ctx_destroy ( NvDsMsg2pCtx ctx)

Release the resources allocated during context creation.

Parameters
[in]ctxpointer to library context.

◆ nvds_msg2p_generate()

NvDsPayload* nvds_msg2p_generate ( NvDsMsg2pCtx ctx,
NvDsEvent events,
guint  size 
)

This function will parse the NvDsEventMsgMeta and will generate message payload.

Payload will be combination of static values read from configuration file and dynamic values received in meta. Payload will be generated based on the NvDsPayloadType type provided in context creation (e.g. Deepstream, Custom etc.).

Parameters
[in]ctxpointer to library context.
[in]eventspointer to array of event objects.
[in]sizenumber of objects in array.
Returns
pointer to NvDsPayload generated or NULL in case of error. This payload should be freed with nvds_msg2p_release

◆ nvds_msg2p_generate_multiple()

NvDsPayload** nvds_msg2p_generate_multiple ( NvDsMsg2pCtx ctx,
NvDsEvent events,
guint  size,
guint *  payloadCount 
)

This function will parse the NvDsEventMsgMeta and will generate multiple message payloads.

Payloads will be combination of static values read from configuration file and dynamic values received in meta. Payloads will be generated based on the NvDsPayloadType type provided in context creation (e.g. Deepstream, Custom etc.).

Parameters
[in]ctxpointer to library context.
[in]eventspointer to array of event objects.
[in]sizenumber of objects in array.
[out]payloadCountnumber of payloads being returned by the function.
Returns
pointer to array of NvDsPayload pointers generated or NULL in case of error. The number of payloads in the array is returned through payloadCount. This pointer should be freed by calling g_free() and the individual payloads should be freed with nvds_msg2p_release

◆ nvds_msg2p_generate_multiple_new()

NvDsPayload** nvds_msg2p_generate_multiple_new ( NvDsMsg2pCtx ctx,
void *  metadataInfo,
guint *  payloadCount 
)

This function will parse the NvDsMsg2pMetaInfo and will generate multiple message payloads.

Payloads will be combination of static values read from configuration file and the deepstream metadata fields passed NvDsMsg2pMetaInfo Payloads will be generated based on the NvDsPayloadType type provided in context creation (e.g. Deepstream, Custom etc.).

Parameters
[in]ctxpointer to library context.
[in]pointerto type NvDsMsg2pMetaInfo
[out]payloadCountnumber of payloads being returned by the function.
Returns
pointer to array of NvDsPayload pointers generated or NULL in case of error. The number of payloads in the array is returned through payloadCount. This pointer should be freed by calling g_free() and the individual payloads should be freed with nvds_msg2p_release

◆ nvds_msg2p_generate_new()

NvDsPayload* nvds_msg2p_generate_new ( NvDsMsg2pCtx ctx,
void *  metadataInfo 
)

This function will parse the NvDsMsg2pMetaInfo and will generate message payloads.

Payloads will be combination of static values read from configuration file and the deepstream metadata fields passed NvDsMsg2pMetaInfo Payloads will be generated based on the NvDsPayloadType type provided in context creation (e.g. Deepstream, Custom etc.).

Parameters
[in]ctxpointer to library context.
[in]pointerto type NvDsMsg2pMetaInfo
Returns
pointer to NvDsPayload generated or NULL in case of error. This payload should be freed with nvds_msg2p_release

◆ nvds_msg2p_release()

void nvds_msg2p_release ( NvDsMsg2pCtx ctx,
NvDsPayload payload 
)

This function should be called to release memory allocated for payload.

Parameters
[in]ctxpointer to library context.
[in]payloadpointer to object that needs to be released.