All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Member Functions | Protected Attributes
pangolin::V4lVideo Class Reference

#include <v4l.h>

Inheritance diagram for pangolin::V4lVideo:
Inheritance graph
[legend]

List of all members.

Public Member Functions

bool GrabNewest (unsigned char *image, bool wait=true)
bool GrabNext (unsigned char *image, bool wait=true)
unsigned Height () const
std::string PixFormat () const
size_t SizeBytes () const
void Start ()
 Implement VideoSource::Start()
void Stop ()
 Implement VideoSource::Stop()
 V4lVideo (const char *dev_name, io_method io=IO_METHOD_MMAP)
unsigned Width () const
 ~V4lVideo ()

Protected Member Functions

void close_device ()
void init_device (const char *dev_name, unsigned iwidth, unsigned iheight, unsigned ifps, unsigned v4l_format=V4L2_PIX_FMT_YUYV, v4l2_field field=V4L2_FIELD_INTERLACED)
void init_mmap (const char *dev_name)
void init_read (unsigned int buffer_size)
void init_userp (const char *dev_name, unsigned int buffer_size)
void Mainloop ()
void open_device (const char *dev_name)
int ReadFrame (unsigned char *image)
void uninit_device ()

Protected Attributes

bufferbuffers
int fd
float fps
unsigned height
size_t image_size
io_method io
unsigned int n_buffers
bool running
unsigned width

Detailed Description

Definition at line 53 of file v4l.h.


Constructor & Destructor Documentation

pangolin::V4lVideo::V4lVideo ( const char *  dev_name,
io_method  io = IO_METHOD_MMAP 
)

Definition at line 62 of file v4l.cpp.

Definition at line 70 of file v4l.cpp.


Member Function Documentation

void pangolin::V4lVideo::close_device ( ) [protected]

Definition at line 636 of file v4l.cpp.

bool pangolin::V4lVideo::GrabNewest ( unsigned char *  image,
bool  wait = true 
) [virtual]

Copy the newest frame from the camera to image discarding all older frames. Optionally wait for a frame if one isn't ready Returns true iff image was copied

Implements pangolin::VideoInterface.

Definition at line 140 of file v4l.cpp.

bool pangolin::V4lVideo::GrabNext ( unsigned char *  image,
bool  wait = true 
) [virtual]

Copy the next frame from the camera to image. Optionally wait for a frame if one isn't ready Returns true iff image was copied

Implements pangolin::VideoInterface.

Definition at line 102 of file v4l.cpp.

unsigned pangolin::V4lVideo::Height ( ) const [virtual]

Implements pangolin::VideoInterface.

Definition at line 86 of file v4l.cpp.

void pangolin::V4lVideo::init_device ( const char *  dev_name,
unsigned  iwidth,
unsigned  iheight,
unsigned  ifps,
unsigned  v4l_format = V4L2_PIX_FMT_YUYV,
v4l2_field  field = V4L2_FIELD_INTERLACED 
) [protected]

Definition at line 486 of file v4l.cpp.

void pangolin::V4lVideo::init_mmap ( const char *  dev_name) [protected]

Definition at line 380 of file v4l.cpp.

void pangolin::V4lVideo::init_read ( unsigned int  buffer_size) [protected]

Definition at line 362 of file v4l.cpp.

void pangolin::V4lVideo::init_userp ( const char *  dev_name,
unsigned int  buffer_size 
) [protected]

Definition at line 440 of file v4l.cpp.

void pangolin::V4lVideo::Mainloop ( ) [protected]
void pangolin::V4lVideo::open_device ( const char *  dev_name) [protected]

Definition at line 644 of file v4l.cpp.

std::string pangolin::V4lVideo::PixFormat ( ) const [virtual]

Implements pangolin::VideoInterface.

Definition at line 96 of file v4l.cpp.

int pangolin::V4lVideo::ReadFrame ( unsigned char *  image) [protected]

Definition at line 146 of file v4l.cpp.

size_t pangolin::V4lVideo::SizeBytes ( ) const [virtual]

Implements pangolin::VideoInterface.

Definition at line 91 of file v4l.cpp.

void pangolin::V4lVideo::Start ( ) [virtual]

Implement VideoSource::Start()

Implements pangolin::VideoInterface.

Definition at line 276 of file v4l.cpp.

void pangolin::V4lVideo::Stop ( ) [virtual]

Implement VideoSource::Stop()

Implements pangolin::VideoInterface.

Definition at line 253 of file v4l.cpp.

void pangolin::V4lVideo::uninit_device ( ) [protected]

Definition at line 337 of file v4l.cpp.

unsigned pangolin::V4lVideo::Width ( ) const [virtual]

Implements pangolin::VideoInterface.

Definition at line 81 of file v4l.cpp.


Member Data Documentation

Definition at line 94 of file v4l.h.

int pangolin::V4lVideo::fd [protected]

Definition at line 93 of file v4l.h.

float pangolin::V4lVideo::fps [protected]

Definition at line 99 of file v4l.h.

unsigned pangolin::V4lVideo::height [protected]

Definition at line 98 of file v4l.h.

size_t pangolin::V4lVideo::image_size [protected]

Definition at line 100 of file v4l.h.

Definition at line 92 of file v4l.h.

unsigned int pangolin::V4lVideo::n_buffers [protected]

Definition at line 95 of file v4l.h.

bool pangolin::V4lVideo::running [protected]

Definition at line 96 of file v4l.h.

unsigned pangolin::V4lVideo::width [protected]

Definition at line 97 of file v4l.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


pangolin_wrapper
Author(s): Todor Stoyanov
autogenerated on Wed Feb 13 2013 14:03:25