NVIDIA DeepStream SDK API Reference

5.0 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;
68  int objNum;
70 
72 NvDsObjEncCtxHandle nvds_obj_enc_create_context (void);
73 
78 bool nvds_obj_enc_process (NvDsObjEncCtxHandle, NvDsObjEncUsrArgs *,
80 
82 void nvds_obj_enc_finish (NvDsObjEncCtxHandle);
83 
85 void nvds_obj_enc_destroy_context (NvDsObjEncCtxHandle);
86 
87 #ifdef __cplusplus
88 }
89 #endif
90 
91 #endif
92 
Holds metadata for a frame in a batch.
Definition: nvdsmeta.h:250
#define FILE_NAME_SIZE
int objNum
Object number in the frame.
struct _NvDsObjEncOutParams NvDsObjEncOutParams
Holds output parameters.
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.
uint8_t * outBuffer
Pointer to the JPEG Encoded Object.
Holds metadata for an object in the frame.
Definition: nvdsmeta.h:304
Holds information about batched buffers.
Definition: nvbufsurface.h:284
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.