37 #ifndef _ARGUS_TYPES_H
38 #define _ARGUS_TYPES_H
55 #include <EGL/eglext.h>
74 class CaptureMetadata;
75 class CaptureMetadataContainer;
80 class OutputStreamSettings;
87 class ICameraProperties;
88 class ICameraProvider;
89 class ICaptureSession;
90 class IAutoControlSettings;
93 class IStreamSettings;
108 , uint16_t time_hi_and_version_
109 , uint16_t clock_seq_
110 , uint8_t c0, uint8_t c1, uint8_t c2, uint8_t c3, uint8_t c4, uint8_t c5
112 :
NamedUUID(time_low_, time_mid_, time_hi_and_version_, clock_seq_,
113 c0, c1, c2, c3, c4, c5, name)
117 :
NamedUUID(0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
"EXT_UNSPECIFIED")
136 DEFINE_UUID(AwbMode, AWB_MODE_OFF, FB3F365A,CC62,11E5,9956,62,56,62,87,07,61);
137 DEFINE_UUID(AwbMode, AWB_MODE_AUTO, FB3F365B,CC62,11E5,9956,62,56,62,87,07,61);
138 DEFINE_UUID(AwbMode, AWB_MODE_INCANDESCENT, FB3F365C,CC62,11E5,9956,62,56,62,87,07,61);
139 DEFINE_UUID(AwbMode, AWB_MODE_FLUORESCENT, FB3F365D,CC62,11E5,9956,62,56,62,87,07,61);
140 DEFINE_UUID(AwbMode, AWB_MODE_WARM_FLUORESCENT, FB3F365E,CC62,11E5,9956,62,56,62,87,07,61);
141 DEFINE_UUID(AwbMode, AWB_MODE_DAYLIGHT, FB3F365F,CC62,11E5,9956,62,56,62,87,07,61);
142 DEFINE_UUID(AwbMode, AWB_MODE_CLOUDY_DAYLIGHT, FB3F3660,CC62,11E5,9956,62,56,62,87,07,61);
143 DEFINE_UUID(AwbMode, AWB_MODE_TWILIGHT, FB3F3661,CC62,11E5,9956,62,56,62,87,07,61);
144 DEFINE_UUID(AwbMode, AWB_MODE_SHADE, FB3F3662,CC62,11E5,9956,62,56,62,87,07,61);
145 DEFINE_UUID(AwbMode, AWB_MODE_MANUAL, 20FB45DA,C49F,4293,AB02,13,3F,8C,CA,DD,69);
148 FB3F3663,CC62,11E5,9956,62,56,62,87,07,61);
150 FB3F3664,CC62,11E5,9956,62,56,62,87,07,61);
151 DEFINE_UUID(CaptureIntent, CAPTURE_INTENT_STILL_CAPTURE,
152 FB3F3665,CC62,11E5,9956,62,56,62,87,07,61);
153 DEFINE_UUID(CaptureIntent, CAPTURE_INTENT_VIDEO_RECORD,
154 FB3F3666,CC62,11E5,9956,62,56,62,87,07,61);
155 DEFINE_UUID(CaptureIntent, CAPTURE_INTENT_VIDEO_SNAPSHOT,
156 FB3F3667,CC62,11E5,9956,62,56,62,87,07,61);
158 DEFINE_UUID(DenoiseMode, DENOISE_MODE_OFF, FB3F3668,CC62,11E5,9956,62,56,62,87,07,61);
159 DEFINE_UUID(DenoiseMode, DENOISE_MODE_FAST, FB3F3669,CC62,11E5,9956,62,56,62,87,07,61);
160 DEFINE_UUID(DenoiseMode, DENOISE_MODE_HIGH_QUALITY, FB3F366A,CC62,11E5,9956,62,56,62,87,07,61);
162 DEFINE_UUID(EdgeEnhanceMode, EDGE_ENHANCE_MODE_OFF, F7100B40,6A5F,11E6,BDF4,08,00,20,0C,9A,66);
163 DEFINE_UUID(EdgeEnhanceMode, EDGE_ENHANCE_MODE_FAST, F7100B41,6A5F,11E6,BDF4,08,00,20,0C,9A,66);
164 DEFINE_UUID(EdgeEnhanceMode, EDGE_ENHANCE_MODE_HIGH_QUALITY, F7100B42,6A5F,11E6,BDF4,08,00,20,0C,9A,66);
166 DEFINE_UUID(SensorModeType, SENSOR_MODE_TYPE_DEPTH,
167 64483464,4b91,11e6,bbbd,40,16,7e,ab,86,92);
169 6453e00c,4b91,11e6,871d,40,16,7e,ab,86,92);
171 6463d4c6,4b91,11e6,88a3,40,16,7e,ab,86,92);
172 DEFINE_UUID(SensorModeType, SENSOR_MODE_TYPE_BAYER,
173 646f04ea,4b91,11e6,9c06,40,16,7e,ab,86,92);
175 DEFINE_UUID(VideoStabilizationMode, VIDEO_STABILIZATION_MODE_OFF,
176 FB3F366E,CC62,11E5,9956,62,56,62,87,07,61);
177 DEFINE_UUID(VideoStabilizationMode, VIDEO_STABILIZATION_MODE_ON,
178 FB3F366F,CC62,11E5,9956,62,56,62,87,07,61);
289 , uint16_t time_hi_and_version_
290 , uint16_t clock_seq_
291 , uint8_t c0, uint8_t c1, uint8_t c2, uint8_t c3, uint8_t c4, uint8_t c5
293 :
NamedUUID(time_low_, time_mid_, time_hi_and_version_, clock_seq_,
294 c0, c1, c2, c3, c4, c5, name)
301 DEFINE_UUID(PixelFormat, PIXEL_FMT_UNKNOWN, 00000000,93d5,11e5,0000,1c,b7,2c,ef,d4,1e);
302 DEFINE_UUID(PixelFormat, PIXEL_FMT_Y8, 569be14a,93d5,11e5,91bc,1c,b7,2c,ef,d4,1e);
303 DEFINE_UUID(PixelFormat, PIXEL_FMT_Y16, 56ddb19c,93d5,11e5,8e2c,1c,b7,2c,ef,d4,1e);
304 DEFINE_UUID(PixelFormat, PIXEL_FMT_YCbCr_420_888, 570c10e6,93d5,11e5,8ff3,1c,b7,2c,ef,d4,1e);
305 DEFINE_UUID(PixelFormat, PIXEL_FMT_YCbCr_422_888, 573a7940,93d5,11e5,99c2,1c,b7,2c,ef,d4,1e);
306 DEFINE_UUID(PixelFormat, PIXEL_FMT_YCbCr_444_888, 576043dc,93d5,11e5,8983,1c,b7,2c,ef,d4,1e);
307 DEFINE_UUID(PixelFormat, PIXEL_FMT_JPEG_BLOB, 578b08c4,93d5,11e5,9686,1c,b7,2c,ef,d4,1e);
308 DEFINE_UUID(PixelFormat, PIXEL_FMT_RAW16, 57b484d8,93d5,11e5,aeb6,1c,b7,2c,ef,d4,1e);
345 , uint16_t time_hi_and_version_
346 , uint16_t clock_seq_
347 , uint8_t c0, uint8_t c1, uint8_t c2, uint8_t c3, uint8_t c4, uint8_t c5
349 :
NamedUUID(time_low_, time_mid_, time_hi_and_version_, clock_seq_,
350 c0, c1, c2, c3, c4, c5, name)
354 :
NamedUUID(0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
"IID_UNSPECIFIED")
380 template <
typename TheInterface>
383 return static_cast<TheInterface*
>(obj ? obj->
getInterface(TheInterface::id()): 0);
386 template <
typename TheInterface>
389 return static_cast<TheInterface*
>(
421 void operator=(
const rv&);
427 return *
static_cast<rv<T>*
>(&
self);
439 template <
typename T>
448 { T* obj = m_obj; m_obj = NULL;
return obj; }
456 T*
get()
const {
return m_obj; }
458 operator bool()
const {
return !!m_obj; }
466 T* operator->()
const;
470 template <
typename TheInterface,
typename TObject>
479 template <
unsigned int N,
typename T>
488 for (
unsigned int i = 0; i < N; i++)
501 return !(*
this == rhs);
507 for (
unsigned int i = 0; i < N; i++)
515 for (
unsigned int i = 0; i < N; i++)
523 for (
unsigned int i = 0; i < N; i++)
531 for (
unsigned int i = 0; i < N; i++)
575 template <
typename T>
610 template <
typename T>
619 r() =
g() =
b() = init;
642 template <
typename T>
670 template <
typename T>
702 template <
typename T>
745 template <
typename T>
783 AcRegion(uint32_t _left, uint32_t _top, uint32_t _right, uint32_t _bottom,
float _weight)
784 :
Rectangle<uint32_t>(_left, _top, _right, _bottom)
802 template <
typename T>
822 m_data.resize(size.
width() * size.
height(), value);
828 m_data = other.m_data;
829 m_size = other.m_size;
835 m_data = other.m_data;
836 m_size = other.m_size;
843 return (m_size == other.m_size && m_data == other.m_data);
855 if (m_data.size() != s)
868 T&
operator[](
unsigned int i) {
return m_data[checkIndex(i)]; }
869 const T&
operator[](
unsigned int i)
const {
return m_data[checkIndex(i)]; }
872 inline const T&
operator() (uint32_t i)
const {
return m_data[checkIndex(i)]; }
873 inline const T&
operator() (uint32_t x, uint32_t y)
const {
return m_data[checkIndex(x, y)]; }
875 {
return m_data[checkIndex(p.
x(), p.
y())]; }
876 inline T&
operator() (uint32_t i) {
return m_data[checkIndex(i)]; }
877 inline T&
operator() (uint32_t x, uint32_t y) {
return m_data[checkIndex(x, y)]; }
879 {
return m_data[checkIndex(p.
x(), p.
y())]; }
882 inline const T*
data()
const {
return m_data.data(); }
883 inline T*
data() {
return m_data.data(); }
886 inline uint32_t checkIndex(uint32_t i)
const
888 assert(i < m_data.size());
892 inline uint32_t checkIndex(uint32_t x, uint32_t y)
const
894 assert(x < m_size.
width());
895 assert(y < m_size.
height());
896 return x + (y * m_size.
width());
899 std::vector<T> m_data;
900 Size2D<uint32_t> m_size;
907 #endif // _ARGUS_TYPES_H
Range(const Tuple< 2, T > &other)
Tuple< N, T > & operator/=(const T &rhs)
Divides every element in the tuple by a single value.
The base interface for a class that provides libargus Interfaces.
T height() const
Returns the height of the rectangle.
The stream or other resource has been disconnected.
bool operator==(const Tuple< N, T > &rhs) const
Returns true when every element in the two tuples are identical.
Status
Status values returned by API function calls.
T & operator[](unsigned int i)
AcRegion(uint32_t _left, uint32_t _top, uint32_t _right, uint32_t _bottom, float _weight)
TheInterface * interface_cast(InterfaceProvider *obj)
Interface-casting helper similar to dynamic_cast.
The top-level interface class.
Size2D(T _width, T _height)
Tuple(T init)
Initialize every element of the tuple to a single value.
UniqueObj(rv< UniqueObj > &moved)
A template class to hold a 2-dimensional array of data.
const Tuple< N, T > operator*(const T &rhs) const
Returns the result of multiplying this tuple by a single value.
const float & weight() const
const Tuple< N, T > operator/(const T &rhs) const
Returns the result of dividing this tuple by a single value.
Array2D(const Array2D< T > &other)
Copy constructor.
bool operator==(const Array2D< T > &other) const
Equality operator.
T area() const
Returns the area of the size (width * height).
Rectangle template class.
InterfaceID(uint32_t time_low_, uint16_t time_mid_, uint16_t time_hi_and_version_, uint16_t clock_seq_, uint8_t c0, uint8_t c1, uint8_t c2, uint8_t c3, uint8_t c4, uint8_t c5, const char *name)
T area() const
Returns the area of the rectangle (width * height).
Array2D & operator=(const Array2D< T > &other)
Assignment operator.
const Tuple< N, T > operator-(const Tuple< N, T > &rhs) const
Returns the result of subtracting another tuple from this tuple.
DEFINE_UUID(ExtensionName, EXT_BAYER_SHARPNESS_MAP, 7d5e0470, 4ea6, 11e6, bdf4, 08, 00, 20, 0c, 9a, 66)
The Ext::BayerSharpnessMap extension adds internally-generated sharpness metrics to CaptureMetadata r...
A unique identifier with a name (primarily for debugging purposes).
virtual void destroy()=0
Destroy this object.
Tuple< N, T > & operator-=(const Tuple< N, T > &rhs)
Subtracts every element of another tuple from the elements of this tuple.
T width() const
Returns the width of the rectangle.
const T & operator[](unsigned int i) const
const Tuple< N, T > operator+(const Tuple< N, T > &rhs) const
Returns the result of adding another tuple to this tuple.
Array2D()
Default Constructor.
BayerTuple(const Tuple< BAYER_CHANNEL_COUNT, T > &other)
RGBTuple(const Tuple< RGB_CHANNEL_COUNT, T > &other)
bool operator!=(const Tuple< N, T > &rhs) const
Returns true if there are any differences between the two tuples.
Tuple< N, T > & operator*=(const T &rhs)
Multiplies every element in the tuple by a single value.
BayerTuple template class.
const T & operator()(uint32_t i) const
Array indexing using () operator.
const uint64_t TIMEOUT_INFINITE
Constant used for infinite timeouts.
RGBTuple(T _r, T _g, T _b)
Size2D(const Tuple< 2, T > &other)
DEFINE_NAMED_UUID_CLASS(StreamMode)
The requested settings are invalid.
Rectangle(T _left, T _top, T _right, T _bottom)
Array2D(const Size2D< uint32_t > &size)
Constructor given initial array size.
ExtensionName(uint32_t time_low_, uint16_t time_mid_, uint16_t time_hi_and_version_, uint16_t clock_seq_, uint8_t c0, uint8_t c1, uint8_t c2, uint8_t c3, uint8_t c4, uint8_t c5, const char *name)
Point2D(const Tuple< COORDINATE_2D_COUNT, T > &other)
A unique identifier for an libargus Interface.
Tuple< N, T > & operator+=(const Tuple< N, T > &rhs)
Adds every element of another tuple to the elements of this tuple.
BayerTuple(T _r, T _gEven, T _gOdd, T _b)
The requested device is unavailable.
A top level object class for libargus objects that are created and owned by the client.
Defines an autocontrol region of interest (in pixel space).
Size2D< uint32_t > size() const
Returns the size (dimensions) of the array.
bool resize(const Size2D< uint32_t > &size)
Resize the array.
The set of parameters passed was invalid.
This method has not been implemented.
const_iterator begin() const
STL style iterators.
Movable smart pointer mimicking std::unique_ptr.
const T & operator[](unsigned int i) const
UniqueObj & operator=(rv< UniqueObj > &moved)
const_iterator end() const
Rectangle(const Tuple< 4, T > &other)
Template helper emulating C++11 rvalue semantics.
T & operator[](unsigned int i)
Array indexing using [] operator.
virtual Interface * getInterface(const InterfaceID &interfaceId)=0
Acquire the interface specified by interfaceId.
An operation failed because of insufficient mavailable memory.
Utility class for libargus interfaces.
static unsigned int tupleSize()
Returns the number of elements in the tuple.
Array2D(const Size2D< uint32_t > &size, const T &value)
Constructor given initial array size and initial fill value.