NVIDIA DeepStream SDK API Reference

8.0 Release
gstnvimageenc.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2023-2024 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 
11 
12 #ifndef __GST_NVIMAGE_ENC_H__
13 #define __GST_NVIMAGE_ENC_H__
14 
15 #include <gst/gst.h>
16 #include <gst/video/video.h>
17 
18 #include "nvjpeg.h"
19 
20 G_BEGIN_DECLS
21 
22 #define MAX_ENCODED_SIZE 15*1024*1024
23 
24 #define GST_TYPE_NVIMAGE_ENC \
25  (gst_nvimage_enc_get_type())
26 #define GST_NVIMAGE_ENC(obj) \
27  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_NVIMAGE_ENC,GstNvImageEnc))
28 #define GST_NVIMAGE_ENC_CLASS(klass) \
29  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_NVIMAGE_ENC,GstNvImageEncClass))
30 #define GST_IS_NVIMAGE_ENC(obj) \
31  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_NVIMAGE_ENC))
32 #define GST_IS_NVIMAGE_ENC_CLASS(obj) \
33  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_NVIMAGE_ENC))
34 
37 
38 typedef struct encode_params_t_ {
39  int dev;
40 
41  nvjpegJpegState_t nvjpeg_state;
42  nvjpegEncoderState_t nvjpeg_encoder_state;
43  nvjpegHandle_t nvjpeg_handle;
45  unsigned int quality;
46  nvjpegOutputFormat_t fmt;
48 
50 {
51  GstVideoEncoder parent;
52 
53  /* < private > */
54  GstVideoCodecState *input_state;
55  GstVideoCodecState *output_state;
56  guint gpu_id;
57  GstVideoFormat format;
59  unsigned int encoded_size;
60 };
61 
63 {
64  GstVideoEncoderClass parent_class;
65 };
66 
67 GType gst_nvimage_enc_get_type (void);
68 
69 G_END_DECLS
70 
71 #endif /* __GST_NVIMAGE_ENC_H__ */
72 
_GstNvImageEncClass::parent_class
GstVideoEncoderClass parent_class
Definition: gstnvimageenc.h:64
_GstNvImageEnc::gpu_id
guint gpu_id
Definition: gstnvimageenc.h:56
encode_params_t_::quality
unsigned int quality
Definition: gstnvimageenc.h:45
_GstNvImageEnc::input_state
GstVideoCodecState * input_state
Definition: gstnvimageenc.h:54
encode_params_t_::stream
cudaStream_t stream
Definition: gstnvimageenc.h:44
_GstNvImageEnc::params
encode_params_t params
Definition: gstnvimageenc.h:58
encode_params_t_::fmt
nvjpegOutputFormat_t fmt
Definition: gstnvimageenc.h:46
_GstNvImageEnc::format
GstVideoFormat format
Definition: gstnvimageenc.h:57
encode_params_t_::nvjpeg_handle
nvjpegHandle_t nvjpeg_handle
Definition: gstnvimageenc.h:43
encode_params_t_::nvjpeg_encoder_state
nvjpegEncoderState_t nvjpeg_encoder_state
Definition: gstnvimageenc.h:42
_GstNvImageEncClass
Definition: gstnvimageenc.h:62
_GstNvImageEnc
Definition: gstnvimageenc.h:49
encode_params_t_
Definition: gstnvimageenc.h:38
cudaStream_t
struct CUstream_st * cudaStream_t
Forward declaration of cudaStream_t.
Definition: nvbufsurftransform.h:35
encode_params_t
struct encode_params_t_ encode_params_t
_GstNvImageEnc::encoded_size
unsigned int encoded_size
Definition: gstnvimageenc.h:59
encode_params_t_::dev
int dev
Definition: gstnvimageenc.h:39
gst_nvimage_enc_get_type
GType gst_nvimage_enc_get_type(void)
_GstNvImageEnc::output_state
GstVideoCodecState * output_state
Definition: gstnvimageenc.h:55
encode_params_t_::nvjpeg_state
nvjpegJpegState_t nvjpeg_state
Definition: gstnvimageenc.h:41
_GstNvImageEnc::parent
GstVideoEncoder parent
Definition: gstnvimageenc.h:51