JeVois  1.17
JeVois Smart Embedded Machine Vision Toolkit
Share this page:
jevois::CameraDevice Class Reference

#include <jevois/Core/CameraDevice.H>

Accessory class to hold all the data associated with a V4L2 camera device.

This class is used internally by jevois::Camera and is of little use to end users.

Definition at line 32 of file CameraDevice.H.

Public Member Functions

 CameraDevice (std::string const &devname, unsigned int const nbufs, bool dummy)
 Constructor opens the device, checks its capabilities, starts run thread. More...
 
 ~CameraDevice ()
 Destructor frees all buffers and closes the device. More...
 
int getFd () const
 Get our fd; used by Camera to access controls. More...
 
void streamOn ()
 Start streaming. More...
 
void abortStream ()
 Abort streaming. More...
 
void streamOff ()
 Stop streaming. More...
 
void get (RawImage &img)
 Get the next captured buffer. More...
 
void done (RawImage &img)
 Indicate that user processing is done with an image previously obtained via get() More...
 
void setFormat (unsigned int const fmt, unsigned int const capw, unsigned int const caph, float const fps, unsigned int const cropw, unsigned int const croph)
 Set the video format and frame rate. More...
 

Constructor & Destructor Documentation

◆ CameraDevice()

jevois::CameraDevice::CameraDevice ( std::string const &  devname,
unsigned int const  nbufs,
bool  dummy 
)

Constructor opens the device, checks its capabilities, starts run thread.

When dummy is true, we will just dequeue and requeue the buffers with no processing.

Definition at line 76 of file CameraDevice.C.

References jevois::async_little(), jevois::fccstr(), FDLDEBUG, FDLFATAL, FDLINFO, JEVOIS_TRACE, and LFATAL.

◆ ~CameraDevice()

jevois::CameraDevice::~CameraDevice ( )

Destructor frees all buffers and closes the device.

Definition at line 145 of file CameraDevice.C.

References FDLERROR, JEVOIS_TRACE, JEVOIS_WAIT_GET_FUTURE, and jevois::warnAndIgnoreException().

Member Function Documentation

◆ abortStream()

void jevois::CameraDevice::abortStream ( )

Abort streaming.

Definition at line 342 of file CameraDevice.C.

References JEVOIS_TRACE.

◆ done()

void jevois::CameraDevice::done ( jevois::RawImage img)

Indicate that user processing is done with an image previously obtained via get()

Definition at line 452 of file CameraDevice.C.

References jevois::RawImage::bufindex, JEVOIS_TIMED_LOCK, JEVOIS_TRACE, and LDEBUG.

◆ get()

void jevois::CameraDevice::get ( jevois::RawImage img)

◆ getFd()

int jevois::CameraDevice::getFd ( ) const

Get our fd; used by Camera to access controls.

Definition at line 168 of file CameraDevice.C.

◆ setFormat()

void jevois::CameraDevice::setFormat ( unsigned int const  fmt,
unsigned int const  capw,
unsigned int const  caph,
float const  fps,
unsigned int const  cropw,
unsigned int const  croph 
)

Set the video format and frame rate.

Definition at line 467 of file CameraDevice.C.

References jevois::fccstr(), FDLFATAL, FDLINFO, JEVOIS_TIMED_LOCK, JEVOIS_TRACE, LDEBUG, LERROR, LINFO, and V4L2_MODE_VIDEO.

◆ streamOff()

void jevois::CameraDevice::streamOff ( )

Stop streaming.

Definition at line 355 of file CameraDevice.C.

References FDLDEBUG, JEVOIS_TRACE, LDEBUG, and jevois::warnAndIgnoreException().

◆ streamOn()

void jevois::CameraDevice::streamOn ( )

Start streaming.

Definition at line 293 of file CameraDevice.C.

References FDLDEBUG, FDLERROR, FDLFATAL, FDLINFO, JEVOIS_TIMED_LOCK, JEVOIS_TRACE, and LDEBUG.


The documentation for this class was generated from the following files: