Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
usb_cam::AbstractV4LUSBCam Class Reference

#include <camera_driver.h>

Inheritance diagram for usb_cam::AbstractV4LUSBCam:
Inheritance graph
[legend]

Public Member Functions

virtual ~AbstractV4LUSBCam ()
 

Static Public Member Functions

static std::vector< capture_format_t > & get_supported_formats ()
 

Protected Member Functions

 AbstractV4LUSBCam ()
 
 AbstractV4LUSBCam (const AbstractV4LUSBCam &root)=delete
 

Static Protected Member Functions

static void adjust_camera ()
 
static void close_handlers ()
 
static bool decode_ffmpeg (const void *src, int len, camera_image_t *dest)
 
static bool init ()
 
static bool init_decoder ()
 
static bool process_image (const void *src, int len, camera_image_t *dest)
 
static camera_image_tread_frame ()
 
static void release_device ()
 
static void run_grabber (unsigned int &buffer_size)
 
static bool set_v4l_parameter (const std::string &param, const std::string &value)
 
static bool set_v4l_parameter (const std::string &param, int value)
 
static bool set_v4l_parameter (const std::string &param, long value)
 
static bool set_v4l_parameter (const std::string &param, bool value)
 
static bool start ()
 
static bool start_capture ()
 
static bool suspend ()
 
static void v4l_query_controls ()
 

Protected Attributes

camera_image_t _image
 

Static Protected Attributes

static AVCodec * avcodec = nullptr
 
static AVCodecContext * avcodec_context = nullptr
 
static AVFrame * avframe_camera = nullptr
 
static int avframe_camera_size = 0
 
static AVFrame * avframe_rgb = nullptr
 
static int avframe_rgb_size = 0
 
static AVDictionary * avoptions = nullptr
 
static AVPacket * avpkt = nullptr
 
static bufferbuffers = nullptr
 
static unsigned int buffers_count = 0
 
static bool capturing = false
 
static AVCodecID codec_id = AV_CODEC_ID_NONE
 
static color_format_t color_format = COLOR_FORMAT_UNKNOWN
 
static std::string color_format_name = "yuv422p"
 
static std::vector< camera_control_tcontrols = std::vector<camera_control_t>()
 
static const time_t epoch_time_shift = util::get_epoch_time_shift()
 
static int file_dev = -1
 
static int framerate = 10
 
static bool full_ffmpeg_log = false
 
static std::set< std::string > ignore_controls = std::set<std::string>()
 
static camera_image_timage = nullptr
 
static int image_height = 240
 
static int image_width = 320
 
static io_method_t io_method = io_method_t::IO_METHOD_MMAP
 
static std::string io_method_name = "mmap"
 
static bool monochrome = false
 
static pixel_format_t pixel_format = PIXEL_FORMAT_UNKNOWN
 
static std::string pixel_format_name = "uyvy"
 
static bool streaming_status = false
 
static std::vector< capture_format_tsupported_formats = std::vector<capture_format_t>()
 
static unsigned int v4l_pixel_format = V4L2_PIX_FMT_UYVY
 
static std::string video_device_name = "/dev/video0"
 
static struct SwsContext * video_sws = nullptr
 

Detailed Description

Definition at line 38 of file camera_driver.h.

Constructor & Destructor Documentation

◆ AbstractV4LUSBCam() [1/2]

AbstractV4LUSBCam::AbstractV4LUSBCam ( )
protected

Definition at line 491 of file camera_driver.cpp.

◆ AbstractV4LUSBCam() [2/2]

usb_cam::AbstractV4LUSBCam::AbstractV4LUSBCam ( const AbstractV4LUSBCam root)
protecteddelete

◆ ~AbstractV4LUSBCam()

AbstractV4LUSBCam::~AbstractV4LUSBCam ( )
virtual

Definition at line 225 of file camera_driver.cpp.

Member Function Documentation

◆ adjust_camera()

void AbstractV4LUSBCam::adjust_camera ( )
staticprotected

Definition at line 1008 of file camera_driver.cpp.

◆ close_handlers()

void AbstractV4LUSBCam::close_handlers ( )
staticprotected

Definition at line 483 of file camera_driver.cpp.

◆ decode_ffmpeg()

