libvcvideo is targeted as a super-simple cross platform video device library. It's starting with the most basic features and building up, all while keeping a simple API and strong documentation for beginners.
Currently only select devices are supported and it is in pre-release condition. It only has compatibility with webcam devices that use the original V4L specifications and output RGB24 data. This is actually a very large set of devices, as that is the generic description for most spca5xx and gspca devices. This is limited because that is the only type of device I posses at this time, more will be added as I can find devices or the time to research them.
Additionally, libvcvideo has plugin based effects support and a small sample of effects are included with the install.
Though incomplete, if you have the right device it is super simple. Counting variable declaration you only need four lines of library code to get a frame from a camera, as the basic example shows below.
Brief Example
#include <iostream>
using std::cerr;
using std::endl;
#include <string>
using std::string;
#include <libvcvideo/videoDevice.h>
int main (int argc, char ** argv) {
vc::videoDevice device ("/dev/video0");
vc::vdFrame frame;
try {
device.init();
}
catch(string s) {
cerr << "Device initialization failed: " << s << endl;
exit(1);
}
try {
device.getFrame(frame);
}
catch(string s) {
cout << "Failed to get frame: " << s << endl;
exit(1);
}
}
That has error checking in it, but you could strip it down to nine lines...
Really Brief Example
#include <string>
using std::string;
#include <libvcvideo/videoDevice.h>
int main (int argc, char ** argv) {
vc::videoDevice device ("/dev/video0");
vc::vdFrame frame;
device.init();
device.getFrame(frame);
}
You can check out the full documentation here.
Subversion
ViewVC
Repository
1.0.1
Change Log
Source Package - MD5: fda2ebc95df6fe1c50d0413d745b3d40