36 #ifndef _ARGUS_TYPES_H
37 #define _ARGUS_TYPES_H
45 #include <EGL/eglext.h>
64 class CaptureMetadata;
65 class CaptureMetadataContainer;
70 class OutputStreamSettings;
77 class ICameraProperties;
78 class ICameraProvider;
79 class ICaptureSession;
80 class IAutoControlSettings;
83 class IStreamSettings;
171 DEFINE_UUID(AeAntibandingMode, AE_ANTIBANDING_MODE_OFF, AD1E5560,9C16,11E8,B568,18,00,20,0C,9A,66);
172 DEFINE_UUID(AeAntibandingMode, AE_ANTIBANDING_MODE_AUTO, AD1E5561,9C16,11E8,B568,18,00,20,0C,9A,66);
173 DEFINE_UUID(AeAntibandingMode, AE_ANTIBANDING_MODE_50HZ, AD1E5562,9C16,11E8,B568,18,00,20,0C,9A,66);
174 DEFINE_UUID(AeAntibandingMode, AE_ANTIBANDING_MODE_60HZ, AD1E5563,9C16,11E8,B568,18,00,20,0C,9A,66);
180 DEFINE_UUID(AeFlickerState, AE_FLICKER_NONE, AD1E5564,9C16,11E8,B568,18,00,20,0C,9A,66);
181 DEFINE_UUID(AeFlickerState, AE_FLICKER_50HZ, AD1E5565,9C16,11E8,B568,18,00,20,0C,9A,66);
182 DEFINE_UUID(AeFlickerState, AE_FLICKER_60HZ, AD1E5566,9C16,11E8,B568,18,00,20,0C,9A,66);
188 DEFINE_UUID(AeState, AE_STATE_INACTIVE, D2EBEA50,9C16,11E8,B568,18,00,20,0C,9A,66);
189 DEFINE_UUID(AeState, AE_STATE_SEARCHING, D2EBEA51,9C16,11E8,B568,18,00,20,0C,9A,66);
190 DEFINE_UUID(AeState, AE_STATE_CONVERGED, D2EBEA52,9C16,11E8,B568,18,00,20,0C,9A,66);
191 DEFINE_UUID(AeState, AE_STATE_FLASH_REQUIRED, D2EBEA53,9C16,11E8,B568,18,00,20,0C,9A,66);
192 DEFINE_UUID(AeState, AE_STATE_TIMEOUT, D2EBEA54,9C16,11E8,B568,18,00,20,0C,9A,66);
198 DEFINE_UUID(AwbMode, AWB_MODE_OFF, FB3F365A,CC62,11E5,9956,62,56,62,87,07,61);
199 DEFINE_UUID(AwbMode, AWB_MODE_AUTO, FB3F365B,CC62,11E5,9956,62,56,62,87,07,61);
200 DEFINE_UUID(AwbMode, AWB_MODE_INCANDESCENT, FB3F365C,CC62,11E5,9956,62,56,62,87,07,61);
201 DEFINE_UUID(AwbMode, AWB_MODE_FLUORESCENT, FB3F365D,CC62,11E5,9956,62,56,62,87,07,61);
202 DEFINE_UUID(AwbMode, AWB_MODE_WARM_FLUORESCENT, FB3F365E,CC62,11E5,9956,62,56,62,87,07,61);
203 DEFINE_UUID(AwbMode, AWB_MODE_DAYLIGHT, FB3F365F,CC62,11E5,9956,62,56,62,87,07,61);
204 DEFINE_UUID(AwbMode, AWB_MODE_CLOUDY_DAYLIGHT, FB3F3660,CC62,11E5,9956,62,56,62,87,07,61);
205 DEFINE_UUID(AwbMode, AWB_MODE_TWILIGHT, FB3F3661,CC62,11E5,9956,62,56,62,87,07,61);
206 DEFINE_UUID(AwbMode, AWB_MODE_SHADE, FB3F3662,CC62,11E5,9956,62,56,62,87,07,61);
207 DEFINE_UUID(AwbMode, AWB_MODE_MANUAL, 20FB45DA,C49F,4293,AB02,13,3F,8C,CA,DD,69);
213 DEFINE_UUID(AwbState, AWB_STATE_INACTIVE, E33CDB30,9C16,11E8,B568,18,00,20,0C,9A,66);
214 DEFINE_UUID(AwbState, AWB_STATE_SEARCHING, E33CDB31,9C16,11E8,B568,18,00,20,0C,9A,66);
215 DEFINE_UUID(AwbState, AWB_STATE_CONVERGED, E33CDB32,9C16,11E8,B568,18,00,20,0C,9A,66);
216 DEFINE_UUID(AwbState, AWB_STATE_LOCKED, E33CDB33,9C16,11E8,B568,18,00,20,0C,9A,66);
233 DEFINE_UUID(CaptureIntent, CAPTURE_INTENT_MANUAL, FB3F3663,CC62,11E5,9956,62,56,62,87,07,61);
234 DEFINE_UUID(CaptureIntent, CAPTURE_INTENT_PREVIEW, FB3F3664,CC62,11E5,9956,62,56,62,87,07,61);
235 DEFINE_UUID(CaptureIntent, CAPTURE_INTENT_STILL_CAPTURE, FB3F3665,CC62,11E5,9956,62,56,62,87,07,61);
236 DEFINE_UUID(CaptureIntent, CAPTURE_INTENT_VIDEO_RECORD, FB3F3666,CC62,11E5,9956,62,56,62,87,07,61);
237 DEFINE_UUID(CaptureIntent, CAPTURE_INTENT_VIDEO_SNAPSHOT, FB3F3667,CC62,11E5,9956,62,56,62,87,07,61);
243 DEFINE_UUID(DenoiseMode, DENOISE_MODE_OFF, FB3F3668,CC62,11E5,9956,62,56,62,87,07,61);
244 DEFINE_UUID(DenoiseMode, DENOISE_MODE_FAST, FB3F3669,CC62,11E5,9956,62,56,62,87,07,61);
245 DEFINE_UUID(DenoiseMode, DENOISE_MODE_HIGH_QUALITY, FB3F366A,CC62,11E5,9956,62,56,62,87,07,61);
251 DEFINE_UUID(EdgeEnhanceMode, EDGE_ENHANCE_MODE_OFF, F7100B40,6A5F,11E6,BDF4,08,00,20,0C,9A,66);
252 DEFINE_UUID(EdgeEnhanceMode, EDGE_ENHANCE_MODE_FAST, F7100B41,6A5F,11E6,BDF4,08,00,20,0C,9A,66);
253 DEFINE_UUID(EdgeEnhanceMode, EDGE_ENHANCE_MODE_HIGH_QUALITY, F7100B42,6A5F,11E6,BDF4,08,00,20,0C,9A,66);
264 DEFINE_UUID(PixelFormat, PIXEL_FMT_UNKNOWN, 00000000,93d5,11e5,0000,1c,b7,2c,ef,d4,1e);
265 DEFINE_UUID(PixelFormat, PIXEL_FMT_Y8, 569be14a,93d5,11e5,91bc,1c,b7,2c,ef,d4,1e);
266 DEFINE_UUID(PixelFormat, PIXEL_FMT_Y16, 56ddb19c,93d5,11e5,8e2c,1c,b7,2c,ef,d4,1e);
267 DEFINE_UUID(PixelFormat, PIXEL_FMT_YCbCr_420_888, 570c10e6,93d5,11e5,8ff3,1c,b7,2c,ef,d4,1e);
268 DEFINE_UUID(PixelFormat, PIXEL_FMT_YCbCr_422_888, 573a7940,93d5,11e5,99c2,1c,b7,2c,ef,d4,1e);
269 DEFINE_UUID(PixelFormat, PIXEL_FMT_YCbCr_444_888, 576043dc,93d5,11e5,8983,1c,b7,2c,ef,d4,1e);
270 DEFINE_UUID(PixelFormat, PIXEL_FMT_JPEG_BLOB, 578b08c4,93d5,11e5,9686,1c,b7,2c,ef,d4,1e);
271 DEFINE_UUID(PixelFormat, PIXEL_FMT_RAW16, 57b484d8,93d5,11e5,aeb6,1c,b7,2c,ef,d4,1e);
272 DEFINE_UUID(PixelFormat, PIXEL_FMT_P016, 57b484d9,93d5,11e5,aeb6,1c,b7,2c,ef,d4,1e);
279 DEFINE_UUID(SensorModeType, SENSOR_MODE_TYPE_DEPTH, 64483464,4b91,11e6,bbbd,40,16,7e,ab,86,92);
280 DEFINE_UUID(SensorModeType, SENSOR_MODE_TYPE_YUV, 6453e00c,4b91,11e6,871d,40,16,7e,ab,86,92);
281 DEFINE_UUID(SensorModeType, SENSOR_MODE_TYPE_RGB, 6463d4c6,4b91,11e6,88a3,40,16,7e,ab,86,92);
282 DEFINE_UUID(SensorModeType, SENSOR_MODE_TYPE_BAYER, 646f04ea,4b91,11e6,9c06,40,16,7e,ab,86,92);
283 DEFINE_UUID(SensorModeType, SENSOR_MODE_TYPE_BAYER_PWL, f6a08220,6a0f,11eb,8572,08,00,20,0c,9a,66);
284 DEFINE_UUID(SensorModeType, SENSOR_MODE_TYPE_BAYER_DOL, f6a08221,6a0f,11eb,8572,08,00,20,0c,9a,66);
290 DEFINE_UUID(SensorPlacement, SENSOR_PLACEMENT_REAR_OR_BOTTOM_OR_BOTTOM_LEFT, 01dba8b0,1946,11eb,8b6f,08,00,20,0c,9a,66);
291 DEFINE_UUID(SensorPlacement, SENSOR_PLACEMENT_FRONT_OR_TOP_OR_CENTER_LEFT, 01dba8b1,1946,11eb,8b6f,08,00,20,0c,9a,66);
292 DEFINE_UUID(SensorPlacement, SENSOR_PLACEMENT_CENTER_OR_CENTER_RIGHT, 01dba8b2,1946,11eb,8b6f,08,00,20,0c,9a,66);
293 DEFINE_UUID(SensorPlacement, SENSOR_PLACEMENT_TOP_LEFT, 01dba8b3,1946,11eb,8b6f,08,00,20,0c,9a,66);
294 DEFINE_UUID(SensorPlacement, SENSOR_PLACEMENT_BOTTOM_RIGHT, 01dba8b4,1946,11eb,8b6f,08,00,20,0c,9a,66);
295 DEFINE_UUID(SensorPlacement, SENSOR_PLACEMENT_TOP_RIGHT, 01dba8b5,1946,11eb,8b6f,08,00,20,0c,9a,66);
301 DEFINE_UUID(BayerPhase, BAYER_PHASE_UNKNOWN, b9d43270,6a0e,12eb,8572,08,00,20,0c,9a,66);
302 DEFINE_UUID(BayerPhase, BAYER_PHASE_RGGB, b9d43271,6a0e,12eb,8572,08,00,20,0c,9a,66);
303 DEFINE_UUID(BayerPhase, BAYER_PHASE_BGGR, b9d43272,6a0e,12eb,8572,08,00,20,0c,9a,66);
304 DEFINE_UUID(BayerPhase, BAYER_PHASE_GRBG, b9d43273,6a0e,12eb,8572,08,00,20,0c,9a,66);
305 DEFINE_UUID(BayerPhase, BAYER_PHASE_GBRG, b9d43274,6a0e,12eb,8572,08,00,20,0c,9a,66);
342 , uint16_t time_hi_and_version_
343 , uint16_t clock_seq_
344 , uint8_t c0, uint8_t c1, uint8_t c2, uint8_t c3, uint8_t c4, uint8_t c5
346 :
NamedUUID(time_low_, time_mid_, time_hi_and_version_, clock_seq_,
347 c0, c1, c2, c3, c4, c5, name)
351 :
NamedUUID(0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
"IID_UNSPECIFIED")
377 template <
typename TheInterface>
380 return static_cast<TheInterface*
>(obj ? obj->
getInterface(TheInterface::id()): 0);
383 template <
typename TheInterface>
386 return static_cast<TheInterface*
>(
419 void operator=(
const rv&);
425 return *
static_cast<rv<T>*
>(&
self);
433 template <
typename T>
struct remove_const;
434 template <
typename T>
struct remove_const<const T&>{
typedef T& type; };
435 template <
typename T>
struct remove_const<const T*>{
typedef T* type; };
436 template <
typename T>
struct remove_const<const T >{
typedef T type; };
437 template <
typename T>
struct remove_const {
typedef T type; };
440 template <
typename T>
447 {
if (m_obj && (m_obj != obj))
const_cast<typename remove_const<T*>::type
>(m_obj)->destroy(); m_obj = obj; }
449 { T* obj = m_obj; m_obj = NULL;
return obj; }
457 T*
get()
const {
return m_obj; }
459 operator bool()
const {
return !!m_obj; }
461 operator rv<UniqueObj>&() {
return *
static_cast< rv<UniqueObj>*
>(
this); }
462 operator const rv<UniqueObj>&()
const {
return *
static_cast<const rv<UniqueObj>*
>(
this); }
467 T* operator->()
const;
471 template <
typename TheInterface,
typename TObject>
480 template <
unsigned int N,
typename T>
489 for (
unsigned int i = 0; i < N; i++)
502 return !(*
this == rhs);
508 for (
unsigned int i = 0; i < N; i++)
516 for (
unsigned int i = 0; i < N; i++)
524 for (
unsigned int i = 0; i < N; i++)
532 for (
unsigned int i = 0; i < N; i++)
576 template <
typename T>
611 template <
typename T>
620 r() =
g() =
b() = init;
643 template <
typename T>
673 template <
typename T>
682 x() =
y() =
z() = init;
704 template <
typename T>
736 template <
typename T>
779 template <
typename T>
817 AcRegion(uint32_t _left, uint32_t _top, uint32_t _right, uint32_t _bottom,
float _weight)
818 :
Rectangle<uint32_t>(_left, _top, _right, _bottom)
836 template <
typename T>
856 m_data.resize(size.
width() * size.
height(), value);
862 m_data = other.m_data;
863 m_size = other.m_size;
869 m_data = other.m_data;
870 m_size = other.m_size;
877 return (m_size == other.m_size && m_data == other.m_data);
889 if (m_data.size() != s)
902 T&
operator[](
unsigned int i) {
return m_data[checkIndex(i)]; }
903 const T&
operator[](
unsigned int i)
const {
return m_data[checkIndex(i)]; }
906 inline const T&
operator() (uint32_t i)
const {
return m_data[checkIndex(i)]; }
907 inline const T&
operator() (uint32_t x, uint32_t y)
const {
return m_data[checkIndex(x, y)]; }
909 {
return m_data[checkIndex(p.
x(), p.
y())]; }
910 inline T&
operator() (uint32_t i) {
return m_data[checkIndex(i)]; }
911 inline T&
operator() (uint32_t x, uint32_t y) {
return m_data[checkIndex(x, y)]; }
913 {
return m_data[checkIndex(p.
x(), p.
y())]; }
916 inline const T*
data()
const {
return m_data.data(); }
917 inline T*
data() {
return m_data.data(); }
920 inline uint32_t checkIndex(uint32_t i)
const
922 assert(i < m_data.size());
926 inline uint32_t checkIndex(uint32_t x, uint32_t y)
const
928 assert(x < m_size.
width());
929 assert(y < m_size.
height());
930 return x + (y * m_size.
width());
933 std::vector<T> m_data;
934 Size2D<uint32_t> m_size;
941 #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.
DEFINE_UUID(ExtensionName, EXT_BAYER_AVERAGE_MAP, 12c3de20, 64c5, 11e6, bdf4, 08, 00, 20, 0c, 9a, 66)
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.
Point3D(T _x, T _y, T _z)
const Tuple< N, T > operator-(const Tuple< N, T > &rhs) const
Returns the result of subtracting another tuple from this tuple.
A universally unique identifier with a name (used 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)
The requested settings are invalid.
Template helper emulating C++11 rvalue semantics.
Rectangle(T _left, T _top, T _right, T _bottom)
Array2D(const Size2D< uint32_t > &size)
Constructor given initial array size.
Point2D(const Tuple< COORDINATE_2D_COUNT, T > &other)
A unique identifier for a libargus Interface.
Point3D(const Tuple< COORDINATE_3D_COUNT, T > &other)
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.
End of stream, used by Stream objects.
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).
DEFINE_NAMED_UUID_CLASS(BufferType)
Coordinate
Coordinates used for 2D and 3D points.
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.
const T & operator[](unsigned int i) const
BayerChannel
Color channel constants for Bayer data.
UniqueObj & operator=(rv< UniqueObj > &moved)
const_iterator end() const
Rectangle(const Tuple< 4, T > &other)
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.
RGBChannel
Color channel constants for RGB data.
Array2D(const Size2D< uint32_t > &size, const T &value)
Constructor given initial array size and initial fill value.