bool AbstractV4LUSBCam::decode_ffmpeg ( const void *  src,
int  len,
camera_image_t dest 
)
staticprotected

Definition at line 761 of file camera_driver.cpp.

◆ get_supported_formats()

std::vector< capture_format_t > & AbstractV4LUSBCam::get_supported_formats ( )
static

Definition at line 835 of file camera_driver.cpp.

◆ init()

bool AbstractV4LUSBCam::init ( )
staticprotected

Definition at line 53 of file camera_driver.cpp.

◆ init_decoder()

bool AbstractV4LUSBCam::init_decoder ( )
staticprotected

Definition at line 252 of file camera_driver.cpp.

◆ process_image()

bool AbstractV4LUSBCam::process_image ( const void *  src,
int  len,
camera_image_t dest 
)
staticprotected

Definition at line 877 of file camera_driver.cpp.

◆ read_frame()

camera_image_t * AbstractV4LUSBCam::read_frame ( )
staticprotected

Definition at line 495 of file camera_driver.cpp.

◆ release_device()

void AbstractV4LUSBCam::release_device ( )
staticprotected

Definition at line 458 of file camera_driver.cpp.

◆ run_grabber()

void AbstractV4LUSBCam::run_grabber ( unsigned int &  buffer_size)
staticprotected

Definition at line 642 of file camera_driver.cpp.

◆ set_v4l_parameter() [1/4]

bool AbstractV4LUSBCam::set_v4l_parameter ( const std::string &  param,
const std::string &  value 
)
staticprotected

Definition at line 903 of file camera_driver.cpp.

◆ set_v4l_parameter() [2/4]

static bool usb_cam::AbstractV4LUSBCam::set_v4l_parameter ( const std::string &  param,
int  value 
)
inlinestaticprotected

Definition at line 100 of file camera_driver.h.

◆ set_v4l_parameter() [3/4]

static bool usb_cam::AbstractV4LUSBCam::set_v4l_parameter ( const std::string &  param,
long  value 
)
inlinestaticprotected

Definition at line 101 of file camera_driver.h.

◆ set_v4l_parameter() [4/4]

static bool usb_cam::AbstractV4LUSBCam::set_v4l_parameter ( const std::string &  param,
bool  value 
)
inlinestaticprotected

Definition at line 102 of file camera_driver.h.

◆ start()

bool AbstractV4LUSBCam::start ( )
staticprotected

Definition at line 90 of file camera_driver.cpp.

◆ start_capture()

bool AbstractV4LUSBCam::start_capture ( )
staticprotected

Definition at line 375 of file camera_driver.cpp.

◆ suspend()

bool AbstractV4LUSBCam::suspend ( )
staticprotected

Definition at line 433 of file camera_driver.cpp.

◆ v4l_query_controls()

void AbstractV4LUSBCam::v4l_query_controls ( )
staticprotected

Definition at line 937 of file camera_driver.cpp.

Member Data Documentation

◆ _image

camera_image_t usb_cam::AbstractV4LUSBCam::_image
protected

Definition at line 64 of file camera_driver.h.

◆ avcodec

AVCodec * AbstractV4LUSBCam::avcodec = nullptr
staticprotected

Definition at line 57 of file camera_driver.h.

◆ avcodec_context

AVCodecContext * AbstractV4LUSBCam::avcodec_context = nullptr
staticprotected

Definition at line 60 of file camera_driver.h.

◆ avframe_camera

AVFrame * AbstractV4LUSBCam::avframe_camera = nullptr
staticprotected

Definition at line 54 of file camera_driver.h.

◆ avframe_camera_size

int AbstractV4LUSBCam::avframe_camera_size = 0
staticprotected

Definition at line 61 of file camera_driver.h.

◆ avframe_rgb

AVFrame * AbstractV4LUSBCam::avframe_rgb = nullptr
staticprotected

Definition at line 55 of file camera_driver.h.

◆ avframe_rgb_size

int AbstractV4LUSBCam::avframe_rgb_size = 0
staticprotected

Definition at line 62 of file camera_driver.h.

◆ avoptions

AVDictionary * AbstractV4LUSBCam::avoptions = nullptr
staticprotected

Definition at line 59 of file camera_driver.h.

◆ avpkt

AVPacket * AbstractV4LUSBCam::avpkt = nullptr
staticprotected

