NVIDIA DeepStream SDK API Reference

9.1 Release
9.1/sources/libs/nvmsgconv_mega2d/nvmsgconv.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
26 #ifndef NVMSGCONV_H_
27 #define NVMSGCONV_H_
28 
29 #include "nvdsmeta_schema.h"
30 #include <glib.h>
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 
40 typedef struct NvDsMsg2pCtx {
43 
45  gpointer privData;
46 } NvDsMsg2pCtx;
47 
53 typedef struct {
55  void* objMeta;
57  void* frameMeta;
59  gchar* mediaType;
61  // abiRefDataMap* typecasted to void*
62  // NvDs3D_Find1stDataMap() will be used to get this pointer
63  // in LL library, we can:
64  void* datamap;
66 
80 NvDsMsg2pCtx* nvds_msg2p_ctx_create(const gchar* file, NvDsPayloadType type);
81 
88 
103 NvDsPayload* nvds_msg2p_generate(NvDsMsg2pCtx* ctx, NvDsEvent* events, guint size);
104 
122 NvDsPayload** nvds_msg2p_generate_multiple(NvDsMsg2pCtx* ctx, NvDsEvent* events, guint size, guint* payloadCount);
123 
137 NvDsPayload* nvds_msg2p_generate_new(NvDsMsg2pCtx* ctx, void* metadataInfo);
138 
155 NvDsPayload** nvds_msg2p_generate_multiple_new(NvDsMsg2pCtx* ctx, void* metadataInfo, guint* payloadCount);
156 
163 void nvds_msg2p_release(NvDsMsg2pCtx* ctx, NvDsPayload* payload);
164 
165 #ifdef __cplusplus
166 }
167 #endif
168 #endif /* NVMSGCONV_H_ */
NvDsPayload
Holds payload metadata.
Definition: sources/includes/nvdsmeta_schema.h:488
NvDsMsg2pCtx
struct NvDsMsg2pCtx NvDsMsg2pCtx
NvDsMsg2pCtx is structure for library context.
NvDsMsg2pCtx::payloadType
NvDsPayloadType payloadType
type of payload to be generated.
Definition: sources/libs/nvmsgconv/nvmsgconv.h:42
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.
_NvDsEvent
Holds event information.
Definition: sources/includes/nvdsmeta_schema.h:468
NvDsPayloadType
NvDsPayloadType
Defines payload type flags.
Definition: sources/includes/nvdsmeta_schema.h:95
NvDsMsg2pCtx::privData
gpointer privData
private to component.
Definition: sources/libs/nvmsgconv/nvmsgconv.h:45
nvds_msg2p_release
void nvds_msg2p_release(NvDsMsg2pCtx *ctx, NvDsPayload *payload)
This function should be called to release memory allocated for payload.
NvDsMsg2pMetaInfo
NvDsMsg2pMetaInfo is structure to hold the NvDs metadata related information to be processed to gener...
Definition: sources/libs/nvmsgconv/nvmsgconv.h:53
NvDsMsg2pCtx
NvDsMsg2pCtx is structure for library context.
Definition: sources/libs/nvmsgconv/nvmsgconv.h:40
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...
nvds_msg2p_ctx_destroy
void nvds_msg2p_ctx_destroy(NvDsMsg2pCtx *ctx)
Release the resources allocated during context creation.
nvds_msg2p_generate_new
NvDsPayload * nvds_msg2p_generate_new(NvDsMsg2pCtx *ctx, void *metadataInfo)
This function will parse the NvDsMsg2pMetaInfo and will generate message payloads.
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.
nvds_msg2p_generate
NvDsPayload * nvds_msg2p_generate(NvDsMsg2pCtx *ctx, NvDsEvent *events, guint size)
This function will parse the NvDsEventMsgMeta and will generate message payload.