NVIDIA DeepStream SDK API Reference

7.1 Release
nvds_obj_encode.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2020-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4  *
5  * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6  * property and proprietary rights in and to this material, related
7  * documentation and any modifications thereto. Any use, reproduction,
8  * disclosure or distribution of this material and related documentation
9  * without an express license agreement from NVIDIA CORPORATION or
10  * its affiliates is strictly prohibited.
11  */
12 
26 #ifndef __NVDS_ENCODE_OBJECT_H__
27 #define __NVDS_ENCODE_OBJECT_H__
28 
29 #include <sys/time.h>
30 
31 #ifdef __cplusplus
32 extern "C"
33 {
34 #endif
35 
36 #define FILE_NAME_SIZE (1024)
37 struct _NvDsObjEncCtx;
38 
40 typedef struct _NvDsObjEncCtx * NvDsObjEncCtxHandle;
41 
45 typedef struct _NvDsObjEncOutParams
46 {
48  uint8_t *outBuffer;
50  uint64_t outLen;
52 
56 typedef struct _NvDsObjEncUsrArgs
57 {
59  bool saveImg;
65  bool scaleImg;
80  int objNum;
82  int quality;
86  bool isFrame;
90 
93 
100 
103 
106 
107 #ifdef __cplusplus
108 }
109 #endif
110 
111 #endif
112 
_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:78
FILE_NAME_SIZE
#define FILE_NAME_SIZE
Definition: nvds_obj_encode.h:36
_NvDsObjEncOutParams
Holds output parameters.
Definition: nvds_obj_encode.h:45
NvBufSurface
Holds information about batched buffers.
Definition: nvbufsurface.h:520
_NvDsObjEncUsrArgs
Holds user parameters for a nvds_obj_enc_process call.
Definition: nvds_obj_encode.h:56
_NvDsObjEncUsrArgs::attachUsrMeta
bool attachUsrMeta
Variable to attach user metadata.
Definition: nvds_obj_encode.h:63
_NvDsObjEncUsrArgs::saveImg
bool saveImg
Boolean variable to save image.
Definition: nvds_obj_encode.h:59
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:69
_NvDsObjEncUsrArgs::scaledHeight
int scaledHeight
Height Paramater for scaling.
Definition: nvds_obj_encode.h:71
NvDsObjEncOutParams
struct _NvDsObjEncOutParams NvDsObjEncOutParams
Holds output parameters.
_NvDsObjEncOutParams::outLen
uint64_t outLen
Length of the JPEG Encoded Object.
Definition: nvds_obj_encode.h:50
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:80
_NvDsObjEncUsrArgs::calcEncodeTime
bool calcEncodeTime
Boolean variable to calculate time of encode.
Definition: nvds_obj_encode.h:88
_NvDsObjEncUsrArgs::scaleImg
bool scaleImg
Boolean variable to scale image.
Definition: nvds_obj_encode.h:65
NvDsObjEncCtxHandle
struct _NvDsObjEncCtx * NvDsObjEncCtxHandle
Opaque Handle to the Object Encoder Context.
Definition: nvds_obj_encode.h:40
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:286
_NvDsObjEncOutParams::outBuffer
uint8_t * outBuffer
Pointer to the JPEG Encoded Object.
Definition: nvds_obj_encode.h:48
_NvDsObjEncUsrArgs::quality
int quality
Image quality value.
Definition: nvds_obj_encode.h:82
_NvDsObjEncUsrArgs::isFrame
bool isFrame
Variable for frame/object encoding.
Definition: nvds_obj_encode.h:86
_NvDsObjectMeta
Holds metadata for an object in the frame.
Definition: nvdsmeta.h:344