Definition at line 56 of file camera_driver.h.

◆ buffers

buffer * AbstractV4LUSBCam::buffers = nullptr
staticprotected

Definition at line 52 of file camera_driver.h.

◆ buffers_count

unsigned int AbstractV4LUSBCam::buffers_count = 0
staticprotected

Definition at line 53 of file camera_driver.h.

◆ capturing

bool AbstractV4LUSBCam::capturing = false
staticprotected

Definition at line 66 of file camera_driver.h.

◆ codec_id

AVCodecID AbstractV4LUSBCam::codec_id = AV_CODEC_ID_NONE
staticprotected

Definition at line 58 of file camera_driver.h.

◆ color_format

color_format_t AbstractV4LUSBCam::color_format = COLOR_FORMAT_UNKNOWN
staticprotected

Definition at line 45 of file camera_driver.h.

◆ color_format_name

std::string AbstractV4LUSBCam::color_format_name = "yuv422p"
staticprotected

Definition at line 74 of file camera_driver.h.

◆ controls

std::vector< camera_control_t > AbstractV4LUSBCam::controls = std::vector<camera_control_t>()
staticprotected

Definition at line 78 of file camera_driver.h.

◆ epoch_time_shift

const time_t AbstractV4LUSBCam::epoch_time_shift = util::get_epoch_time_shift()
staticprotected

Definition at line 48 of file camera_driver.h.

◆ file_dev

int AbstractV4LUSBCam::file_dev = -1
staticprotected

Definition at line 47 of file camera_driver.h.

◆ framerate

int AbstractV4LUSBCam::framerate = 10
staticprotected

Definition at line 77 of file camera_driver.h.

◆ full_ffmpeg_log

bool AbstractV4LUSBCam::full_ffmpeg_log = false
staticprotected

Definition at line 51 of file camera_driver.h.

◆ ignore_controls

std::set< std::string > AbstractV4LUSBCam::ignore_controls = std::set<std::string>()
staticprotected

Definition at line 79 of file camera_driver.h.

◆ image

camera_image_t * AbstractV4LUSBCam::image = nullptr
staticprotected

Definition at line 65 of file camera_driver.h.

◆ image_height

int AbstractV4LUSBCam::image_height = 240
staticprotected

Definition at line 76 of file camera_driver.h.

◆ image_width

int AbstractV4LUSBCam::image_width = 320
staticprotected

Definition at line 75 of file camera_driver.h.

◆ io_method

io_method_t AbstractV4LUSBCam::io_method = io_method_t::IO_METHOD_MMAP
staticprotected

Definition at line 42 of file camera_driver.h.

◆ io_method_name

std::string AbstractV4LUSBCam::io_method_name = "mmap"
staticprotected

Definition at line 72 of file camera_driver.h.

◆ monochrome

bool AbstractV4LUSBCam::monochrome = false
staticprotected

Definition at line 46 of file camera_driver.h.

◆ pixel_format

pixel_format_t AbstractV4LUSBCam::pixel_format = PIXEL_FORMAT_UNKNOWN
staticprotected

Definition at line 43 of file camera_driver.h.

◆ pixel_format_name

std::string AbstractV4LUSBCam::pixel_format_name = "uyvy"
staticprotected

Definition at line 73 of file camera_driver.h.

◆ streaming_status

bool AbstractV4LUSBCam::streaming_status = false
staticprotected

Definition at line 70 of file camera_driver.h.

◆ supported_formats

std::vector< capture_format_t > AbstractV4LUSBCam::supported_formats = std::vector<capture_format_t>()
staticprotected

Definition at line 67 of file camera_driver.h.

◆ v4l_pixel_format

unsigned int AbstractV4LUSBCam::v4l_pixel_format = V4L2_PIX_FMT_UYVY
staticprotected

Definition at line 44 of file camera_driver.h.

◆ video_device_name

std::string AbstractV4LUSBCam::video_device_name = "/dev/video0"
staticprotected

Definition at line 71 of file camera_driver.h.

◆ video_sws

struct SwsContext * AbstractV4LUSBCam::video_sws = nullptr
staticprotected

Definition at line 63 of file camera_driver.h.


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


usb_cam
Author(s): Benjamin Pitzer
autogenerated on Sat May 27 2023 02:53:05