Skip to content

mi-yang/v4l2-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

v4l2-wrapper

a simple c++ wrapper of v4l2

dependences:

pthread opencv-core opencv-highgui

usage:

provide two ways to get image frame

  • query

    V4l2Camera webcam("/dev/video0");
    webcam.openCameraDevice(640, 480, V4L2_PIX_FMT_MJPEG);
    grabAndRender(webcam, 60*5, fmt); //60*5 seconds
    webcam.closeCameraDevice();
  • callback

    V4l2Camera webcam("/dev/video0");
    webcam.openCameraDevice(640, 480, V4L2_PIX_FMT_MJPEG);
    webcam.startStreaming(callback, &webcam);
    sleep(60*5);
    webcam.stopStreaming();
    webcam.closeCameraDevice();

About

a simple c++ wrapper of v4l2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published