source: flair-src/trunk/lib/FlairSensorActuator/src/V4LCamera.h@ 460

Last change on this file since 460 was 403, checked in by Sanahuja Guillaume, 3 years ago

select user memory pointer (v4l) if using custom alloc function in images (ie if initdsp was called)

File size: 2.7 KB
RevLine 
[3]1// %flair:license{
[15]2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
[3]4// %flair:license}
5/*!
6 * \file V4LCamera.h
7 * \brief Base class for V4l camera
8 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
9 * \date 2014/07/17
10 * \version 4.0
11 */
12
[352]13#ifndef V4LCAMERA_H
14#define V4LCAMERA_H
[3]15
16#include <Thread.h>
17#include "Camera.h"
[350]18
[15]19namespace flair {
[346]20 namespace core {
21 class Image;
22 }
[3]23}
24
[352]25class V4LCamera_impl;
26
[15]27namespace flair {
28namespace sensor {
29/*! \class V4LCamera
30*
31* \brief Base class for V4l camera
32*/
33class V4LCamera : public core::Thread, public Camera {
[352]34 friend class ::V4LCamera_impl;
[15]35public:
36 /*!
37 * \brief Constructor
38 *
39 * Construct a Camera.
[137]40 * It will be child of the FrameworkManager.
[15]41 *
42 * \param name name
43 * \param camera_index camera index
44 * \param width width
45 * \param height height
46 * \param format image format
[403]47 * \param useMemoryUsrPtr true to use memory user pointer (ex with cmem on omap3730), false to use mmap
[15]48 * \param priority priority of the Thread
49 */
[137]50 V4LCamera(std::string name,
[15]51 uint8_t camera_index, uint16_t width, uint16_t height,
[403]52 core::Image::Type::Format format, bool useMemoryUsrPtr,uint8_t priority);
[3]53
[15]54 /*!
55 * \brief Destructor
56 *
57 */
58 ~V4LCamera();
[165]59
60 //hack for ps3eye in hds uav
61 //TODO: put this in ps3eye class
62 bool HasProblems(void);
[3]63
[15]64protected:
65 /*!
66 * \brief Set Gain
67 *
68 * \param value value between 0 and 1
69 */
70 virtual void SetGain(float value);
[3]71
[15]72 /*!
73 * \brief Set Auto Gain
74 *
75 * \param value value
76 */
77 virtual void SetAutoGain(bool value);
[3]78
[15]79 /*!
80 * \brief Set Exposure
81 *
82 * \param value value between 0 and 1
83 */
84 virtual void SetExposure(float value);
[3]85
[15]86 /*!
87 * \brief Set Auto Exposure
88 *
89 * \param value value
90 */
91 virtual void SetAutoExposure(bool value);
[3]92
[15]93 /*!
94 * \brief Set Brightness
95 *
96 * \param value value between 0 and 1
97 */
98 virtual void SetBrightness(float value);
[3]99
[15]100 /*!
101 * \brief Set Saturation
102 *
103 * \param value value between 0 and 1
104 */
105 virtual void SetSaturation(float value);
[3]106
[15]107 /*!
108 * \brief Set Hue
109 *
110 * \param value value between 0 and 1
111 */
112 virtual void SetHue(float value);
[3]113
[15]114 /*!
115 * \brief Set Contrast
116 *
117 * \param value value between 0 and 1
118 */
119 virtual void SetContrast(float value);
[165]120
[15]121private:
122 /*!
123 * \brief Update using provided datas
124 *
125 * Reimplemented from IODevice.
126 *
127 * \param data data from the parent to process
128 */
129 void UpdateFrom(const core::io_data *data){};
[3]130
[15]131 /*!
132 * \brief Run function
133 *
134 * Reimplemented from Thread.
135 *
136 */
137 void Run(void);
[330]138
[352]139 class V4LCamera_impl *pimpl_;
[15]140};
[3]141} // end namespace sensor
142} // end namespace flair
[352]143#endif // V4LCAMERA_H
Note: See TracBrowser for help on using the repository browser.