APM:Libraries
|
#include <VideoIn.h>
Classes | |
class | Frame |
Public Member Functions | |
bool | get_frame (Frame &frame) |
void | put_frame (Frame &frame) |
void | set_device_path (const char *path) |
void | init () |
bool | open_device (const char *device_path, uint32_t memtype) |
bool | allocate_buffers (uint32_t nbufs) |
void | get_pixel_formats (std::vector< uint32_t > *formats) |
bool | set_format (uint32_t *width, uint32_t *height, uint32_t *format, uint32_t *bytesperline, uint32_t *sizeimage) |
bool | set_crop (uint32_t left, uint32_t top, uint32_t width, uint32_t height) |
void | prepare_capture () |
Static Public Member Functions | |
static void | shrink_8bpp (uint8_t *buffer, uint8_t *new_buffer, uint32_t width, uint32_t height, uint32_t left, uint32_t selection_width, uint32_t top, uint32_t selection_height, uint32_t fx, uint32_t fy) |
static void | crop_8bpp (uint8_t *buffer, uint8_t *new_buffer, uint32_t width, uint32_t left, uint32_t crop_width, uint32_t top, uint32_t crop_height) |
static void | yuyv_to_grey (uint8_t *buffer, uint32_t buffer_size, uint8_t *new_buffer) |
Private Member Functions | |
void | _queue_buffer (int index) |
bool | _set_streaming (bool enable) |
bool | _dequeue_frame (Frame &frame) |
uint32_t | _timeval_to_us (struct timeval &tv) |
Private Attributes | |
int | _fd = -1 |
struct buffer * | _buffers |
unsigned int | _nbufs |
bool | _streaming |
uint32_t | _width |
uint32_t | _height |
uint32_t | _format |
uint32_t | _bytesperline |
uint32_t | _sizeimage |
uint32_t | _memtype = V4L2_MEMORY_MMAP |
|
private |
Definition at line 362 of file VideoIn.cpp.
Referenced by get_frame().
|
private |
Definition at line 326 of file VideoIn.cpp.
Referenced by prepare_capture(), and put_frame().
|
private |
Definition at line 347 of file VideoIn.cpp.
Referenced by get_frame().
|
private |
Definition at line 321 of file VideoIn.cpp.
Referenced by _dequeue_frame().
bool VideoIn::allocate_buffers | ( | uint32_t | nbufs | ) |
Definition at line 97 of file VideoIn.cpp.
Referenced by Linux::OpticalFlow_Onboard::init().
|
static |
Definition at line 292 of file VideoIn.cpp.
Referenced by Linux::OpticalFlow_Onboard::_run_optflow(), and BM_Crop8bpp().
bool VideoIn::get_frame | ( | Frame & | frame | ) |
Definition at line 45 of file VideoIn.cpp.
Referenced by Linux::OpticalFlow_Onboard::_run_optflow().
void VideoIn::get_pixel_formats | ( | std::vector< uint32_t > * | formats | ) |
Definition at line 163 of file VideoIn.cpp.
Referenced by Linux::OpticalFlow_Onboard::init().
void Linux::VideoIn::init | ( | ) |
bool VideoIn::open_device | ( | const char * | device_path, |
uint32_t | memtype | ||
) |
Definition at line 63 of file VideoIn.cpp.
Referenced by Linux::OpticalFlow_Onboard::init().
void VideoIn::prepare_capture | ( | ) |
Definition at line 243 of file VideoIn.cpp.
Referenced by Linux::OpticalFlow_Onboard::init().
void VideoIn::put_frame | ( | Frame & | frame | ) |
Definition at line 58 of file VideoIn.cpp.
Referenced by Linux::OpticalFlow_Onboard::_run_optflow().
bool VideoIn::set_crop | ( | uint32_t | left, |
uint32_t | top, | ||
uint32_t | width, | ||
uint32_t | height | ||
) |
Definition at line 219 of file VideoIn.cpp.
Referenced by Linux::OpticalFlow_Onboard::init().
void Linux::VideoIn::set_device_path | ( | const char * | path | ) |
bool VideoIn::set_format | ( | uint32_t * | width, |
uint32_t * | height, | ||
uint32_t * | format, | ||
uint32_t * | bytesperline, | ||
uint32_t * | sizeimage | ||
) |
Definition at line 177 of file VideoIn.cpp.
Referenced by Linux::OpticalFlow_Onboard::init().
|
static |
Definition at line 253 of file VideoIn.cpp.
Referenced by Linux::OpticalFlow_Onboard::_run_optflow().
|
static |
Definition at line 310 of file VideoIn.cpp.
Referenced by Linux::OpticalFlow_Onboard::_run_optflow(), and BM_YuyvToGrey().
|
private |
Definition at line 75 of file VideoIn.h.
Referenced by _dequeue_frame(), _queue_buffer(), allocate_buffers(), and open_device().
|
private |
Definition at line 74 of file VideoIn.h.
Referenced by _dequeue_frame(), _queue_buffer(), _set_streaming(), allocate_buffers(), get_pixel_formats(), open_device(), set_crop(), and set_format().
|
private |
Definition at line 83 of file VideoIn.h.
Referenced by _dequeue_frame(), _queue_buffer(), allocate_buffers(), and open_device().
|
private |
Definition at line 76 of file VideoIn.h.
Referenced by allocate_buffers(), and prepare_capture().
|
private |
Definition at line 77 of file VideoIn.h.
Referenced by get_frame().