-
Notifications
You must be signed in to change notification settings - Fork 25
/
gstzedxonesrc.h
104 lines (80 loc) · 4.26 KB
/
gstzedxonesrc.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
// /////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2024, STEREOLABS.
//
// All rights reserved.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// /////////////////////////////////////////////////////////////////////////
#ifndef _GST_ZED_X_ONE_SRC_H_
#define _GST_ZED_X_ONE_SRC_H_
#include <gst/base/gstpushsrc.h>
#include "sl/CameraOne.hpp"
G_BEGIN_DECLS
#define GST_TYPE_ZED_X_ONE_SRC (gst_zedxonesrc_get_type())
#define GST_ZED_X_ONE_SRC(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_ZED_X_ONE_SRC, GstZedXOneSrc))
#define GST_ZED_X_ONE_SRC_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_ZED_X_ONE_SRC, GstZedXOneSrcClass))
#define GST_IS_ZED_X_ONE_SRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_ZED_X_ONE_SRC))
#define GST_IS_ZED_X_ONE_SRC_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_ZED_X_ONE_SRC))
typedef struct _GstZedXOneSrc GstZedXOneSrc;
typedef struct _GstZedXOneSrcClass GstZedXOneSrcClass;
struct _GstZedXOneSrc {
GstPushSrc _base_zedxonesrc;
// ZED X One camera object
std::unique_ptr<sl::CameraOne> _zed; // ZED X One object
gboolean _isStarted; // grab started flag
gboolean _stopRequested; // stop request flagout_framesize
// ----> Properties
gint _cameraResolution; // Camera resolution [enum]
gint _cameraFps; // Camera FPS
gint _sdkVerboseLevel; // Capture library verbose level
gfloat _camTimeout_sec; // Camera open timeout
gint _cameraId; // Camera ID
gint64 _cameraSN; // Camera Serial Number
GString _opencvCalibrationFile; // OpenCV calibration file path
gboolean _cameraImageFlip; // Camera flipped
gboolean _enableHDR; // HDR mode
gint _saturation; // Image Saturation
gint _sharpness; // Image Sharpness
gint _gamma; // Image Gamma
gboolean _autoWb; // Enable Automatic White Balance
gint _manualWb; // Manual White Balance [2800,6500]
gboolean _autoExposure; // Enable Automatic Exposure
gint _exposure_usec; // Manual Exposure time [28,30000]
gint _exposureRange_min; // Minimum value for Automatic Exposure [28,30000]
gint _exposureRange_max; // Maximum value for Automatic Exposure [28,30000]
gint _exposureCompensation; // Exposure Compensation [0,100]
gboolean _autoAnalogGain; // Enable Automatic Analog Gain
gint _analogGain; // Manual Analog Gain [1000,16000]
gint _analogGainRange_min; // Minimum value for Automatic Analog Gain [1000,16000]
gint _analogGainRange_max; // Maximum value for Automatic Analog Gain [1000,16000]
gboolean _autoDigitalGain; // Enable Automatic Digital Gain
gint _digitalGain; // Manual Digital Gain [1,256]
gint _digitalGainRange_min; // Minimum value for Automatic Digital Gain [1,256]
gint _digitalGainRange_max; // Maximum value for Automatic Digital Gain [1,256]
gint _denoising; // Image Denoising [0,100]
// <---- Properties
int _realFps; // Real FPS
GstClockTime _acqStartTime; // Acquisition start time
GstCaps *_caps; // Stream caps
guint _outFramesize; // Output frame size in byte
};
struct _GstZedXOneSrcClass {
GstPushSrcClass base_zedxonesrc_class;
};
G_GNUC_INTERNAL GType gst_zedxonesrc_get_type(void);
G_END_DECLS
#endif // _GST_ZED_X_ONE_SRC_H_