NVIDIA DeepStream SDK API Reference

4.0 Release

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups
gstnvdsmeta.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019, 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 
56 #ifndef GST_NVDS_META_API_H
57 #define GST_NVDS_META_API_H
58 
59 #include <gst/gst.h>
60 #include <gst/video/video.h>
61 #include <gst/base/gstbasetransform.h>
62 
63 #include "nvdsmeta.h"
64 #include "nvds_latency_meta.h"
65 
66 #ifdef __cplusplus
67 extern "C"
68 {
69 #endif
70 GType nvds_meta_api_get_type (void);
71 #define NVDS_META_API_TYPE (nvds_meta_api_get_type())
72 
73 const GstMetaInfo *nvds_meta_get_info (void);
74 
75 #define NVDS_META_INFO (nvds_meta_get_info())
76 
77 #define NVDS_META_STRING "nvdsmeta"
78 
85 typedef enum {
87  /* contains information of formed batch */
90  /* contains information of dewarped surfaces */
93  /* User can start adding it's own gst metadata from here onwards */
94  NVDS_GST_META_FORCE32 = 0x7FFFFFFF
106  typedef struct _NvDsMeta {
107  GstMeta meta;
108 
110  gpointer meta_data;
111 
112  gpointer user_data;
113 
115  gint meta_type;
116 
128 
152 
153 } NvDsMeta;
154 
174 NvDsMeta *gst_buffer_add_nvds_meta (GstBuffer *buffer, gpointer meta_data,
175  gpointer user_data, NvDsMetaCopyFunc copy_func,
176  NvDsMetaReleaseFunc release_func);
177 
185 NvDsMeta* gst_buffer_get_nvds_meta (GstBuffer *buffer);
186 
194 NvDsBatchMeta * gst_buffer_get_nvds_batch_meta (GstBuffer *buffer);
196 #ifdef __cplusplus
197 }
198 #endif
199 #endif
gpointer meta_data
Must be cast to another structure based on meta_type.
Definition: gstnvdsmeta.h:110
NvDsMetaReleaseFunc gst_to_nvds_meta_release_func
It is called when nvdsmeta, transformed from gst meta, attached by plugin before nvstreammux going to...
Definition: gstnvdsmeta.h:151
GstMeta meta
Definition: gstnvdsmeta.h:107
struct _NvDsMeta NvDsMeta
Specifies the type of function to copy meta data.
NvDsMeta * gst_buffer_get_nvds_meta(GstBuffer *buffer)
Gets the NvDsMeta last added to the 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.
const GstMetaInfo * nvds_meta_get_info(void)
GType nvds_meta_api_get_type(void)
Specifies the type of function to copy meta data.
Definition: gstnvdsmeta.h:106
GstNvDsMetaType
Specifies the type of meta data.
Definition: gstnvdsmeta.h:85
Holds information a formed batched containing the frames from different sources.
Definition: nvdsmeta.h:176
NvDsMetaReleaseFunc freefunc
It is called when meta_data is going to be destroyed.
Definition: gstnvdsmeta.h:127
gpointer(* NvDsMetaCopyFunc)(gpointer data, gpointer user_data)
Specifies the type of function to copy meta data.
Definition: nvdsmeta.h:68
NvDsMetaCopyFunc gst_to_nvds_meta_transform_func
It is called when meta_data is transformed into nvds user meta.
Definition: gstnvdsmeta.h:145
NVIDIA DeepStream Metadata Structures
void(* NvDsMetaReleaseFunc)(gpointer data, gpointer user_data)
Specifies the type of function to free meta data.
Definition: nvdsmeta.h:76
gint meta_type
Type of metadata, from the meta_type enum.
Definition: gstnvdsmeta.h:115
metadata type to be set for metadata attached by nvidia gstreamer plugins before nvstreammux gstreame...
Definition: nvdsmeta.h:121
gpointer user_data
Definition: gstnvdsmeta.h:112
NvDsMetaCopyFunc copyfunc
It is called when meta_data needs to copied / transformed from one buffer to other.
Definition: gstnvdsmeta.h:122
NvDsBatchMeta * gst_buffer_get_nvds_batch_meta(GstBuffer *buffer)
Gets the NvDsBatchMeta added to the GstBuffer.