source: flair-src/trunk/lib/FlairSensorActuator/src/V4LCamera.cpp@ 475

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

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

File size: 1.8 KB
Line 
1// %flair:license{
2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
4// %flair:license}
5// created: 2014/07/17
6// filename: V4LCamera.cpp
7//
8// author: Guillaume Sanahuja
9// Copyright Heudiasyc UMR UTC/CNRS 7253
10//
11// version: $Id: $
12//
13// purpose: base class for V4l camera
14//
15//
16/*********************************************************************/
17
18#include "V4LCamera.h"
19#include "V4LCamera_impl.h"
20#include <Image.h>
21#include <FrameworkManager.h>
22
23using std::string;
24using namespace flair::core;
25
26namespace flair {
27namespace sensor {
28
29V4LCamera::V4LCamera(string name,uint8_t camera_index, uint16_t width, uint16_t height,
30 Image::Type::Format format, bool useMemoryUsrPtr,uint8_t priority)
31 : Thread(getFrameworkManager(), name, priority),
32 Camera(name, width, height, format) {
33
34 pimpl_=new V4LCamera_impl(this,name,camera_index,width,height,format,useMemoryUsrPtr);
35}
36
37V4LCamera::~V4LCamera() {
38 SafeStop();
39 Join();
40 delete pimpl_;
41}
42
43void V4LCamera::Run(void) {
44 pimpl_->Run();
45}
46
47bool V4LCamera::HasProblems(void) {
48 return pimpl_->hasProblems;
49}
50
51void V4LCamera::SetAutoGain(bool value) {
52 pimpl_->SetAutoGain(value);
53}
54
55void V4LCamera::SetAutoExposure(bool value) {
56 Thread::Warn("not implemented\n");
57}
58
59void V4LCamera::SetGain(float value) {
60 pimpl_->SetGain(value);
61}
62
63void V4LCamera::SetExposure(float value) {
64 pimpl_->SetExposure(value);
65}
66
67void V4LCamera::SetBrightness(float value) {
68 pimpl_->SetBrightness(value);
69}
70
71void V4LCamera::SetSaturation(float value) {
72 pimpl_->SetSaturation(value);
73}
74
75void V4LCamera::SetHue(float value) {
76 pimpl_->SetHue(value);
77}
78
79void V4LCamera::SetContrast(float value) {
80 pimpl_->SetContrast(value);
81}
82
83} // end namespace sensor
84} // end namespace flair
Note: See TracBrowser for help on using the repository browser.