JeVois  1.22
JeVois Smart Embedded Machine Vision Toolkit
Share this page:
Loading...
Searching...
No Matches
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.
 
 ~CameraDevice ()
 Destructor frees all buffers and closes the device.
 
int getFd () const
 Get our fd; used by Camera to access controls.
 
void streamOn ()
 Start streaming.
 
void abortStream ()
 Abort streaming.
 
void streamOff ()
 Stop streaming.
 
void get (RawImage &img)
 Get the next captured buffer.
 
void done (RawImage &img)
 Indicate that user processing is done with an image previously obtained via get()
 
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, int preset=-1)
 Set the video format and frame rate.
 

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, LFATAL, XIOCTL, and XIOCTL_QUIET.

◆ ~CameraDevice()

jevois::CameraDevice::~CameraDevice ( )

Destructor frees all buffers and closes the device.

Definition at line 172 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 371 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 481 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 195 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,
int  preset = -1 
)

◆ streamOff()

void jevois::CameraDevice::streamOff ( )

Stop streaming.

Definition at line 384 of file CameraDevice.C.

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

◆ streamOn()

void jevois::CameraDevice::streamOn ( )

Start streaming.

Definition at line 320 of file CameraDevice.C.

References FDLDEBUG, FDLERROR, FDLFATAL, FDLINFO, JEVOIS_TIMED_LOCK, JEVOIS_TRACE, LDEBUG, jevois::v4l2ImageSize(), and XIOCTL.


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