/** * Copyright (c) 2017-2020, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ #ifndef __GST_MINIMAL_H__ #define __GST_MINIMAL_H__ #include #include /* Open CV headers */ #include #include #include "nvbufsurface.h" #include "nvbufsurftransform.h" #include "gst-nvquery.h" #include "gstnvdsmeta.h" #include "nvdsmeta_schema.h" /* Package and library details required for plugin_init */ #define PACKAGE "minimal" #define VERSION "1.0" #define LICENSE "Proprietary" #define DESCRIPTION "Hensoldt sequence generator plugin for integration with DeepStream on DGPU" #define BINARY_PACKAGE "NVIDIA DeepStream 3rdparty IP integration example plugin" #define URL "http://nvidia.com/" G_BEGIN_DECLS /* Standard boilerplate stuff */ typedef struct _GstMinimal GstMinimal; typedef struct _GstMinimalClass GstMinimalClass; /* Standard boilerplate stuff */ #define GST_TYPE_MINIMAL (gst_minimal_get_type()) #define GST_MINIMAL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MINIMAL,GstMinimal)) #define GST_MINIMAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MINIMAL,GstMinimalClass)) #define GST_MINIMAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GST_TYPE_MINIMAL, GstMinimalClass)) #define GST_IS_MINIMAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MINIMAL)) #define GST_IS_MINIMAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MINIMAL)) #define GST_MINIMAL_CAST(obj) ((GstMinimal *)(obj)) struct _GstMinimal { GstBaseTransform base_trans; // Unique ID of the element. The labels generated by the element will be // updated at index `unique_id` of attr_info array in NvDsObjectParams. guint unique_id; guint gpuId; //GstPad *sinkpad, *srcpad; // Frame number of the current input buffer guint64 frame_num; // CUDA Stream used for allocating the CUDA task cudaStream_t cuda_stream; NvBufSurface *inter_buf; // Input video info (resolution, color format, framerate, etc) GstVideoInfo video_info; // Resolution at which frames/objects should be processed }; // Boiler plate stuff struct _GstMinimalClass { GstBaseTransformClass parent_class; }; GType gst_minimal_get_type (void); G_END_DECLS #endif /* __GST_MINIMAL_H__ */