Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

V4L2 C++ wrapper

License

NotificationsYou must be signed in to change notification settings

mpromonet/libv4l2cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

It is a C++ wrapper for V4L2

Dependencies

  • liblog4cpp5-dev (optional)

V4L2 Capture

  • create a V4L2 Capture interface using MMAP interface:

      V4L2DeviceParameters param("/dev/video0", V4L2_PIX_FMT_*, width, height, fps, IOTYPE_MMAP);  V4l2Capture* videoCapture = V4l2Capture::create(param);
  • data are available :

      timeval timeout;   bool isReadable = videoCapture->isReadable(&timeout);
  • read data :

      size_t nb = videoCapture->read(buffer, bufferSize);

V4L2 Output

  • To create a V4L2 Output interface using MMAP interface:

      V4L2DeviceParameters param("/dev/video0", V4L2_PIX_FMT_*, width, height, fps, IOTYPE_MMAP);  V4l2Output* videoOutput = V4l2Output::create(param);
  • data could be written :

      timeval timeout;   bool isWritable = videoOutput->isWritable(&timeout);
  • write data :

      size_t nb = videoOutput->write(buffer, bufferSize);

About

V4L2 C++ wrapper

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors7


[8]ページ先頭

©2009-2025 Movatter.jp