NVIDIA DeepStream SDK API Reference

6.4 Release
nvds_obj_encode.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020-2023, 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  */
24 #ifndef __NVDS_ENCODE_OBJECT_H__
25 #define __NVDS_ENCODE_OBJECT_H__
26 
27 #include <sys/time.h>
28 
29 #ifdef __cplusplus
30 extern "C"
31 {
32 #endif
33 
34 #define FILE_NAME_SIZE (1024)
35 struct _NvDsObjEncCtx;
36 
38 typedef struct _NvDsObjEncCtx * NvDsObjEncCtxHandle;
39 
43 typedef struct _NvDsObjEncOutParams
44 {
46  uint8_t *outBuffer;
48  uint64_t outLen;
50 
54 typedef struct _NvDsObjEncUsrArgs
55 {
57  bool saveImg;
63  bool scaleImg;
78  int objNum;
80  int quality;
84  bool isFrame;
88 
91 
98 
101 
104 
105 #ifdef __cplusplus
106 }
107 #endif
108 
109 #endif
110 
_NvDsObjEncUsrArgs::fileNameImg
char fileNameImg[FILE_NAME_SIZE]
If user specifies the filename then it'll be used otherwise the following naming convention is used t...
Definition: nvds_obj_encode.h:76
FILE_NAME_SIZE
#define FILE_NAME_SIZE
Definition: nvds_obj_encode.h:34
_NvDsObjEncOutParams
Holds output parameters.
Definition: nvds_obj_encode.h:43
NvBufSurface
Holds information about batched buffers.
Definition: nvbufsurface.h:503
_NvDsObjEncUsrArgs
Holds user parameters for a nvds_obj_enc_process call.
Definition: nvds_obj_encode.h:54
_NvDsObjEncUsrArgs::attachUsrMeta
bool attachUsrMeta
Variable to attach user metadata.
Definition: nvds_obj_encode.h:61
_NvDsObjEncUsrArgs::saveImg
bool saveImg
Boolean variable to save image.
Definition: nvds_obj_encode.h:57
NvDsObjEncUsrArgs
struct _NvDsObjEncUsrArgs NvDsObjEncUsrArgs
Holds user parameters for a nvds_obj_enc_process call.
nvds_obj_enc_create_context
NvDsObjEncCtxHandle nvds_obj_enc_create_context(int)
Create context and return a handle to NvObjEncCtx.
nvds_obj_enc_destroy_context
void nvds_obj_enc_destroy_context(NvDsObjEncCtxHandle)
Destroy context.
_NvDsObjEncUsrArgs::scaledWidth
int scaledWidth
Image dimensions shouldn't exceed frame dimensions.
Definition: nvds_obj_encode.h:67
_NvDsObjEncUsrArgs::scaledHeight
int scaledHeight
Height Paramater for scaling.
Definition: nvds_obj_encode.h:69
NvDsObjEncOutParams
struct _NvDsObjEncOutParams NvDsObjEncOutParams
Holds output parameters.
_NvDsObjEncOutParams::outLen
uint64_t outLen
Length of the JPEG Encoded Object.
Definition: nvds_obj_encode.h:48
nvds_obj_enc_finish
void nvds_obj_enc_finish(NvDsObjEncCtxHandle)
Wait for all enqueued crops to be encoded.
_NvDsObjEncUsrArgs::objNum
int objNum
Object number in the frame.
Definition: nvds_obj_encode.h:78
_NvDsObjEncUsrArgs::calcEncodeTime
bool calcEncodeTime
Boolean variable to calculate time of encode.
Definition: nvds_obj_encode.h:86
_NvDsObjEncUsrArgs::scaleImg
bool scaleImg
Boolean variable to scale image.
Definition: nvds_obj_encode.h:63
NvDsObjEncCtxHandle
struct _NvDsObjEncCtx * NvDsObjEncCtxHandle
Opaque Handle to the Object Encoder Context.
Definition: nvds_obj_encode.h:38
nvds_obj_enc_process
bool nvds_obj_enc_process(NvDsObjEncCtxHandle, NvDsObjEncUsrArgs *, NvBufSurface *, NvDsObjectMeta *, NvDsFrameMeta *)
Enqueue an object crop for JPEG encode.
_NvDsFrameMeta
Holds metadata for a frame in a batch.
Definition: nvdsmeta.h:284
_NvDsObjEncOutParams::outBuffer
uint8_t * outBuffer
Pointer to the JPEG Encoded Object.
Definition: nvds_obj_encode.h:46
_NvDsObjEncUsrArgs::quality
int quality
Image quality value.
Definition: nvds_obj_encode.h:80
_NvDsObjEncUsrArgs::isFrame
bool isFrame
Variable for frame/object encoding.
Definition: nvds_obj_encode.h:84
_NvDsObjectMeta
Holds metadata for an object in the frame.
Definition: nvdsmeta.h:342