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(AeState, AE_STATE_INACTIVE, D2EBEA50,9C16,11E8,B568,18,00,20,0C,9A,66);
181 DEFINE_UUID(AeState, AE_STATE_SEARCHING, D2EBEA51,9C16,11E8,B568,18,00,20,0C,9A,66);
182 DEFINE_UUID(AeState, AE_STATE_CONVERGED, D2EBEA52,9C16,11E8,B568,18,00,20,0C,9A,66);
183 DEFINE_UUID(AeState, AE_STATE_FLASH_REQUIRED, D2EBEA53,9C16,11E8,B568,18,00,20,0C,9A,66);
184 DEFINE_UUID(AeState, AE_STATE_TIMEOUT, D2EBEA54,9C16,11E8,B568,18,00,20,0C,9A,66);
190 DEFINE_UUID(AwbMode, AWB_MODE_OFF, FB3F365A,CC62,11E5,9956,62,56,62,87,07,61);
191 DEFINE_UUID(AwbMode, AWB_MODE_AUTO, FB3F365B,CC62,11E5,9956,62,56,62,87,07,61);
192 DEFINE_UUID(AwbMode, AWB_MODE_INCANDESCENT, FB3F365C,CC62,11E5,9956,62,56,62,87,07,61);
193 DEFINE_UUID(AwbMode, AWB_MODE_FLUORESCENT, FB3F365D,CC62,11E5,9956,62,56,62,87,07,61);
194 DEFINE_UUID(AwbMode, AWB_MODE_WARM_FLUORESCENT, FB3F365E,CC62,11E5,9956,62,56,62,87,07,61);
195 DEFINE_UUID(AwbMode, AWB_MODE_DAYLIGHT, FB3F365F,CC62,11E5,9956,62,56,62,87,07,61);
196 DEFINE_UUID(AwbMode, AWB_MODE_CLOUDY_DAYLIGHT, FB3F3660,CC62,11E5,9956,62,56,62,87,07,61);
197 DEFINE_UUID(AwbMode, AWB_MODE_TWILIGHT, FB3F3661,CC62,11E5,9956,62,56,62,87,07,61);
198 DEFINE_UUID(AwbMode, AWB_MODE_SHADE, FB3F3662,CC62,11E5,9956,62,56,62,87,07,61);
199 DEFINE_UUID(AwbMode, AWB_MODE_MANUAL, 20FB45DA,C49F,4293,AB02,13,3F,8C,CA,DD,69);
205 DEFINE_UUID(AwbState, AWB_STATE_INACTIVE, E33CDB30,9C16,11E8,B568,18,00,20,0C,9A,66);
206 DEFINE_UUID(AwbState, AWB_STATE_SEARCHING, E33CDB31,9C16,11E8,B568,18,00,20,0C,9A,66);
207 DEFINE_UUID(AwbState, AWB_STATE_CONVERGED, E33CDB32,9C16,11E8,B568,18,00,20,0C,9A,66);
208 DEFINE_UUID(AwbState, AWB_STATE_LOCKED, E33CDB33,9C16,11E8,B568,18,00,20,0C,9A,66);
218 DEFINE_UUID(CaptureIntent, CAPTURE_INTENT_MANUAL, FB3F3663,CC62,11E5,9956,62,56,62,87,07,61);
219 DEFINE_UUID(CaptureIntent, CAPTURE_INTENT_PREVIEW, FB3F3664,CC62,11E5,9956,62,56,62,87,07,61);
220 DEFINE_UUID(CaptureIntent, CAPTURE_INTENT_STILL_CAPTURE, FB3F3665,CC62,11E5,9956,62,56,62,87,07,61);
221 DEFINE_UUID(CaptureIntent, CAPTURE_INTENT_VIDEO_RECORD, FB3F3666,CC62,11E5,9956,62,56,62,87,07,61);
222 DEFINE_UUID(CaptureIntent, CAPTURE_INTENT_VIDEO_SNAPSHOT, FB3F3667,CC62,11E5,9956,62,56,62,87,07,61);
228 DEFINE_UUID(DenoiseMode, DENOISE_MODE_OFF, FB3F3668,CC62,11E5,9956,62,56,62,87,07,61);
229 DEFINE_UUID(DenoiseMode, DENOISE_MODE_FAST, FB3F3669,CC62,11E5,9956,62,56,62,87,07,61);
230 DEFINE_UUID(DenoiseMode, DENOISE_MODE_HIGH_QUALITY, FB3F366A,CC62,11E5,9956,62,56,62,87,07,61);
236 DEFINE_UUID(EdgeEnhanceMode, EDGE_ENHANCE_MODE_OFF, F7100B40,6A5F,11E6,BDF4,08,00,20,0C,9A,66);
237 DEFINE_UUID(EdgeEnhanceMode, EDGE_ENHANCE_MODE_FAST, F7100B41,6A5F,11E6,BDF4,08,00,20,0C,9A,66);
238 DEFINE_UUID(EdgeEnhanceMode, EDGE_ENHANCE_MODE_HIGH_QUALITY, F7100B42,6A5F,11E6,BDF4,08,00,20,0C,9A,66);
249 DEFINE_UUID(PixelFormat, PIXEL_FMT_UNKNOWN, 00000000,93d5,11e5,0000,1c,b7,2c,ef,d4,1e);
250 DEFINE_UUID(PixelFormat, PIXEL_FMT_Y8, 569be14a,93d5,11e5,91bc,1c,b7,2c,ef,d4,1e);
251 DEFINE_UUID(PixelFormat, PIXEL_FMT_Y16, 56ddb19c,93d5,11e5,8e2c,1c,b7,2c,ef,d4,1e);
252 DEFINE_UUID(PixelFormat, PIXEL_FMT_YCbCr_420_888, 570c10e6,93d5,11e5,8ff3,1c,b7,2c,ef,d4,1e);
253 DEFINE_UUID(PixelFormat, PIXEL_FMT_YCbCr_422_888, 573a7940,93d5,11e5,99c2,1c,b7,2c,ef,d4,1e);
254 DEFINE_UUID(PixelFormat, PIXEL_FMT_YCbCr_444_888, 576043dc,93d5,11e5,8983,1c,b7,2c,ef,d4,1e);
255 DEFINE_UUID(PixelFormat, PIXEL_FMT_JPEG_BLOB, 578b08c4,93d5,11e5,9686,1c,b7,2c,ef,d4,1e);
256 DEFINE_UUID(PixelFormat, PIXEL_FMT_RAW16, 57b484d8,93d5,11e5,aeb6,1c,b7,2c,ef,d4,1e);
257 DEFINE_UUID(PixelFormat, PIXEL_FMT_P016, 57b484d9,93d5,11e5,aeb6,1c,b7,2c,ef,d4,1e);
264 DEFINE_UUID(SensorModeType, SENSOR_MODE_TYPE_DEPTH, 64483464,4b91,11e6,bbbd,40,16,7e,ab,86,92);
265 DEFINE_UUID(SensorModeType, SENSOR_MODE_TYPE_YUV, 6453e00c,4b91,11e6,871d,40,16,7e,ab,86,92);
266 DEFINE_UUID(SensorModeType, SENSOR_MODE_TYPE_RGB, 6463d4c6,4b91,11e6,88a3,40,16,7e,ab,86,92);
267 DEFINE_UUID(SensorModeType, SENSOR_MODE_TYPE_BAYER, 646f04ea,4b91,11e6,9c06,40,16,7e,ab,86,92);
305 , uint16_t time_hi_and_version_
306 , uint16_t clock_seq_
307 , uint8_t c0, uint8_t c1, uint8_t c2, uint8_t c3, uint8_t c4, uint8_t c5
309 :
NamedUUID(time_low_, time_mid_, time_hi_and_version_, clock_seq_,
310 c0, c1, c2, c3, c4, c5, name)
314 :
NamedUUID(0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
"IID_UNSPECIFIED")
340 template <
typename TheInterface>
343 return static_cast<TheInterface*
>(obj ? obj->
getInterface(TheInterface::id()): 0);
346 template <
typename TheInterface>
349 return static_cast<TheInterface*
>(
382 void operator=(
const rv&);
388 return *
static_cast<rv<T>*
>(&
self);
396 template <
typename T>
struct remove_const;
397 template <
typename T>
struct remove_const<const T&>{
typedef T& type; };
398 template <
typename T>
struct remove_const<const T*>{
typedef T* type; };
399 template <
typename T>
struct remove_const<const T >{
typedef T type; };
400 template <
typename T>
struct remove_const {
typedef T type; };
403 template <
typename T>
410 {
if (m_obj)
const_cast<typename remove_const<T*>::type
>(m_obj)->destroy(); m_obj = obj; }
412 { T* obj = m_obj; m_obj = NULL;
return obj; }
420 T*
get()
const {
return m_obj; }
422 operator bool()
const {
return !!m_obj; }
424 operator rv<UniqueObj>&() {
return *
static_cast< rv<UniqueObj>*
>(
this); }
425 operator const rv<UniqueObj>&()
const {
return *
static_cast<const rv<UniqueObj>*
>(
this); }
430 T* operator->()
const;
434 template <
typename TheInterface,
typename TObject>
443 template <
unsigned int N,
typename T>
452 for (
unsigned int i = 0; i < N; i++)
465 return !(*
this == rhs);
471 for (
unsigned int i = 0; i < N; i++)
479 for (
unsigned int i = 0; i < N; i++)
487 for (
unsigned int i = 0; i < N; i++)
495 for (
unsigned int i = 0; i < N; i++)
539 template <
typename T>
574 template <
typename T>
583 r() =
g() =
b() = init;
606 template <
typename T>
634 template <
typename T>
666 template <
typename T>
709 template <
typename T>
747 AcRegion(uint32_t _left, uint32_t _top, uint32_t _right, uint32_t _bottom,
float _weight)
748 :
Rectangle<uint32_t>(_left, _top, _right, _bottom)
766 template <
typename T>
786 m_data.resize(size.
width() * size.
height(), value);
792 m_data = other.m_data;
793 m_size = other.m_size;
799 m_data = other.m_data;
800 m_size = other.m_size;
807 return (m_size == other.m_size && m_data == other.m_data);
819 if (m_data.size() != s)
832 T&
operator[](
unsigned int i) {
return m_data[checkIndex(i)]; }
833 const T&
operator[](
unsigned int i)
const {
return m_data[checkIndex(i)]; }
836 inline const T&
operator() (uint32_t i)
const {
return m_data[checkIndex(i)]; }
837 inline const T&
operator() (uint32_t x, uint32_t y)
const {
return m_data[checkIndex(x, y)]; }
839 {
return m_data[checkIndex(p.
x(), p.
y())]; }
840 inline T&
operator() (uint32_t i) {
return m_data[checkIndex(i)]; }
841 inline T&
operator() (uint32_t x, uint32_t y) {
return m_data[checkIndex(x, y)]; }
843 {
return m_data[checkIndex(p.
x(), p.
y())]; }
846 inline const T*
data()
const {
return m_data.data(); }
847 inline T*
data() {
return m_data.data(); }
850 inline uint32_t checkIndex(uint32_t i)
const
852 assert(i < m_data.size());
856 inline uint32_t checkIndex(uint32_t x, uint32_t y)
const
858 assert(x < m_size.
width());
859 assert(y < m_size.
height());
860 return x + (y * m_size.
width());
863 std::vector<T> m_data;
864 Size2D<uint32_t> m_size;
871 #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.
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.
DEFINE_NAMED_UUID_CLASS(StreamType)
The general operation, buffer source, and interfaces supported by a stream object are defined by its ...
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.
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).
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.