NVIDIA DeepStream SDK API Reference

9.1 Release
sources/includes/nvds_obj_encode.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2020-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
31 #ifndef __NVDS_ENCODE_OBJECT_H__
32 #define __NVDS_ENCODE_OBJECT_H__
33 
34 #include <sys/time.h>
35 
36 #ifdef __cplusplus
37 extern "C"
38 {
39 #endif
40 
41 #define FILE_NAME_SIZE (1024)
42 struct _NvDsObjEncCtx;
43 
45 typedef struct _NvDsObjEncCtx * NvDsObjEncCtxHandle;
46 
50 typedef struct _NvDsObjEncOutParams
51 {
53  uint8_t *outBuffer;
55  uint64_t outLen;
57 
61 typedef struct _NvDsObjEncUsrArgs
62 {
64  bool saveImg;
70  bool scaleImg;
85  int objNum;
87  int quality;
91  bool isFrame;
95 
98 
105 
108 
111 
112 #ifdef __cplusplus
113 }
114 #endif
115 
116 #endif
117 
FILE_NAME_SIZE
#define FILE_NAME_SIZE
Definition: sources/includes/nvds_obj_encode.h:41
_NvDsObjEncOutParams::outBuffer
uint8_t * outBuffer
Pointer to the JPEG Encoded Object.
Definition: sources/includes/nvds_obj_encode.h:53
_NvDsObjEncOutParams
Holds output parameters.
Definition: sources/includes/nvds_obj_encode.h:50
NvBufSurface
Holds information about batched buffers.
Definition: sources/includes/nvbufsurface.h:597
_NvDsObjEncUsrArgs
Holds user parameters for a nvds_obj_enc_process call.
Definition: sources/includes/nvds_obj_encode.h:61
_NvDsObjEncUsrArgs::attachUsrMeta
bool attachUsrMeta
Variable to attach user metadata.
Definition: sources/includes/nvds_obj_encode.h:68
_NvDsObjEncUsrArgs::saveImg
bool saveImg
Boolean variable to save image.
Definition: sources/includes/nvds_obj_encode.h:64
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: sources/includes/nvds_obj_encode.h:74
_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: sources/includes/nvds_obj_encode.h:83
_NvDsObjEncUsrArgs::scaledHeight
int scaledHeight
Height Paramater for scaling.
Definition: sources/includes/nvds_obj_encode.h:76
NvDsObjEncOutParams
struct _NvDsObjEncOutParams NvDsObjEncOutParams
Holds output parameters.
_NvDsObjEncOutParams::outLen
uint64_t outLen
Length of the JPEG Encoded Object.
Definition: sources/includes/nvds_obj_encode.h:55
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: sources/includes/nvds_obj_encode.h:85
_NvDsObjEncUsrArgs::calcEncodeTime
bool calcEncodeTime
Boolean variable to calculate time of encode.
Definition: sources/includes/nvds_obj_encode.h:93
_NvDsObjEncUsrArgs::scaleImg
bool scaleImg
Boolean variable to scale image.
Definition: sources/includes/nvds_obj_encode.h:70
NvDsObjEncCtxHandle
struct _NvDsObjEncCtx * NvDsObjEncCtxHandle
Opaque Handle to the Object Encoder Context.
Definition: sources/includes/nvds_obj_encode.h:45
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: sources/includes/nvdsmeta.h:306
_NvDsObjEncUsrArgs::quality
int quality
Image quality value.
Definition: sources/includes/nvds_obj_encode.h:87
_NvDsObjEncUsrArgs::isFrame
bool isFrame
Variable for frame/object encoding.
Definition: sources/includes/nvds_obj_encode.h:91
_NvDsObjectMeta
Holds metadata for an object in the frame.
Definition: sources/includes/nvdsmeta.h:365