NVIDIA DeepStream SDK API Reference

6.1.1 Release

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
gstnvdsmeta.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019-2022, NVIDIA CORPORATION. All rights reserved.
3  *
4  * NVIDIA Corporation and its licensors retain all intellectual property
5  * and proprietary rights in and to this software, related documentation
6  * and any modifications thereto. Any use, reproduction, disclosure or
7  * distribution of this software and related documentation without an express
8  * license agreement from NVIDIA Corporation is strictly prohibited.
9  *
10  */
11 
39 #ifndef GST_NVDS_META_API_H
40 #define GST_NVDS_META_API_H
41 
42 #include <gst/gst.h>
43 #include <gst/video/video.h>
44 #include <gst/base/gstbasetransform.h>
45 
46 #include "nvdsmeta.h"
47 #include "nvds_audio_meta.h"
48 #include "nvds_latency_meta.h"
49 
50 #ifdef __cplusplus
51 extern "C"
52 {
53 #endif
54 GType nvds_meta_api_get_type (void);
55 #define NVDS_META_API_TYPE (nvds_meta_api_get_type())
56 
57 const GstMetaInfo *nvds_meta_get_info (void);
58 
59 #define NVDS_META_INFO (nvds_meta_get_info())
60 
61 #define NVDS_META_STRING "nvdsmeta"
62 
67 typedef enum {
69  /* Specifies information of a formed batch. */
72  /* Specifies information of dewarped surfaces. */
74  /* @ref NvDsMetaType for @ref NvDsUserMeta in @NvDsFrameMeta
75  * This metadata carries GstMeta objects of all input frames
76  * batched by nvstreammux2
77  * Note: Please refer to APIs @ref nvds_copy_gst_meta_to_frame_meta
78  * and @ref nvds_copy_gst_meta_to_audio_frame_meta for more information.
79  */
82  /* Specifies the first value that may be assigned to a user-defined type. */
83  NVDS_GST_META_FORCE32 = 0x7FFFFFFF
85 
89  typedef struct _NvDsMeta {
90  GstMeta meta;
91 
94  gpointer meta_data;
95 
97  gpointer user_data;
98 
100  gint meta_type;
101 
106 
110 
128 
136 
137 } NvDsMeta;
138 
159 NvDsMeta *gst_buffer_add_nvds_meta (GstBuffer *buffer, gpointer meta_data,
160  gpointer user_data, NvDsMetaCopyFunc copy_func,
161  NvDsMetaReleaseFunc release_func);
162 
171 NvDsMeta* gst_buffer_get_nvds_meta (GstBuffer *buffer);
172 
181 NvDsBatchMeta * gst_buffer_get_nvds_batch_meta (GstBuffer *buffer);
182 
208 void nvds_copy_gst_meta_to_frame_meta(GstBuffer* src_gst_buffer, NvDsBatchMeta* batch_meta, NvDsFrameMeta* frame_meta);
209 
235 void nvds_copy_gst_meta_to_audio_frame_meta(GstBuffer* src_gst_buffer, NvDsBatchMeta* batch_meta, NvDsAudioFrameMeta* frame_meta);
236 
238 #ifdef __cplusplus
239 }
240 #endif
241 #endif
gpointer meta_data
Holds a pointer to metadata.
Definition: gstnvdsmeta.h:94
Holds metadata for a frame in a batch.
Definition: nvdsmeta.h:265
NvDsMetaReleaseFunc gst_to_nvds_meta_release_func
A callback to be called when meta_data transformed into NvDsUserMeta is to be destroyed.
Definition: gstnvdsmeta.h:135
Holds metadata for a audio frame in a batch.
GstMeta meta
Definition: gstnvdsmeta.h:90
struct _NvDsMeta NvDsMeta
Holds DeepSteam metadata.
NvDsMeta * gst_buffer_get_nvds_meta(GstBuffer *buffer)
Gets the NvDsMeta last added to a GstBuffer.
NvDsMeta * gst_buffer_add_nvds_meta(GstBuffer *buffer, gpointer meta_data, gpointer user_data, NvDsMetaCopyFunc copy_func, NvDsMetaReleaseFunc release_func)
Adds GstMeta of type NvDsMeta to the GstBuffer and sets the meta_data member of NvDsMeta.
Copyright (c) 2020, NVIDIA CORPORATION.
void nvds_copy_gst_meta_to_audio_frame_meta(GstBuffer *src_gst_buffer, NvDsBatchMeta *batch_meta, NvDsAudioFrameMeta *frame_meta)
Copies all GstMeta objects on src_gst_buffer to the batched buffer's NvDsBatchMeta The GstMeta object...
const GstMetaInfo * nvds_meta_get_info(void)
GType nvds_meta_api_get_type(void)
Holds DeepSteam metadata.
Definition: gstnvdsmeta.h:89
GstNvDsMetaType
Defines the type of metadata.
Definition: gstnvdsmeta.h:67
Holds information about a formed batch containing frames from different sources.
Definition: nvdsmeta.h:221
NvDsMetaReleaseFunc freefunc
A callback to be called when meta_data is to be destroyed.
Definition: gstnvdsmeta.h:109
gpointer(* NvDsMetaCopyFunc)(gpointer data, gpointer user_data)
Defines the type of a callback to copy metadata.
Definition: nvdsmeta.h:78
Defines Latency API
NvDsMetaCopyFunc gst_to_nvds_meta_transform_func
A callback to be called when meta_data is transformed into NvDsUserMeta.
Definition: gstnvdsmeta.h:127
Defines NVIDIA DeepStream Metadata Structures
void nvds_copy_gst_meta_to_frame_meta(GstBuffer *src_gst_buffer, NvDsBatchMeta *batch_meta, NvDsFrameMeta *frame_meta)
Copies all GstMeta objects on src_gst_buffer to the batched buffer's NvDsBatchMeta The GstMeta object...
void(* NvDsMetaReleaseFunc)(gpointer data, gpointer user_data)
Defines the type of a callback to free metadata.
Definition: nvdsmeta.h:90
gint meta_type
Holds the type of metadata, one of values of enum GstNvDsMetaType.
Definition: gstnvdsmeta.h:100
Specifies the start of a range of enum values that represent types of NVIDIA-defined Gst metas...
Definition: nvdsmeta.h:153
gpointer user_data
Holds a pointer to user-specific data .
Definition: gstnvdsmeta.h:97
NvDsMetaCopyFunc copyfunc
A callback to be called when meta_data is to be copied or transformed from one buffer to other...
Definition: gstnvdsmeta.h:105
NvDsBatchMeta * gst_buffer_get_nvds_batch_meta(GstBuffer *buffer)
Gets the NvDsBatchMeta added to a GstBuffer.