36 #ifndef USB_CAM_USB_CAM_H 37 #define USB_CAM_USB_CAM_H 39 #include <asm/types.h> 43 #include <linux/videodev2.h> 44 #include <libavcodec/avcodec.h> 45 #include <libswscale/swscale.h> 46 #include <libavutil/mem.h> 50 #include <libavcodec/version.h> 51 #if LIBAVCODEC_VERSION_MAJOR < 55 52 #define AV_CODEC_ID_MJPEG CODEC_ID_MJPEG 58 #include <sensor_msgs/Image.h> 78 void start(
const std::string& dev, io_method io, pixel_format pf,
79 int image_width,
int image_height,
int framerate);
119 void mjpeg2rgb(
char *MJPEG,
int len,
char *RGB,
int NumPixels);
123 void init_read(
unsigned int buffer_size);
126 void init_device(
int image_width,
int image_height,
int framerate);
int init_mjpeg_decoder(int image_width, int image_height)
void start_capturing(void)
AVFrame * avframe_camera_
void set_auto_focus(int value)
struct SwsContext * video_sws_
void stop_capturing(void)
void process_image(const void *src, int len, camera_image_t *dest)
static pixel_format pixel_format_from_string(const std::string &str)
void mjpeg2rgb(char *MJPEG, int len, char *RGB, int NumPixels)
unsigned int pixelformat_
void set_v4l_parameter(const std::string ¶m, int value)
static io_method io_method_from_string(const std::string &str)
void init_userp(unsigned int buffer_size)
AVDictionary * avoptions_
void init_device(int image_width, int image_height, int framerate)
AVCodecContext * avcodec_context_
void init_read(unsigned int buffer_size)
void start(const std::string &dev, io_method io, pixel_format pf, int image_width, int image_height, int framerate)