NVIDIA DeepStream SDK API Reference

6.1.1 Release

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nvds_obj_encode.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020, 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 #ifdef __cplusplus
28 extern "C"
29 {
30 #endif
31 
32 #define FILE_NAME_SIZE (1024)
33 struct _NvDsObjEncCtx;
34 
36 typedef struct _NvDsObjEncCtx * NvDsObjEncCtxHandle;
37 
41 typedef struct _NvDsObjEncOutParams
42 {
44  uint8_t *outBuffer;
46  uint64_t outLen;
48 
52 typedef struct _NvDsObjEncUsrArgs
53 {
55  bool saveImg;
61  bool scaleImg;
76  int objNum;
78  int quality;
80 
82 NvDsObjEncCtxHandle nvds_obj_enc_create_context (void);
83 
88 bool nvds_obj_enc_process (NvDsObjEncCtxHandle, NvDsObjEncUsrArgs *,
90 
92 void nvds_obj_enc_finish (NvDsObjEncCtxHandle);
93 
95 void nvds_obj_enc_destroy_context (NvDsObjEncCtxHandle);
96 
97 #ifdef __cplusplus
98 }
99 #endif
100 
101 #endif
102 
Holds metadata for a frame in a batch.
Definition: nvdsmeta.h:265
#define FILE_NAME_SIZE
int objNum
Object number in the frame.
int scaledHeight
Height Paramater for scaling.
int quality
Image quality value.
struct _NvDsObjEncOutParams NvDsObjEncOutParams
Holds output parameters.
int scaledWidth
Image dimensions shouldn't exceed frame dimensions.
NvDsObjEncCtxHandle nvds_obj_enc_create_context(void)
Create context and return a handle to NvObjEncCtx.
char fileNameImg[FILE_NAME_SIZE]
If user specifies the filename then it'll be used otherwise the following naming convention is used t...
uint64_t outLen
Length of the JPEG Encoded Object.
bool saveImg
Boolean variable to save image.
Holds user parameters for a nvds_obj_enc_process call.
void nvds_obj_enc_destroy_context(NvDsObjEncCtxHandle)
Destroy context.
bool scaleImg
Boolean variable to scale image.
uint8_t * outBuffer
Pointer to the JPEG Encoded Object.
Holds metadata for an object in the frame.
Definition: nvdsmeta.h:323
Holds information about batched buffers.
Definition: nvbufsurface.h:460
Holds output parameters.
void nvds_obj_enc_finish(NvDsObjEncCtxHandle)
Wait for all enqueued crops to be encoded.
bool nvds_obj_enc_process(NvDsObjEncCtxHandle, NvDsObjEncUsrArgs *, NvBufSurface *, NvDsObjectMeta *, NvDsFrameMeta *)
Enqueue an object crop for JPEG encode.
struct _NvDsObjEncUsrArgs NvDsObjEncUsrArgs
Holds user parameters for a nvds_obj_enc_process call.
struct _NvDsObjEncCtx * NvDsObjEncCtxHandle
Opaque Handle to the Object Encoder Context.
bool attachUsrMeta
Variable to attach user metadata.